【修改】修改接口和菜单权限

This commit is contained in:
fengachen
2022-08-15 17:43:01 +08:00
parent 2e15cc14b3
commit fc6ae1122f
2 changed files with 21 additions and 10 deletions
+9 -5
View File
@@ -130,7 +130,7 @@ export default {
rules: [
{required: true, message: '请输入新密码!'},
{
pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/,
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,30}$/,
message: '密码由8位及以上数字、大小写字母和特殊符号组成!'
}
],
@@ -153,6 +153,7 @@ export default {
},
userList: {},
temporaryUserInfo: null, // 临时用户数据
loginType:false, // true => 管理员登录 false =>联系人登录
}
},
created() {
@@ -161,12 +162,13 @@ export default {
if (this.$route.query.isFirstLogin === 'true') {
this.getPublicKey()
this.temporaryUserInfo = Vue.ls.get('Enterprise_TemporaryUserInfo')
console.log(this.temporaryUserInfo,'temporaryUserInfotemporaryUserInfo')
this.loginType = this.temporaryUserInfo.result.userInfo.roleCode+'' === '3'
}
},
methods: {
...mapActions(['FirstPhoneLogin']),
submit() {
let that = this
that.loading = true
this.form.validateFields((err, values) => {
@@ -181,12 +183,12 @@ export default {
params.phone = encrypt.encrypt(values.phone)
params.verifyCode = values.captcha
params.password = encrypt.encrypt(values.password)
url = '/company/verificationChangePassword'
url = this.loginType ? '/companyManager/verificationChangePassword' : '/company/verificationChangePassword'
} else {
params.newPassword = encrypt.encrypt(values.password)
// 初次登录用password字段存了token
params.password = that.temporaryUserInfo.result.token
url = '/company/changePasswordWithToken'
url = this.loginType ? '/companyManager/changePasswordWithToken' :'/company/changePasswordWithToken'
}
params.verifyPassword = encrypt.encrypt(values.confirmPassword)
postAction(url, params).then((res) => {
@@ -262,7 +264,9 @@ export default {
// 忘记密码是2
codeType: 2
}
getAction('/company/sendVerificationCode', smsParams).then(res => {
// '
let url = this.loginType ? '/companyManager/sendVerificationCode' : '/company/sendVerificationCode'
getAction(url, smsParams).then(res => {
if (!res.success) {
setTimeout(hide, 1)
this.cmsFailed(res.message)