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

311 lines
6.6 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 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">{{ levelMap[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. levelMap : [
  82. '区域分享',
  83. '',
  84. ],
  85. info : {},
  86. };
  87. },
  88. onLoad() {
  89. this.queryParams.state = 0;
  90. this.$store.commit('getUserInfo');
  91. this.getTeamInfo();
  92. },
  93. methods: {
  94. //点击tab栏
  95. clickTabs(index) {
  96. if (index == 0) {
  97. this.state = -1;
  98. } else {
  99. this.state = index - 1;
  100. }
  101. // this.queryParams.pageSize = 10
  102. // this.orderPage()
  103. },
  104. // 跳转到钱包提现
  105. toPurse() {
  106. uni.navigateTo({
  107. url: '/pages_order/mine/purse'
  108. })
  109. },
  110. // 获取团队信息
  111. getTeamInfo() {
  112. this.$api('getTeamHeader', res => {
  113. if (res.code == 200) {
  114. this.info = res.result;
  115. }
  116. })
  117. },
  118. },
  119. }
  120. </script>
  121. <style scoped lang="scss">
  122. .page {
  123. .team {
  124. height: 250rpx;
  125. background-color: #DC2828;
  126. padding-top: 50rpx;
  127. .team-message {
  128. height: 200rpx;
  129. width: 90%;
  130. background-color: #fff;
  131. margin: 0 30rpx;
  132. position: relative;
  133. border-radius: 10rpx;
  134. .leftImage {
  135. width: 150rpx;
  136. height: 150rpx;
  137. background-image: url(/static/image/center/3.png);
  138. background-size: 100% 100%;
  139. overflow: hidden;
  140. border-radius: 50%;
  141. margin-right: 15rpx;
  142. display: inline-block;
  143. position: absolute;
  144. top: 25rpx;
  145. left: 26rpx;
  146. image{
  147. width: 100%;
  148. height: 100%;
  149. }
  150. }
  151. .number-team {
  152. width: 70%;
  153. display: inline-block;
  154. position: absolute;
  155. top: 0rpx;
  156. left: 202rpx;
  157. .top-number {
  158. height: 70rpx;
  159. position: relative;
  160. border-bottom: #DC2828 dotted 1rpx;
  161. display: flex;
  162. align-items: center;
  163. margin: 0 20rpx;
  164. .salesman {
  165. position: absolute;
  166. height: 40rpx;
  167. width: 160rpx;
  168. text-align: center;
  169. background-color: #FF6700;
  170. border-radius: 50rpx;
  171. display: inline;
  172. margin-left: 240rpx;
  173. color: #fff;
  174. font-size: 24rpx;
  175. }
  176. }
  177. .bottom-number {
  178. height: 120rpx;
  179. position: relative;
  180. .performance {
  181. width: 50%;
  182. height: 100%;
  183. display: inline-block;
  184. position: absolute;
  185. top: 0rpx;
  186. .team-sum {
  187. display: inline-block;
  188. width: 180rpx;
  189. background-color: #F99F9F;
  190. border-radius: 50rpx;
  191. text-align: center;
  192. margin: 0rpx 20rpx;
  193. margin-top: 8rpx;
  194. color: #DC2828;
  195. font-size: 26rpx;
  196. }
  197. .figure {
  198. height: 60rpx;
  199. line-height: 60rpx;
  200. display: flex;
  201. // align-items: center;
  202. padding-top: 10rpx;
  203. .money {
  204. font-size: 40rpx;
  205. color: #DC2828;
  206. display: inline-block;
  207. font-weight: 600;
  208. }
  209. }
  210. }
  211. .withdraw {
  212. width: 50%;
  213. height: 100%;
  214. display: inline-block;
  215. position: absolute;
  216. right: 0rpx;
  217. display: flex;
  218. justify-content: center; //横轴居中
  219. align-items: center; //竖轴居中
  220. .withdraw-button {
  221. background-color: #DC2828;
  222. color: #fff;
  223. border-radius: 50rpx;
  224. text-align: center;
  225. height: 62rpx;
  226. width: 200rpx;
  227. line-height: 62rpx;
  228. }
  229. }
  230. }
  231. }
  232. }
  233. }
  234. .user {
  235. height: 120rpx;
  236. background-color: #fff;
  237. display: flex;
  238. align-items: center;
  239. padding-left: 30rpx;
  240. }
  241. .user-list {
  242. margin: 0 20rpx;
  243. .head {
  244. z-index: -1;
  245. display: flex;
  246. background-color: #fff;
  247. padding: 0rpx 20rpx;
  248. align-items: center;
  249. position: relative;
  250. height: 100rpx;
  251. margin-top: 20rpx;
  252. border-radius: 20rpx;
  253. .headImage {
  254. width: 75rpx;
  255. height: 75rpx;
  256. background-image: url(/static/image/center/3.png);
  257. background-size: 100% 100%;
  258. overflow: hidden;
  259. border-radius: 50%;
  260. margin-right: 15rpx;
  261. image{
  262. width: 100%;
  263. height: 100%;
  264. }
  265. }
  266. .info {
  267. font-size: 22rpx;
  268. .name {
  269. font-size: 26rpx;
  270. color: #333;
  271. }
  272. .tips {
  273. font-size: 22rpx;
  274. color: #999999;
  275. margin-top: 10rpx;
  276. }
  277. }
  278. .headBtn {
  279. position: absolute;
  280. right: 60rpx;
  281. top: 38rpx;
  282. color: #333;
  283. font-size: 26rpx;
  284. }
  285. }
  286. }
  287. }
  288. </style>