Commit 2b719c05 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 2488a09a ed48e552
......@@ -79,3 +79,6 @@ export const ACTION_VERIFY_SUCCESS = "ACTION_VERIFY_SUCCESS";
//核验失败
export const ACTION_VERIFY_FAILED = "ACTION_VERIFY_FAILED";
//退出事件
export const ACTION_QUIT = "ACTION_QUIT";
\ No newline at end of file
......@@ -10,7 +10,8 @@ import {
ACTION_GO_HOME, ACTION_REFUND, ACTION_REFUND_FAILED,
ACTION_REFUND_SUCCESS, ACTION_PRINT_LAST_ORDER,
ACTION_SYSTEM_SETTING, ACTION_VERIFY, ACTION_VERIFY_SUCCESS,
ACTION_VERIFY_FAILED,ACTION_DAY_CHECK,ACTION_PICK_UP_GOODS
ACTION_VERIFY_FAILED, ACTION_DAY_CHECK, ACTION_PICK_UP_GOODS,
ACTION_QUIT,
} from '../../const/actioncmd'
......@@ -36,14 +37,14 @@ Page({
onLoad() {
let pickgoodsTemp = []
for(var i = 0;i < 3;i++){
for (var i = 0; i < 3; i++) {
var good = {};
good.name = "SK-II R.N.A.超肌能紧致弹力精华"
good.price = "1098"
good.quantity = 1
pickgoodsTemp.push(good)
}
this.setData({pickGoods:pickgoodsTemp})
this.setData({ pickGoods: pickgoodsTemp })
},
......@@ -184,11 +185,17 @@ Page({
console.log("启动系统设置");
my.ix.startApp({
appName: 'settings',
success: (res) => {
console.log("启动系统设置成功 success==>" + JSON.stringify(res));
}, fail: (res) => {
console.log("启动系统设置失败 failed==>" + JSON.stringify(res));
}
});
context.setData({
toSetting: true,
})
}else if(res.action == ACTION_PICK_UP_GOODS){
} else if (res.action == ACTION_PICK_UP_GOODS) {
//提货
context.setData({
scanDialogDisplay: res.data,
......@@ -211,10 +218,10 @@ Page({
}
//隐藏提货页面
if(res.data == 0){
if (res.data == 0) {
context.setData({
pickGoodsState:0,
pickGoods:[]
pickGoodsState: 0,
pickGoods: []
})
}
} else if (res.action == ACTION_DAY_CHECK) {
......@@ -239,6 +246,17 @@ Page({
speak: true,
success: (r) => { }
});
} else if (res.action == ACTION_QUIT) {
console.log("退出事件")
my.removeStorageSync({
key: 'localAccountInfo',
});
my.removeStorageSync({
key: 'localLoginInfo',
})
my.reLaunch({
url: "/pages/login/login",
});
}
}
});
......@@ -278,7 +296,7 @@ Page({
//打印日期
printer.printNowDate(),
//门店号
printer.printText("门店号:"+getApp().globalData.localAccountInfo.storeName),
printer.printText("门店号:" + getApp().globalData.localAccountInfo.storeName),
//收款总额
printer.printText('收款总额:10.00元'),
printer.feedPaper(),
......@@ -419,7 +437,7 @@ Page({
} else if (this.data.dialogShowType == "coupon") {
// 兑换券
this.verifyCoupon(r);
}else if (this.data.dialogShowType == "pickgoods") {
} else if (this.data.dialogShowType == "pickgoods") {
// 提货
this.pickGoods(r);
} else if (this.data.dialogShowType == "verify") {
......@@ -627,7 +645,7 @@ Page({
setTimeout(() => {
//模拟提货数据
let pickgoodsTemp = []
for(var i = 0;i < 3;i++){
for (var i = 0; i < 3; i++) {
var good = {};
good.name = "SK-II R.N.A.超肌能紧致弹力精华"
good.price = "1098"
......@@ -636,7 +654,7 @@ Page({
}
let pickGoodsReq = {}
pickGoodsReq.pickGoodsState=3;
pickGoodsReq.pickGoodsState = 3;
pickGoodsReq.pickGoods = pickgoodsTemp;
my.ix.sendBuddyMessage({
target: getApp().globalData.backScreenAppId,
......@@ -645,7 +663,7 @@ Page({
data: pickGoodsReq
},
success: (sres) => {
context.setData({pickGoods:pickgoodsTemp,pickGoodsState:3,scanDialogDisplay:0})
context.setData({ pickGoods: pickgoodsTemp, pickGoodsState: 3, scanDialogDisplay: 0 })
},
fail: (fres) => {
console.info(`sendBuddyMessage failed: ${JSON.stringify(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