purui 3 days ago
parent
commit
3419fe6c09

BIN
packages/merchant/src/assets/pngs/referrer-1.png


+ 2 - 0
packages/merchant/src/core/libs/pngs.ts

@@ -13,6 +13,7 @@ import calculator from '@/assets/pngs/calculator.png'
 import calculatorBg from '@/assets/pngs/calculator-bg.png'
 import linkBuckle from '@/assets/pngs/link-buckle.png'
 import memberTextV1 from '@/assets/pngs/member-text-v1.png'
+import referrerOne from '@/assets/pngs/referrer-1.png'
 
 export {
   scheduleCardBg,
@@ -30,4 +31,5 @@ export {
   calculatorBg,
   linkBuckle,
   memberTextV1,
+  referrerOne
 }

+ 8 - 0
packages/merchant/src/pages.json

@@ -215,6 +215,14 @@
       }
     },
     {
+      "path": "pages/mine/refferrer/twoDetails",
+      "type": "page",
+      "style": {
+        "navigationBarTitleText": "",
+        "navigationBarBackgroundColor": "#fff"
+      }
+    },
+    {
       "path": "pages/agent/designer/archives/index",
       "type": "page",
       "style": {

+ 1 - 1
packages/merchant/src/pages/agent/designer/index.vue

@@ -357,7 +357,7 @@ onLoad(async (params: { title?: string; filter?: string; tags?: string }) => {
                         >
                           积分:{{ it.points || 0 }}
                         </div>
-						<div class="bg-[#eeeeee] w-[2px] h-[10px]"></div>
+						<!-- <div class="bg-[#eeeeee] w-[2px] h-[10px]"></div> -->
 						<!-- <div
 						  class="text-black/30 text-xs font-normal font-['PingFang_SC'] leading-none"
 						>

+ 35 - 27
packages/merchant/src/pages/mine/refferrer/details.vue

@@ -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>

+ 12 - 10
packages/merchant/src/pages/mine/refferrer/index.vue

@@ -4,6 +4,7 @@
 <script setup lang="ts">
 import Card from '@/components/card.vue'
 import { phone, right } from '../../../core/libs/svgs'
+import { referrerOne } from '../../../core/libs/pngs'
 import { referrerCount, distributePointsSum } from '../../../core/libs/requests'
 const id = ref()
 const { data: count, run: setCount } = useRequest(() => referrerCount({ referrerId:id.value }))
@@ -11,9 +12,9 @@ const { data: pointsSum, run: setPointsSum} = useRequest(() => distributePointsS
 const handleClick = (path) => {
   uni.navigateTo({ url: path })
 }
-const tips = () =>{
+const tips = (msg) =>{
 	uni.showToast({
-		title:"推荐的设计师,有未完成的订单,订单完成后即可获得",
+		title:msg,
 		icon:"none",
 		duration:3000
 	})
@@ -37,24 +38,24 @@ onLoad(async (query?: Record<string | 'id', any>) => {
 	  </view>
 	  <view class="flex items-start justify-between mb-[40rpx]">
 		  <view class="">
-			  <view class="text-[56rpx] font-bold mb-[12rpx]">{{ count.onePassCount }}</view>
+			  <view class="text-[56rpx] font-bold mb-[12rpx]" @click="handleClick('/pages/mine/refferrer/details?type=recommend&id='+ id)">{{ count.onePassCount }}</view>
 			  <view class="text-[28rpx] text-black/40 ">认证设计师 (人)</view>
 		  </view>
 		  <view class="bg-[#F2F2F2] flex px-[32rpx] py-[10rpx] text-[24rpx] text-black/40 rounded-full items-center">
 			  <text class="mr-[10rpx]">二级推荐:{{ count.twoPassCount }}人</text>
-			  <icon type="info_circle" size="16" color="#999"></icon>
+			  <icon @click="tips('我的推荐设计师,推荐的新设计师加入筑巢荟,并且已经完成认证的设计师数量')" type="info_circle" size="16" color="#999"></icon>
 		  </view>
 	  </view>
 	  <view class="flex justify-between">
 		  <view class="rounded-[8rpx] shadow-[0_4rpx_10rpx_4rpx_rgba(0,0,0,0.1)] relative min-w-[260rpx] h-[60rpx] line-height-[60rpx] overflow-hidden">
 			  <view class="w-[10rpx] h-full absolute bg-[#0CBE7D] left-0 top-0"></view>
-			  <view class="w-full text-center text-[24rpx] text-black/60">
+			  <view class="w-full text-center text-[24rpx] text-black/60" @click="handleClick('/pages/mine/refferrer/details?type=recommend&tab=1&id='+ id)">
 				  <text>审核中</text>
 				  <text class="text-[32rpx] text-black">{{ count.oneWaitCount }}</text>
 				  <text>人</text>
 			  </view>
 		  </view>
-		  <view class="rounded-[8rpx] shadow-[0_4rpx_10rpx_4rpx_rgba(0,0,0,0.1)] relative min-w-[260rpx] h-[60rpx] line-height-[60rpx] overflow-hidden">
+		  <view class="rounded-[8rpx] shadow-[0_4rpx_10rpx_4rpx_rgba(0,0,0,0.1)] relative min-w-[260rpx] h-[60rpx] line-height-[60rpx] overflow-hidden" @click="handleClick('/pages/mine/refferrer/details?type=recommend&tab=2&id='+ id)">
 			  <view class="w-[10rpx] h-full absolute bg-[#FFCF82] left-0 top-0"></view>
 			  <view class="w-full text-center text-[24rpx] text-black/60 ">
 				  <text>未通过</text>
@@ -74,26 +75,27 @@ onLoad(async (query?: Record<string | 'id', any>) => {
 	  </view>
 	  <view class="flex items-start justify-between mb-[40rpx]">
 		  <view class="">
-			  <view class="text-[56rpx] font-bold mb-[12rpx]">{{ pointsSum.passPoints }}</view>
+			  <view class="text-[56rpx] font-bold mb-[12rpx]" @click="handleClick('/pages/mine/refferrer/details?type=reward')">{{ pointsSum.passPoints }}</view>
 			  <view class="text-[28rpx] text-black/40 ">已获得总积分</view>
 		  </view>
 		  <view class="bg-[#F2F2F2] flex px-[32rpx] py-[10rpx] text-[24rpx] text-black/40 rounded-full items-center">
 			  <text class="mr-[10rpx]">待入账:{{ pointsSum.waitPoints }}积分</text>
-			  <icon @click="tips" type="info_circle" size="16" color="#999"></icon>
+			  <icon @click="tips('推荐的设计师,有未完成的订单,订单完成后即可获得')" type="info_circle" size="16" color="#999"></icon>
 		  </view>
 	  </view>
 	  <div class="flex">
-		<div class="w-[50%]">
+		<div class="w-[50%]" @click="handleClick('/pages/mine/refferrer/details?type=reward')">
 			<div class="text-[32rpx] font-bold">{{ pointsSum.onePassPoints }}</div>
 			<div class="text-[24rpx] text-black/60">一级引荐奖励积分</div>
 		</div>
-		<div class="w-[50%]">
+		<div class="w-[50%]" @click="handleClick('/pages/mine/refferrer/details?type=reward')">
 			<div class="text-[32rpx] font-bold">{{ pointsSum.twoPassPoints }}</div>
 			<div class="text-[24rpx] text-black/60">二级引荐奖励积分</div>
 		</div>
 	  </div>
 	</view>
 	<view class="flex bg-white rounded-[32rpx] px-[24rpx] py-[34rpx]" @click="handleClick('/pages/mine/refferrer/rule')">
+		<wd-img width="20" height="20" :src="referrerOne"></wd-img>
 		<view class="text-[32rpx] flex-grow">引荐奖励规则</view>
 		<icon type="info_circle" size="22" color="#999"></icon>
 	</view>

+ 4 - 5
packages/merchant/src/pages/mine/refferrer/twoDetails.vue

@@ -12,8 +12,7 @@ import { ComponentExposed } from 'vue-component-type-helpers'
 const PageHelperEvoRef = ref<ComponentExposed<typeof PageHelperEvo>>()
 const referrerId = ref<number | string>('')
 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 queryRecommend = computed(() => ({ auditStatus: tabsRecommend.value[tab.value]?.value, referrerId:referrerId.value }))
 
 const type = ref("recommend")
 const tab = ref(0)
@@ -60,10 +59,10 @@ const toSecond = (record) =>{
 }
 
 const handleChange = async (value) => {
- console.log(value)
+  console.log(value)
 }
 
-onLoad(async (options)=>{
+onLoad(async (options:object)=>{
 	console.log(decodeURIComponent(options.str))
 	let ob = JSON.parse(decodeURIComponent(options.str))
 	referrerId.value = ob.userId
@@ -79,7 +78,7 @@ onLoad(async (options)=>{
 </script>
 <template>
 	<view class="flex flex-col">
-		<PageHelperEvo ref="pageHelperRef" class="flex-grow flex" :request="pageReferrerDetail" :query="type === queryRecommend">
+		<PageHelperEvo ref="pageHelperRef" class="flex-grow flex" :request="pageReferrerDetail" :query="queryRecommend">
 			<template #top>
 			  <wd-tabs v-model="tab" @change="handleChange">
 			    <block v-for="({ label }, i) in tabsRecommend" :key="i">

+ 1 - 0
packages/merchant/src/types/uni-pages.d.ts

@@ -24,6 +24,7 @@ interface NavigateToOptions {
        "/pages/mine/refferrer/details" |
        "/pages/mine/refferrer/index" |
        "/pages/mine/refferrer/rule" |
+       "/pages/mine/refferrer/twoDetails" |
        "/pages/agent/designer/archives/index" |
        "/pages/agent/designer/points/index" |
        "/pages/agent/designer/points_details/index" |