建材商城系统20241014
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.

307 lines
6.6 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="page">
  3. <navbar
  4. title="我的团队"
  5. leftClick
  6. @leftClick="$utils.navigateBack"
  7. bgColor="#DC2828"
  8. color="#fff"
  9. />
  10. <view class="team">
  11. <view class="team-message">
  12. <view class="leftImage">
  13. <image :src="userInfo.headImage" mode="aspectFill"></image>
  14. </view>
  15. <view class="number-team">
  16. <view class="top-number">
  17. <text style="font-weight: 500;">{{ userInfo.phone }}</text>
  18. <view class="salesman">{{ ['一', '二'][info.role] }}级业务员</view>
  19. </view>
  20. <view class="bottom-number">
  21. <view class="performance">
  22. <view class="team-sum">
  23. 团队总业绩
  24. </view>
  25. <view class="figure">
  26. <text style="margin-left: 30rpx; color: #DC2828; font-weight: 600;"></text><text
  27. class="money">{{ info.money }}</text>
  28. </view>
  29. </view>
  30. <view class="withdraw" @click="toPurse">
  31. <view class="withdraw-button">
  32. 去提现
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="user">
  40. <uv-tabs :list="tabs" :activeStyle="{color : '#FD5100', fontWeight : 600}" lineColor="#FD5100"
  41. lineHeight="8rpx" lineWidth="50rpx" @click="clickTabs"></uv-tabs>
  42. </view>
  43. <view class="user-list">
  44. <view class="head"
  45. :key="index"
  46. v-for="(item, index) in list">
  47. <view class="headImage">
  48. <image :src="item.headImage" mode="aspectFill"></image>
  49. </view>
  50. <view class="info">
  51. <view class="name">
  52. {{ item.nickName }}{{ item.phone ? item.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : '' }}
  53. </view>
  54. <view class="headBtn">
  55. 下单量<text>{{item.orderNum}}</text> | 佣金 <text style="color: darkorange;">{{item.commission}}</text>
  56. </view>
  57. <view class="tips">
  58. 加入<text>{{ $dayjs().diff($dayjs(item.createTime), 'day') }}</text>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import mixinsList from '@/mixins/list.js'
  67. export default {
  68. mixins: [mixinsList],
  69. data() {
  70. return {
  71. state: -1,
  72. mixinsListApi: 'getTeamList',
  73. tabs: [
  74. {
  75. name: '直销用户'
  76. },
  77. {
  78. name: '间推用户'
  79. },
  80. ],
  81. info : {},
  82. };
  83. },
  84. onLoad() {
  85. this.queryParams.state = 0;
  86. this.$store.commit('getUserInfo');
  87. this.getTeamInfo();
  88. },
  89. methods: {
  90. //点击tab栏
  91. clickTabs(index) {
  92. if (index == 0) {
  93. this.state = -1;
  94. } else {
  95. this.state = index - 1;
  96. }
  97. // this.queryParams.pageSize = 10
  98. // this.orderPage()
  99. },
  100. // 跳转到钱包提现
  101. toPurse() {
  102. uni.navigateTo({
  103. url: '/pages_order/mine/purse'
  104. })
  105. },
  106. // 获取团队信息
  107. getTeamInfo() {
  108. this.$api('getTeamHeader', res => {
  109. if (res.code == 200) {
  110. this.info = res.result;
  111. }
  112. })
  113. },
  114. },
  115. }
  116. </script>
  117. <style scoped lang="scss">
  118. .page {
  119. .team {
  120. height: 250rpx;
  121. background-color: #DC2828;
  122. padding-top: 50rpx;
  123. .team-message {
  124. height: 200rpx;
  125. width: 90%;
  126. background-color: #fff;
  127. margin: 0 30rpx;
  128. position: relative;
  129. border-radius: 10rpx;
  130. .leftImage {
  131. width: 150rpx;
  132. height: 150rpx;
  133. background-image: url(/static/image/center/3.png);
  134. background-size: 100% 100%;
  135. overflow: hidden;
  136. border-radius: 50%;
  137. margin-right: 15rpx;
  138. display: inline-block;
  139. position: absolute;
  140. top: 25rpx;
  141. left: 26rpx;
  142. image{
  143. width: 100%;
  144. height: 100%;
  145. }
  146. }
  147. .number-team {
  148. width: 70%;
  149. display: inline-block;
  150. position: absolute;
  151. top: 0rpx;
  152. left: 202rpx;
  153. .top-number {
  154. height: 70rpx;
  155. position: relative;
  156. border-bottom: #DC2828 dotted 1rpx;
  157. display: flex;
  158. align-items: center;
  159. margin: 0 20rpx;
  160. .salesman {
  161. position: absolute;
  162. height: 40rpx;
  163. width: 160rpx;
  164. text-align: center;
  165. background-color: #FF6700;
  166. border-radius: 50rpx;
  167. display: inline;
  168. margin-left: 240rpx;
  169. color: #fff;
  170. font-size: 24rpx;
  171. }
  172. }
  173. .bottom-number {
  174. height: 120rpx;
  175. position: relative;
  176. .performance {
  177. width: 50%;
  178. height: 100%;
  179. display: inline-block;
  180. position: absolute;
  181. top: 0rpx;
  182. .team-sum {
  183. display: inline-block;
  184. width: 180rpx;
  185. background-color: #F99F9F;
  186. border-radius: 50rpx;
  187. text-align: center;
  188. margin: 0rpx 20rpx;
  189. margin-top: 8rpx;
  190. color: #DC2828;
  191. font-size: 26rpx;
  192. }
  193. .figure {
  194. height: 60rpx;
  195. line-height: 60rpx;
  196. display: flex;
  197. // align-items: center;
  198. padding-top: 10rpx;
  199. .money {
  200. font-size: 40rpx;
  201. color: #DC2828;
  202. display: inline-block;
  203. font-weight: 600;
  204. }
  205. }
  206. }
  207. .withdraw {
  208. width: 50%;
  209. height: 100%;
  210. display: inline-block;
  211. position: absolute;
  212. right: 0rpx;
  213. display: flex;
  214. justify-content: center; //横轴居中
  215. align-items: center; //竖轴居中
  216. .withdraw-button {
  217. background-color: #DC2828;
  218. color: #fff;
  219. border-radius: 50rpx;
  220. text-align: center;
  221. height: 62rpx;
  222. width: 200rpx;
  223. line-height: 62rpx;
  224. }
  225. }
  226. }
  227. }
  228. }
  229. }
  230. .user {
  231. height: 120rpx;
  232. background-color: #fff;
  233. display: flex;
  234. align-items: center;
  235. padding-left: 30rpx;
  236. }
  237. .user-list {
  238. margin: 0 20rpx;
  239. .head {
  240. z-index: -1;
  241. display: flex;
  242. background-color: #fff;
  243. padding: 0rpx 20rpx;
  244. align-items: center;
  245. position: relative;
  246. height: 100rpx;
  247. margin-top: 20rpx;
  248. border-radius: 20rpx;
  249. .headImage {
  250. width: 75rpx;
  251. height: 75rpx;
  252. background-image: url(/static/image/center/3.png);
  253. background-size: 100% 100%;
  254. overflow: hidden;
  255. border-radius: 50%;
  256. margin-right: 15rpx;
  257. image{
  258. width: 100%;
  259. height: 100%;
  260. }
  261. }
  262. .info {
  263. font-size: 22rpx;
  264. .name {
  265. font-size: 26rpx;
  266. color: #333;
  267. }
  268. .tips {
  269. font-size: 22rpx;
  270. color: #999999;
  271. margin-top: 10rpx;
  272. }
  273. }
  274. .headBtn {
  275. position: absolute;
  276. right: 60rpx;
  277. top: 38rpx;
  278. color: #333;
  279. font-size: 26rpx;
  280. }
  281. }
  282. }
  283. }
  284. </style>