From 7fce32b33e32b7f72d6202a6d6d9ae6dcfb34452 Mon Sep 17 00:00:00 2001 From: 26947 <12@1> Date: Wed, 8 May 2024 10:28:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=8C=89token=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 1 + manifest.json | 4 ++-- pages/mine/index.vue | 5 +++++ permission.js | 47 ++++++++++++++++++++++---------------------- 4 files changed, 31 insertions(+), 26 deletions(-) diff --git a/config.js b/config.js index 1f8be3d..cf89052 100644 --- a/config.js +++ b/config.js @@ -1,6 +1,7 @@ // 应用全局配置 export default { // baseUrl: 'https://vue.ruoyi.vip/prod-api', + // baseUrl: 'http://47.93.242.168:8080', baseUrl: 'http://localhost:8080', // 应用信息 appInfo: { diff --git a/manifest.json b/manifest.json index 1dbda58..6f1aff0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,4 +1,4 @@ -{ + { "name" : "若依移动端", "appid" : "__UNI__25A9D80", "description" : "", @@ -51,7 +51,7 @@ }, "quickapp" : {}, "mp-weixin" : { - "appid" : "wx63c280fe3248a3e7", + "appid" : "wx892c075ce610e20f", "setting" : { "urlCheck" : false, "es6" : false, diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 4970e42..cd09581 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -159,6 +159,11 @@ const { proxy } = getCurrentInstance(); const sex = ref(proxy.$store.state.user.sex) const version = ref(getApp().globalData.config.appInfo.version) const avatar = ref(proxy.$store.state.user.avatar) + + const info = ()=> { + console.log(avatar); + } + info(); const handleToUserInfo = ()=> { proxy.$tab.navigateTo('/pages/mine/info/userInfo') diff --git a/permission.js b/permission.js index d7ffc27..0e208ff 100644 --- a/permission.js +++ b/permission.js @@ -15,27 +15,26 @@ function checkWhite(url) { } // 页面跳转验证拦截器 -let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"] -list.forEach(item => { - uni.addInterceptor(item, { - invoke(to) { - - if (getToken()) { - if (to.url === loginPage) { - console.log("to:",to); - uni.reLaunch({ url: "/" }) - } - return true - } else { - if (checkWhite(to.url)) { - return true - } - uni.reLaunch({ url: loginPage }) - return false - } - }, - fail(err) { - console.log("错误信息:",err) - } - }) -}) +// let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"] +// list.forEach(item => { +// uni.addInterceptor(item, { +// invoke(to) { +// if (getToken()) { +// if (to.url === loginPage) { +// console.log("to:",to); +// uni.reLaunch({ url: "/" }) +// } +// return true +// } else { +// if (checkWhite(to.url)) { +// return true +// } +// uni.reLaunch({ url: loginPage }) +// return false +// } +// }, +// fail(err) { +// console.log("错误信息:",err) +// } +// }) +// })