fissioned-other.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <template>
  2. <view class="content">
  3. <view class="content-money">
  4. <view class="status_bar"><!-- 这里是状态栏 --></view>
  5. <view class="body-title">
  6. <view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
  7. <view class="header">李丹丹的裂变</view>
  8. </view>
  9. <view class="content-bg"><image src="https://cgst.liuniu946.com/image/fissioned-other.png" mode=""></image></view>
  10. <view class="money-box">
  11. <view class="money">{{ userInfo.white_integral | getMoneyStyle }}</view>
  12. <view>李丹丹的裂变总数</view>
  13. </view>
  14. </view>
  15. <swiper :style="{ height: height }" class="swiper-box" duration="300">
  16. <swiper-item class="tab-content">
  17. <scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
  18. <!-- 空白页 -->
  19. <!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
  20. <!-- 订单列表 -->
  21. <view>
  22. <view class="order-item flex" v-for="(item, index) in 10" :key="index" @click="navto('/pages/shop/fissioned-other')">
  23. <view class="title-box flex_item">
  24. <view class="title-avatar"><image src="../../static/error/missing-face.png"></image></view>
  25. <view class="list_tpl">
  26. <view class="title"><text>御风</text></view>
  27. <view class="time"><text>13541202523</text></view>
  28. </view>
  29. </view>
  30. <view class="money">
  31. 裂变量:
  32. <text class="status">3</text>
  33. <text class="jt">></text>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- <uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more> -->
  38. </scroll-view>
  39. </swiper-item>
  40. </swiper>
  41. </view>
  42. </template>
  43. <script>
  44. import { mapState, mapMutations } from 'vuex';
  45. import { getWhiteJf, getUserInfo } from '@/api/user.js';
  46. import { spreadCommission, userBalance } from '@/api/wallet.js';
  47. import { getMoneyStyle } from '@/utils/rocessor.js';
  48. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  49. import empty from '@/components/empty';
  50. export default {
  51. filters: {
  52. getMoneyStyle
  53. },
  54. components: {
  55. empty,
  56. uniLoadMore
  57. },
  58. onReady(res) {
  59. var _this = this;
  60. uni.getSystemInfo({
  61. success: resu => {
  62. const query = uni.createSelectorQuery();
  63. query.select('.swiper-box').boundingClientRect();
  64. query.exec(function(res) {
  65. _this.height = resu.windowHeight - res[0].top + 'px';
  66. console.log('打印页面的剩余高度', _this.height);
  67. });
  68. },
  69. fail: res => {}
  70. });
  71. },
  72. data() {
  73. return {
  74. height: '',
  75. // 头部图高度
  76. maxheight: '',
  77. navList: [],
  78. money: ''
  79. };
  80. },
  81. onLoad(options) {},
  82. onShow() {
  83. // this.loadData();
  84. // // 获取用户余额
  85. // getUserInfo({}).then(({ data }) => {
  86. // this.money = data.now_money;
  87. // this.setUserInfo(data);
  88. // });
  89. },
  90. computed: {
  91. ...mapState(['userInfo'])
  92. },
  93. methods: {
  94. ...mapMutations(['setUserInfo', 'setOrderInfo']),
  95. toBack() {
  96. uni.navigateBack({});
  97. },
  98. // 页面跳转
  99. navto(e) {
  100. uni.navigateTo({
  101. url: e
  102. });
  103. },
  104. //获取收入支出信息
  105. async loadData(source) {
  106. let obj = this;
  107. //这里是将订单挂载到tab列表下
  108. if (source === 'tabChange' && navItem.loaded === true) {
  109. //tab切换只有第一次需要加载数据
  110. return;
  111. }
  112. if (navItem.loadingType === 'loading') {
  113. //防止重复加载
  114. return;
  115. }
  116. // 修改当前对象状态为加载中
  117. navItem.loadingType = 'loading';
  118. getWhiteJf({
  119. page: navItem.page,
  120. limit: navItem.limit,
  121. pm: navItem.state
  122. })
  123. .then(({ data }) => {
  124. this.zc = data.zc;
  125. this.sr = data.sr;
  126. navItem.orderList = navItem.orderList.concat(data.list);
  127. navItem.page++;
  128. if (navItem.limit == data.list.length) {
  129. navItem.loadingType = 'more';
  130. } else {
  131. navItem.loadingType = 'noMore';
  132. }
  133. this.$set(navItem, 'loaded', true);
  134. })
  135. .catch(e => {
  136. console.log(e);
  137. });
  138. },
  139. //swiper 切换
  140. changeTab(e) {
  141. this.tabCurrentIndex = e.target.current;
  142. this.loadData('tabChange');
  143. },
  144. //顶部tab点击
  145. tabClick(index) {
  146. this.tabCurrentIndex = index;
  147. }
  148. }
  149. };
  150. </script>
  151. <style lang="scss">
  152. page {
  153. background: #fff;
  154. height: 100%;
  155. }
  156. .status_bar {
  157. height: var(--status-bar-height);
  158. width: 100%;
  159. }
  160. .content-money {
  161. position: relative;
  162. height: 430rpx;
  163. .content-bg {
  164. position: absolute;
  165. top: 0;
  166. left: 0;
  167. right: 0;
  168. width: 750rpx;
  169. height: 430rpx;
  170. image {
  171. width: 100%;
  172. height: 100%;
  173. }
  174. }
  175. .body-title {
  176. height: 80rpx;
  177. text-align: center;
  178. font-size: 35rpx;
  179. position: relative;
  180. .header {
  181. position: absolute;
  182. left: 0;
  183. top: 0;
  184. width: 100%;
  185. font-size: 36rpx;
  186. font-family: PingFang SC;
  187. font-weight: bold;
  188. color: #fffeff;
  189. height: 80rpx;
  190. font-size: 36rpx;
  191. font-weight: 700;
  192. z-index: 9;
  193. display: flex;
  194. justify-content: center;
  195. align-items: center;
  196. }
  197. .goback-box {
  198. position: absolute;
  199. left: 18rpx;
  200. top: 0;
  201. height: 80rpx;
  202. display: flex;
  203. align-items: center;
  204. }
  205. .goback {
  206. z-index: 100;
  207. width: 34rpx;
  208. height: 34rpx;
  209. }
  210. }
  211. }
  212. .money-box {
  213. position: relative;
  214. z-index: 2;
  215. padding-top: 100rpx;
  216. color: #ffffff;
  217. text-align: center;
  218. /* #ifdef APP-PLUS */
  219. padding-top: 30rpx;
  220. /* #endif */
  221. .money {
  222. font-size: 72rpx;
  223. font-family: PingFang SC;
  224. font-weight: bold;
  225. color: #ffffff;
  226. text {
  227. font-size: 36rpx;
  228. }
  229. }
  230. .text {
  231. font-size: 30rpx;
  232. }
  233. }
  234. //列表
  235. .swiper-box {
  236. .order-item:last-child {
  237. margin-bottom: 60rpx;
  238. }
  239. .order-item {
  240. padding: 20rpx 30rpx;
  241. line-height: 1.5;
  242. .title-box {
  243. width: 100%;
  244. .title-avatar {
  245. width: 100rpx;
  246. height: 100rpx;
  247. margin-right: 25rpx;
  248. image {
  249. width: 100%;
  250. height: 100%;
  251. border-radius: 100%;
  252. }
  253. }
  254. .list_tpl {
  255. width: 50%;
  256. .title {
  257. font-size: $font-lg;
  258. color: $font-color-base;
  259. overflow: hidden; //超出的文本隐藏
  260. text-overflow: ellipsis; //溢出用省略号显示
  261. white-space: nowrap;
  262. }
  263. .time {
  264. margin-top: 15rpx;
  265. font-size: 22rpx;
  266. color: $font-color-light;
  267. }
  268. }
  269. }
  270. .money {
  271. width: 30%;
  272. font-size: 30rpx;
  273. font-family: PingFang SC;
  274. font-weight: 500;
  275. color: #333333;
  276. text-align: right;
  277. .status {
  278. color: #ff4c4c;
  279. }
  280. .jt {
  281. color: #999999;
  282. display: inline-block;
  283. margin-left: 10rpx;
  284. }
  285. }
  286. }
  287. }
  288. .list-scroll-content {
  289. background: #ffffff;
  290. height: 100%;
  291. }
  292. .content {
  293. height: 100%;
  294. .empty-content {
  295. background-color: #ffffff;
  296. }
  297. }
  298. .btn-box {
  299. width: 674rpx;
  300. height: 88rpx;
  301. background: linear-gradient(0deg, #2e58ff, #32c6ff);
  302. border-radius: 44rpx;
  303. font-size: 36rpx;
  304. font-family: PingFang SC;
  305. font-weight: 500;
  306. color: #ffffff;
  307. text-align: center;
  308. line-height: 88rpx;
  309. position: fixed;
  310. bottom: 48rpx;
  311. left: 0;
  312. right: 0;
  313. margin: 0 auto;
  314. }
  315. </style>