Commit 7435e495 authored by pengguangpu's avatar pengguangpu

添加本地存储支付数据方法;

parent cec1724d
Page({
data: {
goodsNum:0,
payPrice:0.00,
totalPrice:0.00,
couponPrice:0.00,
qrPayShow:false,
goodsNum: 0,
payPrice: 0.00,
totalPrice: 0.00,
couponPrice: 0.00,
qrPayShow: false,
},
onLoad(options) {
var totalQuantity = options.totalQuantity
......@@ -16,7 +16,7 @@ Page({
goodsNum: totalQuantity,
})
}
//暂时没有优惠
if (totalPrice != null) {
this.setData({
......@@ -27,16 +27,30 @@ Page({
},
facePay(){
facePay() {
},
qrPay(){
qrPay() {
//todo 这里增加唤起弹窗的逻辑
this.setData({
qrPayShow:true
qrPayShow: true
});
},
/**
* 保存最近支付成功的相关信息,每次支付成功都需刷新
* @param paySuccessGoodsList 支付成功的商品列表信息
* @param paySuccessResponse 支付成功响应,即云中台返回响应中的data信息
*/
saveData(paySuccessGoodsList, paySuccessResponse) {
my.setStorageSync({
key: 'paySuccessGoodsList',
data: paySuccessGoodsList
});
my.setStorageSync({
key: 'paySuccessResponse',
data: paySuccessResponse
});
}
});
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