my_share_result.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view>
  3. <view class="studentWrapper">
  4. <view class="studentList" >
  5. <view class="studentLeft">
  6. <text >打开人数</text>
  7. </view>
  8. <view class="studentRight">
  9. <text>{{shareCount}}</text>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="studentWrapper">
  14. <view class="studentList" >
  15. <view class="studentLeft">
  16. <text >发布条数</text>
  17. </view>
  18. <view class="studentRight">
  19. <text>{{publishCount}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="studentWrapper">
  24. <view class="studentList" @click="toShareOrders" >
  25. <view class="studentLeft">
  26. <text >成交条数</text>
  27. </view>
  28. <view class="studentRight">
  29. <text>{{orderCount}}</text>
  30. </view>
  31. <image class="rightIcon" src="@/static/right.png"></image>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. shareCount: 0,
  41. publishCount: 0,
  42. orderCount: 0
  43. };
  44. },
  45. created() {
  46. this.getShareCount()
  47. this.getPublishCount()
  48. this.getOrderCount()
  49. },
  50. methods: {
  51. // 成功注册的条数
  52. async getShareCount() {
  53. const { data: result } = await uni.$http.get('/ucenter/mini-program-openid-uid/getShareCount')
  54. this.shareCount = result.data.result
  55. },
  56. // 推荐成功,发布的 课程和需求 条数
  57. async getPublishCount() {
  58. const { data: result } = await uni.$http.get('/ucenter/mini-program-openid-uid/getSharePublishCount')
  59. this.publishCount = result.data.result
  60. },
  61. // 推荐成功 对应的 未退款的订单条数
  62. async getOrderCount() {
  63. const { data: result } = await uni.$http.get('/ucenter/mini-program-openid-uid/getShareOrderCount')
  64. this.orderCount = result.data.result
  65. },
  66. toShareOrders(){
  67. if (this.orderCount > 0) {
  68. uni.navigateTo({
  69. url: '/subpkg/my/share/my_share_result_order'
  70. })
  71. } else{
  72. uni.$showMsg("无成交订单!")
  73. }
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. .studentWrapper{
  80. height: 100%;
  81. background-color: #E2F0D9;
  82. padding-left: 40rpx;
  83. padding-right: 40rpx;
  84. }
  85. .studentList{
  86. display: flex;
  87. align-items: center;
  88. justify-content: space-between;
  89. padding: 40rpx;
  90. border-radius: 40rpx;
  91. background-color: #FFF2CC;
  92. margin-bottom: 20rpx;
  93. }
  94. /* 左侧部分 */
  95. .studentLeft{
  96. margin-left: 100rpx;
  97. font-weight: bold;
  98. font-size: 30rpx;
  99. }
  100. /* 右侧部分定位 */
  101. .studentRight{
  102. margin-right: 150rpx;
  103. font-weight: bold;
  104. font-size: 32rpx;
  105. color: #FF0000;
  106. }
  107. .rightIcon{
  108. position: absolute;
  109. left: 85%;
  110. height: 40rpx;
  111. width: 40rpx;
  112. }
  113. </style>