|
@ -19,7 +19,7 @@ |
|
|
<ns-form |
|
|
<ns-form |
|
|
style="width: 100%; margin: auto" |
|
|
style="width: 100%; margin: auto" |
|
|
ref="formOneRef" |
|
|
ref="formOneRef" |
|
|
formLayout="修改" |
|
|
formLayout="vertical" |
|
|
:schemas="formSchema" |
|
|
:schemas="formSchema" |
|
|
:model="data" /> |
|
|
:model="data" /> |
|
|
<div class="step-box"> |
|
|
<div class="step-box"> |
|
@ -32,8 +32,6 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</a-layout-content> |
|
|
</a-layout-content> |
|
|
<a class="toLogin" @click="toLogin" v-show="step === 0">登录已有豪恩账号 ></a> |
|
|
|
|
|
<!-- <a-layout-footer>Copyright 2021 xu科技 All Rights Reserved</a-layout-footer> --> |
|
|
|
|
|
</a-layout> |
|
|
</a-layout> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
@ -69,7 +67,7 @@ |
|
|
const { navigateBackV2: navigateBack } = useNavigate(); |
|
|
const { navigateBackV2: navigateBack } = useNavigate(); |
|
|
const formSchema = reactive([ |
|
|
const formSchema = reactive([ |
|
|
{ |
|
|
{ |
|
|
field: 'oldPassword', |
|
|
field: 'originPassword', |
|
|
label: '原密码', |
|
|
label: '原密码', |
|
|
component: 'NsInputPassword', |
|
|
component: 'NsInputPassword', |
|
|
componentProps: { |
|
|
componentProps: { |
|
@ -86,7 +84,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
field: 'newPassword', |
|
|
field: 'password', |
|
|
label: '新密码', |
|
|
label: '新密码', |
|
|
component: 'NsInputPassword', |
|
|
component: 'NsInputPassword', |
|
|
componentProps: { |
|
|
componentProps: { |
|
@ -147,7 +145,7 @@ |
|
|
if (!value) { |
|
|
if (!value) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (value !== data.newPassword) { |
|
|
if (value !== data.password) { |
|
|
return Promise.reject('两次密码不一致'); |
|
|
return Promise.reject('两次密码不一致'); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -166,14 +164,14 @@ |
|
|
async function update() { |
|
|
async function update() { |
|
|
try { |
|
|
try { |
|
|
const res = await http.post(configStore.updatePassWordInfo?.api, data); |
|
|
const res = await http.post(configStore.updatePassWordInfo?.api, data); |
|
|
if (res.success) { |
|
|
// if (res.success) { |
|
|
NsMessage.success('修改成功,需重新登陆', 1, () => { |
|
|
NsMessage.success('修改成功,需重新登陆', 1, () => { |
|
|
Cookies.remove(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`); |
|
|
Cookies.remove(`${import.meta.env.VITE_PUBLIC_PATH}-nervsid`); |
|
|
sessionStorage.clear(); |
|
|
sessionStorage.clear(); |
|
|
router.push('/login'); |
|
|
router.replace('/login'); |
|
|
authorizationStore.clearAuthorization(); |
|
|
authorizationStore.clearAuthorization(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
// } |
|
|
loading.value = false; |
|
|
loading.value = false; |
|
|
} catch (err) { |
|
|
} catch (err) { |
|
|
loading.value = false; |
|
|
loading.value = false; |
|
|