sakura 1 سال پیش
والد
کامیت
723e82de05
2فایلهای تغییر یافته به همراه41 افزوده شده و 22 حذف شده
  1. 26 16
      pages/home/home.vue
  2. 15 6
      pages/home/index.scss

+ 26 - 16
pages/home/home.vue

@@ -14,21 +14,18 @@
 				</view>
 				<view class="column column4"></view>
 			</view>
-
 		</view>
 		<view class="banner">
 			<swiper style="height: 240px;" indicator-dots="true" autoplay="true" interval="2000" duration="500">
 				<swiper-item v-for="hot in eventshot" @click="onView(hot.id)">
 					<image :src=hot.imgList[0] class="slide-image"></image>
 				</swiper-item>
-
 			</swiper>
 		</view>
 
 		<view class="section1">
 			<view class="serow">
 				<view class="column">
-
 					<view class="cell" :class="active == 6?'active':''" @click="selActive('',6)">
 						<view class="cl">
 							<image :src="'/static/images/chart_alt6.png'" style="width: 24px; height: 24px;">
@@ -36,7 +33,6 @@
 						</view>
 						<view class="cl">全部</view>
 					</view>
-
 				</view>
 				<view class="column" v-for="(tag,index) in eventstag">
 					<view class="cell" :class="active == index?'active':''" @click="selActive(tag,index)">
@@ -47,7 +43,6 @@
 						<view class="cl">{{tag.name}}</view>
 					</view>
 				</view>
-
 			</view>
 			<view class="full-row">
 				<view class="rows" @click="showCity">
@@ -66,12 +61,18 @@
 				</view>
 
 			</view>
-			<view class="selected" v-if="cityShow">
+			<view class="selected"  v-if="cityShow">
+				<view class="textInfo"  @click="selCity('全国')">
+					全国
+				</view>
 				<view class="textInfo" v-for="(item,index) in cityLists" :key='index' @click="selCity(item)">
 					{{item.name}}
 				</view>
 			</view>
-			<view class="selected" style="left: 16%;" v-if="typeShow">
+			<view class="selected" style="left: 16%;width: 80px;" v-if="typeShow">
+				<view class="textInfo" :class="active == 6?'active':''"  @click="selActive('',6)">
+					全部
+				</view>
 				<view class="textInfo" :class="active == index?'active':''" v-for="(item,index) in eventList"
 					:key='index' @click="selActive(item,index)">
 					{{item.name}}
@@ -90,8 +91,9 @@
 						<view class="ico">
 							<image src="/static/images/time.png" style="width: 12px; height: 12px;"></image>
 						</view>
-						<view class="time">{{ event.openTime }} - {{ event.closeTime }}</view>
-						<view class="time_yuyue">
+						<!-- - {{ event.closeTime }} -->
+						<view class="time">{{ event.openTime }} </view>
+						<view class="adres_yuyue">
 							<view class="ico">
 								<image src="/static/images/daohang.png" style="width: 12px; height: 12px;"></image>
 							</view>
@@ -185,6 +187,7 @@
 		methods: {
 			showType() {
 				let _this = this
+				this.cityShow=false
 				_this.$http.request('events/searchTags', {
 					page: 1,
 					pageSize: 50,
@@ -197,19 +200,26 @@
 				});
 			},
 			selCity(item) {
-				this.activeCity = item.name
-				console.log(item);
-				this.city = item.city
-				this.cityShow = false
-				this.fetchEventsData()
+				if(item=='全国'){
+					this.activeCity=item
+					this.city = ""
+					this.cityShow = false
+					this.fetchEventsData()
+				}else{
+					console.log(item);
+					this.activeCity = item.name
+					this.city = item.city
+					this.cityShow = false
+					this.fetchEventsData()
+				}
+				
 			},
 			showCity() {
+				this.typeShow=false
 				this.cityShow = !this.cityShow
 			},
 			navTo(index, url) {
-
 				if (index != this.active) {
-
 					uni.switchTab({
 						url: url
 					})

+ 15 - 6
pages/home/index.scss

@@ -142,12 +142,17 @@
 				.selected{
 					position: absolute;
 					width: 100px;
-					min-height: 100px;
+					height: 130px;
 					z-index: 999;
 					background-color: #fff;
+					flex: auto;
+					overflow: auto;
+					border-radius: 5px;
 					.textInfo{
-						margin-top: 5px;
+						padding: 5px;
+						margin: 5px 0;
 						text-align: center;
+						font-size: 12px;
 					}
 				}
 		
@@ -236,7 +241,7 @@
 		 
 		 .time_yuyue{
 		 						 width: 95%;
-		 						 padding: 2px 0px 0px 2px;
+		 						 padding: 2px 0px 0px 15px;
 		 						 font-size: 12px;
 		 						 color: #666666;
 		 						 display: flex;
@@ -246,7 +251,7 @@
 		 						 .ico{
 		 							 padding-top: 2px;
 		 							 flex:0 0 20px;
-									 padding-left: 5px;
+									 //padding-left: 5px;
 		 							 
 		 						 }
 		 						 .time{
@@ -255,13 +260,17 @@
 		 							 text-align: left;
 		 						 }
 		 						 .didian{
-		 						 					 							 
+		 						 		width: 200px;			 							 
 		 						  flex:0 0 80%;
 		 						 text-align: left;
 		 						 }
 		 }
+		 .adres_yuyue{
+		 			 display: flex;
+		 			 
+		 		 }
 		 .yuyue_btn{
-			 margin-left: 70px;
+			 margin-left: 100px;
 			 margin-top: 12px;
 			 image{