diff --git a/public/images/foot_center.png b/public/images/foot_center.png index cf128d78..3911d16c 100644 Binary files a/public/images/foot_center.png and b/public/images/foot_center.png differ diff --git a/src/api/modules/cases.js b/src/api/modules/cases.js index 874fd257..a922f82b 100644 --- a/src/api/modules/cases.js +++ b/src/api/modules/cases.js @@ -3,7 +3,7 @@ import ajax from '@/utils/xajax.js' /**首页查询 * pageSize - * orderField + * orderField * orderAsc */ const indexList = function(query) { @@ -12,7 +12,7 @@ const indexList = function(query) { /* *案例分页搜索查询 是否推荐 *@param(String) keyWord 关键词 - *@param(String) orderField 需要排序的字段 不传默认是最新 + *@param(String) orderField 需要排序的字段 不传默认是最新 *@param (boolean) orderAsc 升序还是倒叙 *@param(Boolean) breCommend 是否推荐 true或者false *@param(String) orgDomain 组织机构 @@ -80,19 +80,26 @@ const usernameList= function(pageSize){ } /* 人气榜 -@param pageSize 长度 +@param pageSize 长度 */ const queryPraises=function(pageSize){ return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`); } /* 好评榜 -@param pageSize 长度 +@param pageSize 长度 */ const queryComments=function(pageSize){ return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`); } +/** + * 专业分类 + * */ +const majorTypes=function (){ + return ajax.get('/xboe/m/boe/cases/majorTypes'); +} + export default { indexList, queryList, @@ -104,5 +111,6 @@ export default { query, usernameList, queryPraises, - queryComments + queryComments, + majorTypes } diff --git a/src/components/Portal/interactBar.vue b/src/components/Portal/interactBar.vue index 60d01813..b4d2c567 100644 --- a/src/components/Portal/interactBar.vue +++ b/src/components/Portal/interactBar.vue @@ -181,10 +181,9 @@ export default { this.isFavorite = newVal; }, data(newVal,oldVal){ - // console.log(newVal,'newVal'); - // if(newVal && newVal.id!=''){ - // this.checkHas(); - // } + if(newVal && newVal.id!=''){ + this.checkHas(); + } } }, created(){ diff --git a/src/views/Index.vue b/src/views/Index.vue index 24425d05..336a6708 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -126,9 +126,12 @@ {{ca.sysCreateTime.substring(0,10)}} --> - + + {{ca.title}} + +
{{ca.summary}}
diff --git a/src/views/portal/case/Detail.vue b/src/views/portal/case/Detail.vue index 89c42516..7f2595ca 100644 --- a/src/views/portal/case/Detail.vue +++ b/src/views/portal/case/Detail.vue @@ -43,12 +43,19 @@ - + + + 案例内容只能在内网环境下查看 + + + 网络安全检测中 + +
@@ -82,15 +89,13 @@
- + - - + @@ -98,14 +103,11 @@ {{index+1}} - {{ item.sysCreateUname }} - -
- -
+ --> +
人气榜 @@ -122,7 +124,7 @@ {{index+1}} - + {{ item.title }} @@ -146,7 +148,7 @@ {{index+1}} - + {{ item.title }} @@ -187,6 +189,7 @@ export default { }, data() { return { + Internet:3,//1是成功 2是是失败 3是检测中 noData:true, zoomShow:true, isTopBoxShow:true, @@ -209,7 +212,33 @@ export default { }; }, mounted() { - //this.pdfPath=this.basePath+'/case/demo1.pdf'; + let $this = this; + this.Intsucc(); + let xmlhttp=this.getXmlHttpRequest(); + let timedOut = false; + let timer = setTimeout(function(){ + timedOut = true; + xmlhttp.abort(); + }, 5000); + xmlhttp.open("HEAD", "http://uapi.boe.com.cn",true); + xmlhttp.send(); + xmlhttp.onreadystatechange=function() { + if (xmlhttp.readyState==4) { + if (xmlhttp.status==200){ + clearTimeout(timer); + $this.Internet = 1; + }else{ + clearTimeout(timer); + $this.Internet = 2; + + } + }else{ + if(imedOut) return;//忽略中止请求 + clearTimeout(timer);//取消等待的超时 + } + } + + this.resolveId = this.$route.query.id; this.$watermark.set(this.userInfo.name+this.userInfo.loginName); if (this.resolveId) { @@ -226,6 +255,27 @@ export default { ); }, methods: { + getXmlHttpRequest() { + if (window.XMLHttpRequest) { + return new XMLHttpRequest(); + } + else if (window.ActiveXObject) { + return new ActiveXObject("Microsoft.XMLHTTP"); + } + }, + Intsucc(){ + const loading = this.$loading({ + lock: true, + text: '正在进行安全检测', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + setTimeout(() => { + loading.close(); + }, 2000); + + }, + getdomain() { let key = "org_domain"; apiDict.items(key).then(res => { @@ -325,7 +375,7 @@ export default { } if(scrollTop > 630) { this.isTopBoxShow = true; - document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -500px;width:245.5px"; + document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -250px;width:245.5px"; } else { document.querySelector('#fixd-box').style.cssText = "position: static"; } @@ -406,6 +456,15 @@ export default {