From c01efd4363450bff95b13ff716e4c41a511283e2 Mon Sep 17 00:00:00 2001 From: Anne_LXM <54163582+anne-lxm@users.noreply.github.com> Date: Sat, 3 Feb 2024 18:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=A6=81=E6=B1=82=E7=9A=84=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.uvue | 2 +- uni_modules/uni-id-pages-x/config.uts | 66 +++++++++---------- uni_modules/uni-id-pages-x/init.uts | 8 +-- uni_modules/uni-id-pages-x/lib/Univerify.uts | 4 +- .../uni-id-pages-x/pages/login/login.uvue | 4 +- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/pages/index/index.uvue b/pages/index/index.uvue index 2632104..287a00d 100644 --- a/pages/index/index.uvue +++ b/pages/index/index.uvue @@ -17,7 +17,7 @@ 账号密码登录 - + 一键登录 diff --git a/uni_modules/uni-id-pages-x/config.uts b/uni_modules/uni-id-pages-x/config.uts index 0ec4b05..21478b5 100644 --- a/uni_modules/uni-id-pages-x/config.uts +++ b/uni_modules/uni-id-pages-x/config.uts @@ -1,24 +1,24 @@ -export default { - "debug":true, - "agreements":{ - "serviceUrl": "https://uniapp.dcloud.io/", // 用户服务协议链接 - "privacyUrl": "https://uniapp.dcloud.io/", // 隐私政策条款链接 - /* - * 哪些场景下显示 - * 1. register注册(包括登录并注册,如:短信验证码登录,一键登录) - * 2. login登录(如:用户名密码登录,短信验证码登录) - */ - "scopeList": [ - "register","login","realNameVerify","univerify" - ] - }, - "loginTypes":[ - "smsCode", - // #ifdef APP && ( uniVersion > 3.99 || uniVersion == 3.99) - "univerify", - // #endif - "username", - // 以下登录方式 uni-app x 暂不支持 +export default { + "debug":true, + "agreements":{ + "serviceUrl": "https://uniapp.dcloud.io/", // 用户服务协议链接 + "privacyUrl": "https://uniapp.dcloud.io/", // 隐私政策条款链接 + /* + * 哪些场景下显示 + * 1. register注册(包括登录并注册,如:短信验证码登录,一键登录) + * 2. login登录(如:用户名密码登录,短信验证码登录) + */ + "scopeList": [ + "register","login","realNameVerify","univerify" + ] + }, + "loginTypes":[ + "smsCode", + // #ifdef APP && uniVersion >= 3.98 + "univerify", + // #endif + "username", + // 以下登录方式 uni-app x 暂不支持 /* "qq", "xiaomi", @@ -33,15 +33,15 @@ export default { "univerify", "apple" // #endif - */ - ], - /** - * 密码强度 - * super(超强:密码必须包含大小写字母、数字和特殊符号,长度范围:8-16位之间) - * strong(强: 密密码必须包含字母、数字和特殊符号,长度范围:8-16位之间) - * medium (中:密码必须为字母、数字和特殊符号任意两种的组合,长度范围:8-16位之间) - * weak(弱:密码必须包含字母和数字,长度范围:6-16位之间) - * 为空或false则不验证密码强度 - */ - passwordStrength: 'weak' -} as UTSJSONObject + */ + ], + /** + * 密码强度 + * super(超强:密码必须包含大小写字母、数字和特殊符号,长度范围:8-16位之间) + * strong(强: 密密码必须包含字母、数字和特殊符号,长度范围:8-16位之间) + * medium (中:密码必须为字母、数字和特殊符号任意两种的组合,长度范围:8-16位之间) + * weak(弱:密码必须包含字母和数字,长度范围:6-16位之间) + * 为空或false则不验证密码强度 + */ + passwordStrength: 'weak' +} as UTSJSONObject diff --git a/uni_modules/uni-id-pages-x/init.uts b/uni_modules/uni-id-pages-x/init.uts index 727309c..a6e00af 100644 --- a/uni_modules/uni-id-pages-x/init.uts +++ b/uni_modules/uni-id-pages-x/init.uts @@ -15,7 +15,7 @@ const loginTypes = configLoginTypes == null ? [] as string[] : configLoginTypes; const debug = config.getBoolean('debug') as boolean; -// #ifdef APP && ( uniVersion > 3.99 || uniVersion == 3.99) +// #ifdef APP && uniVersion >= 3.98 import Univerify from '@/uni_modules/uni-id-pages-x/lib/Univerify.uts' // #endif @@ -78,7 +78,7 @@ export default async function () { }) } - // #ifdef APP + // #ifdef APP && uniVersion >= 3.98 // 如果uni-id-pages配置的登录功能有一键登录,有则执行预登录(异步) if (loginTypes.includes('univerify')) { const myUniverify = new Univerify() @@ -152,8 +152,8 @@ export default async function () { // needLogin相关代码-start(此代码仅为版本兼容提示使用,如已知晓可删除) const needLogin = config.getArray('needLogin') - const uniCompileVersionCode = uni.getSystemInfoSync().uniCompileVersionCode as number - if(needLogin != null && (uniCompileVersionCode > 3.99 || uniCompileVersionCode == 3.99) ){ + const uniCompileVersionCode = uni.getSystemInfoSync().uniCompileVersionCode + if(needLogin != null && (uniCompileVersionCode >= 3.99 ) ){ const tipText = "uni-id-pages x v1.0.4+ 不再支持配置项config.needLogin,请升级HBuilderX 版本为3.99+,使用更强大 uni-id-router替代。详情查看:https://uniapp.dcloud.net.cn/uniCloud/uni-id/summary.html#uni-id-router" console.error(tipText) uni.showModal({ diff --git a/uni_modules/uni-id-pages-x/lib/Univerify.uts b/uni_modules/uni-id-pages-x/lib/Univerify.uts index ab36324..ef2bd6e 100644 --- a/uni_modules/uni-id-pages-x/lib/Univerify.uts +++ b/uni_modules/uni-id-pages-x/lib/Univerify.uts @@ -17,11 +17,11 @@ const loginTypes = config.getArray('loginTypes'); // buttonsList.push(buttons) // }) -// #ifdef uniVersion < 3.99 +// #ifdef uniVersion < 3.98 // #endif -// #ifdef APP && (uniVersion > 3.99 || uniVersion == 3.99) +// #ifdef APP && uniVersion >= 3.98 const univerifyManager = uni.getUniverifyManager(); export default class Univerify { diff --git a/uni_modules/uni-id-pages-x/pages/login/login.uvue b/uni_modules/uni-id-pages-x/pages/login/login.uvue index 0768a81..de686ca 100644 --- a/uni_modules/uni-id-pages-x/pages/login/login.uvue +++ b/uni_modules/uni-id-pages-x/pages/login/login.uvue @@ -33,7 +33,7 @@