feat(distribution): 增强分销入口检查与用户反馈

- 引入自助招募入口检查逻辑,确保用户在访问前获得明确的状态反馈。
- 在分销相关页面中添加分销功能关闭和线上招募关闭的提示信息。
- 优化页面逻辑,确保在不同状态下用户体验的一致性与流畅性。
This commit is contained in:
田香琪
2026-09-13 16:29:06 +08:00
parent 43bf0773bc
commit ba4e9126e8
4 changed files with 137 additions and 14 deletions

View File

@@ -13,12 +13,27 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useStore } from '@/store'
import {
checkSelfRecruitEntry,
DISTRIBUTION_CLOSE_MESSAGE,
DISTRIBUTION_ONLINE_ENTRY_CLOSED_MESSAGE,
} from '@/utils/distributionStatus'
const store = useStore()
const lightColor = computed(() => store.getters.lightColor)
function goJoin() {
uni.redirectTo({ url: '/pages/mine/distribution/join' })
checkSelfRecruitEntry().then((gate) => {
if (gate === 'distribution_closed') {
uni.showToast({ title: DISTRIBUTION_CLOSE_MESSAGE, icon: 'none' })
return
}
if (gate === 'entry_closed') {
uni.showToast({ title: DISTRIBUTION_ONLINE_ENTRY_CLOSED_MESSAGE, icon: 'none' })
return
}
uni.redirectTo({ url: '/pages/mine/distribution/join' })
})
}
</script>