index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <route lang="json">
  2. { "style": { "navigationBarTitleText": "引荐奖励", "navigationBarBackgroundColor": "#fff" } }
  3. </route>
  4. <script setup lang="ts">
  5. import Card from '@/components/card.vue'
  6. import { phone, right } from '../../../core/libs/svgs'
  7. import { referrerCount, distributePointsSum } from '../../../core/libs/requests'
  8. import { handleCall } from '../../../core/utils/common'
  9. const { data: count, run: setCount } = useRequest(() => referrerCount())
  10. const { data: pointsSum, run: setPointsSum} = useRequest(() => distributePointsSum())
  11. const handleClick = (path) => {
  12. uni.navigateTo({ url: path })
  13. }
  14. const tips = () =>{
  15. uni.showToast({
  16. title:"推荐的设计师,有未完成的订单,订单完成后即可获得",
  17. icon:"none",
  18. duration:3000
  19. })
  20. }
  21. onMounted(async () => {
  22. await setCount();
  23. await setPointsSum();
  24. })
  25. </script>
  26. <template>
  27. <div class="px-[24rpx] py-[34rpx]">
  28. <view class="bg-white rounded-[32rpx] px-[24rpx] pt-[34rpx] pb-[60rpx] mb-[30rpx]">
  29. <view class="flex items-center justify-between mb-[60rpx] border-b-1 pb-[20rpx]">
  30. <view class="text-[36rpx] font-bold">我的推荐</view>
  31. <view class="text-[28rpx] text-black/40" @click="handleClick('/pages-sub/mine/refferrer/details?type=recommend')">
  32. <text>查看明细</text>
  33. <wd-img :src="right" width="12" height="12"></wd-img>
  34. </view>
  35. </view>
  36. <view class="flex items-start justify-between mb-[40rpx]">
  37. <view class="">
  38. <view class="text-[56rpx] font-bold mb-[12rpx]">{{ count.onePassCount }}</view>
  39. <view class="text-[28rpx] text-black/40 ">认证设计师 (人)</view>
  40. </view>
  41. <view class="bg-[#F2F2F2] flex px-[32rpx] py-[10rpx] text-[24rpx] text-black/40 rounded-full items-center">
  42. <text class="mr-[10rpx]">二级推荐:{{ count.twoPassCount }}人</text>
  43. <icon type="info_circle" size="16" color="#999"></icon>
  44. </view>
  45. </view>
  46. <view class="flex justify-between">
  47. <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">
  48. <view class="w-[10rpx] h-full absolute bg-[#0CBE7D] left-0 top-0"></view>
  49. <view class="w-full text-center text-[24rpx] text-black/60">
  50. <text>审核中</text>
  51. <text class="text-[32rpx] text-black">{{ count.oneWaitCount }}</text>
  52. <text>人</text>
  53. </view>
  54. </view>
  55. <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">
  56. <view class="w-[10rpx] h-full absolute bg-[#FFCF82] left-0 top-0"></view>
  57. <view class="w-full text-center text-[24rpx] text-black/60 ">
  58. <text>未通过</text>
  59. <text class="text-[32rpx] text-black px-[6rpx]">{{ count.oneRejectCount }}</text>
  60. <text>人</text>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="bg-white rounded-[32rpx] px-[24rpx] pt-[34rpx] pb-[60rpx] mb-[30rpx]">
  66. <view class="flex items-center justify-between mb-[60rpx] border-b-1 pb-[20rpx]">
  67. <view class="text-[36rpx] font-bold">引荐加成奖励</view>
  68. <view class="text-[28rpx] text-black/40" @click="handleClick('/pages-sub/mine/refferrer/details?type=reward')">
  69. <text>查看明细</text>
  70. <wd-img :src="right" width="12" height="12"></wd-img>
  71. </view>
  72. </view>
  73. <view class="flex items-start justify-between mb-[40rpx]">
  74. <view class="">
  75. <view class="text-[56rpx] font-bold mb-[12rpx]">{{ pointsSum.passPoints }}</view>
  76. <view class="text-[28rpx] text-black/40 ">已获得总积分</view>
  77. </view>
  78. <view class="bg-[#F2F2F2] flex px-[32rpx] py-[10rpx] text-[24rpx] text-black/40 rounded-full items-center">
  79. <text class="mr-[10rpx]">待入账:{{ pointsSum.waitPoints }}积分</text>
  80. <icon @click="tips" type="info_circle" size="16" color="#999"></icon>
  81. </view>
  82. </view>
  83. <div class="flex">
  84. <div class="w-[50%]">
  85. <div class="text-[32rpx] font-bold">{{ pointsSum.onePassPoints }}</div>
  86. <div class="text-[24rpx] text-black/60">一级引荐奖励积分</div>
  87. </div>
  88. <div class="w-[50%]">
  89. <div class="text-[32rpx] font-bold">{{ pointsSum.twoPassPoints }}</div>
  90. <div class="text-[24rpx] text-black/60">二级引荐奖励积分</div>
  91. </div>
  92. </div>
  93. </view>
  94. <view class="flex bg-white rounded-[32rpx] px-[24rpx] py-[34rpx]" @click="handleClick('/pages-sub/mine/refferrer/rule')">
  95. <view class="text-[32rpx] flex-grow">引荐奖励规则</view>
  96. <icon type="info_circle" size="22" color="#999"></icon>
  97. </view>
  98. </div>
  99. </template>