diff --git a/src/store/mutation-types.js b/src/store/mutation-types.js index 533e6d3..bc0bafd 100644 --- a/src/store/mutation-types.js +++ b/src/store/mutation-types.js @@ -11,6 +11,7 @@ export const DEFAULT_FIXED_HEADER_HIDDEN = 'DEFAULT_FIXED_HEADER_HIDDEN' export const DEFAULT_CONTENT_WIDTH_TYPE = 'DEFAULT_CONTENT_WIDTH_TYPE' export const DEFAULT_MULTI_TAB = 'DEFAULT_MULTI_TAB' export const DICT_TYPE_TREE_DATA = 'DICT_TYPE_TREE_DATA' +export const X_ACCESS_TOKEN = 'X_ACCESS_TOKEN' export const NOTICE_RECEIVED="NOTICE_RECEIVED" export const DEFAULT_HEADER_COLOR="DEFAULT_HEADER_COLOR" export const DEFAULT_MENU_COLOR="DEFAULT_MENU_COLOR" diff --git a/src/utils/request.js b/src/utils/request.js index f903abc..a8254db 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -3,7 +3,7 @@ import axios from 'axios' import store from '@/store' import { message, Modal, notification } from 'ant-design-vue' /// es/notification import { VueAxios } from './axios' -import { ACCESS_TOKEN } from '@/store/mutation-types' +import { ACCESS_TOKEN, X_ACCESS_TOKEN } from '@/store/mutation-types' // 创建 axios 实例 const service = axios.create({ @@ -49,8 +49,18 @@ const err = error => { // request interceptor service.interceptors.request.use(config => { const token = Vue.ls.get(ACCESS_TOKEN) + // const XToken = Vue.ls.get(X_ACCESS_TOKEN) if (token) { config.headers['Authorization'] = 'Bearer ' + token + // const tokenX = token.replace(/_/g, "/").replace(/-/g, "+"); + // var json = decodeURIComponent(escape(window.atob(tokenX.split(".")[1]))); + // const data = JSON.parse(json) + // const expire = data.exp + // const nowTime = Math.floor(Date.now() / 1000); + // const time = expire - nowTime + // if (time <= 50000) { + // config.headers['X-Authorization'] = 'Bearer ' + XToken + // } } return config }, err) @@ -63,6 +73,9 @@ service.interceptors.response.use(response => { if (response.request.responseType === 'blob') { return response } + if (response.headers['x-access-token']) { + Vue.ls.set(X_ACCESS_TOKEN, response.headers['x-access-token']) + } const code = response.data.code if (code === 1011006 || code === 1011007 || code === 1011008 || code === 1011009 || code === 401) { Vue.ls.remove(ACCESS_TOKEN) diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index 4920030..f59b857 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -478,7 +478,7 @@ type="trucker" :defaultVal="details.trucker" searchApi="DjyCustomerpage" - :disabled="BookingLockOrder['trucker'] && isLockBooking" + :disabled="true" :searchQuery="{ SearchValue: '', PropString: 'fleet' }" :showLabel="['shortName']" :openSearch="true" diff --git a/src/views/main/BookingLedger/detail/modules/sedOrder.vue b/src/views/main/BookingLedger/detail/modules/sedOrder.vue index 060a398..2fe5d17 100644 --- a/src/views/main/BookingLedger/detail/modules/sedOrder.vue +++ b/src/views/main/BookingLedger/detail/modules/sedOrder.vue @@ -91,23 +91,6 @@ @pkgsEnCapital="pkgsEnCapitalFun" @changeDetail="changeDetailFun" > - -
箱号:{{ item.primaryKey }}
-

+

-

{{ item.fieldName }}:

-
+

{{ item.fieldName }}:

+
本地