测试提交
This commit is contained in:
BIN
pages/image/home/.DS_Store
vendored
Normal file
BIN
pages/image/home/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
* 页面的初始数据00
|
||||
*/
|
||||
data: {
|
||||
bannerdata:[
|
||||
|
||||
@@ -152,35 +152,66 @@ Page({
|
||||
},
|
||||
success(res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
// order_id: res.data.order_id,
|
||||
order_id: 123456,
|
||||
})
|
||||
// wx.showToast({ title: res.data.msg, icon: 'none' });
|
||||
wx.requestPayment({
|
||||
timeStamp: res.data.data.timeStamp,
|
||||
nonceStr: res.data.data.nonceStr,
|
||||
package: res.data.data.package,
|
||||
signType: 'MD5',
|
||||
paySign: res.data.data.paySign,
|
||||
success(res) {
|
||||
console.log('支付成功');
|
||||
wx.navigateTo({
|
||||
url: '../paysuccess/paysuccess?' + '&order_id=' + that.data.order_id,
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
console.log('支付失败');
|
||||
}
|
||||
})
|
||||
console.log('timeStamp=='+res.data.data.timeStamp)
|
||||
console.log('nonceStr=='+res.data.data.nonceStr)
|
||||
console.log('package=='+res.data.data.package)
|
||||
console.log('signType=='+res.data.data.signType)
|
||||
console.log('paySign=='+res.data.data.paySign)
|
||||
wx.requestPayment({
|
||||
timeStamp: res.data.data.timeStamp,
|
||||
nonceStr: res.data.data.nonceStr,
|
||||
package: res.data.data.package,
|
||||
signType: res.data.data.signType,
|
||||
paySign: res.data.data.paySign,
|
||||
success(res) {
|
||||
console.log('支付成功');
|
||||
wx.navigateTo({
|
||||
url: '/shopping/pages/paysuccess/paysuccess',
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
console.log('支付失败');
|
||||
}
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
// success(res) {
|
||||
// if (res.data.code == 200) {
|
||||
// that.setData({
|
||||
// // order_id: res.data.order_id,
|
||||
// order_id: 123456,
|
||||
// })
|
||||
// // wx.showToast({ title: res.data.msg, icon: 'none' });
|
||||
// wx.requestPayment({
|
||||
// timeStamp: res.data.data.timeStamp,
|
||||
// nonceStr: res.data.data.nonceStr,
|
||||
// package: res.data.data.package,
|
||||
// signType: 'MD5',
|
||||
// paySign: res.data.data.paySign,
|
||||
// success(res) {
|
||||
// console.log('支付成功');
|
||||
// wx.navigateTo({
|
||||
// url: '../paysuccess/paysuccess?' + '&order_id=' + that.data.order_id,
|
||||
// })
|
||||
// },
|
||||
// fail(res) {
|
||||
// console.log('支付失败');
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// wx.showToast({
|
||||
// title: res.data.msg,
|
||||
// icon: 'none'
|
||||
// });
|
||||
|
||||
// }
|
||||
// }
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user