Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp

master
misworga831 2023-10-16 17:09:23 +08:00
commit b69c7d5a05
10 changed files with 117 additions and 30 deletions

View File

@ -121,7 +121,15 @@ export default {
* 回退到上一级 * 回退到上一级
*/ */
onClickLeft() { onClickLeft() {
const paths = getCurrentPages();
console.log(paths)
if(paths.length > 1){
uni.navigateBack(); uni.navigateBack();
}else{
uni.switchTab({
url:"/pages/tabbar/home/index"
})
}
}, },
/** /**

View File

@ -532,7 +532,7 @@
"style": { "style": {
"navigationBarTitleText": "限时抢购", "navigationBarTitleText": "限时抢购",
"navigationStyle": "custom", // "navigationStyle": "custom", //
"navigationBarTextStyle": "white" , "navigationBarTextStyle": "black" ,
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"homeButton":true "homeButton":true
@ -546,7 +546,7 @@
"style": { "style": {
"navigationBarTitleText": "拼团活动", "navigationBarTitleText": "拼团活动",
"navigationStyle": "custom", // "navigationStyle": "custom", //
"navigationBarTextStyle": "white" , "navigationBarTextStyle": "black" ,
"app-plus": { "app-plus": {
// //
"bounce": "none" "bounce": "none"

View File

@ -53,7 +53,7 @@
<text>立即</text><br /> <text>立即</text><br />
<text>使用</text> <text>使用</text>
</view> </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><br />
<text>使用</text> <text>使用</text>
</view> </view>

View File

@ -1,22 +1,25 @@
<template> <template>
<view class="myTracks"> <view class="myTracks">
<u-navbar title="我的足迹"> <u-navbar title="我的足迹">
<div slot="right">
<div class="light-color edit" @click="isEdit = !isEdit">{{ !isEdit ? '编辑' : '完成'}}</div>
</div>
</u-navbar> </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> <u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
<div v-else> <div v-else>
<view v-if="item" v-for="(item, index) in trackList" :key="index"> <view v-for="(item, index) in trackList" :key="index">
<view class="myTracks-title" @click="navigateToStore(item)" v-if="item.storeName">{{item.storeName}}</view> <view class="myTracks-title" @click="navigateToStore(item)">{{item.storeName}}</view>
<view class="myTracks-items"> <view class="myTracks-items">
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id" <u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
@click="delTracks" @open="open" :options="options"> @click="delTracks" @open="open" :options="options">
<!-- 已失效商品 -->
<div class="myTracks-item lose-goods" v-if="!item.storeName && !item.goodsName && !item.price"> <view class="myTracks-item">
已失效商品 <u-checkbox-group v-if="isEdit" class="store-line-check">
</div> <u-checkbox shape="circle" :active-color="lightColor" v-model="item.checked"
<!-- 正常有效商品 --> @change="checkboxChangeDP(item)"></u-checkbox>
<view v-else class="myTracks-item"> </u-checkbox-group>
<view class="myTracks-item-img" @click.stop="navigateToDetail(item)"> <view class="myTracks-item-img" @click.stop="navigateToDetail(item)">
<image :src="item.thumbnail"></image> <image :src="item.thumbnail"></image>
</view> </view>
@ -36,7 +39,9 @@
<view class="myTracks-divider"></view> <view class="myTracks-divider"></view>
</view> </view>
<div @click="handleClickDeleteSelected" v-if="isEdit" class="submit">
删除所选
</div>
</div> </div>
</view> </view>
@ -51,7 +56,7 @@
export default { export default {
data() { data() {
return { return {
isEdit:false,
whetherEmpty: false, // whetherEmpty: false, //
params: { params: {
pageNumber: 1, pageNumber: 1,
@ -59,6 +64,7 @@
order: "desc", order: "desc",
sort: "updateTime", sort: "updateTime",
}, },
lightColor:this.$lightColor,
options: [{ options: [{
text: '删除', text: '删除',
style: { style: {
@ -86,6 +92,21 @@
this.getList(); this.getList();
}, },
methods: { 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) => { myTrackList(this.params).then((res) => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if (this.$store.state.isShowToast){ uni.hideLoading() }; uni.hideLoading();
if (res.statusCode == 200) { if (res.statusCode == 200) {
res.data.result.records.length && res.data.result.records.length &&
res.data.result.records.forEach((item) => { res.data.result.records.forEach((item) => {
item.show = false; item.show = false;
item.checked = false
}); });
let data = res.data.result.records; let data = res.data.result.records;
@ -141,10 +163,11 @@
/** /**
* 删除足迹 * 删除足迹
*/ */
delTracks(index) { delTracks(index,ids) {
deleteHistoryListId(this.trackList[index].goodsId).then((res) => { deleteHistoryListId(ids || this.trackList[index].goodsId).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.trackList = []; this.trackList = [];
this.params.pageNumber = 1
this.getList(); this.getList();
} else { } else {
uni.showToast({ uni.showToast({
@ -160,9 +183,18 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.lose-goods{ .submit{
color: $main-color; position: fixed;
padding-left: 50rpx !important; 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 { .myTracks {
width: 100%; width: 100%;
@ -234,10 +266,39 @@
padding: 10rpx 0 0 0; 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 { .myTracks-divider {
width: 100%; width: 100%;
height: 20rpx; height: 20rpx;
} }
.myTracks-action-check {
align-items: center;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.edit{
padding-right: 32rpx;
}
</style> </style>

View File

@ -84,7 +84,7 @@ export default {
} }
if (!this.feedBack.context) { if (!this.feedBack.context) {
uni.showToast({ uni.showToast({
title: "请填写反馈类型", title: "请填写反馈信息",
duration: 2000, duration: 2000,
icon: "none", icon: "none",
}); });

View File

@ -30,7 +30,7 @@
<view class="opt-view"> <view class="opt-view">
<view class="img-title" style="font-size: 30rpx">填写物流信息</view> <view class="img-title" style="font-size: 30rpx">填写物流信息</view>
<u-form-item label="返回方式" :label-width="150"> <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>
<u-form-item label="快递公司" :label-width="150"> <u-form-item label="快递公司" :label-width="150">
<div style="width: 100%; text-align: right;" @click="companySelectShow = true" >{{ form.courierCompany || '请选择快递公司' }}</div> <div style="width: 100%; text-align: right;" @click="companySelectShow = true" >{{ form.courierCompany || '请选择快递公司' }}</div>

View File

@ -67,7 +67,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "../product.scss"; @import "../product.scss";
.recommend-item-name { .recommend-item-name {
height: 70rpx; height: 60rpx;
color: #333; color: #333;
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;

View File

@ -77,7 +77,7 @@
{{ skuItem.goodsSku.goodsName }} {{ skuItem.goodsSku.goodsName }}
</p> </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-type" v-if="skuItem.goodsSku.salesModel == 'WHOLESALE'"></p>
<p class="sp-number"> <p class="sp-number">
<view class="sp-price"> <view class="sp-price">

View File

@ -123,11 +123,26 @@ export default {
}, },
methods: { methods: {
navigateTo(url) { handleNavigate(url) {
uni.navigateTo({ uni.navigateTo({
url, url,
}); });
}, },
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(){ linkMsgDetail(){
uni.navigateTo({ uni.navigateTo({

View File

@ -376,7 +376,7 @@ export function talkIm (storeId, goodsId, id) {
} }
} }
export function tipsToLogin () { export function tipsToLogin (type) {
if (!isLogin("auth")) { if (!isLogin("auth")) {
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
@ -388,8 +388,11 @@ export function tipsToLogin () {
if (res.confirm) { if (res.confirm) {
navigateToLogin(); navigateToLogin();
} else if (res.cancel) { } else if (res.cancel) {
if(type !== 'normal'){
uni.navigateBack(); uni.navigateBack();
} }
}
}, },
}); });
return false; return false;