index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. onMounted(async () => {
  15. await setCount();
  16. await setPointsSum();
  17. })
  18. </script>
  19. <template>
  20. <div class="px-[24rpx] py-[34rpx]">
  21. <view class="bg-white rounded-[32rpx] px-[24rpx] pt-[34rpx] pb-[60rpx] mb-[30rpx]">
  22. <view class="flex items-center justify-between mb-[60rpx] border-b-1 pb-[20rpx]">
  23. <view class="text-[36rpx] font-bold">我的推荐</view>
  24. <view class="text-[28rpx] text-black/40" @click="handleClick('/pages-sub/mine/refferrer/details?type=recommend')">
  25. <text>查看明细</text>
  26. <wd-img :src="right" width="12" height="12"></wd-img>
  27. </view>
  28. </view>
  29. <view class="flex items-start justify-between mb-[40rpx]">
  30. <view class="">
  31. <view class="text-[56rpx] font-bold mb-[12rpx]">{{ count.onePassCount }}</view>
  32. <view class="text-[28rpx] text-black/40 ">认证设计师 (人)</view>
  33. </view>
  34. <view class="bg-[#F2F2F2] flex px-[32rpx] py-[10rpx] text-[24rpx] text-black/40 rounded-full items-center">
  35. <text class="mr-[10rpx]">二级推荐:{{ count.twoPassCount }}人</text>
  36. <icon type="info_circle" size="16" color="#999"></icon>
  37. </view>
  38. </view>
  39. <view class="flex justify-between">
  40. <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">
  41. <view class="w-[10rpx] h-full absolute bg-[#0CBE7D] left-0 top-0"></view>
  42. <view class="w-full text-center text-[24rpx] text-black/60">
  43. <text>审核中</text>
  44. <text class="text-[32rpx] text-black">{{ count.oneWaitCount }}</text>
  45. <text>人</text>
  46. </view>
  47. </view>
  48. <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">
  49. <view class="w-[10rpx] h-full absolute bg-[#FFCF82] left-0 top-0"></view>
  50. <view class="w-full text-center text-[24rpx] text-black/60 ">
  51. <text>未通过</text>
  52. <text class="text-[32rpx] text-black px-[6rpx]">{{ count.oneRejectCount }}</text>
  53. <text>人</text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="bg-white rounded-[32rpx] px-[24rpx] pt-[34rpx] pb-[60rpx] mb-[30rpx]">
  59. <view class="flex items-center justify-between mb-[60rpx] border-b-1 pb-[20rpx]">
  60. <view class="text-[36rpx] font-bold">引荐加成奖励</view>
  61. <view class="text-[28rpx] text-black/40" @click="handleClick('/pages-sub/mine/refferrer/details?type=reward')">
  62. <text>查看明细</text>
  63. <wd-img :src="right" width="12" height="12"></wd-img>
  64. </view>
  65. </view>
  66. <view class="flex items-start justify-between mb-[40rpx]">
  67. <view class="">
  68. <view class="text-[56rpx] font-bold mb-[12rpx]">{{ pointsSum.passPoints }}</view>
  69. <view class="text-[28rpx] text-black/40 ">已获得总积分</view>
  70. </view>
  71. <view class="bg-[#F2F2F2] flex px-[32rpx] py-[10rpx] text-[24rpx] text-black/40 rounded-full items-center">
  72. <text class="mr-[10rpx]">待入账:{{ pointsSum.waitPoints }}积分</text>
  73. <icon type="info_circle" size="16" color="#999"></icon>
  74. </view>
  75. </view>
  76. <div class="flex">
  77. <div class="w-[50%]">
  78. <div class="text-[32rpx] font-bold">{{ pointsSum.onePassPoints }}</div>
  79. <div class="text-[24rpx] text-black/60">一级引荐奖励积分</div>
  80. </div>
  81. <div class="w-[50%]">
  82. <div class="text-[32rpx] font-bold">{{ pointsSum.twoPassPoints }}</div>
  83. <div class="text-[24rpx] text-black/60">二级引荐奖励积分</div>
  84. </div>
  85. </div>
  86. </view>
  87. <view class="flex bg-white rounded-[32rpx] px-[24rpx] py-[34rpx]" @click="handleClick('/pages-sub/mine/refferrer/rule')">
  88. <view class="text-[32rpx] flex-grow">引荐奖励规则</view>
  89. <icon type="info_circle" size="22" color="#999"></icon>
  90. </view>
  91. </div>
  92. </template>