mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57:25 +08:00
feat(distribution): 实现分销员中心完整功能
- 新增分销业绩统计页面,包含时间范围筛选和自定义日期选择功能 - 重构分销认证页面,改为跳转至招募页面申请分销员身份 - 添加分销商品访问记录功能,支持分享追踪和佣金计算 - 更新分销历史记录页面,优化数据结构和显示字段 - 完全重写分销员首页,包含用户信息、收益统计、等级系统等功能
This commit is contained in:
44
pages/mine/distribution/bind.vue
Normal file
44
pages/mine/distribution/bind.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<view class="bind-page"></view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useStore } from '@/store'
|
||||
import storage from '@/utils/storage'
|
||||
import { getGoodsDistribution } from '@/api/distribution'
|
||||
|
||||
const store = useStore()
|
||||
|
||||
onLoad(async (options) => {
|
||||
let distributionId = (options?.distributionId as string) || ''
|
||||
|
||||
if (options?.scene) {
|
||||
const scene = decodeURIComponent(String(options.scene))
|
||||
const parts = scene.split(',')
|
||||
if (parts[0] === 'bind' && parts[1]) {
|
||||
distributionId = parts[1]
|
||||
}
|
||||
}
|
||||
|
||||
if (distributionId) {
|
||||
store.state.distributionId = distributionId
|
||||
if (storage.getAccessToken()) {
|
||||
try {
|
||||
await getGoodsDistribution(distributionId)
|
||||
} catch (error) {
|
||||
console.warn('bind distribution failed', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uni.switchTab({ url: '/pages/tabbar/home/index' })
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bind-page {
|
||||
min-height: 100vh;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user