|
|
@@ -1,6 +1,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
import ErrorTips from './components/ErrorTips.vue'
|
|
|
+import FirstLoginTips from './components/FirstLoginTips.vue'
|
|
|
import { useUserStore } from '@/stores/modules/user'
|
|
|
import ScoringSystem from '@/views/Dashboard/src/components/ScoringSystem.vue'
|
|
|
import CryptoJS from 'crypto-js'
|
|
|
@@ -261,15 +262,19 @@ const handleLoginAfterVerify = () => {
|
|
|
} else if (data.msg === 'error_times') {
|
|
|
errorTipsRef.value.openDialog()
|
|
|
} else if (data.msg === 'passwordExpires') {
|
|
|
- ElMessageBox.alert('Password expired, please change your password', 'Prompt', {
|
|
|
- confirmButtonText: 'OK',
|
|
|
+ ElMessageBox.alert('Please change your password for security.', 'Prompt', {
|
|
|
+ confirmButtonText: 'Change Password',
|
|
|
type: 'warning',
|
|
|
confirmButtonClass: 'el-button--dark'
|
|
|
+ }).then(() => {
|
|
|
+ userStore.setUsername(res.data.uname)
|
|
|
+ router.push({
|
|
|
+ name: 'Reset Password'
|
|
|
+ })
|
|
|
})
|
|
|
- userStore.setUsername(res.data.uname || '')
|
|
|
- router.push({
|
|
|
- name: 'Reset Password'
|
|
|
- })
|
|
|
+ } else if (data.msg === 'First login, please change your password') {
|
|
|
+ userStore.setUsername(res.data.uname, true)
|
|
|
+ firstLoginTipsRef.value.openDialog()
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -337,6 +342,7 @@ const handleDeleteEmailTips = (type?: any) => {
|
|
|
}
|
|
|
|
|
|
const errorTipsRef = ref()
|
|
|
+const firstLoginTipsRef = ref()
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
@@ -472,6 +478,7 @@ const errorTipsRef = ref()
|
|
|
ref="sliderVerificationRef"
|
|
|
></VSliderVerification>
|
|
|
<ErrorTips ref="errorTipsRef" @forget-password="status = 'reset'"></ErrorTips>
|
|
|
+ <FirstLoginTips ref="firstLoginTipsRef" @forget-password="status = 'reset'"></FirstLoginTips>
|
|
|
</div>
|
|
|
</template>
|
|
|
|