|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view style="padding-top: 20rpx;"> |
|
|
|
<view class="nav_area"></view> |
|
|
|
<view class=""> |
|
|
|
<!-- <view class=""> |
|
|
|
<view class="uni-list"> |
|
|
|
<view class="uni-list-cell" style="padding: 20rpx 40rpx 0px;display: flex;align-items:center;font-size: 14px;"> |
|
|
|
<image src="../../../static/home/stLine-calendar-l@2x.png" mode="" style="width: 48rpx;height: 48rpx;margin-right: 10px;"></image> |
|
|
|
@ -12,26 +12,28 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="padding: 20rpx 40rpx 0px;display: flex;font-size: 14px;color: #999;"> |
|
|
|
</view> --> |
|
|
|
<!-- <view style="padding: 20rpx 40rpx 0px;display: flex;font-size: 14px;color: #999;"> |
|
|
|
今日中奖总金额: |
|
|
|
<view style="color: #E50000;">{{allToday}}<text style="color: #444;">{{' '+unit}}</text></view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<view class="record-head" v-if="recordsList.length>0"> |
|
|
|
<view style="flex:0.15;">ID</view> |
|
|
|
<view style="flex:0.37;">手机号码</view> |
|
|
|
<view style="flex:0.2;">时间</view> |
|
|
|
<view style="flex:0.28;text-align: right;">中奖金额</view> |
|
|
|
<view style="width: 56rpx;text-align: center;">ID</view> |
|
|
|
<view style="width: 200rpx;text-align: left;">手机号码</view> |
|
|
|
<view style="width: 100rpx;">时间</view> |
|
|
|
<view style="width: 120rpx;">中奖金额</view> |
|
|
|
</view> |
|
|
|
<view v-for="(item,index) in recordsList" :key="index" class="record-item"> |
|
|
|
<view style="flex:0.15;">{{ item.user_id }}</view> |
|
|
|
<view style="flex:0.37;">{{ item.phone }}</view> |
|
|
|
<view style="flex:0.2;">{{ item.datetime }}</view> |
|
|
|
<view style="flex:0.28;text-align: right;color: #E50000;">{{ item['awards_amount'] }}<text style="color: #444;">元</text></view> |
|
|
|
<view style="margin-top: 30px;"> |
|
|
|
<view v-for="(item,index) in recordsList" :key="index" class="record-item"> |
|
|
|
<view style="flex:0.15;">{{ item.user_id }}</view> |
|
|
|
<view style="flex:0.45;">{{ item.phone }}</view> |
|
|
|
<view style="flex:0.3;font-size: 12px;">{{ item.datetime }}</view> |
|
|
|
<view style="flex:0.23;text-align: right;color: #E50000;">{{ item['awards_amount'] }}<text style="color: #444;">元</text></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="" v-if="recordsList.length===0" style="color: #999;text-align: center;padding: 40rpx;"> |
|
|
|
<!-- <view class="" v-if="recordsList.length===0" style="color: #999;text-align: center;padding: 40rpx;"> |
|
|
|
- 暂无记录 - |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -64,7 +66,9 @@ |
|
|
|
// }, |
|
|
|
], |
|
|
|
page: 1, |
|
|
|
noMore: true, |
|
|
|
noMore: false, |
|
|
|
total:10, |
|
|
|
limit:10 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
@ -77,36 +81,45 @@ |
|
|
|
var today = year + '-' + month + '-' + day; |
|
|
|
this.date = today; |
|
|
|
this.endDate = today; |
|
|
|
|
|
|
|
this.userType = uni.getStorageSync('userType'); |
|
|
|
this.getZJ(); |
|
|
|
// this.getZJ(); |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getZJ(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getZJ(){ |
|
|
|
this.noMore = true; |
|
|
|
API.request('/adminStatistics/awardRecords', { |
|
|
|
page: this.page, |
|
|
|
limit: 10, |
|
|
|
date: this.date |
|
|
|
// date: this.date |
|
|
|
}, res=>{ |
|
|
|
console.log(res); |
|
|
|
this.allToday = res.data.sum_amount; |
|
|
|
this.unit = res.data.unit; |
|
|
|
let list = res.data.list; |
|
|
|
this.recordsList = [...this.recordsList, ...res.data.list] |
|
|
|
this.total = res.data.total; |
|
|
|
if(this.page===1){ |
|
|
|
list.length>0 ? this.noMore=false : false; |
|
|
|
this.recordsList = list; |
|
|
|
}else{ |
|
|
|
if(res.data.list.length==0){ |
|
|
|
uni.showToast({ |
|
|
|
title: '没有更多了', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
this.noMore = true; |
|
|
|
} |
|
|
|
this.recordsList = this.recordsList.concat(list) |
|
|
|
setTimeout(()=>{ |
|
|
|
this.page++; |
|
|
|
this.getZJ(); |
|
|
|
},200) |
|
|
|
} |
|
|
|
// let list = res.data.list; |
|
|
|
// if(this.page===1){ |
|
|
|
// list.length>0 ? this.noMore=false : false; |
|
|
|
// this.recordsList = list; |
|
|
|
// }else{ |
|
|
|
// if(res.data.list.length==0){ |
|
|
|
// uni.showToast({ |
|
|
|
// title: '没有更多了', |
|
|
|
// icon: 'none' |
|
|
|
// }) |
|
|
|
this.noMore = false; |
|
|
|
// } |
|
|
|
// this.recordsList = this.recordsList.concat(list) |
|
|
|
// } |
|
|
|
}) |
|
|
|
}, |
|
|
|
bindDateChange: function(e) { |
|
|
|
@ -117,6 +130,13 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if(this.limit * this.page >= this.total) { |
|
|
|
return uni.showToast({ |
|
|
|
title: "没有更多了!", |
|
|
|
icon: "none" |
|
|
|
}) |
|
|
|
} |
|
|
|
// 上条数据加载完毕再发起下一次请求 |
|
|
|
if(this.noMore) return; |
|
|
|
this.page++; |
|
|
|
this.getZJ(); |
|
|
|
@ -145,13 +165,24 @@ |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
.record-head{ |
|
|
|
padding: 20rpx 40rpx 0px; |
|
|
|
position: fixed; |
|
|
|
top: 44px; |
|
|
|
/* #ifdef APP-PLUS */ |
|
|
|
top: 0px; |
|
|
|
/* #endif */ |
|
|
|
height: 40px; |
|
|
|
line-height: 40px; |
|
|
|
width: 100%; |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
// padding: 20rpx 0rpx 0px; |
|
|
|
background-color: #fff; |
|
|
|
box-shadow: 5px 0.3px 2px 0px #000000; |
|
|
|
// display: flex; |
|
|
|
// flex-direction: row; |
|
|
|
justify-content: space-around; |
|
|
|
// align-items: center; |
|
|
|
font-size: 14px; |
|
|
|
color: #CECECE; |
|
|
|
color: #ccc; |
|
|
|
} |
|
|
|
.record-item{ |
|
|
|
padding: 20rpx 40rpx 0px; |
|
|
|
|