my_share_result.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="share-result-container">
  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/rightwhite.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. <!-- 设置页面背景 -->
  79. <style lang="scss">
  80. page{
  81. height: 100%;
  82. // background-color: #FFF;
  83. }
  84. </style>
  85. <style lang="scss" scoped>
  86. .share-result-container{
  87. //height: 100%;
  88. //background-color: #FFF2CC;
  89. margin-top: 20rpx;
  90. }
  91. .studentWrapper{
  92. //height: 100%;
  93. //background-color: #E2F0D9;
  94. padding-left: 40rpx;
  95. padding-right: 40rpx;
  96. }
  97. .studentList{
  98. display: flex;
  99. align-items: center;
  100. justify-content: space-between;
  101. padding: 40rpx;
  102. border-radius: 40rpx;
  103. //background-color: #FFF2CC;
  104. // background-color: yellowgreen;
  105. margin-bottom: 20rpx;
  106. background-color: #35b882;
  107. color: white;
  108. }
  109. /* 左侧部分 */
  110. .studentLeft{
  111. margin-left: 100rpx;
  112. font-weight: bold;
  113. font-size: 30rpx;
  114. }
  115. /* 右侧部分定位 */
  116. .studentRight{
  117. margin-right: 150rpx;
  118. font-weight: bold;
  119. font-size: 32rpx;
  120. // color: #FF0000;
  121. }
  122. .rightIcon{
  123. position: absolute;
  124. left: 85%;
  125. height: 30rpx;
  126. width: 30rpx;
  127. }
  128. </style>