wangmengwei 3 years ago
parent
commit
a3e66ba736
3 changed files with 99 additions and 20 deletions
  1. 74 9
      index.html
  2. 20 0
      static/css/style.css
  3. 5 11
      static/js/header.js

+ 74 - 9
index.html

@@ -83,7 +83,7 @@
 					<div class="u-fullpart nopd">
 						<div class="container full">
 							<div class="u-banner">
-								<el-carousel trigger="click" height="410px">
+								<el-carousel trigger="click"  class="nhyeowe">
 									<el-carousel-item v-for="item,index in imalise" :key="item.imageId">
 										<img style="width: 100%; height: 100%;"
 											:src="'https://jyzx.qs163.cn' + '/prod-api'+ item.imageContent" alt="">
@@ -115,7 +115,7 @@
 								</div>
 								<div class="tout_two" >
 									<p @click="nhyeskf(ttjues[0])">{{ ttjues.length == 0 ? '暂无数据' : ttjues[0].newsTitle}}</p>
-									<p> <span @click="nhyeskf(ttjues[1])">{{ ttjues.length >= 1?   ttjues[1].newsTitle :'暂无数据'}}</span> | <span @click="nhyeskf(ttjues[2])">{{  ttjues.length >= 2?   ttjues[2].newsTitle :'暂无数据'}}</span>  </p>
+									<p> <span @click="nhyeskf(ttjues[1])">{{ ttjues.length == 2? ttjues[1].newsTitle : ttjues.length > 2? ttjues[1].newsTitle :'暂无数据'}}</span> | <span @click="nhyeskf(ttjues[2])">{{  ttjues.length == 3?   ttjues[2].newsTitle : ttjues.length > 3? ttjues[2].newsTitle :'暂无数据'}}</span>  </p>
 								</div>
 							</div>
 						</div>
@@ -206,16 +206,16 @@
 							<div class="container">
 								<div class="wagnshi">
 									<div class="wagnshi_one">
-										<img src="static/picture/pic_bsfw_wssj@2x.png">
+										<img src="static/picture/pic_bsfw_wssj@2x.png" @click="bheus(0)">
 									</div>
 									<div class="wagnshi_two wagnshi_one">
-										<img src="static/picture/pic_bsfw_sjlc@2x.png">
+										<img src="static/picture/pic_bsfw_sjlc@2x.png" @click="bheus(1)">
 									</div>
 									<div class="wagnshi_ther wagnshi_one">
-										<img src="static/picture/pic_bsfw_bgcx@2x.png">
+										<img src="static/picture/pic_bsfw_bgcx@2x.png" @click="bheus(2)">
 									</div>
 									<div class="wagnshi_four wagnshi_one">
-										<img src="static/picture/pic_bsfw_lxwm@2x.png">
+										<img src="static/picture/pic_bsfw_lxwm@2x.png" @click="bheus(3)">
 									</div>
 								</div>
 							</div>
@@ -328,7 +328,11 @@
 						dueus:[],
 						dheyw:'',
 						ttjues:[],
-						nhyeis:''
+						nhyeis:'',
+						wsh:{},
+						sjlc:{},
+						baogao:{},
+						lxis:{}
 						
 					},
 					created() {
@@ -336,15 +340,58 @@
 						this.smillimg() //小图轮播
 						this.goese()//通知公告
 						this.newsli() //新闻标题
-						
 						this.boonews()//底部导航
 						this.frihde()//友情链接
 						this.newslieutt()//头条
+						this.gettablistde()
 					},
 					mounted() {
 						// console.log(this.getQueryString("id"))
 					},
 					methods: {
+						gettablistde(){
+										  var that = this
+										  $.ajax({
+											  url:'https://jyzx.qs163.cn/prod-api/gateway/query/treeselect',
+											  type:'get',
+											  data:'',
+											  dataType:'json',
+											  success:function(res){
+												console.log(res,765) 
+												if(res.code == 200){
+													res.data.filter( router=> {
+														if(router.children !== undefined){
+															if(router.children.length !== 0){
+																router.children.filter(rou =>{
+																	if(rou.label == '网上送检'){
+																		that.wsh = rou
+																		
+																	}
+																	if(rou.label == '送检流程'){
+																		that.sjlc = rou
+																	}
+																	if(rou.label == '报告查询'){
+																		that.baogao = rou
+																	}
+																	if(rou.label == '联系我们'){
+																		that.lxis = rou
+																	}
+																	
+																})
+															}
+														}
+													})
+													console.log(that.wsh,that.sjlc,that.baogao,that.lxis)
+												}else{
+													that.$message({
+													          message: res.msg,
+													          type: 'error'
+													        });
+												}
+												// console.log(that.tablide,765) 
+											  }
+										  })
+						},
 			 		// 大图轮播图
 						gettablist() {
 							var that = this
@@ -459,7 +506,7 @@
 						// 头条
 						newslieutt(val){
 							var that = this
-							let hes = {columnId:val,pageSize:6,pageNum:1}
+							let hes = {columnId:val,pageSize:6,pageNum:1,isTop:'Y'}
 							$.ajax({
 									url: 'https://jyzx.qs163.cn/prod-api/gateway/query/getNewS',
 									type: 'post',
@@ -473,6 +520,7 @@
 												res.rows = nhdye
 											}
 											that.ttjues = res.rows
+											console.log(that.ttjues.length)
 										} else {
 											that.$message({
 												message: res.msg,
@@ -634,6 +682,23 @@
 							}else{
 								window.location.href="djdt.html?" +'&titel=头条'   + '&ntitel=头条'  + '&openMode=0' 
 							}					
+						},
+						// 网上送检跳转
+						bheus(index){
+							// console.log(index,this.wsh,this.sjlc,this.baogao,this.lxis)
+							// if(index == 0){
+							// 	window.location.href="djdt.html?id=" + this.wsh.id +'&titel=' + this.wsh.label + '&ntitel=' + '首页'  + '&openMode=' + this.wsh.openMode
+							// }
+							// if(index == 1){
+							// 	window.location.href="djdt.html?id=" + this.sjlc.id +'&titel=' + this.sjlc.label + '&ntitel=' + '首页'  + '&openMode=' + this.sjlc.openMode
+							// }
+							// if(index == 3){
+							// 	window.location.href="djdt.html?id=" + this.baogao.id +'&titel=' + this.baogao.label + '&ntitel=' + '首页'  + '&openMode=' + this.baogao.openMode
+							// }
+							// if(index == 3){
+							// 	window.location.href="djdt.html?id=" + this.lxis.id +'&titel=' + this.lxis.label + '&ntitel=' + '首页'  + '&openMode=' + this.lxis.openMode
+							// }
+							
 						}
 						
 						

+ 20 - 0
static/css/style.css

@@ -1364,6 +1364,13 @@ footer .foot p a:hover {
   background: none no-repeat center;
   background-size: cover;
 }
+.u-banner .nhyeowe{
+	  height: 410px !important;
+  }
+  
+  .u-banner .nhyeowe .el-carousel__container{
+  	  height: 410px !important;
+  }
 .u-banner .carousel-indicators li {
   width: 12px;
   height: 12px;
@@ -1378,6 +1385,19 @@ footer .foot p a:hover {
   .u-banner .i {
     height: 150px;
   }
+  .u-banner .nhyeowe{
+	  height: 86px !important;
+  }
+  .u-banner .nhyeowe .el-carousel__container{
+  	  height: 86px !important;
+  }
+ 
+  .u-banner img {
+    /* width: auto !important;
+	height: auto !important;
+	max-width: 100%;
+	max-height: 100%; */
+  }
   .u-banner .carousel-indicators {
     bottom: 8px;
   }

+ 5 - 11
static/js/header.js

@@ -10,7 +10,7 @@
 // document.writeln("										");
 // document.writeln("										<!-- <script src=\'static/js/time.js\'></script> -->");
 // document.writeln("										<div class=\'loca\'>");
-// document.writeln("											<span> 欢迎访问 刷制品质量监督检验中心 !  今天{{date_show}} {{week}}</span>");
+// document.writeln("											<span> 欢迎访问 安徽省刷制品质量监督检验中心 !  今天{{date_show}} {{week}}</span>");
 // document.writeln("										</div>");
 // document.writeln("										 <div class=\'srch\'><input type=\'text\' class=\'tt\' placeholder=\'输入要查找的信息\' v-model=\'inpute\' @blur=\'inpubie\'/> <img");
 // document.writeln("												src=\'static/picture/icon_ztl_ss@2x.png\' @click=\'nhyesee\'> </div>");
@@ -63,7 +63,7 @@
 			heyseks:'',
 		  },
 		  created() {
-		  	// console.log(234)
+		  	console.log(234)
 			this.getdataTime()
 			this.gettablist()
 			// Vue.$forceUpdate();
@@ -109,6 +109,7 @@
 				  window.location.href = "ss.html?" + encodeURI(nhye)
  
 			  },
+			  
 			  tabcl(val,index){
 				  this.nue = index
 				  if(index == "首页"){
@@ -117,14 +118,7 @@
 				  console.log(val,index)
 			  },
 			  jeuese(index){  
-				  if(index.label=='报告查询'){
-					   window.location.href="bgcx.html"
-				  }else if(index.label=='网上送检'){
-					  window.location.href="wshsj.html"
-				  }else{
-					 window.location.href="djdt.html?id=" + index.id +'&titel=' + index.label + '&ntitel=' + this.hyesfr  + '&openMode=' + index.openMode 
-				  }
-				  // console.log(index.label)
+				  console.log(index.label)
 				 //  if(index == 25 || index == 26 ||index ==33 || index ==33 || index == 20 || index ==21 || index==24){
 				 //  window.location.href="jgjj.html?id=" + index +'&titel=' + val + '&ntitel=' + this.hyesfr
 				 //  }else if(index == 32){
@@ -134,7 +128,7 @@
 				 //  }
 				  
 				  // else {
-					// window.location.href="djdt.html?id=" + index.id +'&titel=' + index.label + '&ntitel=' + this.hyesfr  + '&openMode=' + index.openMode
+					window.location.href="djdt.html?id=" + index.id +'&titel=' + index.label + '&ntitel=' + this.hyesfr  + '&openMode=' + index.openMode
 				  // }
 				  // if(index == 1){
 					 //  // this.$router.push('/index.html');