From 265d629513e2ce936afb1ac7cec5d3c2f74edb03 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Thu, 16 Apr 2026 10:29:44 +0800 Subject: [PATCH] 11 --- package2/shop/merchantCenter.vue | 57 ++++++++++++++++---------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/package2/shop/merchantCenter.vue b/package2/shop/merchantCenter.vue index 07e6cdd..eea22e1 100644 --- a/package2/shop/merchantCenter.vue +++ b/package2/shop/merchantCenter.vue @@ -271,37 +271,36 @@ uni.scanCode({ success: (res) => { if (res.scanType == "QR_CODE") { //二维码 - console.log('二维码',res) - // let shopId = base.decode(res.result.split(',')[1]) - // if (shopId == uni.getStorageSync('shopId').substring('10', '12')) { - // that.productId = base.decode(res.result.split(',')[0]) - // that.toggle('bottom', base.decode(res.result.split(',')[0])); + let shopId = res.result.split('@@')[1] + if (shopId == uni.getStorageSync('shopId')) { + let productId = res.result.split('@@')[0] + uni.showModal({ + title: '提示', + content: '确定要核销该订单吗?', + success: function (res1) { + if (res1.confirm) { + that.tui.request("/mall/order/complete", "post", { + orderId: productId + }, false, true).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: '核销成功', + icon: 'none' + }) + } else { + that.tui.toast(res.message) + } + uni.hideLoading() + }).catch((res) => {}) + } + } + }); - // } else { - // that.tui.toast('您的店铺中暂无该商品!') - // } - } else { - console.log('条形码',res) - // that.tui.request("/app/product/getByBarcode", "POST", { - // barcode: res.result - // }, false, true).then((res1) => { - // if (res1.code == 200) { - // that.productId = res1.result[0].id - // if (res1.result == '') { - // that.tui.toast('您的店铺中暂无该商品!') - // } else { - // that.toggle('bottom', res1.result[0].id); - - // } - - // } else { - // that.tui.toast(res.message) - // } - // }).catch((res) => { - // that.tui.toast(res) - // }) + + } else { + that.tui.toast('未查询到此订单信息,请核实!') + } } - }, fail: (res) => { uni.showToast({