feat: 商户提货列传递门店id

This commit is contained in:
2026-07-14 18:20:00 +08:00
parent 94f8297a01
commit 042c19f4dc
3 changed files with 66 additions and 25 deletions
+10 -2
View File
@@ -1,17 +1,25 @@
<template>
<view class="mode-switch" @tap.stop="open">
<view v-if="showSwitch" class="mode-switch" @tap.stop="open">
<view class="mode-switch__text">{{ label }}</view>
<uni-icons type="bottom" size="14" color="#333" />
</view>
</template>
<script setup>
import { computed } from 'vue';
import { computed, onMounted } from 'vue';
import sheep from '@/sheep';
const appStore = sheep.$store('app');
const userStore = sheep.$store('user');
const label = computed(() => (appStore.bizMode === 'merchant' ? '商户' : '用户'));
const showSwitch = computed(() => Number(userStore?.userInfo?.storeId || 0) > 0);
onMounted(() => {
if (!userStore?.isLogin) return;
if (showSwitch.value) return;
userStore.getInfo();
});
const setMode = (mode) => {
const next = mode === 'merchant' ? 'merchant' : 'user';