Commit 297f4bf5 authored by jiangjiantao's avatar jiangjiantao

优惠券bugfix

parent e3d9e953
...@@ -70,7 +70,7 @@ Page({ ...@@ -70,7 +70,7 @@ Page({
my.reLaunch({ my.reLaunch({
url: "/pages/home/home", url: "/pages/home/home",
}); });
}else if (res.action == ACTION_CONVERT_COUPON) { }else if (res.action == ACTION_USE_COUPON) {
//优惠券 //优惠券
context.setData({ context.setData({
scanDialogDisplay: res.data.discCouponState, scanDialogDisplay: res.data.discCouponState,
......
...@@ -15,6 +15,10 @@ export default class scan { ...@@ -15,6 +15,10 @@ export default class scan {
isScaning = true isScaning = true
code = (r.keyCode - 7) + '' code = (r.keyCode - 7) + ''
setTimeout(() => { setTimeout(() => {
//兼容扫描枪
if(code.endsWith("5913")){
code = code.substring(0,code.length - 4)
}
cur.onKeyPress.call(cur, code); cur.onKeyPress.call(cur, code);
isScaning = false isScaning = false
}, 700); }, 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