|
|
@@ -2,34 +2,36 @@
|
|
|
<view class="content">
|
|
|
<view class="content-money">
|
|
|
<view class="money-box">
|
|
|
- <view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
|
|
|
+ <view class="goback-box" @click="toBack">
|
|
|
+ <image class="goback" src="../../static/img/fanhui.png" mode=""></image>
|
|
|
+ </view>
|
|
|
<view class="header">金豆池</view>
|
|
|
<image class="money_bg" src="../../static/img/anchor8.png"></image>
|
|
|
- <view class="money">100</view>
|
|
|
+ <view class="money">{{jd}}</view>
|
|
|
<view class="tip">
|
|
|
金豆数量
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="title">
|
|
|
- - 实时瓜分 -
|
|
|
+ - 实时累计 -
|
|
|
</view>
|
|
|
<scroll-view class="swiper-box" scroll-y>
|
|
|
<!-- 空白页 -->
|
|
|
<!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
|
|
|
<!-- 订单列表 -->
|
|
|
<template>
|
|
|
- <view v-for="(item, i) in 10" class="order-item flex">
|
|
|
+ <view v-for="(item, index) in dataList" class="order-item flex">
|
|
|
<view class="left flex">
|
|
|
<view class="avator">
|
|
|
- <image src="" mode=""></image>
|
|
|
+ <image :src="item.pay_evaluation" mode=""></image>
|
|
|
</view>
|
|
|
<view class="order-font">
|
|
|
- 御风获得<text>20</text>个金豆
|
|
|
+ {{item.user.real_name}}获得<text>{{item.use_integral}}</text>个金豆
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="time">
|
|
|
- 2019-12-02 12:00:00
|
|
|
+ {{item.add_time}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -39,202 +41,289 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
|
-import empty from '@/components/empty';
|
|
|
-export default {
|
|
|
- components: {
|
|
|
- empty,
|
|
|
- uniLoadMore
|
|
|
- },
|
|
|
- onReady(res) {
|
|
|
- // 初始化获取页面宽度
|
|
|
- var _this = this;
|
|
|
- uni.getSystemInfo({
|
|
|
- success: resu => {
|
|
|
- const query = uni.createSelectorQuery();
|
|
|
- query.select('.swiper-box').boundingClientRect();
|
|
|
- query.exec(function(res) {
|
|
|
- _this.maxheight = resu.windowHeight - res[0].top + 'px';
|
|
|
- console.log('打印页面的剩余高度', _this.height);
|
|
|
+ import {
|
|
|
+ getTime
|
|
|
+ } from '@/utils/rocessor.js'
|
|
|
+ import {
|
|
|
+ jdCoool
|
|
|
+ } from '@/api/wallet.js';
|
|
|
+ import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
|
+ import empty from '@/components/empty';
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ empty,
|
|
|
+ uniLoadMore
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+
|
|
|
+ jd: 0,
|
|
|
+ loadingType: 'more',
|
|
|
+ limit: 10, //每次加载多少信息
|
|
|
+ page: 1, //页数
|
|
|
+ dataList: [
|
|
|
+
|
|
|
+ ]
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ onReady(res) {
|
|
|
+ // 初始化获取页面宽度
|
|
|
+ var _this = this;
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success: resu => {
|
|
|
+ const query = uni.createSelectorQuery();
|
|
|
+ query.select('.swiper-box').boundingClientRect();
|
|
|
+ query.exec(function(res) {
|
|
|
+ _this.maxheight = resu.windowHeight - res[0].top + 'px';
|
|
|
+ console.log('打印页面的剩余高度', _this.height);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: res => {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.loadData();
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ toBack() {
|
|
|
+
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/user/user'
|
|
|
});
|
|
|
},
|
|
|
- fail: res => {}
|
|
|
- });
|
|
|
- },
|
|
|
- methods:{
|
|
|
- toBack() {
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/user/user'
|
|
|
- });
|
|
|
+
|
|
|
+ loadData() {
|
|
|
+ let obj = this
|
|
|
+ jdCoool({
|
|
|
+ page: obj.page,
|
|
|
+ limit: obj.limit
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ obj.dataList = res.data.data;
|
|
|
+ console.log(obj.dataList, '我是强儿die');
|
|
|
+ obj.dataList = obj.dataList.map(item => {
|
|
|
+ item.add_time = getTime(item.add_time);
|
|
|
+ console.log(item.add_time);
|
|
|
+ return item;
|
|
|
+ })
|
|
|
+ obj.limit = res.count
|
|
|
+ obj.jd = res.data.sum
|
|
|
+ // uni.hideLoading({
|
|
|
+ // title:'加载中'
|
|
|
+ // })
|
|
|
+ // uni.hideLoading()
|
|
|
+
|
|
|
+ if(res.length>0){
|
|
|
+ obj.dataList = obj.dataList.concat(res.data.data[0])
|
|
|
+ obj.page++;
|
|
|
+ }
|
|
|
+ //判断是否还有数据,有改为more,没有各位noMore
|
|
|
+ if(obj.limit == res.data.data.length){
|
|
|
+ obj.loadingType = 'more'
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ obj.loadingType = 'noMore'
|
|
|
+ }
|
|
|
+ uni.hideLoading()
|
|
|
+ // this.$set(obj.dataList,'loaded',true)
|
|
|
+ }).catch(e=>{
|
|
|
+ console.log(e);
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-page {
|
|
|
- background: #ffffff;
|
|
|
- height: 100%;
|
|
|
-}
|
|
|
-.content-money {
|
|
|
- background: $page-color-base;
|
|
|
- // border: 2px solid #ffffff;
|
|
|
- // padding-top: var(--status-bar-height);
|
|
|
- .moneyTx {
|
|
|
- position: absolute;
|
|
|
- top: 120rpx;
|
|
|
- right: 0rpx;
|
|
|
- // width: 150rpx;
|
|
|
- padding: 10rpx 10rpx;
|
|
|
- border: 2px solid #ffffff;
|
|
|
- border-top-left-radius: 15rpx;
|
|
|
- border-bottom-left-radius: 15rpx;
|
|
|
- line-height: 1;
|
|
|
- font-size: $font-base;
|
|
|
+ page {
|
|
|
background: #ffffff;
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
- .buttom-box {
|
|
|
- background-color: #ffffff;
|
|
|
- text-align: center;
|
|
|
- margin: 0 30rpx;
|
|
|
- padding: 20rpx 0;
|
|
|
- border-radius: $border-radius-sm;
|
|
|
- margin-top: -60rpx;
|
|
|
- .buttom {
|
|
|
- font-size: $font-lg;
|
|
|
- flex-grow: 1;
|
|
|
- }
|
|
|
- .interval {
|
|
|
- width: 2px;
|
|
|
- height: 60rpx;
|
|
|
- background-color: #eeeeee;
|
|
|
+
|
|
|
+ .content-money {
|
|
|
+ background: $page-color-base;
|
|
|
+
|
|
|
+ // border: 2px solid #ffffff;
|
|
|
+ // padding-top: var(--status-bar-height);
|
|
|
+ .moneyTx {
|
|
|
+ position: absolute;
|
|
|
+ top: 120rpx;
|
|
|
+ right: 0rpx;
|
|
|
+ // width: 150rpx;
|
|
|
+ padding: 10rpx 10rpx;
|
|
|
+ border: 2px solid #ffffff;
|
|
|
+ border-top-left-radius: 15rpx;
|
|
|
+ border-bottom-left-radius: 15rpx;
|
|
|
+ line-height: 1;
|
|
|
+ font-size: $font-base;
|
|
|
+ background: #ffffff;
|
|
|
}
|
|
|
- .icon {
|
|
|
- height: 36rpx;
|
|
|
- width: 36rpx;
|
|
|
- margin: 0 auto;
|
|
|
- .icon-img {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
+
|
|
|
+ .buttom-box {
|
|
|
+ background-color: #ffffff;
|
|
|
+ text-align: center;
|
|
|
+ margin: 0 30rpx;
|
|
|
+ padding: 20rpx 0;
|
|
|
+ border-radius: $border-radius-sm;
|
|
|
+ margin-top: -60rpx;
|
|
|
+
|
|
|
+ .buttom {
|
|
|
+ font-size: $font-lg;
|
|
|
+ flex-grow: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .interval {
|
|
|
+ width: 2px;
|
|
|
+ height: 60rpx;
|
|
|
+ background-color: #eeeeee;
|
|
|
+ }
|
|
|
+
|
|
|
+ .icon {
|
|
|
+ height: 36rpx;
|
|
|
+ width: 36rpx;
|
|
|
+ margin: 0 auto;
|
|
|
+
|
|
|
+ .icon-img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
-.money-box {
|
|
|
- height: 430rpx;
|
|
|
- color: #ffffff;
|
|
|
- text-align: center;
|
|
|
- position: relative;
|
|
|
- background-color: pink;
|
|
|
- .header {
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
- width: 100%;
|
|
|
- height: 80rpx;
|
|
|
- font-size: 32rpx;
|
|
|
- font-weight: 700;
|
|
|
- z-index: 99;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
- .goback-box {
|
|
|
- position: absolute;
|
|
|
- left: 18rpx;
|
|
|
- top: 0;
|
|
|
- height: 80rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
- .goback {
|
|
|
- z-index: 100;
|
|
|
- width: 34rpx;
|
|
|
- height: 34rpx;
|
|
|
- }
|
|
|
- .money_bg {
|
|
|
- width: 100%;
|
|
|
+
|
|
|
+ .money-box {
|
|
|
height: 430rpx;
|
|
|
- display: block;
|
|
|
- }
|
|
|
- .text {
|
|
|
- padding-top: 80rpx;
|
|
|
- font-size: $font-lg;
|
|
|
- }
|
|
|
- .money {
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- width: 100%;
|
|
|
- padding-top: 186rpx;
|
|
|
- font-size: 84rpx;
|
|
|
- font-weight: bold;
|
|
|
+ color: #ffffff;
|
|
|
+ text-align: center;
|
|
|
+ position: relative;
|
|
|
+ background-color: pink;
|
|
|
+
|
|
|
+ .header {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 80rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: 700;
|
|
|
+ z-index: 99;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .goback-box {
|
|
|
+ position: absolute;
|
|
|
+ left: 18rpx;
|
|
|
+ top: 0;
|
|
|
+ height: 80rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .goback {
|
|
|
+ z-index: 100;
|
|
|
+ width: 34rpx;
|
|
|
+ height: 34rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .money_bg {
|
|
|
+ width: 100%;
|
|
|
+ height: 430rpx;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text {
|
|
|
+ padding-top: 80rpx;
|
|
|
+ font-size: $font-lg;
|
|
|
+ }
|
|
|
+
|
|
|
+ .money {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ padding-top: 186rpx;
|
|
|
+ font-size: 84rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tip {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ padding-top: 304rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
}
|
|
|
- .tip {
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- width: 100%;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ height: 82rpx;
|
|
|
+ line-height: 82rpx;
|
|
|
text-align: center;
|
|
|
- padding-top: 304rpx;
|
|
|
- font-size: 26rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: 500;
|
|
|
- color: #FFFFFF;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.title {
|
|
|
- height: 82rpx;
|
|
|
- line-height: 82rpx;
|
|
|
- text-align: center;
|
|
|
- font-size: 30rpx;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 500;
|
|
|
- color: #333333;
|
|
|
- border-bottom: 1px solid #f0f0f0;
|
|
|
-}
|
|
|
-
|
|
|
-// 列表
|
|
|
-.swiper-box {
|
|
|
- .order-item {
|
|
|
- padding: 18rpx 24rpx 14rpx;
|
|
|
+ color: #333333;
|
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
- .left {
|
|
|
- justify-content: flex-start;
|
|
|
- .avator {
|
|
|
- width: 70rpx;
|
|
|
- height: 70rpx;
|
|
|
- border-radius: 50rpx;
|
|
|
- background: #03A9F4;
|
|
|
- image {
|
|
|
+ }
|
|
|
+
|
|
|
+ // 列表
|
|
|
+ .swiper-box {
|
|
|
+ .order-item {
|
|
|
+ padding: 18rpx 24rpx 14rpx;
|
|
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
+
|
|
|
+ .left {
|
|
|
+ justify-content: flex-start;
|
|
|
+
|
|
|
+ .avator {
|
|
|
width: 70rpx;
|
|
|
height: 70rpx;
|
|
|
border-radius: 50rpx;
|
|
|
+ background: #03A9F4;
|
|
|
+
|
|
|
+ image {
|
|
|
+ width: 70rpx;
|
|
|
+ height: 70rpx;
|
|
|
+ border-radius: 50rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .order-font {
|
|
|
+ margin-left: 10rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #3F454B;
|
|
|
+
|
|
|
+ text {
|
|
|
+ color: #FF4D4C;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- .order-font {
|
|
|
- margin-left: 10rpx;
|
|
|
- font-size: 30rpx;
|
|
|
+
|
|
|
+ .time {
|
|
|
+ font-size: 22rpx;
|
|
|
font-family: PingFang SC;
|
|
|
- font-weight: 500;
|
|
|
- color: #3F454B;
|
|
|
- text {
|
|
|
- color: #FF4D4C;
|
|
|
- }
|
|
|
+ font-weight: 400;
|
|
|
+ color: #999999;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
- .time {
|
|
|
- font-size: 22rpx;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #999999;
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
-}
|
|
|
-.content {
|
|
|
- height: 100%;
|
|
|
- .empty-content {
|
|
|
- background-color: #ffffff;
|
|
|
+
|
|
|
+ .content {
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ .empty-content {
|
|
|
+ background-color: #ffffff;
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
</style>
|