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

bug fixes

上级 34a57b66
...@@ -8,6 +8,7 @@ export default { ...@@ -8,6 +8,7 @@ export default {
}, },
data() { data() {
return { return {
loaded: false,
detail: {}, detail: {},
// 学期列表 // 学期列表
semesterList: [ semesterList: [
...@@ -87,9 +88,11 @@ export default { ...@@ -87,9 +88,11 @@ export default {
}, },
// 获取详情 // 获取详情
getDetail() { getDetail() {
api.getAffair(this.pid).then(response => { this.loaded = false
return api.getAffair(this.pid).then(response => {
this.detail = response this.detail = response
this.ruleForm = response.form this.ruleForm = response.form
this.loaded = true
}) })
}, },
// 返回 // 返回
......
...@@ -122,7 +122,9 @@ export default { ...@@ -122,7 +122,9 @@ export default {
'$route.query': { '$route.query': {
immediate: true, immediate: true,
handler(query) { handler(query) {
this.payVisible = query.pay === '1' if (query.pay === '1') {
this.handlePay()
}
} }
} }
}, },
...@@ -134,15 +136,21 @@ export default { ...@@ -134,15 +136,21 @@ export default {
}, },
methods: { methods: {
handleSubmitSuccess(response) { handleSubmitSuccess(response) {
if (!this.isEdit) { if (this.isEdit) {
this.$router
.replace({ name: 'pareportEdit', params: { id: response.data.id }, query: { id: this.affairId, pay: '1' } })
.then(this.getDetail)
}
this.handlePay() this.handlePay()
} else {
this.$router.replace({
name: 'pareportEdit',
params: { id: response.data.id },
query: { id: this.affairId, pay: '1' }
})
}
}, },
// 去支付 // 去支付
handlePay() { async handlePay() {
if (!this.loaded) {
await this.getDetail()
}
this.payVisible = true this.payVisible = true
}, },
// 支付成功 // 支付成功
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论