90天后未修改密码,跳转到修改账户界面,管理员重置密码跳转界面,不应该为初始化账户信息,应为修改账户信息
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0327937f02
commit
b0ad500f7a
|
|
@ -25,7 +25,7 @@ export default {
|
|||
.then(() => {
|
||||
let data = {
|
||||
BaseUrl: `${location.protocol}//${location.host}/login`,
|
||||
UserId: this.userId
|
||||
IdentityUserId: this.userId
|
||||
}
|
||||
resetPassword(data).then(res => {
|
||||
if (res.IsSuccess) {
|
||||
|
|
|
|||
|
|
@ -1,29 +1,18 @@
|
|||
<template>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<div
|
||||
style="
|
||||
<div style="
|
||||
width: 600px;
|
||||
text-align: center;
|
||||
border: 1px solid #e6e6e6;
|
||||
margin-top: 40px;
|
||||
padding: 10px;
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="trial-myinfo-head"
|
||||
style="font-size: 30px; line-height: 120px"
|
||||
>
|
||||
">
|
||||
<div class="trial-myinfo-head" style="font-size: 30px; line-height: 120px">
|
||||
<!-- 首次登录修改密码 -->
|
||||
{{ $t('recompose:title:init') }}
|
||||
{{ !isUpdate ? $t('recompose:title:init') : $t('recompose:title:update') }}
|
||||
</div>
|
||||
<el-form
|
||||
ref="passwordForm"
|
||||
v-loading="loading"
|
||||
label-position="right"
|
||||
:model="password"
|
||||
:rules="passwordFormRules"
|
||||
:label-width="$i18n.locale == 'zh' ? '100px' : '200px'"
|
||||
>
|
||||
<el-form ref="passwordForm" v-loading="loading" label-position="right" :model="password"
|
||||
:rules="passwordFormRules" :label-width="$i18n.locale == 'zh' ? '100px' : '200px'">
|
||||
<!-- 邮箱 -->
|
||||
<el-form-item :label="$t('recompose:form:email')" prop="Email">
|
||||
<el-input v-model="password.Email" disabled />
|
||||
|
|
@ -34,32 +23,15 @@
|
|||
</el-form-item> -->
|
||||
<!-- 用户名 -->
|
||||
<el-form-item :label="$t('recompose:form:userName')" prop="NewUserName">
|
||||
<el-input v-model="password.NewUserName" />
|
||||
<el-input v-model="password.NewUserName" :disabled="isUpdate" />
|
||||
</el-form-item>
|
||||
<!-- 新密码 -->
|
||||
<el-form-item
|
||||
class="my_new_pwd"
|
||||
:label="$t('recompose:form:newPassword')"
|
||||
prop="NewPassWord"
|
||||
>
|
||||
<el-input
|
||||
v-model="password.NewPassWord"
|
||||
type="password"
|
||||
show-password
|
||||
auto-complete="new-password"
|
||||
/>
|
||||
<el-form-item class="my_new_pwd" :label="$t('recompose:form:newPassword')" prop="NewPassWord">
|
||||
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" />
|
||||
</el-form-item>
|
||||
<!-- 确认密码 -->
|
||||
<el-form-item
|
||||
:label="$t('recompose:form:confirmPassword')"
|
||||
prop="ConfirmPassWord"
|
||||
>
|
||||
<el-input
|
||||
v-model="password.ConfirmPassWord"
|
||||
type="password"
|
||||
show-password
|
||||
auto-complete="new-password"
|
||||
/>
|
||||
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
|
||||
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" />
|
||||
</el-form-item>
|
||||
<el-form-item style="text-align: right">
|
||||
<!-- 取消 -->
|
||||
|
|
@ -105,11 +77,11 @@ export default {
|
|||
callback(
|
||||
lang === 'zh'
|
||||
? new Error(
|
||||
'1)新建账号,用户名字符长度最小为4个字符,最大为16个字符,只可使用字母、数字、下划线;'
|
||||
)
|
||||
'1)新建账号,用户名字符长度最小为4个字符,最大为16个字符,只可使用字母、数字、下划线;'
|
||||
)
|
||||
: new Error(
|
||||
'For a new account, the username must have:1) At least 4 characters;2) At most 16 characters;3)Only letters, numbers, and underscores are allowed.'
|
||||
)
|
||||
'For a new account, the username must have:1) At least 4 characters;2) At most 16 characters;3)Only letters, numbers, and underscores are allowed.'
|
||||
)
|
||||
)
|
||||
} else {
|
||||
callback()
|
||||
|
|
@ -124,8 +96,8 @@ export default {
|
|||
validator: (rule, value, callback) => {
|
||||
!value
|
||||
? callback(
|
||||
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||
)
|
||||
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||
)
|
||||
: callback()
|
||||
},
|
||||
trigger: 'blur',
|
||||
|
|
@ -142,8 +114,8 @@ export default {
|
|||
validator: (rule, value, callback) => {
|
||||
!value
|
||||
? callback(
|
||||
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||
)
|
||||
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||
)
|
||||
: callback()
|
||||
},
|
||||
trigger: 'blur',
|
||||
|
|
@ -154,12 +126,12 @@ export default {
|
|||
validator: (rule, value, callback) => {
|
||||
value !== this.password.NewPassWord
|
||||
? callback(
|
||||
new Error(
|
||||
this.$t(
|
||||
'trials:researchForm:formRule:NewPassWordAndConfirmPassWord'
|
||||
)
|
||||
new Error(
|
||||
this.$t(
|
||||
'trials:researchForm:formRule:NewPassWordAndConfirmPassWord'
|
||||
)
|
||||
)
|
||||
)
|
||||
: callback()
|
||||
},
|
||||
},
|
||||
|
|
@ -175,6 +147,7 @@ export default {
|
|||
},
|
||||
userId: null,
|
||||
loading: false,
|
||||
isUpdate: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -182,11 +155,15 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.password.UserId = this.$route.query.UserId
|
||||
zzSessionStorage.setItem('identityUserId', this.$route.query.UserId)
|
||||
this.password.NewUserName = this.$route.query.UserName
|
||||
this.password.Email = this.$route.query.Email
|
||||
this.password.UserType = this.$route.query.UserType
|
||||
this.password.access_token = this.$route.query.access_token
|
||||
this.$i18n.locale = this.$route.query.lang
|
||||
if (this.$route.query.isUpdate) {
|
||||
this.isUpdate = true
|
||||
}
|
||||
this.setLanguage(this.$route.query.lang)
|
||||
this.$updateDictionary()
|
||||
// if (!this.password.NewUserName) {
|
||||
|
|
@ -256,12 +233,14 @@ export default {
|
|||
.reset-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.reset-wrapper .el-page-header {
|
||||
line-height: 50px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.reset-wrapper .box-wrapper {
|
||||
width: 60%;
|
||||
margin: 20px auto;
|
||||
|
|
@ -277,10 +256,12 @@ input:-webkit-autofill {
|
|||
background-image: none;
|
||||
transition: background-color 50000s ease-in-out 0s;
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: transparent;
|
||||
caret-color: #fff;
|
||||
}
|
||||
|
||||
::v-deep .is-error.my_new_pwd {
|
||||
margin-bottom: 45px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@
|
|||
<svg-icon icon-class="login-logo" style="width: 300px; height: 94px" />
|
||||
</div>
|
||||
<div class="title" v-else>
|
||||
<img src="@/assets/system.png" alt="" :style="{ width: isEN ? '180px' : '200px', height: isEN ? '60px' : '65px' }" />
|
||||
<img src="@/assets/system.png" alt=""
|
||||
:style="{ width: isEN ? '180px' : '200px', height: isEN ? '60px' : '65px' }" />
|
||||
<div :style="`font-size:${isEN ? '28px' : '35px'}`">{{ $t('login:title:system') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -364,7 +365,7 @@ export default {
|
|||
this.$message.success(this.$t('login:message:login1'))
|
||||
setTimeout(() => {
|
||||
this.$router.push({
|
||||
path: `/recompose?userName=${this.loginForm.username}`,
|
||||
path: `/email-recompose?UserId=${res.BasicInfo.IdentityUserId}&Email=${res.BasicInfo.EMail}&UserName=${res.BasicInfo.UserName}&lang=${this.$i18n.locale}&access_token=${res.JWTStr}&isUpdate=1`,
|
||||
})
|
||||
}, 500)
|
||||
return
|
||||
|
|
@ -376,7 +377,7 @@ export default {
|
|||
{
|
||||
callback: (action) => {
|
||||
this.$router.push({
|
||||
path: `/recompose?userName=${this.loginForm.username}`,
|
||||
path: `/email-recompose?UserId=${res.BasicInfo.IdentityUserId}&Email=${res.BasicInfo.EMail}&UserName=${res.BasicInfo.UserName}&lang=${this.$i18n.locale}&access_token=${res.JWTStr}&isUpdate=1`,
|
||||
})
|
||||
return
|
||||
},
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default {
|
|||
.then(() => {
|
||||
let data = {
|
||||
BaseUrl: `${location.protocol}//${location.host}/login`,
|
||||
UserId: this.userId
|
||||
IdentityUserId: this.userId
|
||||
}
|
||||
resetPassword(data).then(res => {
|
||||
if (res.IsSuccess) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue