Commit 0c9d686c authored by jiangjiantao's avatar jiangjiantao

支付bugfix&支付背景&数据存储

parent c2b59d6f
......@@ -6,6 +6,8 @@ page{
height: 100%;
align-items: center;
box-sizing: border-box;
background: url(/images/bg_balance.png) no-repeat fixed top;
background-size:100% 504rpx;
}
.goodsRemind{
......
......@@ -32,6 +32,23 @@ Page({
})
}
//商品数据
let context = this;
my.getStorage({
key: 'goods',
success: function (res) {
console.log("商品信息 ===》 " + JSON.stringify(res));
context.setData({
list:res.data
})
},
fail: function (res) {
console.log("商品信息 ===》 " + JSON.stringify(res));
}
});
},
......@@ -89,6 +106,7 @@ Page({
return;
}
if(res.resultCode == 1){
//成功
console.log("支付回调成功,跳转 " );
// if(data.isCashierClosed == true){
......@@ -195,7 +213,7 @@ Page({
console.log("支付回调成功,跳转 " );
// if(data.isCashierClosed == true){
my.ix.offCashierEventReceive();
saveData(this.data.list, res);
this.saveData(this.data.list, res);
my.redirectTo({
url: '/pages/paysuccess/paysuccess?orderPrice=' + this.data.totalPrice + "&couponPrice=" + this.data.couponPrice + "&payPrice=" + this.data.payPrice+"&totalCount="+this.data.totalCount,
});
......@@ -205,7 +223,7 @@ Page({
my.ix.offCashierEventReceive();
my.showToast({
type: 'fail',
content: res.data,
content: res.message,
duration: 2000
});
}
......
......@@ -36,11 +36,6 @@ Page({
var scanGoodRequest = api.createCommonRequest();
scanGoodRequest.goodsId = barcode;
//管理员需要额外传一个storeid 但是目前这个设备是没有
// let storeId = getApp().globalData.localAccountInfo.storeId
// let actType = getApp().globalData.localAccountInfo.actType
// if (storeId != null && actType == 1) {
// scanGoodRequest = storeId
// }
console.log("扫商品的请求 ==>" + JSON.stringify(scanGoodRequest));
my.request({
url: getApp().globalData.BASE_URL + API_SCAN,
......@@ -144,9 +139,15 @@ Page({
//跳转结算页面
goBalance() {
my.navigateTo({
url: "/pages/balance/balance?totalPrice=0.01" +"&totalQuantity="+this.data.totalQuantity+"&totalDisc="+this.data.totalDisc,
// url: "/pages/balance/balance?totalPrice=" + this.data.totalPrice+"&totalQuantity="+this.data.totalQuantity+"&totalDisc="+this.data.totalDisc,
url: "/pages/balance/balance?totalPrice=" + this.data.totalPrice + "&totalQuantity=" + this.data.totalQuantity + "&totalDisc=" + this.data.totalDisc,
});
// 存商品信息数据
my.setStorage({
key: 'goods',
data: this.data.goods,
success: function () {
console.log("商品数据写入成功");
}
});
},
......
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