提交 eb0ae71e authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 6abab340
...@@ -92,12 +92,12 @@ export function getRetakeCourses() { ...@@ -92,12 +92,12 @@ export function getRetakeCourses() {
// 创建微信支付订单 // 创建微信支付订单
export function createWxpayOrder(identity, productId, params) { export function createWxpayOrder(identity, productId, params) {
return httpRequest.get(`/api/pay/v1/wechat/qr/${identity}/${productId}`, params) return httpRequest.get(`/api/pay/v1/wechat/qr/${identity}/${productId}`, { params })
} }
// 创建支付宝支付订单 // 创建支付宝支付订单
export function createAlipayOrder(productId, params) { export function createAlipayOrder(productId, params) {
return httpRequest.get(`/api/pay/v1/ali/unified-order/${productId}`, params) return httpRequest.get(`/api/pay/v1/ali/unified-order/${productId}`, { params })
} }
// 获取订单 // 获取订单
......
...@@ -5,7 +5,7 @@ export default { ...@@ -5,7 +5,7 @@ export default {
const isMobile = /android|iphone|ipad|ipod/i.test(UA) const isMobile = /android|iphone|ipad|ipod/i.test(UA)
return { return {
isMobile, isMobile,
isWechat: /micromessenger/i.test(UA), isWechat: isMobile && /micromessenger/i.test(UA),
openId: window.localStorage.getItem('open_id') openId: window.localStorage.getItem('open_id')
} }
}, },
......
...@@ -52,6 +52,7 @@ export default { ...@@ -52,6 +52,7 @@ export default {
immediate: true, immediate: true,
handler(query) { handler(query) {
if (query.pay && !query.order_no && !query.code) { if (query.pay && !query.order_no && !query.code) {
this.ruleForm.payment = query.pay
this.handlePay() this.handlePay()
} }
} }
......
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
onSubmit(data) { onSubmit(data) {
data.affair_id = this.channelId data.affair_id = this.channelId
data.course_id = this.ruleForm.course_id.join(',') data.course_id = this.ruleForm.course_id.join(',')
data.payment = data.payment || '0' data.payment = this.ruleForm.payment
this.isEdit ? this.handleUpdate(data) : this.handleAdd(data) this.isEdit ? this.handleUpdate(data) : this.handleAdd(data)
}, },
// 去支付 // 去支付
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论