extend.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view class="container">
  3. <view class="header">
  4. <image src="../../static/img/img39.png" mode="scaleToFill"></image>
  5. <view class="counts">385<text>人</text></view>
  6. <view class="people">我的推广人数</view>
  7. </view>
  8. <!-- 推广 -->
  9. <view class="navbar">
  10. <view class="one">5</view>
  11. <view class="line"></view>
  12. <view class="two">120</view>
  13. <view class="nav-item" v-for="(item, index) in navList" :key="index"
  14. :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
  15. </view>
  16. <swiper class="swiper-box" :current="tabCurrentIndex" duration="300" @change="changeTab"
  17. >
  18. <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
  19. <!-- 空白页 -->
  20. <!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
  21. <!-- 推广奖励 -->
  22. <scroll-view class="scorll" scroll-y="true" >
  23. <view class="cost">
  24. <view class="award" v-for="item in 10">
  25. <image src="../../static/tabBar/tab-my-current.png" mode="scaleToFill"></image>
  26. <view class="award-left">
  27. <view class="text">xxx</view>
  28. <view class="time">2021-8-26 09:30</view>
  29. </view>
  30. </view>
  31. </view>
  32. </scroll-view>
  33. </swiper-item>
  34. </swiper>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data () {
  40. return {
  41. height: '',
  42. tabCurrentIndex: 0,
  43. navList: [{
  44. state: 1,
  45. text: '一级推广',
  46. loadingType: 'more',
  47. orderList: [],
  48. page: 1, //当前页数
  49. limit: 10 //每次信息条数
  50. },
  51. {
  52. state: 2,
  53. text: '二级推广',
  54. loadingType: 'more',
  55. orderList: [],
  56. page: 1, //当前页数
  57. limit: 10 //每次信息条数
  58. }
  59. ],
  60. list: [],
  61. money: ''
  62. }
  63. },
  64. methods: {
  65. //swiper 切换
  66. changeTab (e) {
  67. this.tabCurrentIndex = e.target.current;
  68. this.loadData('tabChange')
  69. },
  70. //顶部tab点击
  71. tabClick(index) {
  72. this.tabCurrentIndex = index;
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss">
  78. .container {
  79. width: 750rpx;
  80. height: 1334rpx;
  81. background-color: #fff;
  82. .header {
  83. position: relative;
  84. image {
  85. width: 750rpx;
  86. height: 460rpx;
  87. }
  88. .counts {
  89. font-size: 72rpx;
  90. font-family: PingFang SC;
  91. font-weight: bold;
  92. color: #3F7C1F;
  93. position: absolute;
  94. top: 35%;
  95. margin-left: 310rpx;
  96. text {
  97. font-size: 12rpx;
  98. }
  99. }
  100. .people {
  101. font-size: 30rpx;
  102. font-family: PingFang SC;
  103. font-weight: 500;
  104. color: #3F7C1F;
  105. position: absolute;
  106. top: 55%;
  107. margin-left: 286rpx;
  108. }
  109. }
  110. .swiper-box {
  111. height: calc(100% - 700rpx);
  112. background-color: #FFFFFF;
  113. }
  114. .scorll {
  115. height: 100%;
  116. }
  117. .navbar {
  118. display: flex;
  119. padding: 0 5rpx;
  120. background: #fff;
  121. position: relative;
  122. z-index: 10;
  123. width: 702rpx;
  124. height: 120rpx;
  125. background: #FFFFFF;
  126. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
  127. border-radius: 10rpx;
  128. margin-top: -70rpx;
  129. margin-left: 25rpx;
  130. .one {
  131. position: absolute;
  132. top: 10%;
  133. left: 25%;
  134. font-size: 32rpx;
  135. font-family: PingFang SC;
  136. font-weight: bold;
  137. color: #FF0000;
  138. }
  139. .two {
  140. position: absolute;
  141. top: 10%;
  142. left: 70%;
  143. font-size: 32rpx;
  144. font-family: PingFang SC;
  145. font-weight: bold;
  146. color: #FF0000;
  147. }
  148. .line {
  149. width: 2rpx;
  150. height: 54rpx;
  151. background: #EEEEEE;
  152. position: absolute;
  153. top: 30%;
  154. left: 50%;
  155. }
  156. .nav-item {
  157. flex: 1;
  158. display: flex;
  159. justify-content: center;
  160. align-items: center;
  161. height: 100%;
  162. font-size: 30rpx;
  163. color: #999999;
  164. position: relative;
  165. padding-top: 40rpx;
  166. &.current {
  167. color: #333333;
  168. &:after {
  169. content: '';
  170. position: absolute;
  171. left: 50%;
  172. bottom: 0;
  173. transform: translateX(-50%);
  174. width: 44px;
  175. height: 0;
  176. border-bottom: 2px solid #3F7C1F;
  177. }
  178. }
  179. }
  180. }
  181. .cost {
  182. width: 750rpx;
  183. height: auto;
  184. background-color: #fff;
  185. .award {
  186. width: 701rpx;
  187. height: 132rpx;
  188. border-bottom: 1px solid #F0F4F8;
  189. margin-left: 25rpx;
  190. display: flex;
  191. align-items: center;
  192. image {
  193. width: 80rpx;
  194. height: 80rpx;
  195. }
  196. .award-left {
  197. width: 221rpx;
  198. height: 40rpx;
  199. margin-left: 30rpx;
  200. margin-bottom: 35rpx;
  201. .text {
  202. width: 58rpx;
  203. height: 28rpx;
  204. font-size: 30rpx;
  205. font-family: PingFang SC;
  206. font-weight: 500;
  207. color: #3F454B;
  208. margin-bottom: 16rpx;
  209. }
  210. .time {
  211. width: 221rpx;
  212. height: 20rpx;
  213. font-size: 26rpx;
  214. font-family: PingFang SC;
  215. font-weight: 500;
  216. color: #AEAEAE;
  217. }
  218. }
  219. }
  220. }
  221. }
  222. </style>