Ver código fonte

修改排行样式

11wqe1 1 ano atrás
pai
commit
8c63657267
2 arquivos alterados com 37 adições e 8 exclusões
  1. 4 1
      pages/mineActive/mineActive.vue
  2. 33 7
      pages/ranking/ranking.vue

+ 4 - 1
pages/mineActive/mineActive.vue

@@ -9,7 +9,10 @@
 				<view>
 					<listBlock1 ref="listBlock1" :classList="activeList"></listBlock1>
 				</view>
-				<view class="loading">
+				<view class="loading" v-if="!activeList.length">
+					您还未报名活动哦~
+				</view>
+				<view class="loading" v-if="activeList.length">
 					<view v-if="Loading==1">数据加载中...</view>
 					<view v-if="Loading==2">没有更多了~~</view>
 				</view>

+ 33 - 7
pages/ranking/ranking.vue

@@ -32,8 +32,14 @@
 							</view>
 						</uni-td>
 						<uni-td>
-							<view style="width:150rpx" class="td" @click="show" :data-e="i.schoolName">
-								{{i.schoolName}}
+							<view style="position: relative;" class="">
+								<view style="width:150rpx;position: relative;" class="td" @click="show" :data-e="index">
+									{{i.schoolName}}
+									
+								</view>
+								<view class="floatTd" v-show="floatTd==index">
+									{{i.schoolName}}
+								</view>
 							</view>
 						</uni-td>
 						<uni-td>
@@ -71,6 +77,7 @@
 					title: '排行',
 					btn: 0
 				},
+				floatTd:-1,
 				arrlist: [],
 				adv: {},
 				topNum: 0
@@ -136,12 +143,17 @@
 				})
 			},
 			show(e) {
+				if(this.floatTd!=-1) return
 				let data = e.currentTarget.dataset.e
-				// console.log(data);
-				uni.showToast({
-					title: data,
-					icon: 'none'
-				})
+				console.log(data);
+				this.floatTd=data
+				setTimeout(()=>{
+					this.floatTd=-1
+				}, 1500);
+				// uni.showToast({
+				// 	title: data,
+				// 	icon: 'none'
+				// })
 			},
 			// getMag() {
 			// 	this.$request('/selectAllMessage', "POST", {
@@ -185,6 +197,7 @@
 			this.getAdv()
 		},
 		onShow() {
+			this.floatTd=-1
 			// this.getMag()
 			this.getAllMessage() // 调用app.js中的方法
 			this.getdata()
@@ -277,5 +290,18 @@
 		box-sizing: border-box;
 		border-right: 1px #ebeef5 solid;
 		border-bottom: 1px #ebeef5 solid;
+		
+	}
+	.floatTd{
+		position: absolute;
+		top: 0%;
+		left: 0;
+		height: 100%;
+		width: auto;
+		z-index: 999;
+		white-space: nowrap;
+		line-height: 40px;
+		background-color: #ccc;
+		padding: 0 5px;
 	}
 </style>