tianyi 1 day ago
parent
commit
265d629513
  1. 57
      package2/shop/merchantCenter.vue

57
package2/shop/merchantCenter.vue

@ -271,37 +271,36 @@
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
if (res.scanType == "QR_CODE") { // if (res.scanType == "QR_CODE") { //
console.log('二维码',res) let shopId = res.result.split('@@')[1]
// let shopId = base.decode(res.result.split(',')[1]) if (shopId == uni.getStorageSync('shopId')) {
// if (shopId == uni.getStorageSync('shopId').substring('10', '12')) { let productId = res.result.split('@@')[0]
// that.productId = base.decode(res.result.split(',')[0]) uni.showModal({
// that.toggle('bottom', base.decode(res.result.split(',')[0])); 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 {
// } 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)
// })
} }
}, },
fail: (res) => { fail: (res) => {
uni.showToast({ uni.showToast({

Loading…
Cancel
Save