fix: 批量修复功能问题 - 购物车结算/订单库存积分/搜索/抽奖/个人资料等
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="profile">个人中心</el-dropdown-item>
|
||||
<el-dropdown-item command="home">返回前台</el-dropdown-item>
|
||||
<el-dropdown-item divided command="logout">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -94,6 +95,7 @@ const currentPageTitle = computed(() => {
|
||||
|
||||
function handleCommand(command: string) {
|
||||
switch (command) {
|
||||
case 'profile': router.push('/profile'); break
|
||||
case 'home': router.push('/'); break
|
||||
case 'logout': userStore.logout(); cartStore.clearCart(); router.push('/login'); break
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ function handleCommand(command: string) {
|
||||
|
||||
function handleSearch() {
|
||||
if (searchQuery.value.trim()) {
|
||||
router.push({ path: '/products', query: { search: searchQuery.value } })
|
||||
router.push({ path: '/products', query: { keyword: searchQuery.value } })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user