张文飞 3 лет назад
Родитель
Сommit
8eff57b428

+ 1 - 1
App.vue

@@ -53,7 +53,7 @@
 		onShow: function() {
 			let token = this.$cache.get('_token_owner_union');
 			let userId =  this.$cache.get('_user_id');
-			if (!token) {
+			if (!token||!userId) {
 				this.globalData.userId = userId;
 				this.regist();
 			} else {

+ 2 - 2
components/leve-view/leve-view.vue

@@ -2,7 +2,7 @@
 	<view class="level">
 		<view class="leve_left">
 			<view class="level_left_txt">
-				L{{currentLevelTxt}}
+				{{currentLevelTxt}}
 			</view>
 			<view class="level_progress">
 				<view class="leve_progress_" :style="{width:currentLevel/nextLevel*300+'rpx'}">
@@ -13,7 +13,7 @@
 				</view>
 			</view>
 			<view class="level_right_txt">
-				L{{nextLevelTxt}}
+				{{nextLevelTxt}}
 			</view>
 		</view>
 		<view class="level_right">

+ 45 - 3
pages/homePage/homePage.vue

@@ -168,6 +168,13 @@
 					</view>
 					<view class="item_bg"></view>
 				</view>
+				
+				<view class="com_noMore_text" v-if="noMore && houseList.length > 0">没有更多了</view>
+				
+				<view class="empty" v-if="houseList.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>
 
 
@@ -209,7 +216,8 @@
 				showGuide:false,
 				total:0,
 				pageNo:1,
-				pageSize:10
+				pageSize:10,
+				noMore:false
 			}
 		},
 		mounted() {
@@ -252,7 +260,8 @@
 						this.houseList = [];
 					}
 					this.houseList = this.houseList.concat(houseList);
-					this.total = pageModel.total||0
+					this.total = pageModel.total||0;
+					this.noMore = this.houseList.length==this.total
 				}
 			},
 			async getUserInfo() {
@@ -344,7 +353,12 @@
 				this.showGuide = isShow;
 			},
 			showMine(){
-				this.$refs.mine.show()
+				if(this.userInfo.userId){
+					this.$refs.mine.show()
+				}else{
+					uni.$emit('login')
+				}
+				
 			}
 		},
 		components: {
@@ -1012,5 +1026,33 @@
 			}
 		}
 		
+		.com_noMore_text{
+			margin-top: 40rpx;
+			font-size: 24rpx;
+			font-family: Verdana, Verdana-Regular;
+			font-weight: 400;
+			text-align: center;
+			color: #999999;
+		}
+		
+		.empty {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			
+			.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>

+ 68 - 30
pages/revenueRankingPage/revenueRankingPage.vue

@@ -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>