提交 c01efd43 编写于 作者: A Anne_LXM

调整 一键登录要求的版本号

上级 6f088a13
......@@ -17,7 +17,7 @@
<text class="list-item-text">账号密码登录</text>
<uni-id-pages-x-icons type="right-arrow" color="#999" />
</view>
<!-- #ifdef APP && (uniVersion > 3.99 || uniVersion == 3.99) -->
<!-- #ifdef APP && uniVersion >= 3.98 -->
<view class="list-item" @click="toLogin('univerify')" v-if="hasUniverify">
<text class="list-item-text">一键登录</text>
<uni-id-pages-x-icons type="right-arrow" color="#999" />
......
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
......@@ -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<string>('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({
......
......@@ -17,11 +17,11 @@ const loginTypes = config.getArray<string>('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 {
......
......@@ -33,7 +33,7 @@
<script>
import { state } from '@/uni_modules/uni-id-pages-x/store.uts';
import config from '@/uni_modules/uni-id-pages-x/config.uts';
// #ifdef APP
// #ifdef APP && uniVersion >= 3.98
import Univerify from '@/uni_modules/uni-id-pages-x/lib/Univerify.uts'
// #endif
export default {
......@@ -64,7 +64,7 @@
methods: {
login(){},
verify(){
// #ifdef APP
// #ifdef APP && uniVersion >= 3.98
const univerifyManager = new Univerify()
univerifyManager.verify(true)
// #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册