Commit b805ff8a authored by jiangjiantao's avatar jiangjiantao

Merge branch 'dev-1.0' of…

Merge branch 'dev-1.0' of https://gitlab.infra.miyatech.com/pengguangpu/doublescreen-front into dev-1.0
parents bfb4a2e0 7f51e390
...@@ -98,13 +98,6 @@ Page({ ...@@ -98,13 +98,6 @@ Page({
}, },
onReady() {
if (my.canIUse('hideBackHome')) {
my.hideBackHome();
}
},
onShow() { onShow() {
my.ix.onBuddyMessage({ my.ix.onBuddyMessage({
success: (res) => { success: (res) => {
...@@ -138,7 +131,7 @@ Page({ ...@@ -138,7 +131,7 @@ Page({
//获取order //获取order
var payAmount = payUtils.yuan2Fen(this.data.payPrice); var payAmount = payUtils.yuan2Fen(this.data.payPrice);
payUtils.getOrder(/*payAmount*/1, this.data.list, function (res) { payUtils.getOrder(payAmount, this.data.list, function (res) {
if (res != null) { if (res != null) {
console.log("callback调用,res=" + JSON.stringify(res)); console.log("callback调用,res=" + JSON.stringify(res));
...@@ -227,7 +220,7 @@ Page({ ...@@ -227,7 +220,7 @@ Page({
this.setData({ isPaying: true }); this.setData({ isPaying: true });
//使用barCode来当面付 //使用barCode来当面付
var payAmount = payUtils.yuan2Fen(this.data.payPrice); var payAmount = payUtils.yuan2Fen(this.data.payPrice);
payUtils.startPay(orderNo, payCode, /*payAmount*/1, this.data.list, function (res) { payUtils.startPay(orderNo, payCode, payAmount, this.data.list, function (res) {
my.hideLoading(); my.hideLoading();
console.log("支付回调 ===>" + JSON.stringify(res)); console.log("支付回调 ===>" + JSON.stringify(res));
this.setData({ isPaying: false }); this.setData({ isPaying: false });
...@@ -251,7 +244,7 @@ Page({ ...@@ -251,7 +244,7 @@ Page({
my.ix.offCashierEventReceive(); my.ix.offCashierEventReceive();
this.saveData(this.data.list, res.data); this.saveData(this.data.list, res.data);
my.redirectTo({ my.redirectTo({
url: '/pages/paysuccess/paysuccess', url: '/pages/paysuccess/paysuccess?totalGoodsNum=' + this.data.goodsNum,
}); });
//发送支付成功到后屏 //发送支付成功到后屏
......
...@@ -131,6 +131,15 @@ Page({ ...@@ -131,6 +131,15 @@ Page({
if (printEnabledLocal == null) { if (printEnabledLocal == null) {
printEnabledLocal = true; printEnabledLocal = true;
} }
//如果不打印小票,界面将有所变化
if (printEnabledLocal == false) {
this.setData({
isShowPrinting: false,
printerStatus: "小票打印未开启"
});
}
//开启后屏监听 //开启后屏监听
my.ix.onBuddyMessage({ my.ix.onBuddyMessage({
success: (res) => { success: (res) => {
......
...@@ -9,7 +9,7 @@ export default class scan { ...@@ -9,7 +9,7 @@ export default class scan {
if (!page._keyEventListener) { if (!page._keyEventListener) {
//摄像头 //摄像头
my.ix.onCodeScan((r) => { my.ix.onCodeScan((r) => {
if (r.success){ if (r.success) {
let cur = getCurrentPages().slice(-1)[0]; let cur = getCurrentPages().slice(-1)[0];
cur.onKeyPress.call(cur, code); cur.onKeyPress.call(cur, code);
} }
...@@ -27,7 +27,7 @@ export default class scan { ...@@ -27,7 +27,7 @@ export default class scan {
//兼容扫描枪 //兼容扫描枪
cur.onKeyPress.call(cur, code); cur.onKeyPress.call(cur, code);
isScaning = false isScaning = false
}, 700); }, 1000);
} else { } else {
//特殊处理 keycode需要减7 //特殊处理 keycode需要减7
if (r.keyCode >= 7 && r.keyCode <= 16) { if (r.keyCode >= 7 && r.keyCode <= 16) {
......
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