From fa9a5e4009183a182a066bd7a45d8d8dca8e6057 Mon Sep 17 00:00:00 2001 From: linju-json Date: Fri, 28 May 2021 17:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=A6=E6=88=AA=E5=99=A8?= =?UTF-8?q?=E5=9C=A8ios=20app=E7=AB=AF=E4=BC=9A=E6=8A=A5=E9=94=99=EF=BC=9A?= =?UTF-8?q?Unhandled=20promise...=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 4 + common/appInit.js | 4 +- .../uni-quick-login/uni-quick-login.vue | 2 +- package.json | 4 +- pages/ucenter/userinfo/userinfo.vue | 65 ++++--- .../database/uni-id-users.schema.json | 5 + uni_modules/uni-file-picker/changelog.md | 20 ++- .../uni-file-picker/uni-file-picker.vue | 19 +- .../uni-file-picker/upload-file.vue | 2 +- uni_modules/uni-file-picker/package.json | 164 +++++++++--------- uni_modules/uni-file-picker/readme.md | 5 + 11 files changed, 161 insertions(+), 133 deletions(-) diff --git a/changelog.md b/changelog.md index 824b0ad3..69e42d5e 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 5b55b624..95176a8b 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 3ccfcd2b..69406fe3 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 5424ed06..921eacb2 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 5645b3a7..8117e638 100644 --- a/pages/ucenter/userinfo/userinfo.vue +++ b/pages/ucenter/userinfo/userinfo.vue @@ -1,17 +1,23 @@ -