功能:完善门店能力与用户安全配置

This commit is contained in:
xiaowang
2026-05-18 10:04:57 +08:00
parent 4563dd2538
commit 3797938616
356 changed files with 24983 additions and 1858 deletions
@@ -45,6 +45,10 @@
</template>
<script setup lang="ts">
/**
* BottomNav page script.
* Call guide: the template binds the reactive state below, and the methods are triggered by button clicks, lifecycle hooks, or router events.
*/
import { computed, inject, onMounted, ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { HomeOutlined, ShoppingOutlined, ShoppingCartOutlined, UserOutlined } from '@ant-design/icons-vue'
@@ -59,9 +63,11 @@ const cartCount = inject('cartCount', ref(0))
const updateCartCount = inject<() => Promise<void>>('updateCartCount', async () => {})
// 是否有未读通知
/** hasNotification is a reactive state variable used by the template and event handlers. */
const hasNotification = computed(() => true)
// 加载购物车数量
/** loadCartCount is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
const loadCartCount = async () => {
// 这里我们不需要做任何事情,因为全局状态会自动更新
// 但我们仍然需要这个方法,因为 App.vue 会调用它
@@ -83,6 +89,7 @@ defineExpose({
})
// 根据当前路由判断激活的导航项
/** currentRoute is a reactive state variable used by the template and event handlers. */
const currentRoute = computed(() => {
if (!route || !route.path) return 'home'
const path = route.path
@@ -96,6 +103,7 @@ const currentRoute = computed(() => {
})
// 处理导航点击事件
/** handleNavClick is a local helper used by this page script. */
const handleNavClick = (tab: string) => {
if (tab === 'home') {
router.push('/home')