team.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <template>
  2. <view class="team-box">
  3. <!-- <top :show-img="false"></top>-->
  4. <en-nav v-show="false" :title="$t('index.index.tds')"></en-nav>
  5. <view class="box-list">
  6. <view class="team-data">
  7. <view class="user-data">
  8. <view class="user-img">
  9. <image src="@/static/img/my/user.png" ></image>
  10. <view class="user-level">V{{member.level_id}}</view>
  11. </view>
  12. <view class="user-address">{{member.address}}</view>
  13. </view>
  14. </view>
  15. <view class="team-title">
  16. <view class="title-text">{{ $t('index.team.ztlb') }}</view>
  17. <view class="title-wire"></view>
  18. </view>
  19. <view class="team-list">
  20. <view class="item" v-for="(item,itemIndex) in list">
  21. <view class="team-item" :class="{'item-one':itemIndex===0}">
  22. <view class="item-left">
  23. <view class="left-img"> <image src="@/static/img/my/user.png" ></image></view>
  24. <view class="left-text">
  25. <view class="text-name">{{getAddress(item.address)}}</view>
  26. <view class="text-time">{{ $t('index.team.rtsj') }}:{{item.created_at}}</view>
  27. </view>
  28. </view>
  29. <view class="item-right">V{{item.level_id}}</view>
  30. </view>
  31. </view>
  32. <en-blank v-if="list.length<=0"></en-blank>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. // import Top from "@/pages/index/model/top";
  39. import EnBlank from "@/components/en-utils/en-blank/en-blank";
  40. import tools from "@/common/js/tools";
  41. import {getTeamInfo, getTeamList} from "@/api/member";
  42. import EnNav from "@/components/en-utils/en-nav/en-nav";
  43. export default {
  44. name: "team",
  45. components: {EnNav, EnBlank},
  46. props: {},
  47. data() {
  48. return {
  49. member:{
  50. "address": "",
  51. "level_id": 0,
  52. "recom_num": 0,
  53. "performance": 0,
  54. },
  55. 'list':[],
  56. page:1,
  57. isEnd:false
  58. }
  59. },
  60. watch: {},
  61. onReachBottom(){
  62. this.getTeamList()
  63. },
  64. mounted() {
  65. this.getTeamInfo()
  66. this.getTeamList()
  67. },
  68. methods: {
  69. getAddress(address){
  70. return tools.getAddress(address)
  71. },
  72. getTeamInfo(){
  73. getTeamInfo().then((res)=>{
  74. if(res.code===1){
  75. res.data.address=tools.getAddress(res.data.address)
  76. this.member=res.data
  77. console.log( this.member.address)
  78. }
  79. })
  80. },
  81. getTeamList(){
  82. if(this.isEnd){
  83. return
  84. }
  85. getTeamList().then((res)=>{
  86. if(res.code===1){
  87. if(res.data.items.length<=0){
  88. this.isEnd=true
  89. }
  90. this.list.push(...res.data.items)
  91. ++this.page
  92. }
  93. })
  94. }
  95. }
  96. }
  97. </script>
  98. <style scoped lang="scss">
  99. .box-list{
  100. padding: 6px 16px;
  101. .team-data{
  102. background: #fff;
  103. margin-top: 20rpx;
  104. padding: 20rpx;
  105. border-radius: 10rpx;
  106. .user-data{
  107. .user-img{
  108. margin:24rpx auto;
  109. width: 140rpx;
  110. height: 140rpx;
  111. position: relative;
  112. image{
  113. border-radius: 50%;
  114. width: 140rpx;
  115. height: 140rpx;
  116. }
  117. .user-level{
  118. position: absolute;
  119. bottom: 0;
  120. left: 30rpx;
  121. width: 80rpx;
  122. background: #277ffa;
  123. border-radius: 20rpx;
  124. text-align: center;
  125. color: #fff;
  126. font-size: 22rpx;
  127. }
  128. }
  129. .user-address{
  130. margin: 0 auto;
  131. width: 240rpx;
  132. overflow: hidden;
  133. text-overflow: ellipsis;
  134. text-align: center;
  135. }
  136. padding-bottom: 20rpx;
  137. border-bottom: 2rpx solid #EAEAEA;
  138. }
  139. .team-info{
  140. margin-top: 20rpx;
  141. display: flex;
  142. justify-content: space-between;
  143. .team-item{
  144. width: 50%;
  145. .user-img{
  146. margin:0 auto;
  147. width: 100rpx;
  148. height: 100rpx;
  149. position: relative;
  150. image{
  151. border-radius: 50%;
  152. width: 100rpx;
  153. height: 100rpx;
  154. }
  155. .user-level{
  156. position: absolute;
  157. bottom: 0;
  158. left: 18rpx;
  159. width: 70rpx;
  160. background: #277ffa;
  161. //height: 20rpx;
  162. border-radius: 20rpx;
  163. text-align: center;
  164. color: #fff;
  165. font-size: 16rpx !important;
  166. }
  167. }
  168. .item{
  169. text-align: center;
  170. }
  171. .item-num{
  172. color: #333;
  173. font-size: 34rpx;
  174. font-weight: 600;
  175. }
  176. .item-text{
  177. margin: 6rpx auto 0;
  178. color: #999999;
  179. font-size: 28rpx;
  180. overflow: hidden;
  181. text-overflow: ellipsis;
  182. width: 240rpx;
  183. text-align: center;
  184. }
  185. }
  186. }
  187. }
  188. .team-title{
  189. margin: 30rpx 0;
  190. .title-text{
  191. color: #277ffa;
  192. font-size: 28rpx;
  193. font-weight: 600;
  194. }
  195. .title-wire{
  196. background: #277ffa;
  197. width: 60rpx;
  198. height: 4rpx;
  199. margin-left: 24rpx;
  200. }
  201. }
  202. .team-list{
  203. background: #fff;
  204. padding: 24rpx 21rpx;
  205. min-height: 600rpx;
  206. border-radius: 20rpx;
  207. .team-child{
  208. padding-left: 30rpx;
  209. }
  210. .team-item{
  211. padding: 24rpx 0;
  212. display: flex;
  213. justify-content: space-between;
  214. border-bottom: 2rpx solid #EDEDED;
  215. .item-left{
  216. display: flex;
  217. justify-content: left;
  218. .left-img{
  219. width: 88rpx;
  220. image{
  221. height: 88rpx;
  222. width: 88rpx;
  223. border-radius: 50%;
  224. }
  225. }
  226. .left-text{
  227. margin-left: 16rpx;
  228. .text-name{
  229. color: #333333;
  230. font-size: 28rpx;
  231. width: 240rpx;
  232. overflow: hidden;
  233. text-overflow: ellipsis;
  234. }
  235. .text-time{
  236. margin-top: 20rpx;
  237. color: #999999;
  238. font-size: 20rpx;
  239. }
  240. }
  241. }
  242. .item-right{
  243. width: 72rpx;
  244. height: 34rpx;
  245. background: #277ffa;
  246. color: #fff;
  247. text-align: center;
  248. line-height: 34rpx;
  249. border-radius: 20rpx;
  250. margin-top: 30rpx;
  251. font-size: 20rpx;
  252. }
  253. }
  254. .item-one{
  255. padding-top: 0;
  256. }
  257. }
  258. }
  259. </style>