Browse Source

首页,验证修改

zouling 3 years ago
parent
commit
ae540b8250
7 changed files with 211 additions and 58 deletions
  1. 8 4
      djdt.html
  2. 44 27
      index.html
  3. 14 4
      jgjj.html
  4. 34 0
      static/css/drag.css
  5. 1 1
      static/css/index.css
  6. 5 1
      static/css/printstyle.css
  7. 105 21
      wshsj.html

+ 8 - 4
djdt.html

@@ -106,7 +106,7 @@
 							<div class="p_box_tit cf"><p class="fl p_box_titl">{{tiles}}</p></div>
 							<div class="pd10 pf_list">
 								<ul>
-									<li v-for=" item,index in newsleisL" :key="item.newsId" @click="nhueyfr(item.newsId)"  v-if="shouewfr == 0">
+									<li v-for=" item,index in newsleisL" :key="item.newsId" @click="nhueyfr(item.newsId,item)"  v-if="shouewfr == 0">
 										<!-- v-if="item.openMode == 1" -->
 										<a href="javascript:void(0)" class="cf">
 											<div class="fl">
@@ -122,7 +122,7 @@
 								</ul>
 								<div class="container">
 									<div class="zzhijn" v-if="shouewfr == 1">
-										<div class="zhhsiimd" v-for="item,index in newsleisL" @click="nhueyfr(item.newsId)":key="index" >
+										<div class="zhhsiimd" v-for="item,index in newsleisL" @click="nhueyfr(item.newsId,item)":key="index" >
 											<img :src="item.newsImage == null? 'static/picture/pic_zznl_lt@2x.png' : item.newsImage == undefined ? 'static/picture/pic_zwtp_normal.png' : 'https://jyzx.qs163.cn'+  '/prod-api'+ item.newsImage " >
 											<p>{{item.newsTitle == null? '暂无数据' :item.newsTitle }}</p>
 										</div>
@@ -320,8 +320,12 @@
 					  return  nju
 		},
 		// 跳转详情页面
-		nhueyfr(index){
-			window.location.href="jgjj.html?id=" + index +'&titel=' + this.tiles + '&ntitel=' + this.heyseks  
+		nhueyfr(index,e){
+			if(e&&e.reprintUrl){
+				window.location.href=e.reprintUrl
+			}else{
+			window.location.href="jgjj.html?id=" + index +'&titel=' + this.tiles + '&ntitel=' + this.heyseks  	
+			}	
 		},
 		// 分页
 		handleSizeChange(val){

+ 44 - 27
index.html

@@ -113,25 +113,35 @@
 								<div class="tout_one">
 									<img src="static/picture/ewm.png" alt="">
 								</div>
-								<div class="tout_two" @click="nhyeskf">
-									<p>{{ ttjues.length == 0 ? '暂无数据' : ttjues[0].newsTitle}}</p>
-									<p> {{ ttjues.length >= 1?   ttjues[1].newsTitle :'暂无数据'}} | {{  ttjues.length >= 2?   ttjues[2].newsTitle :'暂无数据' }} </p>
+								<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>
 								</div>
 							</div>
 						</div>
 						<div class="u-homenews _list s3 sk">
 							<ul class="home_activ">
 								<li>
-									<el-carousel trigger="click" height="410px" class="hdyelaie" :autoplay ="false" indicator-position="none">
-										<el-carousel-item v-for="item,index in imalisesmli" :key="item.imageId" >
+									<el-carousel trigger="click" height="410px" class="hdyelaie" :autoplay ="true" indicator-position="none" v-if='imalisesmli.length'>
+										<el-carousel-item v-for="item,index in imalisesmli" :key="item.newsId" >
+											<a :href="item.reprintUrl?'item.reprintUrl':'jgjj.html?id=' + item.newsId + '&titel=' + item.newsTitle">
 											<img style="width: 100%; height: 100%;"
-												:src="'https://jyzx.qs163.cn' + '/prod-api' + item.imageContent" alt="" v-if="item.jeuhse == false">
+												:src="item.newsImage?'https://jyzx.qs163.cn' + '/prod-api' + item.newsImage:'https://jyzx.qs163.cn/prod-api/profile/upload/2022/01/21/caa82e76-5dc8-4dd8-a903-e4fa6a438eb8.png'" alt="" v-if="item.jeuhse == false">
+											</a>
 												<div style="height: 100%; width: 100%; position: relative;" v-if="item.jeuhse == true" >
-													  <video style="height: 100%; width: 100%;"  ref='video' :src="'https://jyzx.qs163.cn' + item.imageContent" controls>
+													  <video style="height: 100%; width: 100%;"  ref='video' :src="'https://jyzx.qs163.cn' + item.newsImage" controls>
 														  您的浏览器不支持 video元素。
 													  </video>
 												</div>
-												<p  style="color: #fff; font-size: 14px; padding-left: 20px; position: relative;bottom:30px; background-color: #000000; opacity: .5; height: 30px; line-height: 30px;">{{item.imageIntroduce}}</p>
+												<p  style="color: #fff; font-size: 14px; padding-left: 20px; position: relative;bottom:30px; background-color: #000000; opacity: .5; height: 30px; line-height: 30px;">{{item.newsTitle}}</p>
+										</el-carousel-item>
+									</el-carousel>
+									<el-carousel trigger="click" height="410px" class="hdyelaie" :autoplay ="true" indicator-position="none" v-else>
+										<el-carousel-item >
+											
+											<img style="width: 100%; height: 100%;"	src="https://jyzx.qs163.cn/prod-api/profile/upload/2022/01/21/caa82e76-5dc8-4dd8-a903-e4fa6a438eb8.png" >
+											
+											<p  style="color: #fff; font-size: 14px; padding-left: 20px; position: relative;bottom:30px; background-color: #000000; opacity: .5; height: 30px; line-height: 30px;"></p>
 										</el-carousel-item>
 									</el-carousel>
 								</li>
@@ -152,7 +162,7 @@
 													<li v-for="item,index in newsxq" :key="index +'' + 'l'">
 														<p class="cf">
 															<span class="fr"><small>{{item.createTime}}</small></span>
-															<a :href="'jgjj.html?id=' + item.newsId + '&titel=' + dheyw">{{item.newsTitle}}
+															<a :href="item.reprintUrl?'item.reprintUrl':'jgjj.html?id=' + item.newsId + '&titel=' + dheyw">{{item.newsTitle}}
 															</a>
 														</p>
 													</li>
@@ -181,7 +191,7 @@
 													<li v-for="items,index in item.columnNewsList" :key="items.newsId" >
 														<p class="cf">
 															<span class="fr"><small>{{items.createTime}}</small></span>
-															<a :href="'jgjj.html?id=' + items.newsId + '&titel=' + item.columnName"  >{{items.newsTitle}}</a>
+															<a :href="item.reprintUrl?'item.reprintUrl':'jgjj.html?id=' + items.newsId + '&titel=' + item.columnName"  >{{items.newsTitle}}</a>
 														</p>
 													</li>
 												</ul>
@@ -222,7 +232,7 @@
 										<img :src="item.newsImage == null? 'static/picture/pic_jcfw_gys@2x.png' : item.newsImage == undefined ? 'static/picture/pic_jcfw_gys@2x.png' : 'https://jyzx.qs163.cn' + '/prod-api'+ item.newsImage " alt="">
 										<span style="width:100%; overflow: hidden;text-overflow:ellipsis;white-space: nowrap; text-align: center;">{{item.newsTitle == null? '暂无数据' :item.newsTitle }}</span>
 										<p style="height: 48px;">{{item.newsContent == null? '暂无数据' : item.newsContent}}</p>
-										<p class="ol" @click="gentg(item.newsId)">查看详情</p>
+										<p class="ol" @click="gentg(item.newsId,item)">查看详情</p>
 									</div>
 									<!-- <div class="shoutoa" v-if="!boofa">
 										<img src="static/picture/pic_jcfw_gys@2x.png" alt="">
@@ -332,7 +342,7 @@
 						this.newslieutt()//头条
 					},
 					mounted() {
-						console.log(this.getQueryString("id"))
+						// console.log(this.getQueryString("id"))
 					},
 					methods: {
 			 		// 大图轮播图
@@ -361,7 +371,7 @@
 							var that = this
 							that.tyer.type = 1
 							$.ajax({
-								url: 'https://jyzx.qs163.cn/prod-api/gateway/query/getRotationChart',
+								url: 'https://jyzx.qs163.cn/prod-api/gateway/query/getRotation',
 								type: 'post',
 								data: that.tyer,
 								dataType: 'json',
@@ -425,18 +435,18 @@
 										// indextitlw
 						  				res.data.filter(rout =>{
 											if(that.indextitlw.length >= 3){
-												console.log(that.indextitlw.length)
+												// console.log(that.indextitlw.length)
 												that.indextitlwboo.push(rout)
 												// that.newslieutr(rout.columnId)
 											}else{
 												that.indextitlw.push(rout)
 												that.dheyw = that.indextitlw[0].columnName
 												that.newaNuber = that.indextitlw[0].columnId
-												that.newslieu(this.newaNuber)//新闻列表
+												that.newslieu(that.newaNuber)//新闻列表
 											}
 											
 										})
-										console.log(that.indextitlw,that.indextitlwboo,this.dheyw,87654)
+										// console.log(that.indextitlw,that.indextitlwboo,this.dheyw,87654)
 						  			} else {
 						  				that.$message({
 						  					message: res.msg,
@@ -520,7 +530,7 @@
 														res.data[0].puhese = res.data[0].columnNewsList
 														
 													}
-													console.log(res.data[0].puhese,34567)
+													// console.log(res.data[0].puhese,34567)
 												})
 												that.dueus = res.data[0].puhese
 												that.jiance = res.data[0]
@@ -558,7 +568,7 @@
 								})
 						},
 						inpubie() {
-							console.log(this.inpute)
+							// console.log(this.inpute)
 						},
 						nhyesee() {
 							console.log(this.inpute)
@@ -571,11 +581,11 @@
 							} else {
 								this.ulrw = 'djdt.html?id=' + val
 							}
-							console.log(index, val)
+							// console.log(index, val)
 						},
 						jeuese(index,val) {
-							console.log(index,val)
-							console.log()
+							// console.log(index,val)
+							// console.log()
 							// if(index == 25){
 							// window.location.href="jgjj.html?id=" + index	
 							// }else if(index == 26){
@@ -592,7 +602,7 @@
 							try {
 								var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
 								var r = window.location.href.split('?')[1].match(reg);
-								console.log(reg, r)
+								// console.log(reg, r)
 								if (r != null) {
 									return r[2];
 								}
@@ -608,15 +618,22 @@
 							this.newslieu(val)
 						},
 						// 底部查看更多
-						gentg(index){
-								// console.log(index,34)
-								window.location.href = 'jgjj.html?id=' + index  +'&titel=监测范围' 
+						gentg(index,e){
+							if(e&&e.reprintUrl){
+								window.location.href=e.reprintUrl
+							}else{
+								window.location.href = 'jgjj.html?id=' + index  +'&titel=监测范围'
+							}
 						},
 						gentgs(){
 							window.location.href = 'jcfanw.html'
 						},
-						nhyeskf(){
-												window.location.href="djdt.html?" +'&titel=头条'   + '&ntitel=头条'  + '&openMode=0' 
+						nhyeskf(e){
+							if(e&&e.reprintUrl){
+								window.location.href=e.reprintUrl
+							}else{
+								window.location.href="djdt.html?" +'&titel=头条'   + '&ntitel=头条'  + '&openMode=0' 
+							}					
 						}
 						
 						

+ 14 - 4
jgjj.html

@@ -101,8 +101,18 @@
 							<div class="p_box_tit cf"><p class="fl p_box_titl">{{tiles}}</p></div>
 							<div class="pd10 pf_list">
 								<div class="container">
-									<div class="jgl tyu">
-										<div style="padding: 50px 100px; font-size: 18px;line-height: 32px;" class="po" v-html="oljhye.newsContent == null? '暂无数据' : oljhye.newsContent "></div>
+									<div class="jgl tyu" style="padding: 50px 100px;">
+										<div class="njgl">
+											<div class="njgltit">{{oljhye.newsTitle}}</div>
+											<div class="nigltxt">
+												<div>发布时间:{{oljhye.releaseTime||'暂无'}}</div>
+												<div>作者:{{oljhye.author||'暂无'}}</div>
+												<div>来源:{{oljhye.remark||'暂无'}}</div>
+<!-- 												<div>URL链接:{{oljhye.reprintUrl||'暂无'}}</div> -->
+												<div>浏览数:{{oljhye.viewsNum||'暂无'}}</div>
+											</div>
+										</div>
+										<div style="font-size: 18px;line-height: 32px;" class="po" v-html="oljhye.newsContent == null? '暂无数据' : oljhye.newsContent "></div>
 									</div>
 									
 									<!-- <div class="des">
@@ -193,7 +203,7 @@
 				 				  data:'',
 				 				  dataType:'json',
 				 				  success:function(res){
-				 					console.log(res,765) 
+				 					// console.log(res,765) 
 				 					if(res.code == 200){
 				 						that.oljhye = res.data
 				 						// that.hyew = true
@@ -203,7 +213,7 @@
 				 						          type: 'error'
 				 						        });
 				 					}
-				 					console.log(that.tablide,765) 
+				 					// console.log(that.tablide,765) 
 				 				  }
 				 }) 
 			  },

+ 34 - 0
static/css/drag.css

@@ -0,0 +1,34 @@
+
+.jc-component__range{width:300px;}
+   .jc-component__range .jc-range{
+        background-color: #e9e9e9;
+        position: relative;
+        transition: 1s all;
+        user-select: none;
+        color: #585858;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        height: 34px; 
+        
+	}
+	.jc-component__range .jc-range.success{
+	    background-color: #3bc923;
+	    color: #fff;
+	}
+		.jc-component__range .jc-range.success i{color: #3bc923;}
+    .jc-component__range    i{
+            position: absolute;
+            left: 0;
+            width: 34px;
+            height: 100%;
+            color: #3fcd26;
+            background-color: #fff;
+            border: 1px solid #d8d8d8;
+            cursor: pointer;
+            font-size: 24px;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+        }
+

+ 1 - 1
static/css/index.css

@@ -8,7 +8,7 @@
 	width: 11%;
 }
 .tout .tout_one img{
-	width: 100%;
+	width: 67px;
 	height: 40px;
 }
 .tout .tout_two{

+ 5 - 1
static/css/printstyle.css

@@ -129,5 +129,9 @@ font-size: 16px;font-weight: 500;color: #343434;line-height: 26px;padding: 20px
 .pw_selecta div:hover{background: #2C91EB;color: #FFFFFF;}
 
 
-
+.njgl{margin-bottom: 30px;}
+.njgltit{font-size: 20px;font-weight: bold;
+color: #000000;text-align: center;margin-bottom: 10px;}
+.nigltxt {display: flex;align-items: center;justify-content: center;}
+.nigltxt div{font-size: 14px;color: #666666;margin: 0 15px;}
 

+ 105 - 21
wshsj.html

@@ -8,11 +8,13 @@
 		<title>刷制品质量监督检验中心</title>
        <meta name="keywords" content="刷制品质量监督检验中心">
        <meta name="description" content="刷制品质量监督检验中心">
+	   <link href="./static/css/drag.css" rel="stylesheet" type="text/css">
+	   	<script src="http://www.qsqrkg.com/vendor/vendor.js"></script>
 	   <script type="text/javascript" src="./static/js/jquery.min.js"></script>
 	<script type="text/javascript" src="./static/js/custom.js"></script>
 	<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
 	<script src="https://unpkg.com/element-ui/lib/index.js"></script>
- 
+ <!-- <script type="text/javascript" src="./static/js/drag.js"></script> -->
 		<link href="./static/css/vendor.css" rel="stylesheet" />
 		<link href="./static/css/style.css" rel="stylesheet" />
 		<link href="./static/css/custom.css" rel="stylesheet" />
@@ -170,6 +172,26 @@
 			</div>
 			<!-- 分割 -->
 			<!-- <div class="foot_line"></div> -->
+			<!-- 滑块验证 -->
+			<center>
+				<!-- <div id="drag"></div> -->
+				<el-dialog
+				  title="验证"
+				  :visible.sync="dialogVisible"
+				  width="30%">
+				<div class="jc-component__range">
+				    <div class="jc-range" :class="rangeStatus?'success':''" >
+				        <i @mousedown="rangeMove"  :class="rangeStatus?'el-icon-success':'el-icon-d-arrow-right'" :style="disX==0?'transform: translateX(0px);':''"></i>
+				        {{rangeStatus?successText:startText}}
+				    </div>
+				  </div>
+				  <span slot="footer" class="dialog-footer">
+				    <el-button @click="dialogVisible = false">取 消</el-button>
+				    <el-button type="primary" @click="getDarg">确 定</el-button>
+				  </span>
+				</el-dialog>
+
+			</center>
 		</main>
 		</div>
 	</body>
@@ -179,7 +201,7 @@
 	} */
 	</style>
 	<script src="static/js/footer.js" type="text/javascript" charset="utf-8"></script>
-	<script src="http://www.qsqrkg.com/vendor/vendor.js"></script>
+
 	<script src="static/js/script.js"></script>
 	<script src="static/js/custom.js"></script>
 	<script type="text/javascript" src="static/js/header.js"></script>
@@ -217,6 +239,11 @@
 				provisionList:[],
 				testItems:'',
 				provideType:'',
+				disX : 0,
+				rangeStatus: false,
+				successText:'验证成功',
+				startText:'请拖住滑块,拖动到最右边',
+				dialogVisible:false
 			},
 			created(){
 				this.getInspect();
@@ -272,6 +299,78 @@
 
 					}
 				},
+				rangeMove(e){
+					let ele = e.target;
+					    let startX = e.clientX;
+					    let eleWidth = ele.offsetWidth;
+					    let parentWidth =  ele.parentElement.offsetWidth;
+					    let MaxX = parentWidth - eleWidth;
+					    if(this.rangeStatus){//不运行
+					        return false;
+					    }
+					    document.onmousemove = (e) => {
+					        let endX = e.clientX;
+					        this.disX = endX - startX;
+					        if(this.disX<=0){
+					            this.disX = 0;
+					        }
+					        if(this.disX>=MaxX-eleWidth){//减去滑块的宽度,体验效果更好
+					            this.disX = MaxX;
+					        }
+					        ele.style.transition = '.1s all';
+					        ele.style.transform = 'translateX('+this.disX+'px)';
+					        e.preventDefault();
+					    }
+					    document.onmouseup = ()=> {
+					        if(this.disX !== MaxX){
+					            ele.style.transition = '.5s all';
+					            ele.style.transform = 'translateX(0)';
+					            //执行成功的函数
+					            this.errorFun && this.errorFun();
+					        }else{
+					            this.rangeStatus = true;
+					            if(this.status){
+					                this.$parent[this.status] = true;
+					            }
+					            //执行成功的函数
+					            // this.successFun && this.successFun();
+					        }
+					        document.onmousemove = null;
+					        document.onmouseup = null;
+					    }
+					},
+				successFun(){
+					
+				},
+				getDarg(){
+					var that=this;
+					if(this.rangeStatus){
+						this.dialogVisible=false;
+						this.rangeStatus=false;
+						this.disX=0;
+						$.ajax({
+							url:this.base_url+ '/gateway/query/sendInspectInFor',
+							type: 'POST',
+							data: this.form,
+							dataType: 'json',
+							success: function(res) {
+								if (res.code == 200) {
+									that.$message.success('提交成功');
+									that.resertFoem()
+									 // that.setTimein()
+								} else {
+									that.$message({
+										message: res.msg,
+										type: 'error'
+									});
+								}
+							}
+						})
+					}else{
+						that.$message.error('请先验证');	
+					}
+					
+				},
 				getSubmit(){
 					var that=this;
 					var myreg=/^[1][3,4,5,7,8,9][0-9]{9}$/;
@@ -311,24 +410,10 @@
 						this.$message.error("请输入正确委托单位电话");
 						return
 					}
-					$.ajax({
-						url:this.base_url+ '/gateway/query/sendInspectInFor',
-						type: 'POST',
-						data: this.form,
-						dataType: 'json',
-						success: function(res) {
-							if (res.code == 200) {
-								that.$message.success('提交成功');
-								that.resertFoem()
-								 // that.setTimein()
-							} else {
-								that.$message({
-									message: res.msg,
-									type: 'error'
-								});
-							}
-						}
-					})
+					this.rangeStatus=false;
+					this.disX=0;
+					this.dialogVisible=true
+					
 				},
 				resertFoem(){
 					this.form={
@@ -363,7 +448,6 @@
 					// console.log(index, val)
 				},
 				jeuese(index) {
-					console.log(index)
 					if (index == 1) {
 						this.ulrw = index.html
 					} else {