diff --git a/changelog.md b/changelog.md index 824b0ad363030bf9fc6e3a09496bae3e7494907e..69e42d5e133497d3cce22ba0380269fd9fb9fb32 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +## 1.0.12(2021-05-28) +修复拦截器在ios app端会报错:Unhandled promise...的问题 +## 1.0.10(2021-05-27) +新增callfunction的拦截器废除this.request的写法。为callFunction添加:请求失败是否断网判断并提示、恢复网络自动重新执行、自动处理响应体,目前处理了403为token过期自动跳转到登陆页面,今后会添加更多的自动行为、自动延续token过期时间 ## 1.0.9(2021-05-23) 修复变量被重复定义的问题 ## 1.0.8(2021-05-22) diff --git a/common/appInit.js b/common/appInit.js index 5b55b624b970e01983ac8058a92d86f5d7134d78..95176a8bdd7602d16da2baa1b8e27a32d6f05fdd 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -155,6 +155,7 @@ export default function() { list.forEach(item => { //用遍历的方式分别为,uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器 uni.addInterceptor(item, { invoke(e) { // 调用前拦截 + console.log(e); //获取用户的token const token = uni.getStorageSync('uni_id_token') //获取当前页面路径(即url去掉"?"和"?"后的参数) @@ -180,9 +181,10 @@ export default function() { title: '请先登录', icon: 'none' }) - return uni.navigateTo({ + uni.navigateTo({ url: "/pages/ucenter/login-page/index/index" }) + return false } } }, diff --git a/components/uni-quick-login/uni-quick-login.vue b/components/uni-quick-login/uni-quick-login.vue index 3ccfcd2b9093418b360df1f1de145468e8cadca1..69406fe32040cf86d0f391ec9fa4f420c205465a 100644 --- a/components/uni-quick-login/uni-quick-login.vue +++ b/components/uni-quick-login/uni-quick-login.vue @@ -119,7 +119,7 @@ oauthServices.forEach(({ id }) => { - console.log(9527,id); + // console.log(9527,id); if (this.config[id].isChecked&&this.loginConfig.includes(id)) { this.servicesList.push({ ...this.config[id], diff --git a/package.json b/package.json index 5424ed06532918fd7cbbdf7b0f67e00f0e438467..921eacb2c54f350969783e18b4d8394bbdf6bc5d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "id": "uni-starter", "displayName": "uni-starter", - "version": "1.0.9", + "version": "1.0.12", "description": "云端一体应用快速开发模版", "keywords": [ "uni-starter", @@ -12,7 +12,7 @@ ], "repository": "https://codechina.csdn.net/dcloud/uni-starter.git", "engines": { - "HBuilderX": "^3.1.14" + "HBuilderX": "^3.1.16" }, "dcloudext": { "category": [ diff --git a/pages/ucenter/userinfo/userinfo.vue b/pages/ucenter/userinfo/userinfo.vue index 5645b3a745baf1bc04551fa8b31cb1ce45c67832..8117e63898040883515e3f1efcf676a3eb496c52 100644 --- a/pages/ucenter/userinfo/userinfo.vue +++ b/pages/ucenter/userinfo/userinfo.vue @@ -1,17 +1,23 @@ -