|
@@ -27,6 +27,7 @@
|
|
|
|
|
|
<script>
|
|
|
import userService from "@/api/sys/userService"
|
|
|
+ import * as $auth from "@/common/auth"
|
|
|
var graceChecker = require("@/common/graceChecker.js");
|
|
|
export default {
|
|
|
onShow() {
|
|
@@ -57,25 +58,36 @@
|
|
|
var checkRes = graceChecker.check(formData, rule);
|
|
|
|
|
|
if(checkRes){
|
|
|
+ console.log(this.inputForm.newPassword)
|
|
|
uni.showLoading()
|
|
|
- if (this.newPassword && (this.newPassword.length < 6 || this.newPassword.length > 16)) {
|
|
|
+ if (this.inputForm.newPassword && (this.inputForm.newPassword.length < 6 || this.inputForm.newPassword.length > 16)) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '密码长度为6-16位'
|
|
|
});
|
|
|
return;
|
|
|
- } else if (!(/\d/.test(this.newPassword) && /[a-zA-Z]/.test(this.newPassword))) {
|
|
|
+ } else if (!(/\d/.test(this.inputForm.newPassword) && /[a-zA-Z]/.test(this.inputForm.newPassword))) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '密码必须包含字母+数字'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ let which=$auth.whichLogin();
|
|
|
userService.savePwd(this.inputForm).then(({data}) => {
|
|
|
uni.showToast({title:data, icon:"success"});
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/user/person/person'
|
|
|
- })
|
|
|
+
|
|
|
+ if(which=='dzf'){
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/pages/login/dzflogin'
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}).catch((e)=>{
|
|
|
|
|
|
})
|