From 3bcb9cdf7a761d712d3e4c95a91a7d239cc95c6b Mon Sep 17 00:00:00 2001 From: DCloud__JSON Date: Wed, 10 May 2023 21:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E6=91=87=E6=A0=91=E4=BC=98=E5=8C=96=E5=90=8E=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E7=99=BB=E9=99=86=E6=96=B9=E5=BC=8F=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uni-id-pages/changelog.md | 2 ++ .../uni-id-pages-fab-login.vue | 25 +++++++++++++------ uni_modules/uni-id-pages/package.json | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/uni_modules/uni-id-pages/changelog.md b/uni_modules/uni-id-pages/changelog.md index 031c0c2..6c1de4e 100644 --- a/uni_modules/uni-id-pages/changelog.md +++ b/uni_modules/uni-id-pages/changelog.md @@ -1,3 +1,5 @@ +## 1.1.13(2023-05-10) +- 修复 启用摇树优化 报错的问题 ## 1.1.12(2023-05-05) - uni-id-co 新增 调用 add-user 接口创建用户时允许触发 beforeRegister 钩子方法,beforeRegister 钩子[详见](https://uniapp.dcloud.net.cn/uniCloud/uni-id-summary.html#before-register) - uni-id-co 新增 自无 unionid 到有 unionid 状态进行登录时为用户补充 unionid 字段 diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue b/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue index f6390f7..913f443 100644 --- a/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue +++ b/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue @@ -202,7 +202,6 @@ return '/' + pages[pages.length - n].route }, toPage(path,index = 0) { - let type = ['navigateTo','redirectTo'][index] //console.log('比较', this.getRoute(1),this.getRoute(2), path) if (this.getRoute(1) == path.split('?')[0] && this.getRoute(1) == '/uni_modules/uni-id-pages/pages/login/login-withoutpwd') { @@ -212,13 +211,23 @@ } else if (this.getRoute(2) == path) { // 如果上一个页面就是,马上要打开的页面,直接返回。防止重复开启 uni.navigateBack(); } else if (this.getRoute(1) != path) { - uni[type]({ - url: path, - animationType: 'slide-in-left', - complete(e) { - // console.log(e); - } - }) + if(index === 0){ + uni.navigateTo({ + url: path, + animationType: 'slide-in-left', + complete(e) { + // console.log(e); + } + }) + }else{ + uni.redirectTo({ + url: path, + animationType: 'slide-in-left', + complete(e) { + // console.log(e); + } + }) + } } else { console.log('出乎意料的情况,path:' + path); } diff --git a/uni_modules/uni-id-pages/package.json b/uni_modules/uni-id-pages/package.json index 21d6ae7..2d9945a 100644 --- a/uni_modules/uni-id-pages/package.json +++ b/uni_modules/uni-id-pages/package.json @@ -1,7 +1,7 @@ { "id": "uni-id-pages", "displayName": "uni-id-pages", - "version": "1.1.12", + "version": "1.1.13", "description": "云端一体简单、统一、可扩展的用户中心页面模版", "keywords": [ "用户管理", -- GitLab