Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp
commit
b69c7d5a05
|
@ -121,7 +121,15 @@ export default {
|
|||
* 回退到上一级
|
||||
*/
|
||||
onClickLeft() {
|
||||
uni.navigateBack();
|
||||
const paths = getCurrentPages();
|
||||
console.log(paths)
|
||||
if(paths.length > 1){
|
||||
uni.navigateBack();
|
||||
}else{
|
||||
uni.switchTab({
|
||||
url:"/pages/tabbar/home/index"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -532,7 +532,7 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "限时抢购",
|
||||
"navigationStyle": "custom", // 隐藏系统导航栏
|
||||
"navigationBarTextStyle": "white" ,
|
||||
"navigationBarTextStyle": "black" ,
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"homeButton":true
|
||||
|
@ -546,7 +546,7 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "拼团活动",
|
||||
"navigationStyle": "custom", // 隐藏系统导航栏
|
||||
"navigationBarTextStyle": "white" ,
|
||||
"navigationBarTextStyle": "black" ,
|
||||
"app-plus": {
|
||||
// 将回弹属性关掉
|
||||
"bounce": "none"
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<text>立即</text><br />
|
||||
<text>使用</text>
|
||||
</view>
|
||||
<view class="used" v-else @click="clickWay(item)">
|
||||
<view class="used" v-if="current == 0 && routerVal.selectedCoupon.includes(item.id)" @click="clickWay(item)">
|
||||
<text>取消</text><br />
|
||||
<text>使用</text>
|
||||
</view>
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
<template>
|
||||
<view class="myTracks">
|
||||
<u-navbar title="我的足迹">
|
||||
|
||||
<div slot="right">
|
||||
<div class="light-color edit" @click="isEdit = !isEdit">{{ !isEdit ? '编辑' : '完成'}}</div>
|
||||
</div>
|
||||
</u-navbar>
|
||||
<u-notice-bar mode="vertical" :list="['右划删除浏览记录']"></u-notice-bar>
|
||||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||
<div v-else>
|
||||
<view v-if="item" v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navigateToStore(item)" v-if="item.storeName">{{item.storeName}}</view>
|
||||
<view v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navigateToStore(item)">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
|
||||
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
|
||||
@click="delTracks" @open="open" :options="options">
|
||||
<!-- 已失效商品 -->
|
||||
<div class="myTracks-item lose-goods" v-if="!item.storeName && !item.goodsName && !item.price">
|
||||
已失效商品
|
||||
</div>
|
||||
<!-- 正常有效商品 -->
|
||||
<view v-else class="myTracks-item">
|
||||
|
||||
<view class="myTracks-item">
|
||||
<u-checkbox-group v-if="isEdit" class="store-line-check">
|
||||
<u-checkbox shape="circle" :active-color="lightColor" v-model="item.checked"
|
||||
@change="checkboxChangeDP(item)"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="myTracks-item-img" @click.stop="navigateToDetail(item)">
|
||||
<image :src="item.thumbnail"></image>
|
||||
</view>
|
||||
|
@ -36,7 +39,9 @@
|
|||
<view class="myTracks-divider"></view>
|
||||
|
||||
</view>
|
||||
|
||||
<div @click="handleClickDeleteSelected" v-if="isEdit" class="submit">
|
||||
删除所选
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</view>
|
||||
|
@ -51,7 +56,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
isEdit:false,
|
||||
whetherEmpty: false, //是否数据为空
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
|
@ -59,6 +64,7 @@
|
|||
order: "desc",
|
||||
sort: "updateTime",
|
||||
},
|
||||
lightColor:this.$lightColor,
|
||||
options: [{
|
||||
text: '删除',
|
||||
style: {
|
||||
|
@ -86,6 +92,21 @@
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
checkboxChangeDP(val){
|
||||
console.log(val)
|
||||
},
|
||||
// 删除所选的数据
|
||||
handleClickDeleteSelected(val){
|
||||
const ids = this.trackList.filter(item=>item.checked).map(item=>item.goodsId);
|
||||
if(!ids.length){
|
||||
uni.showToast({
|
||||
title:"请选择删除数据",
|
||||
icon:"none"
|
||||
})
|
||||
}else{
|
||||
this.delTracks(0,ids)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 导航到店铺
|
||||
*/
|
||||
|
@ -120,11 +141,12 @@
|
|||
});
|
||||
myTrackList(this.params).then((res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
uni.hideLoading();
|
||||
if (res.statusCode == 200) {
|
||||
res.data.result.records.length &&
|
||||
res.data.result.records.forEach((item) => {
|
||||
item.show = false;
|
||||
item.checked = false
|
||||
});
|
||||
|
||||
let data = res.data.result.records;
|
||||
|
@ -141,10 +163,11 @@
|
|||
/**
|
||||
* 删除足迹
|
||||
*/
|
||||
delTracks(index) {
|
||||
deleteHistoryListId(this.trackList[index].goodsId).then((res) => {
|
||||
delTracks(index,ids) {
|
||||
deleteHistoryListId(ids || this.trackList[index].goodsId).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.trackList = [];
|
||||
this.params.pageNumber = 1
|
||||
this.getList();
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
@ -160,9 +183,18 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lose-goods{
|
||||
color: $main-color;
|
||||
padding-left: 50rpx !important;
|
||||
.submit{
|
||||
position: fixed;
|
||||
bottom: 20rpx;
|
||||
left: 10%;
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
color: #fff;
|
||||
border-radius: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: $light-color;
|
||||
}
|
||||
.myTracks {
|
||||
width: 100%;
|
||||
|
@ -234,10 +266,39 @@
|
|||
padding: 10rpx 0 0 0;
|
||||
}
|
||||
|
||||
.myTracks-action {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 75rpx;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.myTracks-action-btn {
|
||||
width: 130rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.myTracks-divider {
|
||||
width: 100%;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.myTracks-action-check {
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
.edit{
|
||||
padding-right: 32rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -84,7 +84,7 @@ export default {
|
|||
}
|
||||
if (!this.feedBack.context) {
|
||||
uni.showToast({
|
||||
title: "请填写反馈类型",
|
||||
title: "请填写反馈信息",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<view class="opt-view">
|
||||
<view class="img-title" style="font-size: 30rpx">填写物流信息</view>
|
||||
<u-form-item label="返回方式" :label-width="150">
|
||||
<u-input type="text" input-align="right" value="快递至第三方卖家" />
|
||||
<div style="width: 100%; text-align: right;">快递至第三方卖家</div>
|
||||
</u-form-item>
|
||||
<u-form-item label="快递公司" :label-width="150">
|
||||
<div style="width: 100%; text-align: right;" @click="companySelectShow = true" >{{ form.courierCompany || '请选择快递公司' }}</div>
|
||||
|
|
|
@ -67,7 +67,7 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
@import "../product.scss";
|
||||
.recommend-item-name {
|
||||
height: 70rpx;
|
||||
height: 60rpx;
|
||||
color: #333;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
{{ skuItem.goodsSku.goodsName }}
|
||||
</p>
|
||||
<!-- 规格 -->
|
||||
<p class="sp-type">{{skuItem.goodsSku.simpleSpecs}}</p>
|
||||
<p class="sp-type" style="width:300rpx">{{skuItem.goodsSku.simpleSpecs}}</p>
|
||||
<p class="sp-type" v-if="skuItem.goodsSku.salesModel == 'WHOLESALE'">批发商品</p>
|
||||
<p class="sp-number">
|
||||
<view class="sp-price">
|
||||
|
|
|
@ -123,10 +123,25 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
handleNavigate(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
});
|
||||
},
|
||||
navigateTo(url) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
});
|
||||
const ignores = [
|
||||
'/pages/mine/set/setUp',
|
||||
'/pages/mine/set/editionIntro',
|
||||
'/pages/mine/set/feedBack'
|
||||
]
|
||||
if (!ignores.includes(url)) {
|
||||
if (this.$options.filters.tipsToLogin('normal')) {
|
||||
this.handleNavigate(url)
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.handleNavigate(url)
|
||||
}
|
||||
},
|
||||
|
||||
linkMsgDetail(){
|
||||
|
|
|
@ -376,7 +376,7 @@ export function talkIm (storeId, goodsId, id) {
|
|||
}
|
||||
}
|
||||
|
||||
export function tipsToLogin () {
|
||||
export function tipsToLogin (type) {
|
||||
if (!isLogin("auth")) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
|
@ -388,7 +388,10 @@ export function tipsToLogin () {
|
|||
if (res.confirm) {
|
||||
navigateToLogin();
|
||||
} else if (res.cancel) {
|
||||
uni.navigateBack();
|
||||
if(type !== 'normal'){
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue