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 @@