推拿小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

229 lines
4.4 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <view class="page">
  3. <view class="bg"></view>
  4. <view class="header">
  5. <!-- 导航栏 -->
  6. <navbar title="我的团队" leftClick @leftClick="$utils.navigateBack" bgColor="transparent" color="#fff" />
  7. <view class="card flex info">
  8. <image class="avatar" :src="userInfo.headImage" mode="aspectFill"></image>
  9. <view class="right">
  10. <view class="phone">{{ userInfo.phone }}</view>
  11. <view class="flex account">
  12. <view class="count">
  13. <view><text class="count-unit">¥</text>{{ riceInfo.canWithdraw || 0 }}</view>
  14. <view class="count-desc">推广佣金</view>
  15. </view>
  16. <button plain class="btn" @click="$utils.navigateTo('/pages_order/mine/withdraw')">去提现</button>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="list">
  22. <view class="list-header">
  23. <view class="list-header-title">
  24. <text>直推用户<text class="sub">{{ `${total}人)` }}</text></text>
  25. <view class="list-header-title-line"></view>
  26. </view>
  27. </view>
  28. <view class="list-content">
  29. <template v-if="list.length">
  30. <view class="card flex list-item" v-for="item in list" :key="item.id">
  31. <view class="left flex">
  32. <image class="avatar" :src="item.headImage" mode="aspectFill"></image>
  33. <view class="detail">
  34. <view class="row name">{{ item.nickName }}</view>
  35. <view class="row">{{ `下单时间:${item.createTime}` }}</view>
  36. <!-- todo: check -->
  37. <view class="row">{{ `${item.shopName}${item.price}` }}</view>
  38. </view>
  39. </view>
  40. <!-- todo: check -->
  41. <view class="commission">{{ `+${item.integerPrice}` }}</view>
  42. </view>
  43. </template>
  44. <template v-else>
  45. <uv-empty mode="list"></uv-empty>
  46. </template>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import mixinsList from '@/mixins/list.js'
  53. import { mapState } from 'vuex'
  54. export default {
  55. name: "Partner",
  56. mixins: [mixinsList],
  57. data() {
  58. return {
  59. mixinsListApi: 'queryRecommendUserList',
  60. }
  61. },
  62. computed : {
  63. ...mapState(['riceInfo']),
  64. },
  65. onLoad() {
  66. // todo
  67. // this.$store.commit('getRiceInfo')
  68. },
  69. methods: {
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .page {
  75. background-color: #F5F5F5;
  76. min-height: 100vh;
  77. position: relative;
  78. }
  79. .bg {
  80. width: 100vw;
  81. height: 465rpx;
  82. background-image: linear-gradient(#84A73F, #D8FF8F);
  83. }
  84. .header {
  85. position: absolute;
  86. top: 0;
  87. left: 0;
  88. width: 100vw;
  89. }
  90. .info {
  91. box-sizing: border-box;
  92. width: calc(100% - 13rpx*2);
  93. padding: 0 33rpx 0 20rpx;
  94. margin: 0 13rpx;
  95. align-items: flex-start;
  96. .avatar {
  97. width: 145rpx;
  98. height: 145rpx;
  99. margin: 46rpx 20rpx 46rpx 0;
  100. }
  101. .phone {
  102. color: #000000;
  103. font-size: 28rpx;
  104. }
  105. .account {
  106. margin-top: 21rpx;
  107. border-top: 1rpx dashed #707070;
  108. align-items: flex-start;
  109. justify-content: space-between;
  110. padding: 23rpx 7rpx 15rpx 26rpx;
  111. .count {
  112. color: #FF2A2A;
  113. font-size: 32rpx;
  114. font-weight: 700;
  115. &-unit {
  116. font-size: 15rpx;
  117. }
  118. &-desc {
  119. color: #666666;
  120. font-size: 22rpx;
  121. margin-top: 9rpx;
  122. margin-left: 2rpx;
  123. }
  124. }
  125. .btn {
  126. display: inline-block;
  127. padding: 14rpx 47rpx;
  128. color: $uni-text-color-inverse;
  129. font-size: 28rpx;
  130. line-height: 40rpx;
  131. border-radius: 34rpx;
  132. border: none;
  133. background-image: linear-gradient(to right, #84A73F, #D8FF8F);
  134. }
  135. }
  136. .right {
  137. flex: 1;
  138. padding-top: 52rpx;
  139. }
  140. }
  141. .list {
  142. &-header {
  143. background-color: $uni-fg-color;
  144. padding: 0 48rpx;
  145. &-title {
  146. color: #000000;
  147. font-size: 28rpx;
  148. padding: 33rpx 0 17rpx 0;
  149. position: relative;
  150. .sub {
  151. color: #84A73F;
  152. font-size: 22rpx;
  153. }
  154. &-line {
  155. position: absolute;
  156. left: 6rpx;
  157. bottom: 0;
  158. width: 92rpx;
  159. height: 5rpx;
  160. border-radius: 3rpx;
  161. background-image: linear-gradient(to right, #84A73F, #D8FF8F);
  162. }
  163. }
  164. }
  165. &-content {
  166. padding: 7rpx 13rpx;
  167. .left {
  168. flex: 1;
  169. }
  170. }
  171. &-item {
  172. margin-top: 8rpx;
  173. padding: 0 40rpx 0 18rpx;
  174. .avatar {
  175. width: 82rpx;
  176. height: 82rpx;
  177. border-radius: 50%;
  178. }
  179. .detail {
  180. flex: 1;
  181. margin: 9rpx 0 7rpx 13rpx;
  182. color: #999999;
  183. font-size: 18rpx;
  184. }
  185. .row + .row {
  186. margin-top: 4rpx;
  187. }
  188. .name {
  189. color: #000000;
  190. font-size: 26rpx;
  191. }
  192. .commission {
  193. color: #FF2A2A;
  194. font-size: 22rpx;
  195. }
  196. }
  197. }
  198. </style>