From 3bf0be98cb6523a08e09013da1a09f042fe5f708 Mon Sep 17 00:00:00 2001
From: Yer <17633066053@163.com>
Date: Sat, 7 Oct 2023 16:12:04 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E6=88=91=E7=9A=84?=
=?UTF-8?q?=E8=B6=B3=E8=BF=B9=E6=96=B0=E5=A2=9E=E6=89=B9=E9=87=8F=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/mine/myTracks.vue | 95 ++++++++++++++++++++++++++++------
pages/tabbar/cart/cartList.vue | 2 +-
2 files changed, 79 insertions(+), 18 deletions(-)
diff --git a/pages/mine/myTracks.vue b/pages/mine/myTracks.vue
index a03bede..01edc63 100644
--- a/pages/mine/myTracks.vue
+++ b/pages/mine/myTracks.vue
@@ -1,22 +1,25 @@
-
+
+
{{ !isEdit ? '编辑' : '完成'}}
+
+
-
- {{item.storeName}}
+
+ {{item.storeName}}
-
-
- 已失效商品
-
-
-
+
+
+
+
+
@@ -36,7 +39,9 @@
-
+
+ 删除所选
+
@@ -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 @@
diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue
index 6d736cc..59bfaca 100644
--- a/pages/tabbar/cart/cartList.vue
+++ b/pages/tabbar/cart/cartList.vue
@@ -77,7 +77,7 @@
{{ skuItem.goodsSku.goodsName }}
- {{skuItem.goodsSku.simpleSpecs}}
+ {{skuItem.goodsSku.simpleSpecs}}
批发商品