diff --git a/pages/mine/distribution/achievement.vue b/pages/mine/distribution/achievement.vue index 9bf0664..252aba9 100644 --- a/pages/mine/distribution/achievement.vue +++ b/pages/mine/distribution/achievement.vue @@ -1,5 +1,9 @@ @@ -135,6 +140,7 @@ import { onShow, onLoad } from '@dcloudio/uni-app' import { useStore } from '@/store' import { getThemeStyle } from '@/utils/theme' import { getDistributionPerformance } from '@/api/distribution' +import { assertActiveDistributor } from '@/utils/distributionStatus' const store = useStore() const themeStyle = computed(() => getThemeStyle(store.state.theme)) @@ -146,6 +152,7 @@ const rangeTabs = [ { label: '近七日', value: 'LAST_7_DAYS' }, ] +const pageReady = ref(false) const activeRange = ref('ALL') const loading = ref(false) const customVisible = ref(false) @@ -176,7 +183,13 @@ onLoad((options: Record) => { }) onShow(() => { - loadPerformance() + assertActiveDistributor().then((d) => { + if (!d) { + return + } + pageReady.value = true + loadPerformance() + }) }) function formatMoney(val: number | string) { diff --git a/pages/mine/distribution/bank-accounts.vue b/pages/mine/distribution/bank-accounts.vue index 2ece322..6e095a4 100644 --- a/pages/mine/distribution/bank-accounts.vue +++ b/pages/mine/distribution/bank-accounts.vue @@ -7,7 +7,7 @@ - +