|
@@ -8,15 +8,15 @@ import { handleCall } from '../../../core/utils/common'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
import PageHelperEvo from '@/components/page-helper-evo.vue'
|
|
|
import { ComponentExposed } from 'vue-component-type-helpers'
|
|
|
-import dayjs from "dayjs";
|
|
|
+import { domainToUnicode } from 'url'
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
const PageHelperEvoRef = ref<ComponentExposed<typeof PageHelperEvo>>()
|
|
|
const referrerId = ref<number | string>('')
|
|
|
-const { data: count, run: setCount } = useRequest(() => referrerCount({ referrerId:id.value }))
|
|
|
-const queryReward = computed(() => ({ status: tabsReward.value[tab.value]?.value,referrerId:id.value }))
|
|
|
-const queryRecommend = computed(() => (referrerId.value?{ auditStatus: tabsRecommend.value[tab.value]?.value, referrerId:referrerId.value,userId:id.value }:{auditStatus: tabsRecommend.value[tab.value]?.value,referrerId:id.value}))
|
|
|
+const { data: count, run: setCount } = useRequest(() => referrerCount({referrerId:referrerId.value}))
|
|
|
+const queryReward = computed(() => ({ status: tabsReward.value[tab.value]?.value }))
|
|
|
+const queryRecommend = computed(() => (referrerId.value?{ auditStatus: tabsRecommend.value[tab.value]?.value, referrerId:referrerId.value }:{auditStatus: tabsRecommend.value[tab.value]?.value}))
|
|
|
|
|
|
-const id = ref()
|
|
|
const type = ref("recommend")
|
|
|
const tab = ref(0)
|
|
|
const tabsReward = ref([
|
|
@@ -50,13 +50,15 @@ const tabsRecommend = ref([
|
|
|
])
|
|
|
|
|
|
const handleClick = () => {
|
|
|
- uni.navigateTo({ url: '/pages-sub/mine/orders/detail/index' })
|
|
|
+ uni.navigateTo({ url: '/pages/mine/orders/detail/index' })
|
|
|
}
|
|
|
|
|
|
const toSecond = (record) =>{
|
|
|
- // referrerId.value = record.userId
|
|
|
- // PageHelperEvoRef.value?.reload()
|
|
|
let str = encodeURIComponent(JSON.stringify(record))
|
|
|
+ // PageHelperEvoRef.value?.reload()
|
|
|
+ // uni.setNavigationBarTitle({
|
|
|
+ // title:record.name + "的推荐"
|
|
|
+ // })
|
|
|
uni.navigateTo({ url: '/pages/mine/refferrer/twoDetails?str=' + str })
|
|
|
}
|
|
|
|
|
@@ -70,22 +72,28 @@ const handleChange = async (value) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-onLoad(async(options)=>{
|
|
|
+onLoad(async (options:object)=>{
|
|
|
+ console.log(options)
|
|
|
if(options?.type === "recommend"){
|
|
|
uni.setNavigationBarTitle({
|
|
|
title:"我的推荐"
|
|
|
})
|
|
|
+ if(options.id){
|
|
|
+ referrerId.value = options.id
|
|
|
+ }
|
|
|
+ let res = await setCount();
|
|
|
+ tabsRecommend.value[0].label = tabsRecommend.value[0].label + "(" +res.onePassCount+ ")"
|
|
|
+ tabsRecommend.value[1].label = tabsRecommend.value[1].label + "(" +res.oneWaitCount+ ")"
|
|
|
+ tabsRecommend.value[2].label = tabsRecommend.value[2].label + "(" +res.oneRejectCount+ ")"
|
|
|
}else{
|
|
|
uni.setNavigationBarTitle({
|
|
|
title:"奖励明细"
|
|
|
})
|
|
|
}
|
|
|
- id.value = options?.id
|
|
|
type.value = options?.type
|
|
|
- let res = await setCount();
|
|
|
- tabsRecommend.value[0].label = tabsRecommend.value[0].label + "(" +res.onePassCount+ ")"
|
|
|
- tabsRecommend.value[1].label = tabsRecommend.value[1].label + "(" +res.oneWaitCount+ ")"
|
|
|
- tabsRecommend.value[2].label = tabsRecommend.value[2].label + "(" +res.oneRejectCount+ ")"
|
|
|
+ if(options?.tab){
|
|
|
+ tab.value = Number(options?.tab)
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
</script>
|
|
@@ -107,18 +115,18 @@ onLoad(async(options)=>{
|
|
|
</wd-tabs>
|
|
|
</template>
|
|
|
<template #default="{ source }">
|
|
|
- <view class="bg-white rounded-[20rpx] mx-[24rpx] mt-[30rpx] px-[20rpx] py-[30rpx]" v-if="type === 'recommend'">
|
|
|
- <view class="py-[30rpx]" v-for="(it, i) in source.list" :key="i">
|
|
|
- <view class="flex items-center pb-[20rpx]" style="border-bottom: 2rpx solid #FAFAFA;">
|
|
|
- <view class="rounded-full w-[88rpx] h-[88rpx] overflow-hidden mr-[20rpx]">
|
|
|
- <image :src="it.avatar" mode="widthFix"></image>
|
|
|
- </view>
|
|
|
- <view class="flex-grow text-[32rpx]">{{ it.name }}</view>
|
|
|
- <view class="text-[#586A8F] text-[28rpx]" v-if="it.auditStatus === 0 && !referrerId" @click="toSecond(it)">推荐人数:{{ it.referrerCount }}</view>
|
|
|
- </view>
|
|
|
- <view class="text-[24rpx] text-[#EF4343] pl-[108rpx] pt-[20rpx] pr-[20rpx]" v-if="it.auditStatus == 2">原因:{{ it.reason }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="bg-white rounded-[20rpx] mx-[24rpx] mt-[30rpx] px-[20rpx] py-[30rpx]" v-if="type === 'recommend'">
|
|
|
+ <view class="py-[30rpx]" v-for="(it, i) in source.list" :key="i">
|
|
|
+ <view class="flex items-center pb-[20rpx]" style="border-bottom: 2rpx solid #FAFAFA;">
|
|
|
+ <view class="rounded-full w-[88rpx] h-[88rpx] overflow-hidden mr-[20rpx]">
|
|
|
+ <image :src="it.avatar" mode="widthFix"></image>
|
|
|
+ </view>
|
|
|
+ <view class="flex-grow text-[32rpx]">{{ it.name }}</view>
|
|
|
+ <view class="text-[#586A8F] text-[28rpx]" v-if="it.auditStatus === 0" @click="toSecond(it)">推荐人数:{{ it.referrerCount }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="text-[24rpx] text-[#EF4343] pl-[108rpx] pt-[20rpx] pr-[20rpx]" v-if="it.auditStatus == 2">原因:{{ it.reason }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="bg-white rounded-[20rpx] mx-[24rpx] mt-[30rpx] px-[20rpx] py-[30rpx]" v-else>
|
|
|
<view class="flex flex-col mb-[30rpx]" v-for="(it, i) in source.list" :key="i" style="border-bottom: 2rpx solid #FAFAFA;">
|
|
|
<view class="flex items-center">
|
|
@@ -131,7 +139,7 @@ onLoad(async(options)=>{
|
|
|
<view class="text-[20rpx] bg-[#F6F6F6] rounded-full text-black/40 px-[14rpx] py-[6rpx]" v-if=" it.distributeType==1 ">一级奖励</view>
|
|
|
<view class="text-[20rpx] bg-[#F6F6F6] rounded-full text-black/40 px-[14rpx] py-[6rpx]" v-else>二级奖励</view>
|
|
|
</view>
|
|
|
- <view class="text-black/30">{{ it.completeTime?dayjs(it.completeTime).format('YYYY/MM/DD HH:mm'):"" }}</view>
|
|
|
+ <view class="text-black/30">{{ it.completeTime?dayjs(it.completeTime).format('YYYY/MM/DD HH:mm'):"" }}</view>
|
|
|
</view>
|
|
|
<view class="text-[#EF4343] text-[32rpx]">+{{ it.onePoints }}(*{{ it.oneRatio }}%)</view>
|
|
|
</view>
|