BUG修复

This commit is contained in:
Songsl 2026-05-12 13:53:54 +08:00
parent 4abcdf1129
commit 8e76c49fa9
5 changed files with 25 additions and 22 deletions

View File

@ -18,14 +18,16 @@
<!-- 主体内容区 --> <!-- 主体内容区 -->
<main class="main-content"> <main class="main-content">
<transition name="fade-transform" mode="out-in" <transition
style="height: 100%; name="fade-transform"
display: flex; mode="out-in"
flex-direction: column;"> style="height: 100%; display: flex; flex-direction: column"
>
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<KeepAlive> <KeepAlive v-if="route.meta.keepAlive">
<component :is="Component" :key="route.path" /> <component :is="Component" :key="route.path" />
</KeepAlive> </KeepAlive>
<component v-else :is="Component" :key="route.path" />
</router-view> </router-view>
</transition> </transition>
</main> </main>
@ -35,9 +37,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
defineOptions({ defineOptions({
name: 'Layout' name: 'Layout',
}) })
import Header from './Header.vue' import Header from './Header.vue'
import Sidebar from './Sidebar.vue' import Sidebar from './Sidebar.vue'
@ -45,7 +46,7 @@ import Sidebar from './Sidebar.vue'
// import Tabs from './Tabs.vue' // import Tabs from './Tabs.vue'
const route = useRoute() const route = useRoute()
console.log('route.path', route)
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -16,6 +16,7 @@ export const handleRouter = (list: any[]):any[] => {
component: viewModules[componentPath] || (() => import('@/views/404/index.vue')), component: viewModules[componentPath] || (() => import('@/views/404/index.vue')),
meta: { meta: {
title: item.name, // 左侧菜单显示的标题 title: item.name, // 左侧菜单显示的标题
keepAlive: !!item.keepAlive,
}, },
}) })
} }

View File

@ -16,37 +16,37 @@ const routes = [
path: 'login', path: 'login',
name: 'Login', name: 'Login',
component: () => import('@/views/user/Login.vue'), component: () => import('@/views/user/Login.vue'),
meta: { isAuthPage: true, title: '登录' }, meta: { isAuthPage: true, title: '登录', keepAlive: false },
}, },
{ {
path: 'register', path: 'register',
name: 'Register', name: 'Register',
component: () => import('@/views/user/Register.vue'), component: () => import('@/views/user/Register.vue'),
meta: { isAuthPage: true, title: '注册' }, meta: { isAuthPage: true, title: '注册', keepAlive: false },
}, },
{ {
path: 'forgot-password', path: 'forgot-password',
name: 'ForgotPassword', name: 'ForgotPassword',
component: () => import('@/views/user/ForgotPassword.vue'), component: () => import('@/views/user/ForgotPassword.vue'),
meta: { isAuthPage: true, title: '忘记密码' }, meta: { isAuthPage: true, title: '忘记密码', keepAlive: false },
}, },
{ {
path: 'change-password', path: 'change-password',
name: 'ChangePassword', name: 'ChangePassword',
component: () => import('@/views/user/ChangePassword.vue'), component: () => import('@/views/user/ChangePassword.vue'),
meta: { requiresAuth: true, title: '修改密码' }, meta: { requiresAuth: true, title: '修改密码', keepAlive: false },
}, },
{ {
path: 'bind-email', path: 'bind-email',
name: 'BindEmail', name: 'BindEmail',
component: () => import('@/views/user/bindEmail.vue'), component: () => import('@/views/user/bindEmail.vue'),
meta: { requiresAuth: true, title: '绑定邮箱' }, meta: { requiresAuth: true, title: '绑定邮箱', keepAlive: false },
}, },
{ {
path: 'bind-phone', path: 'bind-phone',
name: 'BindPhone', name: 'BindPhone',
component: () => import('@/views/user/bindPhone.vue'), component: () => import('@/views/user/bindPhone.vue'),
meta: { requiresAuth: true, title: '绑定手机号' }, meta: { requiresAuth: true, title: '绑定手机号', keepAlive: false },
}, },
], ],
}, },
@ -65,6 +65,7 @@ const routes = [
component: () => import('@/views/dashboard/index.vue'), component: () => import('@/views/dashboard/index.vue'),
meta: { meta: {
title: '首页', // 左侧菜单显示的标题 title: '首页', // 左侧菜单显示的标题
keepAlive: false,
}, },
}, },
], ],

View File

@ -62,7 +62,7 @@
<script lang="ts" setup> <script lang="ts" setup>
defineOptions({ defineOptions({
name: 'RechangeCheck' name: 'RechangeCheck',
}) })
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
@ -215,27 +215,27 @@ const handleSelectionChange = (rows: TableRow[]) => {
} }
// //
const handleApprove = () => { const handleApprove = async () => {
if (!selectedRows.value.length) { if (!selectedRows.value.length) {
ElMessage.warning('请先选择要通过的记录') ElMessage.warning('请先选择要通过的记录')
return return
} }
console.log(selectedRows.value) console.log(selectedRows.value)
reviewRechargeOrder({ id: selectedRows.value[0].id, status: '3' }) await reviewRechargeOrder({ id: selectedRows.value[0].id, status: '3' })
ElMessage.success('审核通过') ElMessage.success('审核通过')
getList() await getList()
} }
// //
const handleReject = () => { const handleReject = async () => {
if (!selectedRows.value.length) { if (!selectedRows.value.length) {
ElMessage.warning('请先选择要驳回的记录') ElMessage.warning('请先选择要驳回的记录')
return return
} }
//:1,2,3,4 //:1,2,3,4
reviewRechargeOrder({ id: selectedRows.value[0].id, status: '4' }) await reviewRechargeOrder({ id: selectedRows.value[0].id, status: '4' })
ElMessage.success('审核驳回') ElMessage.success('审核驳回')
getList() await getList()
} }
// //

View File

@ -4,7 +4,7 @@ export const identityFormItems = [
// 国籍 // 国籍
{ prop: 'nationality', label: '国籍', type: 'select' as const, width: '200px' }, { prop: 'nationality', label: '国籍', type: 'select' as const, width: '200px' },
// 证件类型 // 证件类型
{ prop: 'idType', label: '证件类型', type: 'select' as const, width: '200px' }, // { prop: 'idType', label: '证件类型', type: 'select' as const, width: '200px' },
// 上传证件 // 上传证件
{ prop: 'idCard', slotName: 'upload', label: '上传证件', type: 'upload' as const }, { prop: 'idCard', slotName: 'upload', label: '上传证件', type: 'upload' as const },
] ]