Commit 7435e495 authored by pengguangpu's avatar pengguangpu

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

parent cec1724d
Page({ Page({
data: { data: {
goodsNum:0, goodsNum: 0,
payPrice:0.00, payPrice: 0.00,
totalPrice:0.00, totalPrice: 0.00,
couponPrice:0.00, couponPrice: 0.00,
qrPayShow:false, qrPayShow: false,
}, },
onLoad(options) { onLoad(options) {
var totalQuantity = options.totalQuantity var totalQuantity = options.totalQuantity
...@@ -27,16 +27,30 @@ Page({ ...@@ -27,16 +27,30 @@ Page({
}, },
facePay(){ facePay() {
}, },
qrPay(){ qrPay() {
//todo 这里增加唤起弹窗的逻辑 //todo 这里增加唤起弹窗的逻辑
this.setData({ 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