This commit is contained in:
王子琦
2026-01-13 16:30:16 +08:00
parent 6af59d985f
commit fecc30b7f0
8 changed files with 167 additions and 15 deletions

View File

@@ -4,8 +4,8 @@
<el-header class="header">
<div class="logo">植愈线上花店</div>
<div>
<el-button type="text" @click="$router.push('/orders')">我的订单</el-button>
<el-button type="text" @click="$router.push('/profile')">个人中心</el-button>
<el-button v-if="isLoggedIn" type="text" @click="$router.push('/orders')">我的订单</el-button>
<el-button v-if="isLoggedIn" type="text" @click="$router.push('/profile')">个人中心</el-button>
<el-button v-if="isAdmin" type="text" @click="$router.push('/admin')">后台管理</el-button>
<el-button v-if="!isLoggedIn" type="primary" @click="$router.push('/login')">登录</el-button>
<el-button v-else type="danger" @click="handleLogout">注销</el-button>