hwq 3 jaren geleden
bovenliggende
commit
4f4f931865

+ 2 - 1
src/App.vue

@@ -27,7 +27,8 @@ export default {
 	margin: 0 auto;
 }
 .main-wrapper {
-	width: 1200px;
+	max-width: 1920px;
+	min-width: 1200px;
 	margin: 0 auto;
 }
 .bg {

BIN
src/assets/img/i1.png


BIN
src/assets/img/i2.png


BIN
src/assets/img/i3.png


BIN
src/assets/img/i4.png


BIN
src/assets/img/i5.png


BIN
src/assets/img/i6.png


BIN
src/assets/img/i7.png


BIN
src/assets/img/i8.png


BIN
src/assets/img/logo.png


BIN
src/assets/img/m2.png


+ 7 - 3
src/components/navBar/NavBar.vue

@@ -2,7 +2,7 @@
   <div>
     <div class="top-bar">
 	  <div class="img">
-	  	<img src="" >
+	  	<img src="../../assets/img/logo.png" >
 	  </div>
 	  <div class="barbox">
         <div class="bar-item" v-for="( item, index ) in navList" :key="index" @click="navClick(item.path,index)" :class="{'action':currentUrl.indexOf(item.path) !=-1}">
@@ -70,7 +70,8 @@ export default {
 
 <style lang="scss" scoped>
 .top-bar {
-  width: 1200px;
+  max-width: 1920px;
+  min-width: 1200px;
   height: 140px;
   margin: 0 auto;
   padding: 35px 97px 0 122px;
@@ -86,7 +87,10 @@ export default {
   .img {
 	  width: 373px;
 	  height: 94px;
-	  background: #00B0E8;
+	  img {
+		  width: 100%;
+		  height: 100%;
+	  }
   }
   .barbox {
 	display: flex;

+ 6 - 3
src/components/swiper/swiper.vue

@@ -33,14 +33,17 @@ export default {
 
 <style lang="scss">
 .home-swiper {
-	width: 1200px;
+	max-width: 1920px;
+	min-width: 1200px;
 	height: 484px;
 	// background: pink;
 	margin: -20px auto 24px;
 	el-carousel {
-		width: 1200px;
+		max-width: 1920px;
+		min-width: 1200px;
 		el-carousel-item {
-			width: 1200px;
+			max-width: 1920px;
+			min-width: 1200px;
 			height: 484px;
 		}
 	}

+ 2 - 1
src/store.js

@@ -5,7 +5,8 @@ Vue.use(Vuex)
 
 export default new Vuex.Store({
   state: {
-	www: "http://tianli.liuniu946.com"
+	  www:""
+	// www: "http://tianli.liuniu946.com"
   },
   mutations: {
 

+ 132 - 117
src/views/Home.vue

@@ -1,41 +1,47 @@
 <template>
 	<div class="home">
-		
-		<div class="news-wrapper">
-			<div class="new-pic" @click="navTo('/news/detail?id='+ showNew.id)">
-				<img :src="showNew.img">
-				<div class="title clamp hand">
-					{{showNew.title}}
+		<div class="company">
+			<div class="company-left">
+				<div class="title-box">
+					<item-title title="公司介绍" :topath="'/publicity'"></item-title>
 				</div>
 			</div>
-			<div class="news">
-				<item-title title="红会新闻" :topath="'/news'"></item-title>
-				<div class="item-wrapper">
-					<div class="new-item hand" v-for="item in redNews" :key="item.id" @click="navTo('/news/detail?id='+ item.id)">
-						<div class="title clamp ">
-							<span></span>
-							{{ item.title }}
-						</div>
-						<div class="time">{{ item.release_time?item.release_time:item.add_time | time }}</div>
-					</div>
-				</div>
+			<div class="company-right">
+				<img src="" >
 			</div>
 		</div>
 		<div class="home-body">
-			<div class="body-left moren">
-				<div class="red-new">
-					<item-title title="信息公示" :topath="'/publicity'"></item-title>
+			<div class="news-wrapper">
+				<div class="new-pic" @click="navTo('/news/detail?id=' + showNew.id)">
+					<img :src="showNew.img" />
+					<div class="title clamp hand">{{ showNew.title }}</div>
+				</div>
+				<div class="body-left moren">
+					<div class="red-new">
+						<item-title title="案例展示" :topath="'/publicity'"></item-title>
+						<div class="item-wrapper">
+							<div class="new-item hand" v-for="item in openNews" :key="item.id" @click="navTo('/publicity/detail?id=' + item.id)">
+								<div class="title clamp ">
+									<span></span>
+									{{ item.title }}
+								</div>
+								<div class="time">{{ item.release_time ? item.release_time : item.add_time | time }}</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="news">
+					<item-title title="新闻动态" :topath="'/news'"></item-title>
 					<div class="item-wrapper">
-						<div class="new-item hand" v-for="item in openNews" :key="item.id" @click="navTo('/publicity/detail?id='+ item.id)">
-							<div class="title clamp ">
+						<div class="new-item hand" v-for="item in redNews" :key="item.id" @click="navTo('/news/detail?id=' + item.id)">
+							<div class="title clamp">
 								<span></span>
 								{{ item.title }}
 							</div>
-							<div class="time">{{ item.release_time?item.release_time:item.add_time | time }}</div>
+							<div class="time">{{ item.release_time ? item.release_time : item.add_time | time }}</div>
 						</div>
 					</div>
 				</div>
-				
 			</div>
 		</div>
 	</div>
@@ -44,15 +50,13 @@
 <script>
 import ItemTitle from './homeChild/ItemTitle.vue';
 
-import { loadIndexs, splist, loveList, friendList , newsList, openList, banner, regulationList } from '../request/api.js';
+import { loadIndexs, splist, loveList, friendList, newsList, openList, banner, regulationList } from '../request/api.js';
 export default {
 	components: {
 		ItemTitle
 	},
 	data() {
 		return {
-			
-			
 			// jxList: [],
 			spList: [],
 			imgList: [],
@@ -68,45 +72,42 @@ export default {
 		getTime(val) {
 			let date = new Date(val * 1000);
 			let Y = date.getFullYear();
-			let M = date.getMonth() +1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
+			let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
 			let D = date.getDate() < 10 ? '0' + date.getDay() : date.getDate();
 			return Y + '.' + M + '.' + D;
 		},
 		time(val) {
-			let arr = val.split(' ')
-			let str = arr[0]
-			str = str.replace(/-/g, '.')
-			return str
+			let arr = val.split(' ');
+			let str = arr[0];
+			str = str.replace(/-/g, '.');
+			return str;
 		}
 	},
-	computed:{
+	computed: {
 		jxList() {
-			return this.moreJxList.slice(0,3)
+			return this.moreJxList.slice(0, 3);
 		},
 		showNew() {
-			
-			let obj =this
-			if(obj.redNews[0]){
+			let obj = this;
+			if (obj.redNews[0]) {
 				let data = {
 					id: obj.redNews[0].id,
 					img: obj.redNews[0].image_input[0],
 					title: obj.redNews[0].title
-					
-				}
-				return data
+				};
+				return data;
 			}
-			
-			return {}
+
+			return {};
 		}
 	},
 	created() {
-		this.getSwiperList()
+		this.getSwiperList();
 		this.getIndex();
 		this.getFirstAidList();
 		this.getJxList();
-		this.getNewsList()
-		this.getOpenList(),
-		this.getRegulationList()
+		this.getNewsList();
+		this.getOpenList(), this.getRegulationList();
 	},
 	methods: {
 		navTo(url) {
@@ -139,65 +140,64 @@ export default {
 					}
 					let date = new Date(item.add_time * 1000);
 					let Y = date.getFullYear();
-					let M = date.getMonth()+1 < 10 ? '0' + (date.getMonth()+1) : date.getMonth() + 1;
+					let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
 					let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
 					item.time = Y + '/' + M + '/' + D;
 					return item;
 				});
-				obj.gundong()
+				obj.gundong();
 			});
 		},
 		gundong() {
-			let obj = this
-			obj.timer = setTimeout(()=> {
-				obj.moreJxList.push(obj.moreJxList.shift())
+			let obj = this;
+			obj.timer = setTimeout(() => {
+				obj.moreJxList.push(obj.moreJxList.shift());
 				// console.log(obj.moreJxList)
-				obj.gundong()
-			},2000)
+				obj.gundong();
+			}, 2000);
 		},
 		getNewsList() {
-			let obj = this
+			let obj = this;
 			newsList({
 				page: 1,
 				limit: 9
 			}).then(res => {
-				obj.redNews = res.data.list
-			})
+				obj.redNews = res.data.list;
+			});
 		},
 		getOpenList() {
-			let obj = this
+			let obj = this;
 			openList({
 				page: 1,
 				limit: 9
 			}).then(res => {
-				obj.openNews = res.data.list
+				obj.openNews = res.data.list;
 				// console.log(obj.openNews)
-			})
+			});
 		},
 		getSwiperList() {
-			let obj = this
+			let obj = this;
 			banner().then(res => {
-				let list = res.data.list.map( item => {
-					return item.image_input[0]
-				})
-				obj.swiperList= list
-			})
+				let list = res.data.list.map(item => {
+					return item.image_input[0];
+				});
+				obj.swiperList = list;
+			});
 		},
 		getRegulationList() {
-			let obj = this
+			let obj = this;
 			regulationList({
 				page: 1,
 				limit: 6
 			}).then(res => {
-				obj.regulationList = res.data.list
-			})
+				obj.regulationList = res.data.list;
+			});
 		}
 	}
 };
 </script>
 
 <style lang="scss" spcode>
-
 .news-wrapper {
 	width: 1200px;
 	display: flex;
@@ -223,7 +223,7 @@ export default {
 			font-size: 24px;
 			font-family: inpinheiti;
 			font-weight: 400;
-			color: #FFFFFF;
+			color: #ffffff;
 			position: absolute;
 			bottom: 0;
 		}
@@ -231,10 +231,27 @@ export default {
 	.news {
 		width: 659px;
 		height: 344px;
-		background: #FFFFFF;
+		background: #ffffff;
 		box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
 	}
 }
+.company {
+	margin-top: 49px;
+	width: 1980px;
+	display: flex;
+	justify-content: start;
+	padding: 0 75px 72px 51px;
+	.company-left{
+		padding-top: 21px;
+		width: 900px;
+		height: 414px;
+	}
+	.company-right {
+		width: 917px;
+		height: 414px;
+		background: #55aaff;
+	}
+}
 .home-body {
 	width: 1200px;
 	margin: 24px auto;
@@ -258,7 +275,7 @@ export default {
 		}
 		.item-wrapper {
 			padding: 20px 15px 0 13px;
-			
+
 			.new-item {
 				display: flex;
 				justify-content: space-between;
@@ -282,7 +299,6 @@ export default {
 					// border-radius: 50%;
 					transform: rotate(45deg);
 					margin-right: 8px;
-					
 				}
 				.title {
 					width: 400px;
@@ -442,50 +458,49 @@ export default {
 	}
 }
 .item-wrapper {
-			padding: 20px 15px 0 13px;
-			
-			.new-item {
-				display: flex;
-				justify-content: space-between;
-				margin-bottom: 17px;
-				&:hover {
-					span {
-						background: red;
-					}
-					.title {
-						color: red;
-					}
-					.time {
-						color: red;
-					}
-				}
-				span {
-					display: inline-block;
-					width: 8px;
-					height: 8px;
-					background: #d8d8d8;
-					// border-radius: 50%;
-					transform: rotate(45deg);
-					margin-right: 8px;
-					
-				}
-				.title {
-					width: 400px;
-					height: 14px;
-					font-size: 14px;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #101010;
-					// &:hover {
-					// 	color: red;
-					// }
-				}
-				.time {
-					font-size: 14px;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #999999;
-				}
+	padding: 20px 15px 0 13px;
+
+	.new-item {
+		display: flex;
+		justify-content: space-between;
+		margin-bottom: 17px;
+		&:hover {
+			span {
+				background: red;
+			}
+			.title {
+				color: red;
 			}
+			.time {
+				color: red;
+			}
+		}
+		span {
+			display: inline-block;
+			width: 8px;
+			height: 8px;
+			background: #d8d8d8;
+			// border-radius: 50%;
+			transform: rotate(45deg);
+			margin-right: 8px;
 		}
+		.title {
+			width: 400px;
+			height: 14px;
+			font-size: 14px;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #101010;
+			// &:hover {
+			// 	color: red;
+			// }
+		}
+		.time {
+			font-size: 14px;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+		}
+	}
+}
 </style>

+ 43 - 50
src/views/homeChild/ItemTitle.vue

@@ -1,63 +1,56 @@
 <template>
-  <div class="item-title">
-    <div class="title moren">{{title}}</div>
-    <div class="more hand" v-if="isShow === '1'" @click="loadMore" >【查看更多】</div>
-  </div>
+	<div class="item-title">
+		<div class="title moren">{{ title }}</div>
+		<div class="more hand" v-if="isShow === '1'" @click="loadMore">更多>></div>
+	</div>
 </template>
 
 <script>
 export default {
-  props: {
-    title: {
-      type: String,
-      default: ''
-    },
-	isShow: {
-		type: String,
-		default: '1'
+	props: {
+		title: {
+			type: String,
+			default: ''
+		},
+		isShow: {
+			type: String,
+			default: '1'
+		},
+		topath: {
+			type: String,
+			default: '/home'
+		}
 	},
-	topath: {
-		type: String,
-		default: '/home'
+	methods: {
+		loadMore() {
+			this.$router.push(this.topath);
+		}
 	}
-  },
-  methods: {
-	  loadMore() {
-		 this.$router.push(this.topath) 
-	  }
-  }
 };
 </script>
 
 <style lang="scss" scoped>
 .item-title {
-  height: 40px;
-  border-top: 2px solid #d82020;
-  display: flex;
-  justify-content: space-between;
-  padding-right: 8px;
-  .title {
-	text-align: center;
-    font-size: 16px;
-    font-family: PingFang SC;
-    font-weight: bold;
-    color: #ffffff;
-    width: 120px;
-    height: 38px;
-    line-height: 40px;
-    background-color: #d82020;
-	position: relative;
-	top: -1px;
-	letter-spacing:2px
-  }
-  .more {
-    display: inline-block;
-    height: 38px;
-    line-height: 38px;
-    font-size: 14px;
-    font-family: PingFang SC;
-    font-weight: bold;
-    color: #666666;
-  }
+	border-bottom: 2px solid #0165b5;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	padding-right: 8px;
+	.title {
+		text-align: center;
+		font-size: 42px;
+		font-family: Adobe Heiti Std;
+		font-weight: normal;
+		color: #ffffff;
+		padding: 5px;
+		background-color: #0165b5;
+	}
+	.more {
+		display: inline-block;
+		font-size: 20px;
+		font-family: Adobe Heiti Std;
+		font-weight: normal;
+		color: #0165B5;
+	}
 }
-</style>
+</style>

+ 10 - 1
vue.config.js

@@ -13,6 +13,15 @@ module.exports = {
     overlay: {
       warnings: false,
       errors: true
-    }
+    },
+	proxyTable: {
+		'/apis': {
+			target:'http://tianli.liuniu946.com',
+			changOrigin: true,
+			pathRewrite: {
+				'^/apis':'/apis'
+			}
+		}
+	}
   }
 }