From c4dec49f2831a6e1806d96bde0b9db08ae36a858 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Fri, 6 Sep 2024 14:53:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E6=A3=80=20=E4=B8=8E=20=E5=9F=B9?= =?UTF-8?q?=E8=AE=AD=E9=AA=8C=E8=AF=81token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 67 ++++++--- pages.json | 14 ++ pages/HealthExaminationApp/index/index.vue | 134 +++++++++++++++--- pages/HealthExaminationApp/index/message.vue | 111 +++++++++++++++ pages/HealthExaminationApp/index/userInfo.vue | 62 ++++++++ pages/YNEduApp/exam/exam.vue | 1 + pages/YNEduApp/exam/examination.vue | 22 +-- pages/YNEduApp/exam/examinationDetails.vue | 1 + pages/YNEduApp/exam/examinationList.vue | 1 + .../exam/examinationResultDetails.vue | 1 + pages/YNEduApp/index/index.vue | 9 +- pages/YNEduApp/index/notices.vue | 3 +- pages/YNEduApp/learn/learn.vue | 1 + pages/YNEduApp/learnProj/imageStudy.vue | 1 + pages/YNEduApp/learnProj/learnProj.vue | 1 + pages/YNEduApp/learnProj/learnProjDetail.vue | 1 + pages/YNEduApp/learnProj/pdfStudy.vue | 1 + pages/YNEduApp/prac/exercises.vue | 10 ++ pages/YNEduApp/prac/prac.vue | 1 + pages/YNEduApp/prac/pracDetail.vue | 1 + pages/YNEduApp/user/faceScan.vue | 1 + pages/YNEduApp/user/myMsg.vue | 3 + pages/YNEduApp/user/user.vue | 1 + pages/gzt/index.vue | 10 +- pages/login.vue | 2 +- static/images-tijian/logout.png | Bin 0 -> 1270 bytes static/images-tijian/message.png | Bin 0 -> 1940 bytes static/images-tijian/userInfo.png | Bin 0 -> 2745 bytes utils/request.js | 3 - 29 files changed, 408 insertions(+), 55 deletions(-) create mode 100644 pages/HealthExaminationApp/index/message.vue create mode 100644 pages/HealthExaminationApp/index/userInfo.vue create mode 100644 static/images-tijian/logout.png create mode 100644 static/images-tijian/message.png create mode 100644 static/images-tijian/userInfo.png diff --git a/main.js b/main.js index bfd88d8..f5ef3a8 100644 --- a/main.js +++ b/main.js @@ -7,11 +7,11 @@ import Vue from 'vue' Vue.config.productionTip = false // Vue.prototype.$api = $api Vue.prototype.$store = store -Vue.prototype.$adpid = "1111111111" +Vue.prototype.$adpid = '1111111111' Vue.prototype.$backgroundAudioData = { - playing: false, - playTime: 0, - formatedPlayTime: '00:00:00' + playing: false, + playTime: 0, + formatedPlayTime: '00:00:00' } import uView from '@/uni_modules/uview-ui' @@ -24,29 +24,56 @@ Vue.use(uView) // const vconsole = require('vconsole') // Vue.prototype.$vconsole = new vconsole() // 使用vconsole +Vue.prototype.$verificationToken = function () { + console.log('验证Token-->') + uni.request({ + url: 'http://192.168.0.14:19999/exam-bmw/users/current', + method: 'get', + header: { + Authorization: uni.getStorageSync('access_token') + }, + success: (res) => { + console.log('🚀 ~ res:', res) + let data = res.data + console.log('🚀 ~ res.data:', data) + if (data === '' || data === undefined) { + uni.showToast({ + title: '已在其他设备登录,请重新登录', + icon: 'none' + }) + uni.reLaunch({ + url: '/pages/login' + }) + } + }, + fail: (err) => { + console.log('🚀 ~ err:', err) + } + }) +} + App.mpType = 'app' const app = new Vue({ - store, - ...App + store, + ...App }) app.$mount() // #endif // #ifdef VUE3 -import { - createSSRApp -} from 'vue' +import { createSSRApp } from 'vue' +import { data } from 'uview-ui/libs/mixin/mixin'; export function createApp() { - const app = createSSRApp(App) - app.use(store) - app.config.globalProperties.$adpid = "1111111111" - app.config.globalProperties.$backgroundAudioData = { - playing: false, - playTime: 0, - formatedPlayTime: '00:00:00' - } - return { - app - } + const app = createSSRApp(App) + app.use(store) + app.config.globalProperties.$adpid = '1111111111' + app.config.globalProperties.$backgroundAudioData = { + playing: false, + playTime: 0, + formatedPlayTime: '00:00:00' + } + return { + app + } } // #endif diff --git a/pages.json b/pages.json index 14eb1d7..2be0f27 100644 --- a/pages.json +++ b/pages.json @@ -261,6 +261,20 @@ { "navigationBarTitleText" : "体检预约单" } + }, + { + "path" : "pages/HealthExaminationApp/index/userInfo", + "style" : + { + "navigationBarTitleText" : "个人信息" + } + }, + { + "path" : "pages/HealthExaminationApp/index/message", + "style" : + { + "navigationBarTitleText" : "消息通知" + } } ], "globalStyle": { diff --git a/pages/HealthExaminationApp/index/index.vue b/pages/HealthExaminationApp/index/index.vue index eb6f8fa..cc301d7 100644 --- a/pages/HealthExaminationApp/index/index.vue +++ b/pages/HealthExaminationApp/index/index.vue @@ -1,6 +1,5 @@