2 Commits 8ca3e70ad1 ... 19a55d376e

Author SHA1 Message Date
  xiaokuang 19a55d376e 合并冲突 4 months ago
  xiaokuang fbcdb5e0f5 合并 4 months ago
2 changed files with 136 additions and 156 deletions
  1. 69 93
      pages/index/home.vue
  2. 67 63
      pages/user/index.vue

+ 69 - 93
pages/index/home.vue

@@ -1,69 +1,68 @@
 <template>
   <page-layout>
-    <nav-bar :show-title="false">
-      <view class="top-container">
-        <image class="logo" :src="logo"/>
-        <view class="countdown">
-          距开幕
-          <view class="days"> 168</view>
-          天
-        </view>
-      </view>
-    </nav-bar>
-    <u-swiper :items="images" useComponentName='topSwiper' indicato-dots-style="morphing" :height="387"/>
-    <view class="main-container">
-      <u-search v-model="searchKeyword" placeholder="搜索关键词" @search="onClickSearch"/>
-      <view class="nav-icons">
-        <template v-for="(item, index) in navIcons">
-          <view class="nav-icon-wrapper" :key="index" v-if="!item.is_hide">
-            <view class="nav-icon" @click="onClickNavIcon(item)">
-              <view v-if="item.icon.indexOf('.svg') !== -1" :style="'background-image:url(' + item.icon +  ')'"></view>
-              <view v-else-if="item.icon.indexOf('icon-') !== -1" :class="'iconfont ' + item.icon"></view>
-            </view>
-            <view class="nav-text">
-              {{ item.name }}
-            </view>
-          </view>
-        </template>
-      </view>
-      <view class="panel-group panel-group-1">
-        <u-panel title="精彩视频" link="/pages/video/index">
-          <u-swiper :items="videos" useComponentName="videoSwiper" :height="360" :autoplay="false" :border-radius="10"
-                    :image-width="508" :image-height="286" next-margin="100rpx"/>
-        </u-panel>
-        <u-panel title="精彩图集"
-                 link="https://www.productronicachina.com.cn/data-facts-impressions-impressions-videos">
-          <u-swiper :items="albumPics" useComponentName="imageSwiper" :height="360" :border-radius="10"
-                    :image-width="508" :image-height="286" next-margin="100rpx"/>
-          <!-- <view class="album">
+		<nav-bar :show-title="false">
+			<view class="top-container">
+				<image class="logo" :src="logo" />
+				<view class="countdown">
+					距开幕
+					<view class="days"> 168</view>
+					天
+				</view>
+			</view>
+		</nav-bar>
+		<u-swiper :items="images" useComponentName='topSwiper' indicato-dots-style="morphing" :height="387" />
+		<view class="main-container">
+			<u-search v-model="searchKeyword" placeholder="搜索关键词" @search="onClickSearch" />
+			<view class="nav-icons">
+				<template v-for="(item, index) in navIcons">
+					<view class="nav-icon-wrapper" :key="index" v-if="!item.is_hide">
+						<view class="nav-icon" @click="onClickNavIcon(item)">
+							<view v-if="item.icon.indexOf('.svg') !== -1" :style="'background-image:url(' + item.icon +  ')'"></view>
+							<view v-else-if="item.icon.indexOf('icon-') !== -1" :class="'iconfont ' + item.icon"></view>
+						</view>
+						<view class="nav-text">
+							{{ item.name }}
+						</view>
+					</view>
+				</template>
+			</view>
+			<view class="panel-group panel-group-1">
+				<u-panel title="精彩视频" link="/pages/video/index">
+					<u-swiper :items="videos" useComponentName="videoSwiper" :height="360" :autoplay="false" :border-radius="10"
+						:image-width="508" :image-height="286" next-margin="100rpx" />
+				</u-panel>
+				<u-panel title="精彩图集" link="https://www.productronicachina.com.cn/data-facts-impressions-impressions-videos">
+					<u-swiper :items="albumPics" useComponentName="imageSwiper" :height="360" :border-radius="10"
+						:image-width="508" :image-height="286" next-margin="100rpx" />
+					<!-- <view class="album">
             <template v-for="(item, index) in albumPics">
               <view class="album-pic" :key="index" @click="onClickAlbum(index)">
                 <image :src="String(item)" mode="aspectFill" />
               </view>
             </template>
           </view> -->
-        </u-panel>
-      </view>
-      <view class="panel-group">
-        <u-panel title="新闻" link="/pages/news/index">
-          <news-recommend recommend-type="home" news-type="exhibition"/>
-        </u-panel>
-      </view>
-      <view class="panel-group logo-group">
-        <u-panel title="战略合作方">
-          <u-swiper :items="part1" useComponentName="logoSwiper" key="logoSwiper" :autoplay="false" :height="250">
-            <template v-slot="{ scope }">
-              <view class="partners">
-                <template v-for="(item, index) in scope">
-                  <view class="partner" :key="index" @tap="onLogoClick(item)">
-                    <image :src="item.url"/>
-                  </view>
-                </template>
-              </view>
-            </template>
-          </u-swiper>
-        </u-panel>
-        <!-- <u-panel title="推荐展商" link="https://www.productronicachina.com.cn/partners">
+				</u-panel>
+			</view>
+			<view class="panel-group">
+				<u-panel title="新闻" link="/pages/news/index">
+					<news-recommend recommend-type="home" news-type="exhibition" />
+				</u-panel>
+			</view>
+			<view class="panel-group logo-group">
+				<u-panel title="战略合作方">
+					<u-swiper :items="part1" useComponentName="logoSwiper" key="logoSwiper" :autoplay="false" :height="250">
+						<template v-slot="{ scope }">
+							<view class="partners">
+								<template v-for="(item, index) in scope">
+									<view class="partner" :key="index" @tap="onLogoClick(item)">
+										<image :src="item.url" />
+									</view>
+								</template>
+							</view>
+						</template>
+					</u-swiper>
+				</u-panel>
+				<!-- <u-panel title="推荐展商" link="https://www.productronicachina.com.cn/partners">
           <u-swiper :items="partners" :height="250">
             <template v-slot="{ scope }">
               <view class="partners">
@@ -76,23 +75,8 @@
             </template>
           </u-swiper>
         </u-panel> -->
-        <u-panel title="合作媒体" link="https://www.productronicachina.com.cn/partners">
-          <u-swiper :items="part2" key="logoSwiper2" useComponentName="logoSwiper" :autoplay="false" :height="250">
-            <template v-slot="{ scope }">
-              <view class="partners">
-                <template v-for="(item, index) in scope">
-                  <view class="partner" :key="index" @tap="onLogoClick(item)">
-                    <image :src="item.url"/>
-                  </view>
-                </template>
-              </view>
-            </template>
-          </u-swiper>
-        </u-panel>
-      </view>
     </view>
-    <float-button></float-button>
-		<van-overlay :show="isShow">
+	<float-button></float-button>		<van-overlay :show="isShow">
 			<view class="ad-wrapper">
 				<view class="img-btn-box">
 					<view class="ad-space" @tap="navigateToAdLink(adInfo.ad_link)">
@@ -104,13 +88,11 @@
 				</view>
 			</view>
 		</van-overlay>
-  </page-layout>
+	</page-layout>
 </template>
 
 <script>
-
-import NavBar from '@/components/layout/nav-bar'
-	import UScrollView from '@/components/common/u-scroll-view'
+import NavBar from '@/components/layout/nav-bar'	import UScrollView from '@/components/common/u-scroll-view'
 	import USwiper from '@/components/common/u-swiper'
 	import USearch from '@/components/common/u-search'
 	import UPanel from '@/components/common/u-panel'
@@ -206,10 +188,10 @@ import NavBar from '@/components/layout/nav-bar'
 			this.getAdData()
 		},
 		mounted() {
-		    this.getSystemInfo(this,(res)=>{
-		      this.navType = res
-		    })
-		  },
+			this.getSystemInfo(this, (res) => {
+				this.navType = res
+			})
+		},
 		methods: {
 			onClickNavIcon(item) {
 				if (item.link === '/pages/exhibitor/index') {
@@ -273,7 +255,7 @@ import NavBar from '@/components/layout/nav-bar'
 </script>
 
 <style lang="scss">
-.ad-wrapper {
+	.ad-wrapper {
 		display: flex;
 		justify-content: center;
 		align-items: center;
@@ -294,11 +276,12 @@ import NavBar from '@/components/layout/nav-bar'
 			}
 		}
 
-		.home-ad-close{
+		.home-ad-close {
 			position: absolute;
 			top: -70rpx;
 			right: -70rpx;
-			.van-icon-close{
+
+			.van-icon-close {
 				font-size: 60rpx;
 				color: #FFFFFF;
 				cursor: pointer;
@@ -337,12 +320,6 @@ import NavBar from '@/components/layout/nav-bar'
 			}
 		}
 	}
-  .countdown {
-    display: flex;
-    align-items: center;
-    margin-left: 27rpx;
-    font-size: $fontSize3;
-
 	.search-container {
 		.search-input {
 			height: 64rpx;
@@ -503,5 +480,4 @@ import NavBar from '@/components/layout/nav-bar'
 		image {
 			object-fit: contain;
 		}
-	}
-</style>
+	}</style>

+ 67 - 63
pages/user/index.vue

@@ -53,15 +53,17 @@
 	import UScrollView from '@/components/common/u-scroll-view'
 	import VanCell from '@/wxcomponents/vant/cell/index'
 	import VanCellGroup from '@/wxcomponents/vant/cell-group/index'
-	import PageLayout from "@/components/layout/page-layout";
+	import PageLayout from "@/components/layout/page-layout"
 	import {
-			getAdInfo
-		} from '@/api'	export default {
+		getAdInfo
+	} from '@/api'
+
+	export default {
 		options: {
 			styleIsolation: 'shared'
 		},
 		components: {
-      		PageLayout,
+			PageLayout,
 			NavBar,
 			UScrollView,
 			VanCell,
@@ -104,8 +106,9 @@
 			}
 		},
 		created() {
-			this.getAdData()},
-		}, 		methods: {
+			this.getAdData()
+		},
+		methods: {
 			onClickSetting() {
 				this.navigateTo('/pages/user/setting')
 			},
@@ -127,76 +130,77 @@
 </script>
 
 <style lang="scss">
-		.user-info{
-			display: flex;
-			align-items: center;
+	.user-info {
+		display: flex;
+		align-items: center;
 
-			.user-avator {
-				@include display-flex-center;
-				width: 111rpx;
-				height: 111rpx;
-				border-radius: 50%;
-				overflow: hidden;
-				margin-right: 23rpx;
-				background-color: $buttonPrimaryColor;
+		.user-avator {
+			@include display-flex-center;
+			width: 111rpx;
+			height: 111rpx;
+			border-radius: 50%;
+			overflow: hidden;
+			margin-right: 23rpx;
+			background-color: $buttonPrimaryColor;
 
-				.icon {
-					color: #ffffff;
-					opacity: 0.67;
-					font-size: 70rpx;
-				}
+			.icon {
+				color: #ffffff;
+				opacity: 0.67;
+				font-size: 70rpx;
 			}
+		}
 
-			.user-name {
-				font-size: 30rpx;
-				color: #333333;
-			}
+		.user-name {
+			font-size: 30rpx;
+			color: #333333;
+		}
 
-			.user-phone {
-				font-size: $fontSize3;
-				color: #7d7d7d;
-			}
+		.user-phone {
+			font-size: $fontSize3;
+			color: #7d7d7d;
 		}
+	}
 
-		.user-grid-menu {
-			display: grid;
-			grid-template-columns: repeat(4, 1fr);
-			height: 192rpx;
-			margin-top: 60rpx;
-			background-color: #FFFFFF;
+	.user-grid-menu {
+		display: grid;
+		grid-template-columns: repeat(4, 1fr);
+		height: 192rpx;
+		margin-top: 60rpx;
+		background-color: #FFFFFF;
 
-			&>view {
-				@include display-flex-center;
-				flex-direction: column;
-				font-size: $fontSize3;
-				color: #333333;
-				cursor: pointer;
+		&>view {
+			@include display-flex-center;
+			flex-direction: column;
+			font-size: $fontSize3;
+			color: #333333;
+			cursor: pointer;
 
-				&.active {
-					background-color: rgba(0, 0, 0, 0.05)
-				}
-			}
-
-			.iconfont {
-				margin-bottom: 19rpx;
-				font-size: 44rpx;
+			&.active {
+				background-color: rgba(0, 0, 0, 0.05)
 			}
+		}
 
-			.icon-Heart,
-			.icon-xiaochengxu-toupiaoicon {
-				font-size: 48rpx;
-			}
+		.iconfont {
+			margin-bottom: 19rpx;
+			font-size: 44rpx;
 		}
 
-		.user-list-item {
-			margin-top: 23rpx;
-			.van-cell {
-				--cell-horizontal-padding: 58rpx;
-			}
+		.icon-Heart,
+		.icon-xiaochengxu-toupiaoicon {
+			font-size: 48rpx;
 		}
+	}
 
-		.ad-space {
-			height: 180rpx;
-			margin-top: 23rpx;
+	.user-list-item {
+		margin-top: 23rpx;
+
+		.van-cell {
+			--cell-horizontal-padding: 58rpx;
 		}
-	}</style>
+	}
+
+	.ad-space {
+		height: 180rpx;
+		margin-top: 23rpx;
+	}
+</style>