From a49e2e547a890e93873dc4a82f7c20ce2f5988a7 Mon Sep 17 00:00:00 2001 From: 2183691628 <2183691628@qq.com> Date: Tue, 14 Dec 2021 09:28:22 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=20token=E8=BF=87?= =?UTF-8?q?=E6=9C=9F=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=97=A0=E6=B3=95=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E7=9A=84=E9=97=AE=E9=A2=98=20-=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=20=E9=A1=B5=E9=9D=A2=E4=B8=AD=E4=B8=8D=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=20TopMenu=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++++-- src/utils/model.js | 4 ++-- src/utils/request.js | 19 +++++++++++++------ .../off-limits-manage/alarm-query/index.vue | 5 ++--- .../alarm-recognition/index.vue | 6 ++---- .../common-exception/index.vue | 5 ++--- .../off-limits-main/off-limits-type/index.vue | 9 ++++----- .../user-exception/index.vue | 5 ++--- 8 files changed, 35 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 0adf468..7085afb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -76,4 +76,10 @@ IMPROVEMENT FIX - 修复 表格-操作列显示问题 - 取消 搜索选择类别 -- 修改 输入搜索框提示都为 '请输入内容' \ No newline at end of file +- 修改 输入搜索框提示都为 '请输入内容' + +## v1.0.8F +`2021年12月14日` +FIX +- 修复 token过期移动端无法跳转的问题 +- 删除 页面中不使用的 TopMenu组件 \ No newline at end of file diff --git a/src/utils/model.js b/src/utils/model.js index f804b01..213bd6d 100644 --- a/src/utils/model.js +++ b/src/utils/model.js @@ -1,8 +1,8 @@ /* * @Date: 2021-11-30 15:09:25 * @LastEditors: JinxuChen - * @LastEditTime: 2021-12-13 11:35:53 + * @LastEditTime: 2021-12-14 09:28:08 * @FilePath: \GpsCardAdmin\src\utils\model.js * @description: 版本号 */ -export const VersionModel = '1.0.7'; \ No newline at end of file +export const VersionModel = '1.0.8'; \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index bbc37c5..cf7e12a 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,7 +1,14 @@ +/* + * @Date: 2021-12-08 15:59:46 + * @LastEditors: JinxuChen + * @LastEditTime: 2021-12-14 09:25:12 + * @FilePath: \GpsCardAdmin\src\utils\request.js + * @description: + */ import axios from 'axios' import { MessageBox, Message } from 'element-ui' import store from '@/store' -import { getToken } from '@/utils/auth' +/* import { getToken } from '@/utils/auth' */ // create an axios instance const service = axios.create({ @@ -53,12 +60,12 @@ service.interceptors.response.use( duration: 5 * 1000 }) - // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired; - if (res.code === 50008 || res.code === 50012 || res.code === 50014) { + // 106 token验证过期; + if (res.code === 106) { // to re-login - MessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', { - confirmButtonText: 'Re-Login', - cancelButtonText: 'Cancel', + MessageBox.confirm('登录过期,是否重新登录?', { + confirmButtonText: '确认', + cancelButtonText: '取消', type: 'warning' }).then(() => { store.dispatch('user/resetToken').then(() => { diff --git a/src/views/off-limits-manage/alarm-query/index.vue b/src/views/off-limits-manage/alarm-query/index.vue index 4581bb1..774ef79 100644 --- a/src/views/off-limits-manage/alarm-query/index.vue +++ b/src/views/off-limits-manage/alarm-query/index.vue @@ -1,7 +1,7 @@ @@ -51,13 +51,12 @@