team.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="container">
  3. <view class="img">
  4. <image src="https://mmz.liuniu946.com/statics/img/img02.png"></image>
  5. </view>
  6. <view class="team-box">
  7. <view class="team-header">
  8. <view class="return" @click="navTo('/pages/user/spread')"><image src="../../static/img/img03.png"></image></view>
  9. <view class="team-title">我的团队</view>
  10. </view>
  11. <view class="Personal-information">
  12. <view class="avatar">
  13. <image :src="userInfo.avatar || '/static/error/missing-face.png'"></image>
  14. </view>
  15. <view class="name">{{userInfo.nickname}}</view>
  16. </view>
  17. </view>
  18. <view class="team-info">
  19. <view class="team-info-item" >
  20. <view class="count">3</view>
  21. <view class="info">团队人数</view>
  22. </view>
  23. <view class="team-info-item">
  24. <view class="count">¥0.00</view>
  25. <view class="info">团队奖励(元)</view>
  26. </view>
  27. </view>
  28. <view class="number-box">
  29. <view class="number-box-item">
  30. <view class="avatar">
  31. <image src="../../static/img/1.jpg"></image>
  32. </view>
  33. <view class="number-info">
  34. <view class="number-header">
  35. <view class="number-name">御风</view>
  36. <view class="number-title">粉丝</view>
  37. </view>
  38. <view class="number-time">2020-07-02 12:00:00</view>
  39. </view>
  40. </view>
  41. <view class="number-box-item">
  42. <view class="avatar">
  43. <image src="../../static/img/1.jpg"></image>
  44. </view>
  45. <view class="number-info">
  46. <view class="number-header">
  47. <view class="number-name">御风</view>
  48. <view class="number-title">粉丝</view>
  49. </view>
  50. <view class="number-time">2020-07-02 12:00:00</view>
  51. </view>
  52. </view>
  53. <view class="number-box-item">
  54. <view class="avatar">
  55. <image src="../../static/img/1.jpg"></image>
  56. </view>
  57. <view class="number-info">
  58. <view class="number-header">
  59. <view class="number-name">御风</view>
  60. <view class="number-title">粉丝</view>
  61. </view>
  62. <view class="number-time">2020-07-02 12:00:00</view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import { mapState, mapMutations } from 'vuex';
  70. export default{
  71. computed: {
  72. ...mapState([ 'userInfo'])
  73. },
  74. onLoad() {
  75. this.loadData();
  76. },
  77. methods:{
  78. loadData() {
  79. let index = this.tabCurrentIndex;
  80. let navItem = this.navList[index];
  81. let state = navItem.state + 1;
  82. myGroup({
  83. layer: state,
  84. // page: navItem.page,
  85. // limit: navItem.limit
  86. }).then(({ data }) => {
  87. this.list = data.list;
  88. if( state == 1) {
  89. this.yiNum = data.sum;
  90. }
  91. if( state == 2) {
  92. this.erNum = data.sum;
  93. }
  94. this.numbers = parseFloat(this.yiNum) + parseFloat(this.erNum);
  95. })
  96. },
  97. // 跳转
  98. navTo(url) {
  99. uni.navigateTo({
  100. url
  101. });
  102. }
  103. }
  104. }
  105. </script>
  106. <style lang="scss">
  107. page, .conteiner{
  108. background: #F0F0F0;
  109. height: 100%;
  110. }
  111. .container{
  112. position: relative;
  113. // background-color: pink;
  114. .img{
  115. width: 100%;
  116. image{
  117. width: 100%;
  118. height: 500rpx;
  119. }
  120. }
  121. .team-box{
  122. position: absolute;
  123. top:0;
  124. left:0;
  125. width: 100%;
  126. height: 500rpx;
  127. padding: 0 24rpx;
  128. .team-header{
  129. margin-top: 30rpx;
  130. display: flex;
  131. .return{
  132. width: 21rpx;
  133. height: 36rpx;
  134. image{
  135. width: 21rpx;
  136. height: 36rpx;
  137. }
  138. }
  139. .team-title{
  140. width: 100%;
  141. text-align: center;
  142. color: #fff;
  143. font-size:32rpx;
  144. }
  145. }
  146. .Personal-information{
  147. display: flex;
  148. flex-direction: column;
  149. justify-content: center;
  150. .avatar{
  151. width: 140rpx;
  152. height: 140rpx;
  153. margin: 0 auto;
  154. margin-top: 80rpx;
  155. border-radius: 70rpx;
  156. image{
  157. width: 140rpx;
  158. height: 140rpx;
  159. border-radius: 70rpx;
  160. }
  161. }
  162. .name{
  163. margin-top:30rpx;
  164. font-size: 30rpx;
  165. color: #FFF;
  166. text-align: center;
  167. }
  168. }
  169. }
  170. .team-info{
  171. height: 164rpx;
  172. width: 94%;
  173. background-color: #fff;
  174. margin-left: 24rpx;
  175. margin-right:24rpx;
  176. position: absolute;
  177. left:0;
  178. top:420rpx;
  179. display: flex;
  180. text-align: center;
  181. justify-content: space-around;
  182. border-radius: 16rpx;
  183. .count{
  184. font-size: 42rpx;
  185. color: #222222;
  186. margin-top: 36rpx;
  187. }
  188. .info{
  189. font-size: 24rpx;
  190. color: #666666;
  191. margin-top: 10rpx;
  192. }
  193. }
  194. .number-box{
  195. width: 94%;
  196. height: 377rpx;
  197. background-color: #FFF;
  198. margin-top:96rpx;
  199. margin-left: 24rpx;
  200. border-radius: 10rpx;
  201. .number-box-item{
  202. border-bottom: 1px solid #F0F0F0;
  203. width: 100%;
  204. height: 130rpx;
  205. display: flex;
  206. .avatar{
  207. height: 130rpx;
  208. width: 130rpx;
  209. image{
  210. margin: 30rpx 24rpx;
  211. width: 80rpx;
  212. height: 80rpx;
  213. border-radius: 50%;
  214. }
  215. }
  216. .number-info{
  217. .number-header{
  218. display: flex;
  219. .number-name{
  220. color: #3F454B;
  221. font-size: 30rpx;
  222. margin-top: 40rpx;
  223. }
  224. .number-title{
  225. width: 68rpx;
  226. height: 32rpx;
  227. border: 1px solid #FC4141;
  228. border-radius: 16rpx;
  229. text-align: center;
  230. line-height: 32rpx;
  231. font-size: 20rpx;
  232. color: #FC4141;
  233. margin-top: 42rpx;
  234. margin-left: 10rpx;
  235. }
  236. }
  237. .number-time{
  238. font-size: 22rpx;
  239. color: #999999;
  240. }
  241. }
  242. }
  243. }
  244. }
  245. </style>