system-phone 3.1.40 → 3.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-phone",
3
- "version": "3.1.40",
3
+ "version": "3.1.41",
4
4
  "description": "手机模块 前端组件",
5
5
  "author": "何宁社 <524395609@qq.com>",
6
6
  "license": "ISC",
@@ -104,7 +104,7 @@ let asyncCheck = async function (self, url) {
104
104
  }
105
105
  }
106
106
  }
107
-
107
+ import { validateStrongPasswordPhone } from '../plugins/validateStrongPasswordPhone.js'
108
108
  export default {
109
109
  title: '修改密码',
110
110
  data() {
@@ -158,9 +158,12 @@ export default {
158
158
  this.$showMessage('两次输入密码不一致!')
159
159
  return
160
160
  }
161
- if (Vue.weakPassword && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*(),.?":{}|<>~`+=_\\-])[A-Za-z\d!@#$%^&*(),.?":{}|<>~`+=_\\-]{8,}$/.test(this.model.password))) {
162
- this.$showMessage("密码必须是8~16位数字与大小字母外加特殊字符的组合,并且不能出现类似'123','abc'等连贯数字或者字母")
163
- return
161
+ // 弱口令验证
162
+ if (this.weakPassword) {
163
+ const pwdResult = validateStrongPasswordPhone(this.model.password)
164
+ if (!pwdResult.isValid) {
165
+ this.$showMessage('密码过于简单,' + (pwdResult.errors[0] || '请按照要求修改密码!!!'))
166
+ }
164
167
  }
165
168
  // 检验原始密码是否符合 并修改密码
166
169
  asyncCheck(this, this.$androidUtil.getProxyUrl())