调整微信小程序的报错。
This commit is contained in:
2
unpackage/dist/dev/mp-weixin/uni_modules/uni-id-pages/common/check-id-card.js
vendored
Normal file
2
unpackage/dist/dev/mp-weixin/uni_modules/uni-id-pages/common/check-id-card.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/uni_modules/uni-id-pages/common/check-id-card.js.map
|
||||
85
unpackage/dist/dev/mp-weixin/uni_modules/uni-id-pages/common/login-page.mixin.js
vendored
Normal file
85
unpackage/dist/dev/mp-weixin/uni_modules/uni-id-pages/common/login-page.mixin.js
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const common_store = require("../../../common/store.js");
|
||||
const uni_modules_uniIdPages_config = require("../config.js");
|
||||
const mixin = {
|
||||
data() {
|
||||
return {
|
||||
config: uni_modules_uniIdPages_config.config,
|
||||
uniIdRedirectUrl: "",
|
||||
isMounted: false
|
||||
};
|
||||
},
|
||||
onUnload() {
|
||||
},
|
||||
mounted() {
|
||||
this.isMounted = true;
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.is_weixin_redirect) {
|
||||
common_vendor.index.showLoading({
|
||||
mask: true
|
||||
});
|
||||
if (window.location.href.includes("#")) {
|
||||
const paramsArr = window.location.href.split("?")[1].split("&");
|
||||
paramsArr.forEach((item) => {
|
||||
const arr = item.split("=");
|
||||
if (arr[0] == "code") {
|
||||
e.code = arr[1];
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$nextTick((n) => {
|
||||
this.$refs.uniFabLogin.login({
|
||||
code: e.code
|
||||
}, "weixin");
|
||||
});
|
||||
}
|
||||
if (e.uniIdRedirectUrl) {
|
||||
this.uniIdRedirectUrl = decodeURIComponent(e.uniIdRedirectUrl);
|
||||
}
|
||||
if (getCurrentPages().length === 1) {
|
||||
common_vendor.index.hideHomeButton();
|
||||
common_vendor.index.__f__("log", "at uni_modules/uni-id-pages/common/login-page.mixin.js:52", "已隐藏:返回首页按钮");
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
needAgreements() {
|
||||
if (this.isMounted) {
|
||||
if (this.$refs.agreements) {
|
||||
return this.$refs.agreements.needAgreements;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
agree: {
|
||||
get() {
|
||||
if (this.isMounted) {
|
||||
if (this.$refs.agreements) {
|
||||
return this.$refs.agreements.isAgree;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
set(agree) {
|
||||
if (this.$refs.agreements) {
|
||||
this.$refs.agreements.isAgree = agree;
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at uni_modules/uni-id-pages/common/login-page.mixin.js:80", "不存在 隐私政策协议组件");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loginSuccess(e) {
|
||||
common_store.mutations.loginSuccess({
|
||||
...e,
|
||||
uniIdRedirectUrl: this.uniIdRedirectUrl
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.mixin = mixin;
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/uni_modules/uni-id-pages/common/login-page.mixin.js.map
|
||||
80
unpackage/dist/dev/mp-weixin/uni_modules/uni-id-pages/common/password.js
vendored
Normal file
80
unpackage/dist/dev/mp-weixin/uni_modules/uni-id-pages/common/password.js
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
const uni_modules_uniIdPages_config = require("../config.js");
|
||||
const { passwordStrength } = uni_modules_uniIdPages_config.config;
|
||||
const passwordRules = {
|
||||
// 密码必须包含大小写字母、数字和特殊符号
|
||||
super: /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/])[0-9a-zA-Z~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]{8,16}$/,
|
||||
// 密码必须包含字母、数字和特殊符号
|
||||
strong: /^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/])[0-9a-zA-Z~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]{8,16}$/,
|
||||
// 密码必须为字母、数字和特殊符号任意两种的组合
|
||||
medium: /^(?![0-9]+$)(?![a-zA-Z]+$)(?![~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]+$)[0-9a-zA-Z~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]{8,16}$/,
|
||||
// 密码必须包含字母和数字
|
||||
weak: /^(?=.*[0-9])(?=.*[a-zA-Z])[0-9a-zA-Z~!@#$%^&*_\-+=`|\\(){}[\]:;"'<>,.?/]{6,16}$/
|
||||
};
|
||||
const ERROR = {
|
||||
normal: {
|
||||
noPwd: "请输入密码",
|
||||
noRePwd: "再次输入密码",
|
||||
rePwdErr: "两次输入密码不一致"
|
||||
},
|
||||
passwordStrengthError: {
|
||||
super: "密码必须包含大小写字母、数字和特殊符号,密码长度必须在8-16位之间",
|
||||
strong: "密码必须包含字母、数字和特殊符号,密码长度必须在8-16位之间",
|
||||
medium: "密码必须为字母、数字和特殊符号任意两种的组合,密码长度必须在8-16位之间",
|
||||
weak: "密码必须包含字母,密码长度必须在6-16位之间"
|
||||
}
|
||||
};
|
||||
function validPwd(password) {
|
||||
if (passwordStrength && passwordRules[passwordStrength]) {
|
||||
if (!new RegExp(passwordRules[passwordStrength]).test(password)) {
|
||||
return ERROR.passwordStrengthError[passwordStrength];
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function getPwdRules(pwdName = "password", rePwdName = "password2") {
|
||||
const rules = {};
|
||||
rules[pwdName] = {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: ERROR.normal.noPwd
|
||||
},
|
||||
{
|
||||
validateFunction: function(rule, value, data, callback) {
|
||||
const checkRes = validPwd(value);
|
||||
if (checkRes !== true) {
|
||||
callback(checkRes);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
if (rePwdName) {
|
||||
rules[rePwdName] = {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
errorMessage: ERROR.normal.noRePwd
|
||||
},
|
||||
{
|
||||
validateFunction: function(rule, value, data, callback) {
|
||||
if (value != data[pwdName]) {
|
||||
callback(ERROR.normal.rePwdErr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
const passwordMod = {
|
||||
ERROR,
|
||||
validPwd,
|
||||
getPwdRules
|
||||
};
|
||||
exports.passwordMod = passwordMod;
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/uni_modules/uni-id-pages/common/password.js.map
|
||||
Reference in New Issue
Block a user