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(() => {
|
.then(() => {
|
||||||
let data = {
|
let data = {
|
||||||
BaseUrl: `${location.protocol}//${location.host}/login`,
|
BaseUrl: `${location.protocol}//${location.host}/login`,
|
||||||
UserId: this.userId
|
IdentityUserId: this.userId
|
||||||
}
|
}
|
||||||
resetPassword(data).then(res => {
|
resetPassword(data).then(res => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="display: flex; justify-content: center">
|
<div style="display: flex; justify-content: center">
|
||||||
<div
|
<div style="
|
||||||
style="
|
|
||||||
width: 600px;
|
width: 600px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid #e6e6e6;
|
border: 1px solid #e6e6e6;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
padding: 10px;
|
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>
|
</div>
|
||||||
<el-form
|
<el-form ref="passwordForm" v-loading="loading" label-position="right" :model="password"
|
||||||
ref="passwordForm"
|
:rules="passwordFormRules" :label-width="$i18n.locale == 'zh' ? '100px' : '200px'">
|
||||||
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-form-item :label="$t('recompose:form:email')" prop="Email">
|
||||||
<el-input v-model="password.Email" disabled />
|
<el-input v-model="password.Email" disabled />
|
||||||
|
|
@ -34,32 +23,15 @@
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<!-- 用户名 -->
|
<!-- 用户名 -->
|
||||||
<el-form-item :label="$t('recompose:form:userName')" prop="NewUserName">
|
<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>
|
||||||
<!-- 新密码 -->
|
<!-- 新密码 -->
|
||||||
<el-form-item
|
<el-form-item class="my_new_pwd" :label="$t('recompose:form:newPassword')" prop="NewPassWord">
|
||||||
class="my_new_pwd"
|
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" />
|
||||||
: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>
|
||||||
<!-- 确认密码 -->
|
<!-- 确认密码 -->
|
||||||
<el-form-item
|
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
|
||||||
:label="$t('recompose:form:confirmPassword')"
|
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" />
|
||||||
prop="ConfirmPassWord"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="password.ConfirmPassWord"
|
|
||||||
type="password"
|
|
||||||
show-password
|
|
||||||
auto-complete="new-password"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="text-align: right">
|
<el-form-item style="text-align: right">
|
||||||
<!-- 取消 -->
|
<!-- 取消 -->
|
||||||
|
|
@ -105,11 +77,11 @@ export default {
|
||||||
callback(
|
callback(
|
||||||
lang === 'zh'
|
lang === 'zh'
|
||||||
? new Error(
|
? new Error(
|
||||||
'1)新建账号,用户名字符长度最小为4个字符,最大为16个字符,只可使用字母、数字、下划线;'
|
'1)新建账号,用户名字符长度最小为4个字符,最大为16个字符,只可使用字母、数字、下划线;'
|
||||||
)
|
)
|
||||||
: new Error(
|
: 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 {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
|
|
@ -124,8 +96,8 @@ export default {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
!value
|
!value
|
||||||
? callback(
|
? callback(
|
||||||
new Error(this.$t('trials:researchForm:formRule:specify'))
|
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||||
)
|
)
|
||||||
: callback()
|
: callback()
|
||||||
},
|
},
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
|
|
@ -142,8 +114,8 @@ export default {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
!value
|
!value
|
||||||
? callback(
|
? callback(
|
||||||
new Error(this.$t('trials:researchForm:formRule:specify'))
|
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||||
)
|
)
|
||||||
: callback()
|
: callback()
|
||||||
},
|
},
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
|
|
@ -154,12 +126,12 @@ export default {
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
value !== this.password.NewPassWord
|
value !== this.password.NewPassWord
|
||||||
? callback(
|
? callback(
|
||||||
new Error(
|
new Error(
|
||||||
this.$t(
|
this.$t(
|
||||||
'trials:researchForm:formRule:NewPassWordAndConfirmPassWord'
|
'trials:researchForm:formRule:NewPassWordAndConfirmPassWord'
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
: callback()
|
: callback()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -175,6 +147,7 @@ export default {
|
||||||
},
|
},
|
||||||
userId: null,
|
userId: null,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
isUpdate: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -182,11 +155,15 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.password.UserId = this.$route.query.UserId
|
this.password.UserId = this.$route.query.UserId
|
||||||
|
zzSessionStorage.setItem('identityUserId', this.$route.query.UserId)
|
||||||
this.password.NewUserName = this.$route.query.UserName
|
this.password.NewUserName = this.$route.query.UserName
|
||||||
this.password.Email = this.$route.query.Email
|
this.password.Email = this.$route.query.Email
|
||||||
this.password.UserType = this.$route.query.UserType
|
this.password.UserType = this.$route.query.UserType
|
||||||
this.password.access_token = this.$route.query.access_token
|
this.password.access_token = this.$route.query.access_token
|
||||||
this.$i18n.locale = this.$route.query.lang
|
this.$i18n.locale = this.$route.query.lang
|
||||||
|
if (this.$route.query.isUpdate) {
|
||||||
|
this.isUpdate = true
|
||||||
|
}
|
||||||
this.setLanguage(this.$route.query.lang)
|
this.setLanguage(this.$route.query.lang)
|
||||||
this.$updateDictionary()
|
this.$updateDictionary()
|
||||||
// if (!this.password.NewUserName) {
|
// if (!this.password.NewUserName) {
|
||||||
|
|
@ -256,12 +233,14 @@ export default {
|
||||||
.reset-wrapper {
|
.reset-wrapper {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reset-wrapper .el-page-header {
|
.reset-wrapper .el-page-header {
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
border: 1px solid #ebeef5;
|
border: 1px solid #ebeef5;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reset-wrapper .box-wrapper {
|
.reset-wrapper .box-wrapper {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
|
|
@ -277,10 +256,12 @@ input:-webkit-autofill {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
transition: background-color 50000s ease-in-out 0s;
|
transition: background-color 50000s ease-in-out 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
caret-color: #fff;
|
caret-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .is-error.my_new_pwd {
|
::v-deep .is-error.my_new_pwd {
|
||||||
margin-bottom: 45px;
|
margin-bottom: 45px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@
|
||||||
<svg-icon icon-class="login-logo" style="width: 300px; height: 94px" />
|
<svg-icon icon-class="login-logo" style="width: 300px; height: 94px" />
|
||||||
</div>
|
</div>
|
||||||
<div class="title" v-else>
|
<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 :style="`font-size:${isEN ? '28px' : '35px'}`">{{ $t('login:title:system') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -364,7 +365,7 @@ export default {
|
||||||
this.$message.success(this.$t('login:message:login1'))
|
this.$message.success(this.$t('login:message:login1'))
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({
|
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)
|
}, 500)
|
||||||
return
|
return
|
||||||
|
|
@ -376,7 +377,7 @@ export default {
|
||||||
{
|
{
|
||||||
callback: (action) => {
|
callback: (action) => {
|
||||||
this.$router.push({
|
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
|
return
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export default {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
let data = {
|
let data = {
|
||||||
BaseUrl: `${location.protocol}//${location.host}/login`,
|
BaseUrl: `${location.protocol}//${location.host}/login`,
|
||||||
UserId: this.userId
|
IdentityUserId: this.userId
|
||||||
}
|
}
|
||||||
resetPassword(data).then(res => {
|
resetPassword(data).then(res => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue