This commit is contained in:
李远 2026-03-04 17:52:23 +08:00
parent 21173963f9
commit ec46a7a491
8 changed files with 57 additions and 13 deletions

View File

View File

View File

@ -0,0 +1,13 @@
<!-- src/components/layout/Layout.vue -->
<template>
<div class="app-layout">
<!-- 左侧菜单 -->
<Sidebar />
<!-- 右侧主内容区 -->
<div class="main-content">
<Header />
<!-- 路由视图渲染当前路由对应的页面如dashboard/index.vue -->
<router-view />
</div>
</div>
</template>

View File

@ -1,8 +0,0 @@
<template>
<div class="test-card">
<h1>测试页</h1>
</div>
</template>
<script lang="ts" setup>
</script>

View File

@ -0,0 +1,4 @@
<template>
<Layout>
</Layout>
</template>

View File

@ -134,6 +134,20 @@ watch(
{ immediate: false } // { immediate: false } //
) )
//
const sendCodeApi = async () => {
//
const sendParams = {
email: changePasswordForm.value.email,
mobile: changePasswordForm.value.phone,
reg_type: activeTab.value === 'email' ? 1 : 2,
type:'resetPass_code'
}
return userStore.sendCode(sendParams)
}
// //
const handleSendCode = async () => { const handleSendCode = async () => {
const currentType = activeTab.value const currentType = activeTab.value
@ -141,14 +155,13 @@ const handleSendCode = async () => {
const type: string = currentType || 'email' const type: string = currentType || 'email'
const receiver = type === 'phone' ? changePasswordForm.value.phone : changePasswordForm.value.email; const receiver = type === 'phone' ? changePasswordForm.value.phone : changePasswordForm.value.email;
const currentCaptchaState = type === 'phone' ? phoneCaptchaState : emailCaptchaState; const currentCaptchaState = type === 'phone' ? phoneCaptchaState : emailCaptchaState;
const sendFunc = type === 'phone' ? "sendPhoneCaptcha" : "sendEmailCaptcha";
// //
await sendCaptcha( await sendCaptcha(
type, type,
receiver, receiver,
currentCaptchaState, // currentCaptchaState, //
sendFunc // Promise () => sendCodeApi() // Promise
); );
// //

View File

@ -150,6 +150,18 @@ watch(activeTab, (newTab) => {
} }
}) })
//
const sendCodeApi = async () => {
//
const sendParams = {
email: forgotPasswordForm.value.email,
mobile: forgotPasswordForm.value.phone,
reg_type: getStorage('forgotType', 'session') === 'email' ? 1 : 2,
type:'transfer_code'
}
return userStore.sendCode(sendParams)
}
// //
const handleSendCode = async () => { const handleSendCode = async () => {
// //
@ -163,7 +175,7 @@ const handleSendCode = async () => {
type, type,
receiver, receiver,
currentCaptchaState, // currentCaptchaState, //
sendFunc // Promise () => sendCodeApi() // Promise
); );
// //

View File

@ -111,7 +111,17 @@ const { isCounting: phoneIsCounting, countdown: phoneCountdown } = phoneCaptchaS
// //
//
const sendCodeApi = async () => {
//
const sendParams = {
email: registerForm.value.email,
mobile: registerForm.value.phone,
reg_type: activeTab.value === 'email' ? 1 : 2,
type:'resetPass_code'
}
return userStore.sendCode(sendParams)
}
// //
const handleSendCode = async () => { const handleSendCode = async () => {
if (!registerFormRef.value) return if (!registerFormRef.value) return
@ -133,7 +143,7 @@ const handleSendCode = async () => {
type, type,
receiver, receiver,
currentCaptchaState, // currentCaptchaState, //
sendFunc // Promise () => sendCodeApi() // Promise
); );
} }