feat: 商户提货列传递门店id
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user