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

bug fixes

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