|
@@ -9,11 +9,14 @@ import { $t } from '@/locales';
|
|
|
import { getDeliveryPartnersApi, type UserApi } from '#/api';
|
|
import { getDeliveryPartnersApi, type UserApi } from '#/api';
|
|
|
import { useLoginModalStore } from '#/store';
|
|
import { useLoginModalStore } from '#/store';
|
|
|
|
|
|
|
|
|
|
+interface Props {
|
|
|
|
|
+ jurisdiction: boolean;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const props = defineProps<Props>();
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const loginModalStore = useLoginModalStore();
|
|
const loginModalStore = useLoginModalStore();
|
|
|
-
|
|
|
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
|
-
|
|
|
|
|
const isLogin = computed(() => !!userStore.userInfo);
|
|
const isLogin = computed(() => !!userStore.userInfo);
|
|
|
|
|
|
|
|
function handleNavigate() {
|
|
function handleNavigate() {
|
|
@@ -74,6 +77,7 @@ watch(
|
|
|
<div class="text-xs text-[#9A9BA3]">Delivery Partners</div>
|
|
<div class="text-xs text-[#9A9BA3]">Delivery Partners</div>
|
|
|
</div>
|
|
</div>
|
|
|
<img
|
|
<img
|
|
|
|
|
+ v-if="props.jurisdiction"
|
|
|
alt="more"
|
|
alt="more"
|
|
|
class="h-[29px] w-[29px] cursor-pointer"
|
|
class="h-[29px] w-[29px] cursor-pointer"
|
|
|
src="@/assets/image/home-more.png"
|
|
src="@/assets/image/home-more.png"
|
|
@@ -87,16 +91,40 @@ watch(
|
|
|
{{ $t('homeModule.deliveryPartnersIntroduction') }}
|
|
{{ $t('homeModule.deliveryPartnersIntroduction') }}
|
|
|
</p>
|
|
</p>
|
|
|
|
|
|
|
|
- <div v-if="isLogin" class="mt-[63px] flex gap-[18px]">
|
|
|
|
|
|
|
+ <div v-if="props.jurisdiction && isLogin" class="mt-[63px]">
|
|
|
|
|
+ <div v-if="deliveryPartnersList.length > 0" class="flex gap-[18px]">
|
|
|
|
|
+ <img
|
|
|
|
|
+ v-for="index in 4"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :src="`/src/assets/image/user${index}.png`"
|
|
|
|
|
+ :style="{ marginLeft: index !== 1 ? '-35px' : '0' }"
|
|
|
|
|
+ :text="index"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ class="h-[46px] w-[46px]"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-else
|
|
|
|
|
+ class="mx-auto mt-[-20px] flex flex-col items-center justify-center text-center"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ class="block h-[80px] w-[85px]"
|
|
|
|
|
+ src="@/assets/image/jurisdiction.png"
|
|
|
|
|
+ />
|
|
|
|
|
+ {{ $t('auth.emptyContent') }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-else
|
|
|
|
|
+ class="mt-[10px] flex flex-col items-center justify-center text-center"
|
|
|
|
|
+ >
|
|
|
<img
|
|
<img
|
|
|
- v-for="index in 4"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- :src="`/src/assets/image/user${index}.png`"
|
|
|
|
|
- :style="{ marginLeft: index !== 1 ? '-35px' : '0' }"
|
|
|
|
|
- :text="index"
|
|
|
|
|
alt=""
|
|
alt=""
|
|
|
- class="h-[46px] w-[46px]"
|
|
|
|
|
|
|
+ class="block h-[80px] w-[85px]"
|
|
|
|
|
+ src="@/assets/image/empty.png"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ {{ $t('auth.noPermission') }}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|