my_share_result.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. <uni-icons type="right" size="15" color="#35b882" ></uni-icons>
  12. </view>
  13. </view>
  14. <view class="studentWrapper">
  15. <view class="studentList" >
  16. <view class="studentLeft">
  17. <text >教员人数</text>
  18. </view>
  19. <view class="studentRight">
  20. <text>{{publishCount}}</text>
  21. </view>
  22. <uni-icons type="right" size="15" color="#35b882" ></uni-icons>
  23. </view>
  24. </view>
  25. <view class="studentWrapper">
  26. <view class="studentList" @click="toShareOrders" >
  27. <view class="studentLeft">
  28. <text >学员单数</text>
  29. </view>
  30. <view class="studentRight">
  31. <text>{{orderCount}}</text>
  32. </view>
  33. <uni-icons type="right" size="15" color="#fff" ></uni-icons>
  34. </view>
  35. </view>
  36. <view class="shareRule-btn-wrapper" v-if="isShowShareRuleBtn">
  37. <button class="shareRule-btn" @click="shareRuleButton">分享规则</button>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. shareCount: 0,
  46. publishCount: 0,
  47. orderCount: 0,
  48. isShowShareRuleBtn: false
  49. };
  50. },
  51. created() {
  52. this.getShareCount()
  53. this.getTeacherCount()
  54. this.getOrderCount()
  55. },
  56. methods: {
  57. // 成功注册的条数
  58. async getShareCount() {
  59. const { data: result } = await uni.$http.get('/ucenter/mini-program-openid-uid/getShareCount')
  60. this.shareCount = result.data.result
  61. if (result.data.result > 0){
  62. this.isShowShareRuleBtn = true
  63. }
  64. },
  65. // 推荐成功,认证通过的教员 条数
  66. async getTeacherCount() {
  67. const { data: result } = await uni.$http.get('/ucenter/mini-program-openid-uid/getShareTeacherCount')
  68. this.publishCount = result.data.result
  69. },
  70. // 推荐成功 对应的 未退款的 学员 订单条数
  71. async getOrderCount() {
  72. const { data: result } = await uni.$http.get('/ucenter/mini-program-openid-uid/getShareOrderCount')
  73. this.orderCount = result.data.result
  74. },
  75. toShareOrders(){
  76. if (this.orderCount > 0) {
  77. uni.navigateTo({
  78. url: '/subpkg/my/share/my_share_result_order'
  79. })
  80. } else{
  81. uni.$showMsg("无成交订单!")
  82. }
  83. },
  84. shareRuleButton() {
  85. uni.navigateTo({
  86. url:'/subpkg/my/fee/feeRule_share'
  87. })
  88. }
  89. }
  90. }
  91. </script>
  92. <!-- 设置页面背景 -->
  93. <style lang="scss">
  94. page{
  95. height: 100%;
  96. // background-color: #FFF;
  97. }
  98. </style>
  99. <style lang="scss" scoped>
  100. .share-result-container{
  101. //height: 100%;
  102. //background-color: #FFF2CC;
  103. margin-top: 20rpx;
  104. }
  105. .studentWrapper{
  106. //height: 100%;
  107. //background-color: #E2F0D9;
  108. padding-left: 40rpx;
  109. padding-right: 40rpx;
  110. }
  111. .studentList{
  112. display: flex;
  113. align-items: center;
  114. justify-content: space-between;
  115. padding: 30rpx;
  116. border-radius: 50rpx;
  117. //background-color: #FFF2CC;
  118. // background-color: yellowgreen;
  119. margin-bottom: 20rpx;
  120. background-color: #35b882;
  121. color: white;
  122. }
  123. /* 左侧部分 */
  124. .studentLeft{
  125. margin-left: 100rpx;
  126. // font-weight: bold;
  127. font-size: 35rpx;
  128. }
  129. /* 右侧部分定位 */
  130. .studentRight{
  131. margin-right: 100rpx;
  132. //font-weight: bold;
  133. font-size: 35rpx;
  134. // color: #FF0000;
  135. }
  136. // 底部按钮
  137. .shareRule-btn-wrapper{
  138. margin-top: 60rpx;
  139. height: 140rpx;
  140. align-items: center;
  141. }
  142. .shareRule-btn{
  143. width: 300rpx;
  144. border-radius: 50rpx;
  145. // margin-bottom: 40rpx;
  146. background-color: #35b882;
  147. font-size: 35rpx;
  148. color:#fff;
  149. }
  150. </style>