diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 8f2112c..5dac109 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -102,6 +102,10 @@ const user = { reject(response.message) return } + if (response.needPassWord) { + reject(response) + return + } const result = response.data Vue.ls.set(ACCESS_TOKEN, result, 7 * 24 * 60 * 60 * 1000) commit('SET_TOKEN', result) diff --git a/src/utils/request.js b/src/utils/request.js index fb35104..50a75a1 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -79,6 +79,9 @@ service.interceptors.response.use(response => { message.error(response.data.message) return response.data } else { + if (response.headers['need-modify-password']) { + response.data.needPassWord = true + } return response.data } }, err) diff --git a/src/views/main/BookingLedger/detail/components/selectView.vue b/src/views/main/BookingLedger/detail/components/selectView.vue index d9c73b4..0a37b2b 100644 --- a/src/views/main/BookingLedger/detail/components/selectView.vue +++ b/src/views/main/BookingLedger/detail/components/selectView.vue @@ -488,28 +488,18 @@ export default { console.log('首次搜索内容', e, this.type, this.bookingInitData) if (this.type === 'forwarder') { this.inLoading = true - const arr = [] - this.selectList = [] - setTimeout(() => { - if (this.agentFilter.length === 0) { - setTimeout(() => { - this.inLoading = false - this.selectList = this.bookingInitData[`${this.type}InitList`] - }, 100); + if (this.agentFilter.length === 0) { + this.inLoading = false + this.selectList = this.bookingInitData[`${this.type}InitList`] } else { - this.agentFilter.forEach(item => { - this.bookingInitData[`${this.type}InitList`].forEach(ite => { - if (ite.codeName == item.agentCode) { - arr.push(ite) - } - }) - }) setTimeout(() => { - this.inLoading = false - this.selectList = arr - }, 100); + this.agentFilter.forEach(item => { + item.shortName = item.agent + item.codeName = item.agentCode + }) + this.selectList = this.agentFilter + }, 500); } - }, 900); return false } if ( diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index fbe77d7..16bc671 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -76,8 +76,7 @@ +