|
@@ -58,7 +58,8 @@ export default ({
|
|
|
payInfo = qs.stringify(payInfo)
|
|
|
axios.post('o2o/order/pay', payInfo).then(function (res) {
|
|
|
// let tmp = {orderData: data, changeData: res.data}
|
|
|
- console.log(res.data.credential)
|
|
|
+ console.log(61)
|
|
|
+ console.log(res.data)
|
|
|
// let WxPay = res.data
|
|
|
if (!config.test) {
|
|
|
pingpp.createPayment(res.data.data, function (result, err) {
|
|
@@ -80,8 +81,9 @@ export default ({
|
|
|
// window.location.href='http://commontest.yiguanjia.me/index.php?r=o2o/web/index';
|
|
|
// 支付凭据
|
|
|
console.log(82)
|
|
|
- console.log(res.data.credential)
|
|
|
- let option = res.data.credential.wx_pub
|
|
|
+ let wxPay = res.data.data
|
|
|
+ console.log(wxPay.credential)
|
|
|
+ let option = wxPay.credential.wx_pub
|
|
|
|
|
|
let prepay = option['package'].replace('prepay_id=', '')
|
|
|
window.location.href = '/webapp/o2o/module/pay/index.html?appId=' +
|
|
@@ -89,9 +91,9 @@ export default ({
|
|
|
'&package=' + prepay + '&signType=' +
|
|
|
option.signType + '&timeStamp=' +
|
|
|
option.timeStamp + '&paySign=' +
|
|
|
- option.paySign + '&amount=' + res.data.amount +
|
|
|
- '&created=' + res.data.created + '&body=' +
|
|
|
- res.data.body + '&bookingTime=' + bookingTime
|
|
|
+ option.paySign + '&amount=' + wxPay.amount +
|
|
|
+ '&created=' + wxPay.created + '&body=' +
|
|
|
+ wxPay.body + '&bookingTime=' + bookingTime
|
|
|
}
|
|
|
|
|
|
// cb(tmp)
|