From b8759611e6a58e3e1f0177a48a7275a63eb6c78f Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Sun, 7 Jul 2024 19:54:25 +0800 Subject: [PATCH] 0707 --- pages/order/detail/index2.js | 36 ++++++++++++++++++++++++++++++++++ pages/order/detail/index2.wxml | 4 ++++ pages/order/index.js | 2 ++ 3 files changed, 42 insertions(+) diff --git a/pages/order/detail/index2.js b/pages/order/detail/index2.js index dcfcefe..6c7e705 100644 --- a/pages/order/detail/index2.js +++ b/pages/order/detail/index2.js @@ -646,6 +646,42 @@ Page({ }) }, + //删除订单 + delAppCusorder(){ + let that = this + wx.showModal({ + title: '确定删除订单?', + content: '', + confirmColor: "#36afa2", + success(resW) { + if (resW.confirm) { + let params = {}; + params['id'] = that.data.id; + params['status'] = -1; + _.apiQuery.putAppCusorderStatus(params).then(res => { + //刷新列表页 + let pages = getCurrentPages(); + pages.forEach(item => { + if(item.route == 'pages/order/index'){ + item.onPullDownRefresh() + } + }) + wx.showToast({ + title: '删除成功', + icon: 'success', + duration: 2000 + }) + setTimeout(function () { + wx.navigateBack({ + delta: 1 + }) + }, 500) + }) + } + } + }) + }, + /** * 生成倒计时 */ diff --git a/pages/order/detail/index2.wxml b/pages/order/detail/index2.wxml index d124c71..0f30df6 100644 --- a/pages/order/detail/index2.wxml +++ b/pages/order/detail/index2.wxml @@ -276,6 +276,10 @@ + + + + diff --git a/pages/order/index.js b/pages/order/index.js index 708627c..47193e6 100644 --- a/pages/order/index.js +++ b/pages/order/index.js @@ -464,6 +464,8 @@ Page({ loading: false, flag: this.data.flag + 1 }) + + this.getAppCusorderTabs() this.getAppCusorderList() },