Browse Source

HL-6334SCP正式环境,账号忘记密码,更改对邮箱验证的样式。

hella_online_20241107
yufei_wang 4 weeks ago
parent
commit
3e15e46d57
  1. 32
      src/views/login/forgetPassword.vue

32
src/views/login/forgetPassword.vue

@ -10,6 +10,20 @@
>
<div class="title">{{ t('ts.忘记密码') }}</div>
<el-row type="flex" justify="center" align="middle">
<el-col>
<el-form-item v-if="tenantEnable === 'true'" prop="tenantName">
<!-- <el-input v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')"
:prefix-icon="iconHouse" link type="primary" /> -->
<el-select v-model="loginData.tenantName" :placeholder="t('login.tenantNamePlaceholder')" :prefix-icon="iconHouse">
<el-option
v-for="item in tenantArray"
:key="item"
:label="t(`ts.${item.aliasName}`).replace('ts.','')"
:value="item.name"
/>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item :label="t('ts.用户名')" prop="username" align="center">
<el-input v-model="loginData.username" :placeholder="t('ts.请输入用户名')" />
@ -39,6 +53,10 @@ import { setTenantId, setToken } from '@/utils/auth'
import { usePermissionStore } from '@/store/modules/permission'
import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login'
import * as UserApi from '@/api/system/user'
import { getTenant } from '@/utils/systemParam'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()
const language = wsCache.get('lang')
const { t } = useI18n()
const message = useMessage()
@ -53,7 +71,21 @@ const rules = {
email: [{ required: true, message: '请输入邮箱', trigger: 'blur' }]
}
const tenantEnable = import.meta.env.VITE_APP_TENANT_ENABLE
const tenantArray = ref(JSON.parse(getTenant()))
if('en-US'==language){
tenantArray.value = tenantArray.value.map(item => ({
name: item,
aliasName:item.replace('长春','ChangChun').replace('成都','ChengDu')
}));
}else{
tenantArray.value = tenantArray.value.map(item => ({
name: item,
aliasName:item
}));
}
const loginData = reactive({
tenantName: tenantArray.value[0].name,
username: '',
email: ''
})

Loading…
Cancel
Save