team.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. <template>
  2. <view class="content">
  3. <view class="content-money">
  4. <view class="status_bar">
  5. <!-- 这里是状态栏 -->
  6. </view>
  7. <view class="body-title">
  8. <view class="goback-box" @click="toBack">
  9. <image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
  10. </view>
  11. <view class="header">我的推广</view>
  12. </view>
  13. <view class="content-bg">
  14. <image src="../../static/img/promotion-bg.png" mode=""></image>
  15. </view>
  16. <view class="money-box">
  17. <view class="money">{{ navList.count||0 }}</view>
  18. <view>我的推广人数</view>
  19. </view>
  20. </view>
  21. <view class="info-box flex">
  22. <view class="info-item">
  23. <view class="info-font">参与人数</view>
  24. <view class="info-num">{{navList.count||0}}</view>
  25. </view>
  26. <view class="shu"></view>
  27. <view class="info-item">
  28. <view class="info-font">累计参与积分</view>
  29. <view class="info-num">{{navList.user_price||0}}</view>
  30. </view>
  31. <view class="shu"></view>
  32. <view class="info-item">
  33. <view class="info-font">每周团队业绩</view>
  34. <view class="info-num">{{navList.week_price||0}}</view>
  35. </view>
  36. </view>
  37. <view class="content-box" v-for="(item,index) in navList.user_list" :key="index" >
  38. <!-- <view class="tgTop">
  39. <image src="../../static/img/top.png" mode=""></image>
  40. </view> -->
  41. <view class="content-box-left">
  42. <!-- <view class="left-img">
  43. <image :src="item.avatar" mode=""></image>
  44. </view> -->
  45. <view class="right-title">
  46. <view class="top">
  47. {{item.nickname}}
  48. </view>
  49. <view class="bottom">
  50. ID:{{item.uid}}
  51. </view>
  52. <view class="bottom " style="font-size: 24rpx;">
  53. 手机号:{{item.phone}}
  54. </view>
  55. <view class="bottom " style="font-size: 24rpx;">
  56. 返回额度:{{item.price}}
  57. </view>
  58. <view class="bottom " style="font-size: 24rpx;">
  59. 参与中金额:{{item.cy_price}}
  60. </view>
  61. <!-- <view class="bottom " style="font-size: 24rpx;">
  62. 待返回金额:{{item.dfh_price}}
  63. </view>
  64. <view class="bottom " style="font-size: 24rpx;">
  65. 充值金额:{{item.order_price}}
  66. </view> -->
  67. </view>
  68. </view>
  69. <view class="content-box-right">
  70. <view class="state">
  71. {{item.zt==0?'间推':'直推'}}
  72. </view>
  73. <view class="box-right">
  74. 参与积分:<span>{{item.price}}</span>
  75. </view>
  76. <view class="bottom " style="font-size: 24rpx;">
  77. 待返回金额:{{item.dfh_price}}
  78. </view>
  79. <view class="bottom " style="font-size: 24rpx;">
  80. 充值金额:{{item.order_price}}
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. </template>
  86. <script>
  87. import {
  88. myspread,
  89. tuiguang
  90. } from '@/api/user.js';
  91. import {
  92. mapState,
  93. mapMutations
  94. } from 'vuex';
  95. export default {
  96. onReady(res) {
  97. var _this = this;
  98. uni.getSystemInfo({
  99. success: resu => {
  100. const query = uni.createSelectorQuery();
  101. query.select('.swiper-box').boundingClientRect();
  102. query.exec(function(res) {
  103. _this.maxheight = resu.windowHeight - res[0].top + 'px';
  104. console.log('打印页面的剩余高度', _this.height);
  105. });
  106. },
  107. fail: res => {}
  108. });
  109. },
  110. data() {
  111. return {
  112. nowIndex:0,//'当前选中'
  113. // 头部图高度
  114. maxheight: '',
  115. tabCurrentIndex: 0,
  116. navList: {
  117. state: 0,
  118. text: '直接推荐',
  119. loadingType: 'more',
  120. orderList: [],
  121. page: 1, //当前页数
  122. limit: 5 //每次信息条数
  123. },
  124. all: '',
  125. list: '',
  126. };
  127. },
  128. computed: {
  129. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
  130. getPhone() {
  131. let reg = /(\d{3})\d{4}(\d{4})/;
  132. this.navList.user_list.forEach(e => {
  133. return e.phone.replace(reg, "$1****$2")
  134. console.log(e.phone.replace(reg, "$1****$2"));
  135. })
  136. }
  137. },
  138. onLoad(options) {},
  139. onShow() {
  140. this.loadData();
  141. },
  142. methods: {
  143. //下拉
  144. xiala(index) {
  145. // top.style.height = "200rpx"
  146. // top.style.backGround = "red"
  147. this.nowIndex = index
  148. console.log(this.nowIndex);
  149. },
  150. // 页面跳转
  151. navto(e) {
  152. uni.navigateTo({
  153. url: e
  154. });
  155. },
  156. //获取收入支出信息
  157. async loadData(source) {
  158. let objList = this.navList
  159. tuiguang({
  160. page:objList.page,
  161. limit:objList.limit,
  162. }).then(res => {
  163. console.log(res, 'data');
  164. this.navList = res.data
  165. })
  166. },
  167. // 点击返回 我的页面
  168. toBack() {
  169. uni.switchTab({
  170. url: '/pages/user/user'
  171. });
  172. }
  173. }
  174. };
  175. </script>
  176. <style lang="scss">
  177. page {
  178. background: #f8f8f8;
  179. height: 100%;
  180. }
  181. .info-box {
  182. width: 670rpx;
  183. height: 186rpx;
  184. background: #ffffff;
  185. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  186. border-radius: 20rpx;
  187. margin: -100rpx auto 0;
  188. position: relative;
  189. z-index: 2;
  190. .info-item {
  191. width: 50%;
  192. display: flex;
  193. flex-direction: column;
  194. align-items: center;
  195. line-height: 1;
  196. .info-font {
  197. font-size: 30rpx;
  198. font-family: PingFang SC;
  199. font-weight: bold;
  200. color: #999999;
  201. }
  202. .info-num {
  203. margin-top: 30rpx;
  204. font-size: 30rpx;
  205. font-family: PingFang SC;
  206. font-weight: bold;
  207. color: #181818;
  208. }
  209. }
  210. .shu {
  211. width: 2rpx;
  212. height: 74rpx;
  213. background: #dcdfe6;
  214. }
  215. }
  216. .status_bar {
  217. height: var(--status-bar-height);
  218. width: 100%;
  219. background: #5dbc7c;
  220. }
  221. .content-money {
  222. position: relative;
  223. height: 480rpx;
  224. .content-bg {
  225. position: absolute;
  226. top: 0;
  227. left: 0;
  228. right: 0;
  229. width: 750rpx;
  230. height: 480rpx;
  231. image {
  232. width: 100%;
  233. height: 100%;
  234. }
  235. }
  236. .body-title {
  237. height: 80rpx;
  238. text-align: center;
  239. font-size: 35rpx;
  240. position: relative;
  241. .header {
  242. position: absolute;
  243. left: 0;
  244. top: 0;
  245. width: 100%;
  246. font-size: 36rpx;
  247. font-family: PingFang SC;
  248. font-weight: bold;
  249. color: #fffeff;
  250. height: 80rpx;
  251. font-size: 36rpx;
  252. font-weight: 700;
  253. z-index: 9;
  254. display: flex;
  255. justify-content: center;
  256. align-items: center;
  257. }
  258. .goback-box {
  259. position: absolute;
  260. left: 18rpx;
  261. top: 0;
  262. height: 80rpx;
  263. display: flex;
  264. align-items: center;
  265. }
  266. .goback {
  267. z-index: 100;
  268. width: 34rpx;
  269. height: 34rpx;
  270. }
  271. }
  272. }
  273. .money-box {
  274. position: relative;
  275. z-index: 2;
  276. padding-top: 90rpx;
  277. color: #ffffff;
  278. text-align: center;
  279. .money {
  280. font-size: 72rpx;
  281. font-family: PingFang SC;
  282. font-weight: bold;
  283. color: #ffffff;
  284. }
  285. .text {
  286. font-size: 30rpx;
  287. }
  288. }
  289. .order-item {
  290. padding: 20rpx 30rpx;
  291. line-height: 1.5;
  292. .title-box {
  293. width: 100%;
  294. .title-avatar {
  295. flex-shrink: 0;
  296. width: 100rpx;
  297. height: 100rpx;
  298. margin-right: 25rpx;
  299. border-radius: 100%;
  300. image {
  301. width: 100%;
  302. height: 100%;
  303. border-radius: 100%;
  304. }
  305. }
  306. .list_tpl {
  307. width: 85%;
  308. .title {
  309. display: flex;
  310. justify-content: flex-start;
  311. font-size: $font-lg;
  312. color: $font-color-base;
  313. overflow: hidden; //超出的文本隐藏
  314. text-overflow: ellipsis; //溢出用省略号显示
  315. white-space: nowrap;
  316. line-height: 1;
  317. text-align: center;
  318. .title-name {
  319. max-width: 40%;
  320. }
  321. .dl {
  322. margin-left: 10rpx;
  323. width: 93rpx;
  324. height: 32rpx;
  325. border-radius: 16rpx;
  326. image {
  327. width: 93rpx;
  328. height: 32rpx;
  329. border-radius: 16rpx;
  330. }
  331. }
  332. .class {
  333. display: inline-block;
  334. margin-left: 10rpx;
  335. padding: 6rpx;
  336. text-align: center;
  337. border: 1px solid #2e58ff;
  338. border-radius: 16rpx;
  339. font-size: 20rpx;
  340. font-family: PingFang SC;
  341. font-weight: 500;
  342. color: #2e58ff;
  343. }
  344. }
  345. .time {
  346. font-size: $font-base;
  347. color: $font-color-light;
  348. }
  349. }
  350. }
  351. .money {
  352. width: 50%;
  353. text-align: right;
  354. color: #db1935;
  355. font-size: $font-lg;
  356. }
  357. }
  358. .yeji {
  359. position: relative;
  360. margin: -72rpx auto 0;
  361. width: 690rpx;
  362. height: 143rpx;
  363. background: #ffffff;
  364. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
  365. border-radius: 10rpx;
  366. display: flex;
  367. align-items: center;
  368. .yeji-a {
  369. width: 50%;
  370. display: flex;
  371. flex-direction: column;
  372. justify-content: center;
  373. align-items: center;
  374. .yeji-top {
  375. font-size: 28rpx;
  376. font-family: PingFang SC;
  377. font-weight: bold;
  378. color: #333333;
  379. }
  380. .yeji-buttom {
  381. font-size: 42rpx;
  382. font-family: PingFang SC;
  383. font-weight: bold;
  384. color: #333333;
  385. }
  386. }
  387. .border {
  388. width: 1rpx;
  389. height: 51rpx;
  390. background: #dddddd;
  391. }
  392. }
  393. .bottomm{
  394. padding: 20rpx;
  395. position: relative;
  396. background: red;
  397. display: flex;
  398. justify-content: space-between;
  399. margin: 30rpx;
  400. border-radius: 10rpx;
  401. }
  402. .content-box {
  403. overflow: hidden;
  404. padding: 20rpx;
  405. position: relative;
  406. background: #fffeff;
  407. display: flex;
  408. justify-content: space-between;
  409. margin: 30rpx;
  410. border-radius: 10rpx;
  411. .tgTop {
  412. position: absolute;
  413. right: 50rpx;
  414. top: 30rpx;
  415. width: 30rpx;
  416. height: 30rpx;
  417. image {
  418. width: 100%;
  419. height: 100%;
  420. }
  421. }
  422. .content-box-left {
  423. display: flex;
  424. .left-img {
  425. width: 100rpx;
  426. height: 100rpx;
  427. border-radius: 50%;
  428. overflow: hidden;
  429. image {
  430. width: 100%;
  431. height: 100%;
  432. }
  433. }
  434. .right-title {
  435. margin-left: 15rpx;
  436. display: flex;
  437. flex-direction: column;
  438. justify-content: space-around;
  439. .top {
  440. font-weight: 500;
  441. font-size: 30rpx;
  442. }
  443. .bottom {
  444. color: #999999;
  445. }
  446. }
  447. }
  448. .content-box-right {
  449. display: flex;
  450. flex-direction: column;
  451. width: 230rpx;
  452. color: #999999;
  453. .state {
  454. color: red;
  455. }
  456. span {
  457. color: red;
  458. font-size: 28rpx;
  459. }
  460. }
  461. }
  462. </style>