mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-09-20 20:02:02 +08:00
- 在多个分销相关页面中引入分销员状态检查,确保用户在访问前具备有效分销资格。 - 增加加载指示器以改善用户体验,提示用户正在加载数据。 - 更新相关逻辑以处理分销员资格的不同状态,确保用户在不符合条件时获得适当反馈。
51 lines
1.0 KiB
Vue
51 lines
1.0 KiB
Vue
<template>
|
|
<view class="page">
|
|
<view v-if="!pageReady" class="state-wrap">
|
|
<text class="state-text">加载中...</text>
|
|
</view>
|
|
<distribution-goods-share
|
|
v-else
|
|
:sku-id="query.skuId"
|
|
:goods-id="query.goodsId"
|
|
:distribution-id="query.distributionId"
|
|
/>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
import DistributionGoodsShare from '@/components/distribution-goods-share/index.vue'
|
|
import { assertActiveDistributor } from '@/utils/distributionStatus'
|
|
|
|
const query = ref<Record<string, string>>({})
|
|
const pageReady = ref(false)
|
|
|
|
onLoad((options) => {
|
|
query.value = (options || {}) as Record<string, string>
|
|
assertActiveDistributor().then((d) => {
|
|
if (!d) {
|
|
return
|
|
}
|
|
pageReady.value = true
|
|
})
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.page {
|
|
min-height: 100vh;
|
|
background: #fff;
|
|
}
|
|
|
|
.state-wrap {
|
|
padding: 120rpx 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.state-text {
|
|
color: #999;
|
|
font-size: 26rpx;
|
|
}
|
|
</style>
|