|
@@ -32,7 +32,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="rank_item" v-for="(item,index) in rankingList" :key='index'>
|
|
|
+ <view class="rank_item" v-for="(item,index) in rankingList" :key='item.userId'>
|
|
|
<view class="rank_item_name" style="width: 20%;">
|
|
|
<image class="icon" v-if="index==0" src="https://dm.static.elab-plus.com/yezhu/icon_first.png" mode=""></image>
|
|
|
<image class="icon" v-if="index==1" src="https://dm.static.elab-plus.com/yezhu/icon_twice.png" mode=""></image>
|
|
@@ -40,18 +40,22 @@
|
|
|
<text v-if="index!=0&&index!=1&&index!=2" >{{index+1}}</text>
|
|
|
</view>
|
|
|
<view class="rank_item_name" style="width: 30%;" :style="{color:(index==0||index==1||index==2)?color1:'auto'}">
|
|
|
- 淘房**神
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
|
<view class="rank_item_name" style="width: 20%;">
|
|
|
- LV10
|
|
|
+ {{'L'+item.level}}
|
|
|
</view>
|
|
|
<view class="rank_item_name" style="width: 30%;" :style="{color:(index==0||index==1||index==2)?color1:'auto'}">
|
|
|
- 8273.00
|
|
|
+ {{Number(item.amount).toFixed(2)}}
|
|
|
</view>
|
|
|
<view class="item_line">
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="empty" v-if="rankingList.length == 0">
|
|
|
+ <image class="emptyImg" src="https://dm.static.elab-plus.com/yezhu/h5/icon_empty.png" mode=""></image>
|
|
|
+ <view class="text">暂无数据</view>
|
|
|
+ </view>
|
|
|
|
|
|
<view class="back_home" :style="{background:color2}" @click="backHome">
|
|
|
<image class="back_home_icon" src="https://dm.static.elab-plus.com/yezhu/icon_home.png" mode=""></image>
|
|
@@ -68,32 +72,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- rankingList:[
|
|
|
- {
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
-
|
|
|
- },{
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
-
|
|
|
- },{
|
|
|
-
|
|
|
- },{
|
|
|
-
|
|
|
- },{
|
|
|
-
|
|
|
- },{
|
|
|
-
|
|
|
- },{
|
|
|
-
|
|
|
- }
|
|
|
- ],
|
|
|
+ rankingList:[],
|
|
|
color1:"",
|
|
|
color2:"",
|
|
|
currentTab:1,
|
|
@@ -105,10 +84,48 @@
|
|
|
mounted() {
|
|
|
this.color1 = app.globalData.color1;
|
|
|
this.color2 = app.globalData.color2;
|
|
|
+ this.incomeRankTop10Amounts();
|
|
|
},
|
|
|
methods:{
|
|
|
tab(index){
|
|
|
this.currentTab = index;
|
|
|
+ if(index==1){
|
|
|
+ this.incomeRankTop10Amounts();
|
|
|
+ }else if(index==2){
|
|
|
+ this.incomeRankTop10ThisMonth();
|
|
|
+ }else if(index==3){
|
|
|
+ this.incomeRankTop10Today();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async incomeRankTop10Today(){
|
|
|
+ const res = await this.$myRequest({
|
|
|
+ url: '/income/trigger/incomeRankTop10Today',
|
|
|
+ data:{}
|
|
|
+ });
|
|
|
+ this.rankingList = []
|
|
|
+ if(res&&res.data.success){
|
|
|
+ this.rankingList = res.data.list||[]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async incomeRankTop10ThisMonth(){
|
|
|
+ const res = await this.$myRequest({
|
|
|
+ url: '/income/trigger/incomeRankTop10ThisMonth',
|
|
|
+ data:{}
|
|
|
+ });
|
|
|
+ this.rankingList = []
|
|
|
+ if(res&&res.data.success){
|
|
|
+ this.rankingList = res.data.list||[]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async incomeRankTop10Amounts(){
|
|
|
+ const res = await this.$myRequest({
|
|
|
+ url: '/income/trigger/incomeRankTop10Amounts',
|
|
|
+ data:{}
|
|
|
+ });
|
|
|
+ this.rankingList = []
|
|
|
+ if(res&&res.data.success){
|
|
|
+ this.rankingList = res.data.list||[]
|
|
|
+ }
|
|
|
},
|
|
|
backHome(){
|
|
|
uni.navigateBack({
|
|
@@ -127,6 +144,7 @@
|
|
|
border-radius: 16rpx;
|
|
|
padding-top: 20rpx;
|
|
|
margin-top: 20rpx;
|
|
|
+ min-height: 1200rpx;
|
|
|
.title{
|
|
|
text-align: center;
|
|
|
font-size: 32rpx;
|
|
@@ -244,5 +262,25 @@
|
|
|
text-align: center;
|
|
|
color: #ffffff;
|
|
|
}
|
|
|
+
|
|
|
+ .empty {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 300rpx;
|
|
|
+
|
|
|
+ .emptyImg {
|
|
|
+ width: 283rpx;
|
|
|
+ height: 227rpx;
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ margin-top: -20rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-family: PingFang SC, PingFang SC-Medium;
|
|
|
+ font-weight: 500;
|
|
|
+ text-align: center;
|
|
|
+ color: #b1b3ba;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|