订单
This commit is contained in:
@@ -77,13 +77,13 @@ Page({
|
||||
|
||||
},
|
||||
sub() {
|
||||
if(this.data.list.addressList == null){
|
||||
if (this.data.list.addressList == null) {
|
||||
wx.showToast({
|
||||
title:"请先添加地址",
|
||||
icon:"none"
|
||||
title: "请先添加地址",
|
||||
icon: "none"
|
||||
})
|
||||
console.log(123)
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
bin.getuserid().then((res) => {
|
||||
bin.request({
|
||||
@@ -104,12 +104,20 @@ Page({
|
||||
console.log(r)
|
||||
let { timeStamp, nonceStr, signType, sign } = r.data.data.wdata
|
||||
// timeStamp = timeStamp
|
||||
timeStamp = timeStamp.toString()
|
||||
timeStamp = timeStamp.toString()
|
||||
console.log(timeStamp)
|
||||
wx.requestPayment({
|
||||
timeStamp, nonceStr, package:r.data.data.wdata.package, signType, paySign:sign,
|
||||
success(res) {console.log("成功")},
|
||||
fail(res) {console.log(res)}
|
||||
timeStamp, nonceStr, package: r.data.data.wdata.package, signType, paySign: sign,
|
||||
success(res) {
|
||||
console.log("成功")
|
||||
wx.redirectTo({
|
||||
url: "/pages/order/order?index=1"
|
||||
})
|
||||
},
|
||||
fail(res) { console.log(res)
|
||||
wx.redirectTo({
|
||||
url: "/pages/order/order?index=0"
|
||||
})}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user