|
@@ -0,0 +1,100 @@
|
|
|
+<route lang="json">
|
|
|
+{ "style": { "navigationBarTitleText": "", "navigationBarBackgroundColor": "#fff" } }
|
|
|
+</route>
|
|
|
+<script setup lang="ts">
|
|
|
+import { phone, right } from '../../../core/libs/svgs'
|
|
|
+import { pageReferrerDetail, getDistributePage } from '../../../core/libs/requests'
|
|
|
+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'
|
|
|
+
|
|
|
+const PageHelperEvoRef = ref<ComponentExposed<typeof PageHelperEvo>>()
|
|
|
+const referrerId = ref<number | string>('')
|
|
|
+// const { data: referrer, run: setReferrer } = useRequest(() => pageReferrerDetail())
|
|
|
+// const { data: distribute, run: setDistribute } = useRequest(() => getDistributePage())
|
|
|
+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 type = ref("recommend")
|
|
|
+const tab = ref(0)
|
|
|
+const tabsReward = ref([
|
|
|
+ {
|
|
|
+ label: '已完成',
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '待入账',
|
|
|
+ value: "2"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '已取消',
|
|
|
+ value: "3",
|
|
|
+ },
|
|
|
+])
|
|
|
+
|
|
|
+const tabsRecommend = ref([
|
|
|
+ {
|
|
|
+ label: '已认证',
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '审核中',
|
|
|
+ value: "1"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '未通过',
|
|
|
+ value: "2",
|
|
|
+ },
|
|
|
+])
|
|
|
+
|
|
|
+const handleClick = () => {
|
|
|
+ uni.navigateTo({ url: '/pages-sub/mine/orders/detail/index' })
|
|
|
+}
|
|
|
+
|
|
|
+const toSecond = (record) =>{
|
|
|
+ referrerId.value = record.userId
|
|
|
+ PageHelperEvoRef.value?.reload()
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title:record.name + "的推荐"
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const handleChange = async (value) => {
|
|
|
+ console.log(value)
|
|
|
+}
|
|
|
+
|
|
|
+onLoad((options:object)=>{
|
|
|
+ console.log(decodeURIComponent(options.str))
|
|
|
+ let ob = JSON.parse(decodeURIComponent(options.str))
|
|
|
+ referrerId.value = ob.userId
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title:ob.name + "的推荐"
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+</script>
|
|
|
+<template>
|
|
|
+ <view class="flex flex-col">
|
|
|
+ <PageHelperEvo ref="pageHelperRef" class="flex-grow flex" :request="pageReferrerDetail" :query="type === queryRecommend">
|
|
|
+ <template #top>
|
|
|
+ <wd-tabs v-model="tab" @change="handleChange">
|
|
|
+ <block v-for="({ label }, i) in tabsRecommend" :key="i">
|
|
|
+ <wd-tab :title="`${label}`" class="relative"></wd-tab>
|
|
|
+ </block>
|
|
|
+ </wd-tabs>
|
|
|
+ </template>
|
|
|
+ <template #default="{ source }">
|
|
|
+ <view class="bg-white rounded-[20rpx] mx-[24rpx] mt-[30rpx] px-[20rpx] py-[30rpx]">
|
|
|
+ <view class="flex items-center py-[30rpx] relative" v-for="(it, i) in source.list" :key="i" 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="absolute bottom-0 left-[20%] text-[24rpx] text-[#EF4343]" v-if="it.auditStatus == 2">原因:{{ it.remark }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </PageHelperEvo>
|
|
|
+ </view>
|
|
|
+</template>
|