diff --git a/pages/index/index.uvue b/pages/index/index.uvue
index 26321046840916a58c01a1744632c21c35745cc0..287a00de74ffcc9225a806f13b0e8ac5cb0e246a 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 0ec4b0525dcaa5e1dbfc77178d39fe6abfc3adde..21478b59aaaf02cef1b07b1653aacfab301ebda9 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 727309cecbb57a353b01aea645af58bfc334b7ca..a6e00af717dd0fb886a1ddbda751ad7dafa44955 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 ab363243c342a62e7956cb43d411ab110b3b9458..ef2bd6e0a255a31dfe87f53e548b7ecf23f50efc 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 0768a81f515144e22c8205065c7c043b584f74b3..de686cac4669420af1402f10054ec9fcb6ee8f81 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 @@