team.vue 8.0 KB

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