Commit 157de391 authored by jiangjiantao's avatar jiangjiantao

bugfixed

parent dfdf1a77
...@@ -66,3 +66,6 @@ export const ACTION_SYSTEM_SETTING = "ACTION_SYSTEM_SETTING"; ...@@ -66,3 +66,6 @@ export const ACTION_SYSTEM_SETTING = "ACTION_SYSTEM_SETTING";
//结算页面back到扫商品页面 //结算页面back到扫商品页面
export const ACTION_BALANCE_BACK_GOODS = "ACTION_BALANCE_BACK_GOODS"; export const ACTION_BALANCE_BACK_GOODS = "ACTION_BALANCE_BACK_GOODS";
//提货
export const ACTION_PICK_UP_GOODS = "ACTION_PICK_UP_GOODS";
\ No newline at end of file
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
ACTION_DIRECT_PAYMENT, ACTION_CONVERT_COUPON, ACTION_DIRECT_PAYMENT, ACTION_CONVERT_COUPON,
ACTION_GO_HOME, ACTION_REFUND, ACTION_REFUND_FAILED, ACTION_GO_HOME, ACTION_REFUND, ACTION_REFUND_FAILED,
ACTION_REFUND_SUCCESS, ACTION_PRINT_LAST_ORDER, ACTION_REFUND_SUCCESS, ACTION_PRINT_LAST_ORDER,
ACTION_SYSTEM_SETTING, ACTION_SYSTEM_SETTING,ACTION_PICK_UP_GOODS
} from '../../const/actioncmd' } from '../../const/actioncmd'
...@@ -17,7 +17,7 @@ Page({ ...@@ -17,7 +17,7 @@ Page({
data: { data: {
//显示弹窗,>1为显示,2loading 3 result success 4 result failed //显示弹窗,>1为显示,2loading 3 result success 4 result failed
scanDialogDisplay: 0, scanDialogDisplay: 0,
dialogShowType: "",//弹窗类型:如refund coupon dialogShowType: "",//弹窗类型:如refund coupon pickgoods
dialogRemindText: "请扫描兑换码", dialogRemindText: "请扫描兑换码",
dialogLoadingText: "识别中", dialogLoadingText: "识别中",
dialogResultSuccessRemind: "兑换码已识别", dialogResultSuccessRemind: "兑换码已识别",
...@@ -173,6 +173,28 @@ Page({ ...@@ -173,6 +173,28 @@ Page({
context.setData({ context.setData({
toSetting: true, toSetting: true,
}) })
}else if(res.action == ACTION_PICK_UP_GOODS){
//提货
context.setData({
scanDialogDisplay: res.data,
dialogShowType: "pickgoods",//弹窗类型:如refund coupon pickgoods
dialogRemindText: "请扫描提货码",
dialogLoadingText: "识别中",
dialogResultSuccessRemind: "提货码已识别",
dialogResultSuccessText: "恭喜您!提货成功",
dialogResultFailureRemind: "提货失败",
dialogResultFailureText: "提货失败!无效的提货码!",
});
if (res.data != 0) {
var speechContent = "请扫描提货码";
my.ix.speech({
text: speechContent,
speak: true,
success: (r) => {
}
});
}
} }
} }
}); });
...@@ -309,6 +331,9 @@ Page({ ...@@ -309,6 +331,9 @@ Page({
} else if (this.data.dialogShowType == "coupon") { } else if (this.data.dialogShowType == "coupon") {
// 兑换券 // 兑换券
this.verifyCoupon(r); this.verifyCoupon(r);
}else if (this.data.dialogShowType == "pickgoods") {
// 提货
this.pickGoods(r);
} }
} }
}, },
...@@ -469,10 +494,14 @@ Page({ ...@@ -469,10 +494,14 @@ Page({
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`); console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
} }
}); });
} },
//提货商品
pickGoods(code) {
this.setData({ scanDialogDisplay: 2 })
setTimeout(() => {
}, 700);
},
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment