代码
// 调起扫码
scanCode(index) {
uni.scanCode({
success: (res) => {
// console.log('条码内容:' + res.result);
uni.showModal({
title: "提示",
content: '确定核销这笔订单吗?',
success: (r) => {
if (r.confirm) {
// 扫码核销接口
this.$common.request('post', '/user/deliverGoods', {
order_id: this.list[index].id,
type: 2,
pick_up_code: res.result
}).then(res => {
if (res.code == 1) {
this.$common.success(res.msg)
this.getList()
}
})
}
}
})
}
});
}