diff --git a/front/src/utils/request.js b/front/src/utils/request.js index 03239f01..dfcce28a 100644 --- a/front/src/utils/request.js +++ b/front/src/utils/request.js @@ -161,14 +161,14 @@ instance.interceptors.response.use( console.log('接口error', error) if (loadingInstance) loadingInstance.close() - const { response, message } = error + const { response, myMessage } = error if (error.response) { console.log('接口返回', response) console.log('接口返回headers', response.headers) console.log('接口返回REDIRECT', response.headers.redirect) const { status, data } = response - handleCode(status, data.msg || message, response.headers.redirect) + handleCode(status, data.msg || myMessage, response.headers.redirect) if (response.headers.token) { setAccessToken(response.headers.token) } @@ -179,18 +179,18 @@ instance.interceptors.response.use( return Promise.reject(error) } else { - let { message } = error - if (message === 'Network Error') { - message = '后端接口连接异常' + // let { message } = error + if (error.message === 'Network Error') { + error.message = '后端接口连接异常' } - if (message.includes('timeout')) { - message = '后端接口请求超时' + if (error.message.includes('timeout')) { + error.message = '后端接口请求超时' } - if (message.includes('Request failed with status code')) { - const code = message.substr(message.length - 3) - message = '后端接口' + code + '异常' + if (error.message.includes('Request failed with status code')) { + const code = error.message.substr(error.message.length - 3) + error.message = '后端接口' + code + '异常' } - message.error(message || `后端接口未知异常`) + message.error(error.message || `后端接口未知异常`) return Promise.reject(error) } } diff --git a/front/src/views/home/AbilityToApplyFor.vue b/front/src/views/home/AbilityToApplyFor.vue index eedf7caf..a5741a02 100644 --- a/front/src/views/home/AbilityToApplyFor.vue +++ b/front/src/views/home/AbilityToApplyFor.vue @@ -126,7 +126,13 @@ title="已申请摄像头列表" @ok="videoVisible = false" > - + {{ item.name }} @@ -204,6 +210,7 @@ const showItem = (id, type, delFlag, note1) => { if (type == '基础设施') { let arr = JSON.parse(note1); + //console.log('arrarr====',arr); xVideoList.value = [] arr.map((val) => { xVideoList.value.push({ @@ -244,10 +251,6 @@ }) } getDeptAllData(); - //select搜索过滤 - const filterOption = (input, option) => { - return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }