Browse Source

Merge branch 'master' of http://git.liuniu946.com/hwq/tianliPc

cmy 4 years ago
parent
commit
45cca6c637

+ 3 - 4
src/App.vue

@@ -23,12 +23,11 @@ export default {
 <style lang="scss" scoped>
 #app {
 	max-width: 1920px;
-	min-width: 1200px;
+	min-width: 1080px;
 	margin: 0 auto;
 }
 .main-wrapper {
-	max-width: 1920px;
-	min-width: 1200px;
+	width: 100%;
 	margin: 0 auto;
 }
 .bg {
@@ -39,7 +38,7 @@ export default {
 	// margin: 0 auto -300px;
 	height: 300px;
 	max-width: 1920px;
-	min-width: 1200px;
+	min-width: 1080px;
 	// background-image: url(assets/img/m1.png);
 	// background-size: auto 100%;
 	z-index: -1;

+ 41 - 109
src/components/leftNav/LeftNav.vue

@@ -1,28 +1,26 @@
 <template>
 	<div class="wrapper">
 		<div class="left-nav" :style="{height: navHeight}">
-			<div class="nav-title">善行共参与</div>
+			<div class="nav-title">
+				<div class="china">
+					关于我们
+				</div>
+				<div class="English">
+					About us
+				</div>
+			</div>
 			<div class="nav-item" v-for="item in navList" :key="item.id" :class="{'action': currentUrl.indexOf(item.path) !== -1 }" @click="navTo(item.path)">
 				<div class="item-name">
+					<div class="yuan">
+					</div>
 					{{item.name}}
 				</div>
 				<div class="item-icon">
-					>
+					
 				</div>
 			</div>
 		</div>
 		<div class="right-content">
-			<div class="title moren" v-if="isShow">
-				{{rightTitle}}
-			</div>
-			<template v-else>
-				<div class="title hand" style="display: inline-block;" :class="{'action': currentIndex !== 0}" @click="changeClik(0)">
-					基础知识
-				</div>
-				<div class="title hand" style="display: inline-block;" :class="{'action': currentIndex !== 1}" @click="changeClik(1)">
-					如何报名
-				</div>
-			</template>
 			<div style="padding: 35px 50px 35px 50px;" class="line">
 				<slot></slot>
 			</div>
@@ -40,73 +38,11 @@
 			}
 		},
 		computed: {
-			isShow() {
-				return this.$route.path !== '/donation/Hpc'
-			},
 			navHeight() {
 				return this.navList.length*51 + 52 + 'px'
 			},
 			currentUrl() {
 				return this.$route.path
-			},
-			rightTitle() {
-				let title = ''
-				switch(this.currentUrl) {
-				     case '/donation/contribution':
-				        title = '我要捐款'
-				        break;
-				     case '/donation/organDonation':
-				         title = '我要捐献器官'
-				        break;
-					case '/join/rescue':
-					    title = '我要成为救护员'
-					   break;
-					case '/join/member':
-						title = '我要成为会员'
-						break
-					case '/join/volunteer':
-						title = '我要成为志愿者'
-						break
-					case '/join/train':
-						title = '报名普及培训'
-						break
-					case '/about':
-						title = '关于我们'
-						break
-					case '/concat':
-						title = '联系我们'
-						break
-					case '/popularScience/list':
-						title = '红会科普'
-						break
-					case '/popularScience/detail':
-						title = '红会科普'
-						break
-					case '/news/list':
-						title = '红会新闻'
-						break
-					case '/news/detail':
-						title = '红会新闻'
-						break
-					case '/publicity/list':
-						title = '信息公示'
-						break
-					case '/publicity/detail':
-						title = '信息公示'
-						break
-					case '/regulations/detail':
-						title = '政策法规'
-						break
-					case '/regulations/list':
-						title = '政策法规'
-						break
-					case '/regulations':
-						title = '政策法规'
-						break
-				     default:
-				        title = ''
-				}
-				return title
 			}
 		},
 		data() {
@@ -133,9 +69,11 @@
 
 <style lang="scss" scoped>
 	.wrapper {
-		width: 1200px;
+		margin-top: 20px;
+		max-width: 1920px;
+		min-width: 1080px;
 		display: flex;
-		justify-content: space-between;
+		justify-content: flex-start;
 		
 	}
 	.left-nav {
@@ -143,67 +81,61 @@
 		// height: 154px;
 		box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
 		.nav-title {
-			height: 52px;
-			background-color: #d82020;
-			line-height: 52px;
+			background-color: #0165B5;
 			text-align: center;
-			font-size: 18px;
+			font-size: 20px;
 			font-family: PingFang SC;
 			font-weight: bold;
 			color: #FFFFFF;
 			letter-spacing:3px;
 			cursor:default;
+			padding: 25px 0 50px 30px;
+			text-align: left;
+			.English {
+				margin-top: 20px;
+			}
 		}
 		.nav-item {
 			cursor:pointer;
-			border-top: 1px #fcfbfb solid;
+			margin-top: 5px;
 			display: flex;
+			align-items: center;
 			height: 50px;
 			background-color: #f2eeef;
 			justify-content: space-between;
 			line-height: 50px;
 			padding: 0 37px 0 26px;
 			.item-name {
+				display: flex;
 				font-size: 16px;
 				font-family: PingFang SC;
 				font-weight: bold;
 				color: #333333;
-				letter-spacing:1px
+				letter-spacing:1px;
+				align-items: center;
+				.yuan {
+					width: 10px;
+					height: 10px;
+					border-radius: 50%;
+					background: #98B6CE;
+					margin-right: 10px;
+				}
 			}
 			.item-icon {
-				font-size: 16px;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #999999;
+				width: 10px;
+				height: 10px;
+				background: #0165B5;
 			}
 		}
 		.action {
-			background-color: #f7dfdf;
+			background-color: #B2D0E9;
 		}
 	}
 	.right-content {
+		margin-left: 20px;
 		width: 915px;
-		min-height: 706px;
-		border-top: 2px solid #D82020;
-		box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
-		.title {
-			border: 2px #d82020 solid;
-			width: 156px;
-			height: 50px;
-			line-height: 50px;
-			text-align: center;
-			background: #D82020;
-			font-size: 18px;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #FFFFFF;
-			position: relative;
-			top: -2px;
-		}
-		.action {
-			background: #FFFFFF;
-			color: #D82020;
-		}
+		min-height: 700px;
+		
 	}
 	.line {
 		line-height: 1.5;

+ 25 - 0
src/components/navBar/NavBar.vue

@@ -61,8 +61,33 @@ export default {
 				console.log(this.currentIndex);
 				this.$router.push(url);
 			}
+<<<<<<< HEAD
+		],
+		currentIndex: 0
+	};
+  },
+  computed: {
+	  currentUrl() {
+		  return this.$route.path
+	  }
+  },
+  methods: {
+	  navClick(url,index) {
+		  let currentUrl = this.$route.path
+		  if(currentUrl === url) {
+			  return 
+		  }else {
+			 this.currentIndex = index
+			 this.$router.push(url) 
+		  }
+		  
+		  
+	  }
+  }
+=======
 		}
 	}
+>>>>>>> 3eb8156c5037847aa2ac2d617689590b9a3d19c7
 };
 </script>
 

+ 59 - 1
src/router/index.js

@@ -1,7 +1,58 @@
 import Vue from 'vue'
 import Router from 'vue-router'
-const routerPush = Router.prototype.push  
+const routerPush = Router.prototype.push
 Vue.use(Router)
+<<<<<<< HEAD
+const ter = new Router({
+	// mode: 'history',
+	base: process.env.BASE_URL,
+	routes: [{
+			path: '/',
+			redirect: '/home'
+		},
+		{
+			path: '/home',
+			name: 'home',
+			component: () => import('../views/Home.vue'),
+			meta: {
+				title: '添利'
+			}
+		},
+		{
+			path: '/about',
+			name: 'about',
+			component: () => import('../views/About.vue'),
+			redirect: '/about/Company',
+			meta: {
+				title: '关于我们'
+			},
+			children: [{
+					path: 'company',
+					name: 'company',
+					component: () => import('../views/about/Company.vue'),
+					meta: {
+						title: '公司介绍'
+					}
+				},
+				{
+					path: 'Concat',
+					name: 'concat',
+					component: () => import('../views/about/Concat.vue'),
+					meta: {
+						title: '联系我们'
+					}
+				},
+				{
+					path: 'Product',
+					name: 'product',
+					component: () => import('../views/about/Product.vue'),
+					meta: {
+						title: '产品介绍'
+					}
+				}
+			]
+		}
+=======
 const ter =  new Router({
   // mode: 'history',
   base: process.env.BASE_URL,
@@ -34,6 +85,13 @@ const ter =  new Router({
 })
 
 
+>>>>>>> 3eb8156c5037847aa2ac2d617689590b9a3d19c7
 
+		// {
+		// 	path: '*',
+		// 	redirect: '/home'
+		// }
+	]
+})
 
 export default ter

+ 1 - 1
src/utils/request.js

@@ -1,5 +1,5 @@
 import axios from 'axios'
-import router from '../router.js'
+import router from '../router/index.js'
 import {
 	Message
 } from 'element-ui'

+ 5 - 3
src/views/About.vue

@@ -1,8 +1,8 @@
 <template>
 	<div class="about">
-		<left-nav :navList="navList">
+		<left-nav :navList="navList" :rightTitle="rightTitle" :currentIndex="currentIndex">
 			<div id="" v-html="content">
-				
+				<router-view></router-view>
 			</div>
 		</left-nav>
 	</div>
@@ -16,7 +16,9 @@ export default {
 	},
 	data(){
 		return {
-			navList:[{index:0,name:'公司介绍',path:'/about'},{index:1,name:'产品介绍',path:'/product'},{index:2,name:'联系我们',path:'/concat'}]
+			navList:[{index:0,name:'公司介绍',path:'/about/Company'},{index:1,name:'产品介绍',path:'/about/Product'},{index:2,name:'联系我们',path:'/about/Concat'}],
+			rightTitle:'关于我们',
+			currentIndex: 0
 		}
 	}
 }

+ 0 - 8
src/views/Concat.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 0 - 8
src/views/Product.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 27 - 0
src/views/about/Company.vue

@@ -0,0 +1,27 @@
+<template>
+	<div class="center">
+		<div class="" v-html="text">
+		</div>
+	</div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				text: ''
+			}
+		},
+		created() {
+			this.getContent()
+		},
+		methods: {
+			getContent() {
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped="">
+</style>

+ 27 - 0
src/views/about/Concat.vue

@@ -0,0 +1,27 @@
+<template>
+	<div class="center">
+		<div class="" v-html="text">
+		</div>
+	</div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				text: ''
+			}
+		},
+		created() {
+			this.getContent()
+		},
+		methods: {
+			getContent() {
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped="">
+</style>

+ 27 - 0
src/views/about/Product.vue

@@ -0,0 +1,27 @@
+<template>
+	<div class="center">
+		<div class="" v-html="text">
+		</div>
+	</div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				text: ''
+			}
+		},
+		created() {
+			this.getContent()
+		},
+		methods: {
+			getContent() {
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped="">
+</style>