From 5eab12358b25d0ec81b6b3166ab8f28830f82830 Mon Sep 17 00:00:00 2001 From: fanfan Date: Fri, 17 May 2024 14:05:12 +0800 Subject: [PATCH] =?UTF-8?q?bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/member/index.vue | 6 ++-- pages/order/index.vue | 63 +++++++++++++++++++++++++----------------- 2 files changed, 41 insertions(+), 28 deletions(-) diff --git a/pages/member/index.vue b/pages/member/index.vue index 98570e1..7926834 100644 --- a/pages/member/index.vue +++ b/pages/member/index.vue @@ -197,7 +197,8 @@ .then((result) => { console.log(22,result) uni.showToast({ - title: "支付成功" + title: "支付成功", + icon: 'success' }) this.isClick = true; @@ -209,7 +210,8 @@ }) .catch(err => { uni.showToast({ - title: "支付失败" + title: "支付失败", + icon:'none' }) this.isClick = true; }) diff --git a/pages/order/index.vue b/pages/order/index.vue index 67f12db..fa4885a 100644 --- a/pages/order/index.vue +++ b/pages/order/index.vue @@ -54,7 +54,8 @@ - 申请开票 @@ -262,7 +263,7 @@ }, methods: { handleOk() { - + }, meKone() { this.cdDia = false @@ -273,9 +274,14 @@ app.getOrderList(1) }, changeMenu(index) { - this.list.forEach((item, ind) => { - item.menushow = !item.menushow; - }); + let that = this; + this.list.map((item, inx) => { + if (index == inx) { + item.menushow = item.menushow == true ? false : true + } else { + item.menushow = false + } + }) }, toggleImage() { this.isToggle = !this.isToggle @@ -307,7 +313,7 @@ }); if (status == 200) { uni.hideLoading(); - this.list = this.arrayUnique(this.list.concat(data.list.data),'order_id') + this.list = this.arrayUnique(this.list.concat(data.list.data), 'order_id') this.total = data.list.total } }, @@ -334,7 +340,7 @@ } }, - onCopyLink(str){ + onCopyLink(str) { uni.setClipboardData({ data: str, // 这里是个坑接受字符串类型 value转化为字符串 success: function() { @@ -360,9 +366,11 @@ // 显示成功信息 app.$toast(result.message) // 刷新订单列表 - app.list = [] - app.pageNum = 1 - app.getOrderList() + setTimeout(() => { + app.list = [] + app.pageNum = 1 + app.getOrderList() + }, 1500) }) } } @@ -382,10 +390,11 @@ .then(result => { // 显示成功信息 app.$toast(result.message) - // 刷新订单列表 - app.list = [] - app.pageNum = 1 - app.getOrderList() + setTimeout(() => { + app.list = [] + app.pageNum = 1 + app.getOrderList() + }, 1500) }) } } @@ -411,9 +420,11 @@ // 显示成功信息 app.$success(result.message) // 刷新订单列表 - app.list = [] - app.pageNum = 1 - app.getOrderList() + setTimeout(() => { + app.list = [] + app.pageNum = 1 + app.getOrderList() + }, 1500) }) } } @@ -461,15 +472,15 @@ return new RegExp(mix.split('').join('\\w*')).test(str) }, //数组对象去重 - arrayUnique(arr, name) { -     var hash = {}; -     return arr.reduce(function (item, next) { -         hash[next[name]] -             ? "" -             : (hash[next[name]] = true && item.push(next)); -         return item; -     }, []); - }, + arrayUnique(arr, name) { + var hash = {}; + return arr.reduce(function(item, next) { + hash[next[name]] ? + "" : + (hash[next[name]] = true && item.push(next)); + return item; + }, []); + }, // 点击去物流 onLogistics(orderId, item) { if (item.delivery) {