Commit 80bdb7cb authored by 智勇's avatar 智勇

透传后端msg

parent b29cc606
...@@ -43,8 +43,8 @@ service.interceptors.response.use( ...@@ -43,8 +43,8 @@ service.interceptors.response.use(
duration: 5 * 1000 duration: 5 * 1000
}) })
// 50008:非法的token; 50012:其他客户端登录了; 500003:Token 过期了; // 500003:Token 过期了;
if (res.code === 501002 || res.code === 500003) { if (res.code === 500003) {
store.dispatch('FedLogOut').then(() => { store.dispatch('FedLogOut').then(() => {
location.reload() // 为了重新实例化vue-router对象 避免bug location.reload() // 为了重新实例化vue-router对象 避免bug
}) })
......
...@@ -255,12 +255,20 @@ export default { ...@@ -255,12 +255,20 @@ export default {
} }
if (opt.action === 'second_audit') { if (opt.action === 'second_audit') {
secondAudit({ channelOrderNumber: this.order.channelOrderNumber }).then(() => { secondAudit({ channelOrderNumber: this.order.channelOrderNumber }).then((res) => {
this.$notify({ if (res.data) {
title: '操作成功', this.$notify({
type: 'success', message: res.message,
duration: 2000 type: 'success',
}) duration: 2000
})
} else {
this.$notify({
message: res.message,
type: 'error',
duration: 2000
})
}
this.getOrders() this.getOrders()
}) })
} }
...@@ -274,7 +282,7 @@ export default { ...@@ -274,7 +282,7 @@ export default {
} }
lendLoan(obj).then(() => { lendLoan(obj).then(() => {
this.$notify({ this.$notify({
title: '操作成功', message: '操作成功',
type: 'success', type: 'success',
duration: 2000 duration: 2000
}) })
...@@ -285,7 +293,7 @@ export default { ...@@ -285,7 +293,7 @@ export default {
cancelLoan() { cancelLoan() {
cancelLoan({ channelOrderNumber: this.order.channelOrderNumber }).then(() => { cancelLoan({ channelOrderNumber: this.order.channelOrderNumber }).then(() => {
this.$notify({ this.$notify({
title: '关单完毕', message: '关单完毕',
type: 'success', type: 'success',
duration: 2000 duration: 2000
}) })
...@@ -300,13 +308,13 @@ export default { ...@@ -300,13 +308,13 @@ export default {
approve(this.approveData).then(res => { approve(this.approveData).then(res => {
if (res.data) { if (res.data) {
this.$notify({ this.$notify({
title: res.message, message: res.message,
type: 'success', type: 'success',
duration: 5000 duration: 5000
}) })
} else { } else {
this.$notify({ this.$notify({
title: res.message, message: res.message,
type: 'error', type: 'error',
duration: 5000 duration: 5000
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment