提交 d22e09b4 authored 作者: pengxiaohui's avatar pengxiaohui

修改支付bug

上级 d9016a50
...@@ -47,7 +47,6 @@ export default { ...@@ -47,7 +47,6 @@ export default {
price: item.price price: item.price
} }
}) })
console.log(this.list)
}, },
immediate: true, immediate: true,
deep: true deep: true
......
...@@ -193,13 +193,6 @@ export default { ...@@ -193,13 +193,6 @@ export default {
} }
}) })
}, },
placeOrderParams() {
const params = Object.assign({ payment_method: this.payment_method }, this.order_params)
if (this.payment_method === '3') {
params.open_id = this.openId
}
return params
},
fetchPlaceOrder(params) { fetchPlaceOrder(params) {
createOrder(params).then(res => { createOrder(params).then(res => {
if (res.code === 0 && res.msg === '成功') { if (res.code === 0 && res.msg === '成功') {
...@@ -214,15 +207,17 @@ export default { ...@@ -214,15 +207,17 @@ export default {
checkPayStatus({ payment_order_id: id }).then(res => {}) checkPayStatus({ payment_order_id: id }).then(res => {})
}, },
placeOrderCallback(res) { placeOrderCallback(res) {
console.log(res)
const payType = this.payment_method const payType = this.payment_method
if (payType === 3) { console.log(payType)
if (payType === '3') {
// 微信内支付 // 微信内支付
} else if (payType === 4) { } else if (payType === '4') {
// 微信外微信h5支付 // 微信外微信h5支付
window.sessionStorage.setItem('isBackFormWxH5Pay', 1) window.sessionStorage.setItem('isBackFormWxH5Pay', 1)
window.sessionStorage.setItem('payment_order_id', res.payment_order_id) window.sessionStorage.setItem('payment_order_id', res.payment_order_id)
window.location.href = res.payment_url + '&redirect_url=' + encodeURIComponent(window.location.href) window.location.href = res.payment_url + '&redirect_url=' + encodeURIComponent(window.location.href)
} else if (payType === 12) { } else if (payType === '12') {
// 支付宝网页支付 // 支付宝网页支付
console.log(res) console.log(res)
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论