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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@ export const identityFormItems = [
// 国籍
{ 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 },
]