|
|
@ -7,7 +7,7 @@ Page({ |
|
|
|
pays: [], |
|
|
|
itemData: {}, |
|
|
|
userId: 0, |
|
|
|
paytype: 'wxPay', //支付方式
|
|
|
|
paytype: 'bank_pay', //支付方式
|
|
|
|
cartId: 0, |
|
|
|
addrId: 0, //收货地址//测试--
|
|
|
|
btnDisabled: false, |
|
|
@ -71,7 +71,6 @@ Page({ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
onLoad: function (options) { |
|
|
|
// console.log(options)
|
|
|
|
var that = this; |
|
|
@ -91,6 +90,19 @@ Page({ |
|
|
|
wallet: wallet, // 钱包状态
|
|
|
|
}); |
|
|
|
this.Settlement(options); |
|
|
|
this.getWXTemplate(); |
|
|
|
}, |
|
|
|
getWXTemplate() { |
|
|
|
WXAPI.getWXTemplate({ |
|
|
|
storeId: 239, |
|
|
|
storeType: 1, |
|
|
|
type: 2, |
|
|
|
}).then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|
var data = res.data |
|
|
|
wx.setStorageSync('logmsgId', [data.template_id]) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
//页面加载完成函数
|
|
|
|
onReady: function () { |
|
|
@ -156,6 +168,12 @@ Page({ |
|
|
|
// }
|
|
|
|
|
|
|
|
}, |
|
|
|
//单选支付方式
|
|
|
|
updataRadio:function(e){ |
|
|
|
this.setData({ |
|
|
|
paytype: e.detail.value |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 进入结算页面
|
|
|
|
Settlement: function (options) { |
|
|
|
var that = this; |
|
|
@ -181,10 +199,10 @@ Page({ |
|
|
|
} |
|
|
|
var pays = [] |
|
|
|
if (data.payment.bank_pay == 1) { |
|
|
|
pays.push({'name':'公对公支付','icon':'/images/公对公.png'}) |
|
|
|
pays.push({'name':'公对公支付','icon':'/images/公对公.png','type':'bank_pay','checked':true}) |
|
|
|
} |
|
|
|
// if (data.payment.wallet_pay == 1) {
|
|
|
|
// pays.push({'name':'余额支付','icon':'/images/weixin.png'})
|
|
|
|
// pays.push({'name':'余额支付','icon':'/images/钱包支付.png','type':'wallet_pay','checked':false})
|
|
|
|
// }
|
|
|
|
that.setData({ |
|
|
|
productAry: options.product, |
|
|
@ -542,7 +560,7 @@ Page({ |
|
|
|
remarks: '', |
|
|
|
vipSource: 0, |
|
|
|
product: that.data.productAry, |
|
|
|
pay_type: 'bank_pay', |
|
|
|
pay_type: that.data.paytype, |
|
|
|
}).then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|
var data = res.data |
|
|
|