|
@@ -17,21 +17,21 @@
|
|
|
</view>
|
|
|
<view v-if="false" class="no-view sys-size-40 sys-color-gray-9">暂无数据</view>
|
|
|
<scroll-view v-else scroll-y="true" class="box-sizing-border list-scroll">
|
|
|
- <view class="list-box" v-for="(item,i) in 10" :key="i">
|
|
|
+ <view class="list-box" v-for="(item,i) in list" :key="i">
|
|
|
<image v-if="navIndex===0" src="@/static/img/wallet/j.png" mode=""></image>
|
|
|
<image v-else src="@/static/img/wallet/bb.png" mode=""></image>
|
|
|
<view class="box-right">
|
|
|
<view class="box-right-1 mb-4">
|
|
|
<view class="sys-size-32 sys-color-gray-3">收益</view>
|
|
|
- <view class="sys-size-36 sys-color-4BC285 sys-weight-600">+100</view>
|
|
|
+ <view class="sys-size-36 sys-color-4BC285 sys-weight-600">{{item.side===1?'+':''}}{{item.amount}}</view>
|
|
|
<!-- <view class="sys-size-36 sys-color-gray-3 sys-weight-600">-100</view> -->
|
|
|
</view>
|
|
|
- <view class="sys-size-24 sys-color-gray-9">4月23日 12:06</view>
|
|
|
+ <view class="sys-size-24 sys-color-gray-9">{{item.time}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<view class="pop-view" v-if="isPop">
|
|
|
<view class="pop-1"></view>
|
|
|
<view class="pop-title sys-size-32 sys-color-gray-3 sys-weight-600 sys-background-gray-f">
|
|
@@ -47,6 +47,7 @@
|
|
|
|
|
|
<script>
|
|
|
import tools from "@/service/tools";
|
|
|
+ import {getCashFlowHistoryPage, getDailyEarnings, getMyLikeMoments} from "@/api/my";
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
|
@@ -68,22 +69,71 @@
|
|
|
this.endTime = tools.getDateYM();
|
|
|
this.fromData.time = this.endTime;
|
|
|
this.dateList = tools.getCustomTimeList('2020-01',this.endTime,'y-m')
|
|
|
+ this.startList()
|
|
|
},
|
|
|
methods:{
|
|
|
+ startList(){
|
|
|
+ if(this.userId<=0){
|
|
|
+ // return false
|
|
|
+ }
|
|
|
+ this.list=[]
|
|
|
+ this.isAjax=false
|
|
|
+ this.total=undefined
|
|
|
+ this.page=1
|
|
|
+ if(this.navIndex===0){
|
|
|
+ this.getCashFlowHistoryPage()
|
|
|
+ }else {
|
|
|
+ this.getDailyEarnings()
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ getDailyEarnings(){
|
|
|
+ if(this.isAjax){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isAjax=true
|
|
|
+ let that=this
|
|
|
+ getDailyEarnings({'pageNo':this.page,'pageSize':20,'month':this.fromData.time}).then((res)=>{
|
|
|
+ this.isAjax=false
|
|
|
+ if(res.code===0){
|
|
|
+ res.data.data.forEach((item)=>{
|
|
|
+ that.list.push(item )
|
|
|
+ })
|
|
|
+ ++that.page
|
|
|
+ that.total=res.data.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getCashFlowHistoryPage(){
|
|
|
+ if(this.isAjax){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isAjax=true
|
|
|
+ let that=this
|
|
|
+ getCashFlowHistoryPage({'pageNo':this.page,'pageSize':20,'month':this.fromData.time}).then((res)=>{
|
|
|
+ this.isAjax=false
|
|
|
+ if(res.code===0){
|
|
|
+ res.data.data.forEach((item)=>{
|
|
|
+ that.list.push(item )
|
|
|
+ })
|
|
|
+ ++that.page
|
|
|
+ that.total=res.data.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
selectTo(type,item,i){
|
|
|
if(type === 1){
|
|
|
- if(this.navId != item.id){
|
|
|
+ if(this.navId !== item.id){
|
|
|
this.navId = item.id;
|
|
|
this.navIndex = i;
|
|
|
this.fromData.time = this.endTime;
|
|
|
- this.page = 1;
|
|
|
- this.list = [];
|
|
|
+ this.startList()
|
|
|
}
|
|
|
}else if(type === 2){
|
|
|
if(item){
|
|
|
this.fromData.time = item;
|
|
|
- this.page = 1;
|
|
|
- this.list = [];
|
|
|
+ this.startList()
|
|
|
}
|
|
|
this.isPop = !this.isPop;
|
|
|
}
|
|
@@ -100,7 +150,7 @@
|
|
|
.mb-4{
|
|
|
margin-bottom: 4rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.pop-view{
|
|
|
width: 100%;
|
|
|
height: 100vh;
|
|
@@ -137,7 +187,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.no-view{
|
|
|
text-align: center;
|
|
|
margin-top: 200rpx;
|
|
@@ -162,7 +212,7 @@
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -187,11 +237,11 @@
|
|
|
}
|
|
|
.left-1{
|
|
|
left: 168rpx;
|
|
|
- transition: all 0.5s;
|
|
|
+ transition: all 0.5s;
|
|
|
}
|
|
|
.left-2{
|
|
|
left: 545rpx;
|
|
|
- transition: all 0.5s;
|
|
|
+ transition: all 0.5s;
|
|
|
}
|
|
|
}
|
|
|
.box-head-2{
|
|
@@ -210,4 +260,4 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|