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

merge...

module.exports = { module.exports = {
url: '/', url: '/',
DesDir: './client-dist', DesDir: './client-dist',
apiBaseURL: 'https://learn-api.ezijing.com', // apiBaseURL: 'https://learn-api.ezijing.com',
apiBaseURL: '/',
others: { others: {
url: '/app/learn/course', url: '/app/learn/course',
loginUrl: 'https://login.ezijing.com/sofia/login/index' loginUrl: 'https://login.ezijing.com/sofia/login/index'
......
module.exports = { module.exports = {
url: '/', url: '/',
DesDir: './client-dist', DesDir: './client-dist',
apiBaseURL: 'https://learn-api2.ezijing.com', // apiBaseURL: 'https://learn-api2.ezijing.com',
apiBaseURL: '/',
others: { others: {
url: '/app/learn/course', url: '/app/learn/course',
loginUrl: 'https://login2.ezijing.com/sofia/login/index' loginUrl: 'https://login2.ezijing.com/sofia/login/index'
......
...@@ -8,6 +8,7 @@ export default { ...@@ -8,6 +8,7 @@ export default {
}, },
data() { data() {
return { return {
loaded: false,
detail: {}, detail: {},
// 学期列表 // 学期列表
semesterList: [ semesterList: [
...@@ -33,7 +34,7 @@ export default { ...@@ -33,7 +34,7 @@ export default {
}, },
// 撤回 // 撤回
hasAbort() { hasAbort() {
return this.isEdit && this.detail.status === -1 return this.isEdit && this.detail.status === -1 && this.detail.pay !== 1
}, },
// 去支付 // 去支付
hasPay() { hasPay() {
...@@ -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 this.handlePay()
.replace({ name: 'pareportEdit', params: { id: response.data.id }, query: { id: this.affairId, pay: '1' } }) } else {
.then(this.getDetail) this.$router.replace({
name: 'pareportEdit',
params: { id: response.data.id },
query: { id: this.affairId, pay: '1' }
})
} }
this.handlePay()
}, },
// 去支付 // 去支付
handlePay() { async handlePay() {
if (!this.loaded) {
await this.getDetail()
}
this.payVisible = true this.payVisible = true
}, },
// 支付成功 // 支付成功
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
{ {
label: '删除', label: '删除',
isShow(row) { isShow(row) {
return row.status === -1 return row.status === -1 && row.pay !== 1
}, },
onClick: row => { onClick: row => {
this.handleRemove(row) this.handleRemove(row)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论