Commit d2b7b72c authored by gaodapeng's avatar gaodapeng

fix bugs

parent 3e1c9855
......@@ -55,7 +55,8 @@ export const ACTION_PRINT_LAST_ORDER = "ACTION_PRINT_LAST_ORDER";
const FLOW_IDLE = "idle";
const FLOW_COLLECTIONS = "collections";//收款
const FLOW_REFUND = "refund";//退款
const FLOW_DIRECT_PAYMENT = "direct_payment"
export {
FLOW_IDLE,FLOW_COLLECTIONS,FLOW_REFUND
FLOW_IDLE,FLOW_COLLECTIONS,FLOW_REFUND,FLOW_DIRECT_PAYMENT
}
......@@ -17,7 +17,7 @@ import { ACTION_REFUND } from '../../const/actioncmd'
import { ACTION_REFUND_SUCCESS } from '../../const/actioncmd'
import { ACTION_REFUND_FAILED } from '../../const/actioncmd'
import { ACTION_PRINT_LAST_ORDER } from '../../const/actioncmd'
import { FLOW_IDLE, FLOW_COLLECTIONS, FLOW_REFUND } from '../../const/actioncmd'
import { FLOW_IDLE, FLOW_COLLECTIONS, FLOW_REFUND, FLOW_DIRECT_PAYMENT } from '../../const/actioncmd'
Page({
......@@ -288,6 +288,10 @@ Page({
},
success: (res) => {
context.goPage('home');
context.setData({
flowType: FLOW_IDLE,
operateContext: {},//重新初始化
})
console.log("通知前屏回到首页 成功 ===》" + JSON.stringify(res));
},
fail: (res) => {
......@@ -324,7 +328,8 @@ Page({
/**首页相关 */
/**立即收款 */
onHomeCashierImmediatelyClicked() {
this.setData({ scene: 3 })
this.setData({ scene: 3, flowType: FLOW_DIRECT_PAYMENT })
},
/**
......@@ -720,7 +725,7 @@ Page({
//直接返回到扫码页面,并且通知前屏返回
if (this.data.flowType == FLOW_REFUND) {
this.operateResultClose();
} else {
} else if (this.data.flowType == FLOW_COLLECTIONS) {
this.goPage('landscan');
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
......@@ -742,6 +747,8 @@ Page({
});
}
})
} else if (this.data.flowType == FLOW_DIRECT_PAYMENT) {
this.goHome();
}
},
......@@ -785,7 +792,6 @@ Page({
},
fail: (fres) => {
console.log("兑换券通知前屏 失败 ===》 " + JSON.stringify(fres));
context.sendConvertCouponToFront(res)
}
})
},
......
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