lsw 10 months ago
parent
commit
5c75caca7b
2 changed files with 10 additions and 5 deletions
  1. 6 1
      app/pages/news/index.vue
  2. 4 4
      app/pages/serve/index.vue

+ 6 - 1
app/pages/news/index.vue

@@ -24,11 +24,12 @@ export default {
 			current: 0,
 			tab: [],
 			list: [],
-			param: { pageNum: 1, pageSize: 10 },
+			param: { pageNum: 1, pageSize: 10, type: '新闻资讯' },
 			loadMore: true
 		};
 	},
 	onLoad(e) {
+		this.param.type = e.type || '新闻资讯';
 		this.getType();
 		this.getData();
 	},
@@ -58,6 +59,10 @@ export default {
 				loading: 'false',
 				success: (res) => {
 					this.tab = res.data.data;
+					let obj = this.tab.filter((item) => item.dictLabel == this.param.type);
+					if (obj.length > 0) {
+						this.current = this.tab.indexOf(obj[0]);
+					}
 				}
 			});
 		},

+ 4 - 4
app/pages/serve/index.vue

@@ -2,7 +2,7 @@
 	<view class="main">
 		<!--轮播图-->
 		<view class="banner">
-			<u-swiper circular :radius="5" :indicator="true" keyName="pic" :list="bannerList" :height="150" class="uni-swiper" @click="click"></u-swiper>
+			<u-swiper circular :radius="5" :indicator="true" keyName="pic" :list="bannerList" :height="160" class="uni-swiper" @click="click"></u-swiper>
 		</view>
 		<!--菜单-->
 		<view class="menu">
@@ -60,7 +60,7 @@
 			<view class="gg">
 				<view class="title">最新资讯</view>
 				<view class="bor"></view>
-				<view class="more" @click="go('/pages/news/index')">
+				<view class="more" @click="go('/pages/news/index?type=新闻资讯')">
 					<text>更多</text>
 					<text class="icon">&#xe62b;</text>
 				</view>
@@ -77,14 +77,14 @@
 			<view class="item" style="height: 190px">
 				<view class="out" style="padding-right: 0px" @click="go('/pages/news/index?type=就业政策')">
 					<view class="int" style="height: 175px; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2)">
-						<image :src="img.a2"  style="height: 180px; width: 100%"></image>
+						<image :src="img.a2" style="height: 180px; width: 100%"></image>
 					</view>
 				</view>
 			</view>
 			<view class="item" style="height: 190px">
 				<view class="out">
 					<view class="int">
-						<view class="it" style="height: 80px" @click="go('/pages/news/index?type=就业政策')">
+						<view class="it" style="height: 80px" @click="go('/pages/news/index?type=人才政策')">
 							<image :src="img.a3" mode="aspectFill" style="height: 85px; width: 100%"></image>
 						</view>
 						<view class="it" style="height: 86px; margin-top: 10px" @click="go('/pages/news/index?type=创业政策')">