team.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <template>
  2. <view class="content">
  3. <!-- 头部 -->
  4. <view class="container">
  5. <view class="jiedianbackground"><image src="../../static/img/jiedian.png" mode=""></image></view>
  6. <view class="number-box">
  7. <view class="number">
  8. <text>100</text>
  9. </view>
  10. <view class="renshu">我的团队人数</view>
  11. </view>
  12. </view>
  13. <view class="message">
  14. <!-- <view class="back" @click="navBack()" v-if="parentList.length > 0">
  15. <image src="../../static/img/zhengyi10.png" mode=""></image>
  16. 返回
  17. </view> -->
  18. <view class="relation-box">
  19. <view class="relation">
  20. <view class="headbox">
  21. <view class="head">
  22. <view class="photo"><image v-if="avatar" :src="avatar || '/static/error/missing-face.png'"></image></view>
  23. </view>
  24. <!-- <view class="head-title">
  25. <image src="../../static/error/missing-face.png" mode=""></image>
  26. </view> -->
  27. </view>
  28. <view class="information">
  29. <view class="name clamp">{{ name }}</view>
  30. <view class="cell clamp">{{ phone }}</view>
  31. </view>
  32. </view>
  33. <view class="sanchaji"><image src="../../static/img/sanchaji.png" mode=""></image></view>
  34. <view class="subordinate flex">
  35. <view class="subordinate-box" v-for="(item, index) in childList">
  36. <view class="head"><image :src="item.avter || '/static/error/missing-face.png'" mode=""></image></view>
  37. <view class="name clamp">{{ item.name }}</view>
  38. <view class="phone clamp">{{ item.phone }}</view>
  39. </view>
  40. <template v-if="childList.length < 5">
  41. <view class="subordinate-box" v-for="item in (5-childList.length)">
  42. <view class="head"></view>
  43. <view class="name clamp"></view>
  44. <view class="phone clamp"></view>
  45. </view>
  46. </template>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  54. import { getjiedian, getReferralList, addJiedian } from '@/api/user.js';
  55. import { mapState, mapMutations } from 'vuex';
  56. export default {
  57. components: {
  58. uniPopup
  59. },
  60. data() {
  61. return {
  62. name: '', //当前节点姓名
  63. phone: '', //当前节点手机号
  64. avatar: '', //当前节点头像
  65. id: '',
  66. childList: [{
  67. name:'11',
  68. phone:'13300000000'
  69. },{
  70. name:'12',
  71. phone:'13300000001'
  72. },{
  73. name:'13',
  74. phone:'13300000003'
  75. },{
  76. name:'14',
  77. phone:'13300000004'
  78. },
  79. ] //当前节点的下级
  80. };
  81. },
  82. computed: {
  83. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  84. },
  85. onLoad() {
  86. this.name = this.userInfo.nickname;
  87. this.phone = this.userInfo.phone;
  88. this.avatar = this.userInfo.avatar;
  89. this.id = this.userInfo.uid;
  90. this.loadData();
  91. },
  92. methods: {
  93. //返回
  94. loadData() {
  95. const obj = this;
  96. }
  97. }
  98. };
  99. </script>
  100. <style lang="scss">
  101. page {
  102. padding: 0;
  103. margin: 0;
  104. height: 100%;
  105. background-color: #000;
  106. }
  107. .container {
  108. width: 750rpx;
  109. height: 400rpx;
  110. position: relative;
  111. .jiedianbackground {
  112. position: absolute;
  113. width: 750rpx;
  114. height: 400rpx;
  115. image {
  116. width: 100%;
  117. height: 100%;
  118. }
  119. }
  120. .number-box {
  121. width: 750rpx;
  122. height: 400rpx;
  123. position: absolute;
  124. display: flex;
  125. justify-content: center;
  126. flex-direction: column;
  127. align-items: center;
  128. .number {
  129. font-size: 30rpx;
  130. font-family: PingFang SC;
  131. font-weight: 500;
  132. color: #fad6b0;
  133. text {
  134. font-size: 72rpx;
  135. font-family: PingFang SC;
  136. font-weight: bold;
  137. line-height: 86rpx;
  138. }
  139. }
  140. .renshu {
  141. font-size: 30rpx;
  142. font-family: PingFang SC;
  143. font-weight: 500;
  144. color: #fad6b0;
  145. }
  146. }
  147. }
  148. .message {
  149. padding: 0 30rpx;
  150. .relation-box {
  151. margin-top: 100rpx;
  152. display: flex;
  153. flex-direction: column;
  154. align-items: center;
  155. .relation {
  156. position: relative;
  157. display: flex;
  158. align-items: center;
  159. .headbox {
  160. position: absolute;
  161. // width: 154rpx;
  162. // height: 154rpx;
  163. .head {
  164. width: 154rpx;
  165. height: 154rpx;
  166. background: #fff;
  167. box-shadow: 5rpx 0rpx 5rpx 0rpx rgba(110, 171, 78, 0.26);
  168. border-radius: 50%;
  169. overflow: hidden;
  170. .photo {
  171. width: 154rpx;
  172. height: 154rpx;
  173. image {
  174. width: 100%;
  175. height: 100%;
  176. }
  177. }
  178. }
  179. .head-title {
  180. margin: -30rpx 30rpx 0 30rpx;
  181. width: 94rpx;
  182. height: 32rpx;
  183. image {
  184. width: 100%;
  185. height: 100%;
  186. }
  187. }
  188. // .head-name{
  189. // max-width: 100%;
  190. // font-size: 32rpx;
  191. // font-weight: bold;
  192. // color: #333333;
  193. // }
  194. // .head-phone{
  195. // font-size: 26rpx;
  196. // font-weight: 500;
  197. // color: #999999;
  198. // }
  199. }
  200. .information {
  201. margin-left: 77rpx;
  202. display: flex;
  203. padding: 20rpx 10rpx;
  204. flex-direction: column;
  205. width: 297rpx;
  206. height: 137rpx;
  207. background: linear-gradient(90deg, #393326, #27221d);
  208. border: 4rpx solid #fad6b0;
  209. border-radius: 10rpx;
  210. .name {
  211. text-align: left;
  212. margin-left: 70rpx;
  213. font-size: 32rpx;
  214. font-family: PingFang SC;
  215. font-weight: bold;
  216. color: #fad6b0;
  217. }
  218. .cell {
  219. text-align: left;
  220. margin-left: 70rpx;
  221. font-size: 26rpx;
  222. font-family: PingFang SC;
  223. font-weight: 500;
  224. color: #fad6b0;
  225. }
  226. }
  227. }
  228. .sanchaji {
  229. margin: 30rpx 0;
  230. width: 90%;
  231. height: 91rpx;
  232. image {
  233. width: 100%;
  234. height: 100%;
  235. }
  236. }
  237. .subordinate {
  238. width: 750rpx;
  239. display: flex;
  240. justify-content: flex-start;
  241. align-items: flex-start;
  242. .subordinate-box {
  243. flex: 1;
  244. display: flex;
  245. flex-direction: column;
  246. align-items: center;
  247. .head {
  248. border-radius: 50%;
  249. background: #fff;
  250. width: 120rpx;
  251. height: 120rpx;
  252. image {
  253. width: 100%;
  254. height: 100%;
  255. }
  256. }
  257. .name {
  258. max-width: 120rpx;
  259. margin-top: 10rpx;
  260. font-size: 26rpx;
  261. font-family: PingFang SC;
  262. font-weight: bold;
  263. color: #FFFFFF;
  264. }
  265. .phone {
  266. max-width: 120rpx;
  267. margin-top: 10rpx;
  268. font-size: 22rpx;
  269. font-family: PingFang SC;
  270. font-weight: 500;
  271. color: #999999;
  272. }
  273. }
  274. }
  275. }
  276. .back {
  277. float: right;
  278. margin-top: 40rpx;
  279. display: flex;
  280. align-items: center;
  281. justify-content: center;
  282. image {
  283. width: 24rpx;
  284. height: 23rpx;
  285. }
  286. width: 104rpx;
  287. height: 39rpx;
  288. border: 2rpx solid #6eab4e;
  289. border-radius: 7rpx;
  290. font-size: 24rpx;
  291. font-family: PingFang SC;
  292. font-weight: 500;
  293. color: #6eab4e;
  294. }
  295. }
  296. </style>