diff --git a/uni_modules/uni-id-pages/changelog.md b/uni_modules/uni-id-pages/changelog.md index 9d10c85bd89fa777f09f042e8991eb902b60f05d..210fd1b3782a9ceaed5508f422e6cae043db8014 100644 --- a/uni_modules/uni-id-pages/changelog.md +++ b/uni_modules/uni-id-pages/changelog.md @@ -1,3 +1,15 @@ +## 1.0.12(2022-09-07) +- 优化 适配pc端样式 +- 新增 邮箱验证码注册 +- 新增 邮箱验证码找回密码 +## 1.0.11(2022-09-01) +- 修复 iOS端,一键登录功能卡在showLoading的问题 +- 更新 合并密码强度与长度配置 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#config) +- uni-id-co 修复 调用 removeAuthorizedApp 接口报错的Bug +- uni-id-co 新增 管理端接口 updateUser [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#update-user) +- uni-id-co 调整 为兼容旧版本,未配置密码强度时提供最简单的密码规则校验(长度大于6即可) +- uni-id-co 调整 注册、登录时如果携带了token则尝试对此token进行登出操作 +- uni-id-co 调整 管理端接口 addUser 增加 mobile、email等参数 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#add-user) ## 1.0.10(2022-08-25) - 修复 导入uni-id-pages插件时未自动导入uni-open-bridge-common的Bug ## 1.0.9(2022-08-23) diff --git a/uni_modules/uni-id-pages/common/password.js b/uni_modules/uni-id-pages/common/password.js index 4944191cb0759bdf598f7b7bb817d664399c2d09..c3f677a79568d08bf5b375dde78a4e18dcdf3971 100644 --- a/uni_modules/uni-id-pages/common/password.js +++ b/uni_modules/uni-id-pages/common/password.js @@ -1,19 +1,8 @@ // 导入配置 import config from '@/uni_modules/uni-id-pages/config.js' -const passwordLength = config.password.length -const passwordStrength = config.password.strength +const {passwordStrength} = config -let minPasswordLength = 6 -let maxPasswordLength = 20 -if (passwordLength) { - if (passwordLength[0]) { - minPasswordLength = passwordLength[0] - } - if (passwordLength[1]) { - maxPasswordLength = passwordLength[1] - } -} // 密码强度表达式 const passwordRules = { // 密码必须包含大小写字母、数字和特殊符号 @@ -37,11 +26,6 @@ const ERROR = { strong: '密码必须包含字母、数字和特殊符号,密码长度必须在8-16位之间', medium: '密码必须为字母、数字和特殊符号任意两种的组合,密码长度必须在8-16位之间', weak: '密码必须包含字母,密码长度必须在6-16位之间' - }, - passwordLengthError: { - normal: '密码长度必须在' + minPasswordLength + '-' + maxPasswordLength + '位之间', - minLimit: '密码长度不得少于' + minPasswordLength + '位', - maxLimit: '密码长度不得超过' + maxPasswordLength + '位' } } @@ -52,16 +36,6 @@ function validPwd(password) { return ERROR.passwordStrengthError[passwordStrength] } } - //长度校验 - if (passwordLength) { - if (passwordLength[0] && password.length < passwordLength[0]) { - return ERROR.passwordLengthError.minLimit - } - if (passwordLength[1] && password.length > passwordLength[1]) { - return ERROR.passwordLengthError.maxLimit - } - } - return true } @@ -106,8 +80,6 @@ function getPwdRules(pwdName = 'password', rePwdName = 'password2') { export default { ERROR, - minPasswordLength, - maxPasswordLength, validPwd, getPwdRules } diff --git a/uni_modules/uni-id-pages/config.js b/uni_modules/uni-id-pages/config.js index 8d632d91db5850c74900f2701d795bacd87facc8..09fc92ba80ce817fbd74f5010fca7f29c62985f5 100644 --- a/uni_modules/uni-id-pages/config.js +++ b/uni_modules/uni-id-pages/config.js @@ -1,6 +1,6 @@ export default { //调试模式 - "debug": true, + "debug": false, /* 登录类型 未列举到的或运行环境不支持的,将被自动隐藏。 如果需要在不同平台有不同的配置,直接用条件编译即可 @@ -43,16 +43,13 @@ export default { "web": "xxxxxx" } }, - /** - * 密码强度 - * super(超强:密码必须包含大小写字母、数字和特殊符号) - * strong(强: 密码必须包含字母、数字和特殊符号) - * medium (中:密码必须为字母、数字和特殊符号任意两种的组合) - * weak(弱:密码必须包含字母) - * 为空或false则不验证密码强度 - */ - "password": { - "strength": "medium", - "length": [6, 20] //密码长度,默认在6-20位之间 - } + /** + * 密码强度 + * super(超强:密码必须包含大小写字母、数字和特殊符号,长度范围:8-16位之间) + * strong(强: 密密码必须包含字母、数字和特殊符号,长度范围:8-16位之间) + * medium (中:密码必须为字母、数字和特殊符号任意两种的组合,长度范围:8-16位之间) + * weak(弱:密码必须包含字母和数字,长度范围:6-16位之间) + * 为空或false则不验证密码强度 + */ + "passwordStrength":"medium" } diff --git a/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue b/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue index dba1be12c341795d4771b769ce56ec9453102e62..b58f78fa0386774acd35c8f503e2f0a2205b91cb 100644 --- a/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue +++ b/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue @@ -190,6 +190,9 @@ .quickLoginBtn { margin: 20px 0; width: 450rpx; + /* #ifndef APP-NVUE */ + max-width: 230px; + /* #endif */ height: 82rpx; } diff --git a/uni_modules/uni-id-pages/pages/register/register-by-email.vue b/uni_modules/uni-id-pages/pages/register/register-by-email.vue index 0c239301135499c056e9dd8d5e08ea6e59acdafe..1a345149c21d9d054a2c48348d0a724aedf7d8ed 100644 --- a/uni_modules/uni-id-pages/pages/register/register-by-email.vue +++ b/uni_modules/uni-id-pages/pages/register/register-by-email.vue @@ -19,7 +19,7 @@ @@ -116,11 +116,6 @@ logo: "/static/logo.png" } }, - computed:{ - passwordLength(){ - return config.password.length - } - }, onReady() { this.$refs.form.setRules(this.rules) }, diff --git a/uni_modules/uni-id-pages/pages/register/register.vue b/uni_modules/uni-id-pages/pages/register/register.vue index 543afc4f93adda7cbd24fafa572c4ced7a0d5ef6..abd1de11e77e8549df60edd1314419a750bb5bf0 100644 --- a/uni_modules/uni-id-pages/pages/register/register.vue +++ b/uni_modules/uni-id-pages/pages/register/register.vue @@ -19,7 +19,7 @@ @@ -67,11 +67,6 @@ logo: "/static/logo.png" } }, - computed:{ - passwordLength(){ - return config.password.length - } - }, onReady() { this.$refs.form.setRules(this.rules) }, diff --git a/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue b/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue index 1ce6e5334f59746ddef1496d59a8d3ab485a140e..567eaba8f0df746435a6d1bb6f07a505195cf76f 100644 --- a/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue +++ b/uni_modules/uni-id-pages/pages/userinfo/userinfo.vue @@ -1,79 +1,79 @@ -