Commit f7704876 authored by jiangjiantao's avatar jiangjiantao

toast替换

parent cf2a3e20
......@@ -769,13 +769,7 @@ Page({
},
fail: (res) => {
console.log("发送收款事件到前屏小程序 失败 ===》 " + JSON.stringify(res));
my.showToast({
type: 'fail',
content: '操作失败',
duration: 3000,
success: () => {
},
});
context.showToast("操作失败");
},
});
},
......@@ -819,6 +813,7 @@ Page({
//把手输条码发生到前屏
sendGoodsInfoToFront(barcode) {
let context = this;
my.showLoading({});
var commonRequest = {
action: ACTION_REQUEST_GOOD_INFO,
......@@ -833,13 +828,7 @@ Page({
fail: (res) => {
console.log("发送商品条码到前屏小程序 失败 ===》 " + JSON.stringify(res));
my.hideLoading();
my.showToast({
type: 'fail',
content: '操作失败',
duration: 3000,
success: () => {
},
});
context.showToast("操作失败");
}
})
},
......@@ -973,13 +962,7 @@ Page({
goPay(e) {
//购物车不能为空
if (this.data.goods.length == 0) {
my.showToast({
type: 'fail',
content: '等待收银员录入商品',
duration: 3000,
success: () => {
},
});
this.showToast("等待收银员录入商品",3000)
return
}
......@@ -998,13 +981,7 @@ Page({
},
fail: (res) => {
console.log("通知前屏跳转到结算页面 失败 ===》 " + JSON.stringify(res));
my.showToast({
type: 'fail',
content: '结算失败',
duration: 3000,
success: () => {
},
});
context.showToast('结算失败');
}
});
......@@ -1022,6 +999,7 @@ Page({
this.operateResultClose();
} else if (this.data.flowType == FLOW_COLLECTIONS) {
this.goPage('landscan');
let context = this;
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
data: {
......@@ -1033,13 +1011,7 @@ Page({
},
fail: (res) => {
console.log("通知前屏跳转到结算页面 失败 ===》 " + JSON.stringify(res));
my.showToast({
type: 'fail',
content: '结算失败',
duration: 3000,
success: () => {
},
});
context.showToast('结算失败');
}
})
} else if (this.data.flowType == FLOW_DIRECT_PAYMENT) {
......@@ -1182,6 +1154,7 @@ Page({
var miyapay = require("/utils/miyapay4.js");
var refundAmount = miyapay.yuan2Fen(amount);
console.log("amount" + refundAmount);
let context = this;
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
data: {
......@@ -1193,13 +1166,7 @@ Page({
console.log("发送退款金额到前屏小程序成功 ===》" + JSON.stringify(res));
},
fail: (res) => {
my.showToast({
type: 'fail',
content: '发送退款金额到前屏失败',
duration: 3000,
success: () => {
},
});
context.showToast("操作失败");
}
})
},
......@@ -1249,6 +1216,7 @@ Page({
this.setData({
flowType: FLOW_IDLE,
})
let context = this;
my.ix.sendBuddyMessage({
target: getApp().globalData.frontScreenAppId,
data: {
......@@ -1260,13 +1228,7 @@ Page({
console.log("发送退款金额到前屏小程序成功 ===》" + JSON.stringify(res));
},
fail: (res) => {
my.showToast({
type: 'fail',
content: '发送关闭前屏操作结果页失败',
duration: 3000,
success: () => {
},
});
context.showToast("操作失败");
}
})
},
......
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