From a5a76110f079df3a4189bf4de0752555cddb1e4f Mon Sep 17 00:00:00 2001
From: gongjiale <942894820@qq.com>
Date: Mon, 10 Oct 2022 09:53:44 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=89=8B=E5=86=8C?=
=?UTF-8?q?=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/src/views/instructionManual/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/front/src/views/instructionManual/index.vue b/front/src/views/instructionManual/index.vue
index 55c9bb3d..9e09a015 100644
--- a/front/src/views/instructionManual/index.vue
+++ b/front/src/views/instructionManual/index.vue
@@ -12,7 +12,7 @@
-->
+ @click="downloadDoc('/static/doc/userbook.docx', '通用能力服务平台USC用户手册')">
使用手册
From 4c4fe02f74178dc943a18b97f48478daea6da46a Mon Sep 17 00:00:00 2001
From: unknown
Date: Mon, 10 Oct 2022 10:11:16 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E8=9E=8D=E5=90=88=E6=9C=8D=E5=8A=A1?=
=?UTF-8?q?=E6=88=91=E7=9A=84=E7=94=B3=E8=AF=B7=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/src/views/home/AbilityToApplyFor.vue | 8 ++++----
front/src/views/home/apply.vue | 2 +-
front/src/views/personalCenter/components/MyApply.vue | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/front/src/views/home/AbilityToApplyFor.vue b/front/src/views/home/AbilityToApplyFor.vue
index 4f23d218..ed119a40 100644
--- a/front/src/views/home/AbilityToApplyFor.vue
+++ b/front/src/views/home/AbilityToApplyFor.vue
@@ -92,8 +92,8 @@
{{
val.description ||
- ((val.note1 || '') &&
- (JSON.parse(val.note1)[0].channelName || '--') +
+ ((val.note1) &&
+ (JSON.parse(val.note1) && JSON.parse(val.note1)[0] && JSON.parse(val.note1)[0].channelName || '--') +
'等' +
JSON.parse(val.note1).length +
'个摄像头') ||
@@ -148,7 +148,7 @@
])
// eslint-disable-next-line vue/no-setup-props-destructure
dataForm.value = props.dataList
- console.log('=========================>', dataForm.value)
+ console.log('============dataList=============>', dataForm.value)
// const router = useRouter()
// const arr =
// router.currentRoute.value.query.name instanceof Array
@@ -177,7 +177,7 @@
let arr = JSON.parse(note1)
xVideoList.value = []
arr.map((val) => {
- xVideoList.value.push({ name: val.channelName, key: val.channelId })
+ xVideoList.value.push({ name: val.channelName || '', key: val.channelId })
})
videoVisible.value = true
} else {
diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue
index 47f72b18..1f3f2e7c 100644
--- a/front/src/views/home/apply.vue
+++ b/front/src/views/home/apply.vue
@@ -51,7 +51,7 @@
style="width: 230px" :options="systemOptions" @focus="handleFocus" @blur="handleBlur"
@change="systemHandleChange" @search="systemHandleSearch">
- 请输入关键字(如选项没有系统请新增)
+ 如选项没有系统请新增
diff --git a/front/src/views/personalCenter/components/MyApply.vue b/front/src/views/personalCenter/components/MyApply.vue
index 1c11bafe..4e1b1353 100644
--- a/front/src/views/personalCenter/components/MyApply.vue
+++ b/front/src/views/personalCenter/components/MyApply.vue
@@ -148,7 +148,7 @@ let typeList = ref([
'能力下架',
'能力需求',
'需求评论',
- '能力评价',
+ // '能力评价',
])
// 西海岸-设备申请
let isXiHaiAn = whoShow.itShowXiHaiAn
From c95d9ac76e2709cf6e7b82eaacfde40b3e89fada Mon Sep 17 00:00:00 2001
From: a0049873 <79py69t9wb@privaterelay.appleid.com>
Date: Mon, 10 Oct 2022 10:35:29 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9token=E5=A4=B1=E6=95=88?=
=?UTF-8?q?=20=E5=AF=BC=E8=87=B4=E7=99=BD=E5=B1=8F=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=EF=BC=8C=20=E7=9B=AE=E5=89=8D=E8=AE=BE=E7=BD=AE=E7=9A=84?=
=?UTF-8?q?=E6=9C=89=E6=95=88=E6=97=B6=E9=95=BF=E4=B8=BA2=E5=B0=8F?=
=?UTF-8?q?=E6=97=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/src/router/index.js | 22 ++
front/src/views/login/index.vue | 366 +++++++++++++++++---------------
2 files changed, 213 insertions(+), 175 deletions(-)
diff --git a/front/src/router/index.js b/front/src/router/index.js
index 47c429c7..9c0f4ca9 100644
--- a/front/src/router/index.js
+++ b/front/src/router/index.js
@@ -1,5 +1,7 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/layout'
+import { message } from 'ant-design-vue'
+import Cookies from 'js-cookie'
export const constantRoutes = [
{
@@ -567,4 +569,24 @@ const router = createRouter({
routes: constantRoutes,
})
+router.beforeEach((to, from, next) => {
+ let token = Cookies.get('ucsToken')
+ const tokenStartTime = window.localStorage.getItem('tokenStartTime')
+ // 定义失效时间
+ const timeOver = 2 * 60 * 60 * 1000
+ let date = new Date().getTime()
+ if (date - tokenStartTime > timeOver) {
+ token = null
+ }
+ console.log('判断token失效', token, date - tokenStartTime > timeOver)
+ if (!token) {
+ if (to.path == '/login') return next()
+ message.warning('登录失效,请重新登录!')
+ return next('/login')
+ } else if (to.path == '/login') {
+ return next('/home')
+ }
+ next()
+})
+
export default router
diff --git a/front/src/views/login/index.vue b/front/src/views/login/index.vue
index cd9cc7f8..c684ab11 100644
--- a/front/src/views/login/index.vue
+++ b/front/src/views/login/index.vue
@@ -15,7 +15,11 @@
-
+
@@ -23,8 +27,15 @@
-
+
登录
@@ -36,191 +47,196 @@