Commit c5d4c613 authored by youjie's avatar youjie

账号中心

parent 15d9ad15
...@@ -144,9 +144,6 @@ body { ...@@ -144,9 +144,6 @@ body {
.customColor-text-7{color: var(--customColor-text-7);} .customColor-text-7{color: var(--customColor-text-7);}
.customColor-text-6{color: var(--customColor-text-6);} .customColor-text-6{color: var(--customColor-text-6);}
.customColor-text-5{color: var(--customColor-text-5);} .customColor-text-5{color: var(--customColor-text-5);}
*{
color: var(--customColor-text-10);
}
@font-face{ @font-face{
font-family:'Source Han Sans CN ExtraLight'; font-family:'Source Han Sans CN ExtraLight';
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
"coupon": "优惠券", "coupon": "优惠券",
"accountCenter": "账户中心", "accountCenter": "账户中心",
"commonPassengerInfo": "常用旅客信息", "commonPassengerInfo": "常用旅客信息",
"distributionCenter": "分销中心" "distributionCenter": "分销中心",
"resetPassword": "重置密码",
"editEmail": "绑定/修改邮箱"
} }
} }
\ No newline at end of file
...@@ -178,14 +178,18 @@ export default { ...@@ -178,14 +178,18 @@ export default {
medium: '中', medium: '中',
high: '高', high: '高',
passwordSecurityTip: ' 安全性高的密码可以使账号更安全。建议您定期更换密码,且设置一个包含数字和字母,并且长度超过8位以上的密码。', passwordSecurityTip: ' 安全性高的密码可以使账号更安全。建议您定期更换密码,且设置一个包含数字和字母,并且长度超过8位以上的密码。',
bindPhoneTip: '绑定手机后,您即可享受手机号登录、动态码登录、找回密码等。为了帐号安全建议您在更换手机号后第一时间更换绑定手机。 ', bindPhoneTip: '绑定手机。 ',
changeBindData: '更换', changeBindData: '更换',
bindEmailTip: '邮箱用于验证码接收,账户登录。', bindEmailTip: '邮箱用于验证码接收,账户登录。',
bindWechatTip: '通过微信账户快速登录,无需输入密码。', bindWechatTip: '通过微信账户快速登录,无需输入密码。',
bindGoogleTip: '通过谷歌账户快速登录,无需输入密码。', bindGoogleTip: '通过谷歌账户快速登录,无需输入密码。',
bindLineTip: '绑定手机后,您即可享受手机号登录、动态码登录、找回密码等。为了帐号安全建议您在更换手机号后第一时间更换绑定手机。', bindLineTip: '通过Line账户快速登录,无需输入密码。',
notYetBin: '暂未绑定', notYetBin: '暂未绑定',
goBind: '去绑定', goBind: '去绑定',
confirmChange: '确认修改',
return: '返回',
oldPassword: '旧密码',
placeholderNewPassword: '请输入新密码',
}, },
// HTTP 错误状态码 // HTTP 错误状态码
httpError: { httpError: {
......
<template> <template>
<div class="h-screen flex flex-col"> <div class="h-screen flex flex-col">
<!-- 顶部工具栏 --> <!-- 顶部工具栏 -->
<Headers <Headers
:menu-list="menuList" :menu-list="menuList"
:active-menu="activeMenu"/> :active-menu="activeMenu"/>
<!-- 页面内容 --> <!-- 页面内容 -->
<main class="flex-1 flex flex-col overflow-hidden"> <main class="flex-1 flex flex-col overflow-hidden">
<router-view /> <router-view />
</main> </main>
</div> </div>
</template> </template>
...@@ -21,7 +21,7 @@ import Headers from './components/Headers.vue' ...@@ -21,7 +21,7 @@ import Headers from './components/Headers.vue'
const { t } = useI18n() const { t } = useI18n()
const route = useRoute() const route = useRoute()
const collapsed = ref(false) const loading = ref(true)
// 当前激活的菜单 // 当前激活的菜单
...@@ -70,13 +70,10 @@ const menuList = ref([ ...@@ -70,13 +70,10 @@ const menuList = ref([
} }
]) ])
// 菜单点击
const handleMenuClick = (key: string) => {
}
onMounted(() => { onMounted(() => {
setTimeout(()=>{
loading.value = false
},500)
}) })
</script> </script>
......
...@@ -54,7 +54,17 @@ const router = createRouter({ ...@@ -54,7 +54,17 @@ const router = createRouter({
component: () => import ('../views/personalCenter/distributionCenter.vue') component: () => import ('../views/personalCenter/distributionCenter.vue')
}, },
] ]
} },
{
path: '/resetPassword',
meta: { title: "page.resetPassword" },
component: () => import ('../views/personalCenter/resetPassword.vue')
},
{
path: '/editEmail',
meta: { title: "page.editEmail" },
component: () => import ('../views/personalCenter/editEmail.vue')
},
] ]
}, },
{ {
...@@ -70,7 +80,7 @@ const router = createRouter({ ...@@ -70,7 +80,7 @@ const router = createRouter({
meta: { title: "page.register" }, meta: { title: "page.register" },
}, },
{ {
path: "/forgePassword", path: "/forgePassword/:email?",
name: "forgePassword", name: "forgePassword",
component: () => import("../views/auth/forgePassword.vue"), component: () => import("../views/auth/forgePassword.vue"),
meta: { title: "page.forgotPassword" }, meta: { title: "page.forgotPassword" },
......
...@@ -242,6 +242,20 @@ export interface ResetPasswordDto { ...@@ -242,6 +242,20 @@ export interface ResetPasswordDto {
newPassword: string newPassword: string
} }
/**
* 更新密码请求参数
*/
export interface NewPasswordResponseDto {
/** 租户ID */
tenantId: string
/** 旧密码 */
oldPassword: string
/** 新密码 */
newPassword: string
}
/** /**
* 重置密码响应 * 重置密码响应
*/ */
...@@ -571,6 +585,32 @@ class UserService { ...@@ -571,6 +585,32 @@ class UserService {
return response as unknown as ResetPasswordResponseDto return response as unknown as ResetPasswordResponseDto
} }
/**
* 更新密码
* @param email 邮箱地址
* @param code 验证码
* @param newPassword 新密码
* @param confirmPassword 确认密码
* @param tenantId 租户ID(可选)
* @returns 重置结果
*/
static async setNewPasswordAsync(
tenantId: string,
oldPassword: string,
newPassword: string,
): Promise<HttpResponse> {
const data: NewPasswordResponseDto = {
tenantId,
oldPassword,
newPassword,
}
const response = await OtaRequest.post(
'/account/password',
data
)
return response as unknown as HttpResponse
}
/** /**
* 获取个人中心信息 * 获取个人中心信息
* @param tenantId 租户ID(可选) * @param tenantId 租户ID(可选)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -59,7 +59,9 @@ ...@@ -59,7 +59,9 @@
</span> </span>
<a-badge class="ml-[8px]" v-if="item.count" <a-badge class="ml-[8px]" v-if="item.count"
:count="item.count" :count="item.count"
:dotStyle="{ background: '#FF9707', minWidth: '16px', width: '16px', minHeight: '16px', height: '16px',fontSize:'12px',borderRadius:'16px',lineHeight:'15px' }" :dotStyle="{ background: '#FF9707', minWidth: '16px', width: '16px',
minHeight: '16px', height: '16px',fontSize:'12px',borderRadius:'16px',
lineHeight:'15px', color:'#fff' }"
/> />
</div> </div>
</div> </div>
......
...@@ -153,7 +153,7 @@ const rules = computed(() => ({ ...@@ -153,7 +153,7 @@ const rules = computed(() => ({
}, },
{ {
validator: (value: any, cb: any) => { validator: (value: any, cb: any) => {
if (!/^(?=.*[A-Za-z])(?=.*\d).{8,}$/.test(value)) { if (!/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d\S]{8,}$/.test(value)) {
cb(t('login.passwordFormat')) cb(t('login.passwordFormat'))
}else { }else {
cb() cb()
...@@ -165,7 +165,7 @@ const rules = computed(() => ({ ...@@ -165,7 +165,7 @@ const rules = computed(() => ({
{ required: true, message: t('login.newPasswordRequired') }, { required: true, message: t('login.newPasswordRequired') },
{ {
validator: (value: any, cb: any) => { validator: (value: any, cb: any) => {
if (!/^(?=.*[A-Za-z])(?=.*\d).{8,}$/.test(value)) { if (!/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d\S]{8,}$/.test(value)) {
cb(t('login.passwordFormat')) cb(t('login.passwordFormat'))
}else { }else {
cb() cb()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment