diff --git a/src/views/portal/case/Detail.vue b/src/views/portal/case/Detail.vue index 3d72a8ec..e31c6156 100644 --- a/src/views/portal/case/Detail.vue +++ b/src/views/portal/case/Detail.vue @@ -89,15 +89,13 @@
- + - - + @@ -105,14 +103,11 @@ {{index+1}} - {{ item.sysCreateUname }} - -
- -
+ --> +
人气榜 @@ -383,7 +378,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"; } diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index f9970307..fa365b13 100644 --- a/src/views/portal/case/Index.vue +++ b/src/views/portal/case/Index.vue @@ -49,14 +49,14 @@
-
+
{{word}} @@ -131,15 +131,12 @@
- + - - + @@ -147,14 +144,11 @@ {{index+1}} - {{ item.sysCreateUname }} - -
- -
+ --> +
人气榜 @@ -272,6 +266,7 @@ export default { }, data() { return { + speciData:[], moreState: 1, // 1 加载更多 2 加载中 3无数据 isSeach: false, searchwd: true, @@ -296,8 +291,8 @@ export default { orderField: "comments", // breCommend:null, keyWord: "", - majorType:'', //专业分类 - orgDomain: '', // 组织领域 + majorType:null, //专业分类 + orgDomain: null, // 组织领域 orderAsc: false }, keyWord: "", @@ -313,6 +308,12 @@ export default { }, mounted() { + if(this.searchTags.length == 0){ + console.log('gyigyu') + this.queryCondition.majorType = null; + this.queryCondition.orgDomain = null; + }; + this.specialized(); this.$nextTick(function() { this.closeSearch(); }); @@ -332,6 +333,7 @@ export default { // this.getCaseData(); this.search(); window.addEventListener("scroll", this.handleScroll); + }, watch: { @@ -347,6 +349,15 @@ export default { window.removeEventListener("scroll", this.handleScroll); }, methods: { + specialized(){ + apiCase.majorTypes().then(res =>{ + if(res.status == 200){ + this.speciData = res.result + } + }) + }, + + jumcasedet(item) { this.$router.push({path:'/case/detail',query:{id:item.id}}); @@ -487,7 +498,7 @@ export default { } if (scrollTop > 630) { document.querySelector("#fixd-box").style.cssText = - "position: fixed;top: -500px;width:245.5px"; + "position: fixed;top: -250px;width:245.5px"; } else { document.querySelector("#fixd-box").style.cssText = "position: static"; } @@ -609,13 +620,15 @@ export default { } }, tagsClose(tag, index) { + for (let i in this.queryCondition) { + if (tag.type === i) { if (i == "majorType") { - this.queryCondition.majorType = 0; + this.queryCondition.majorType = ''; } if (i == "orgDomain") { - this.queryCondition.orgDomain = 0; + this.queryCondition.orgDomain = ''; } if (i == "keyWord") { this.queryCondition.keyWord = ""; @@ -623,9 +636,17 @@ export default { } this.queryCondition[i] = ""; this.searchTags.splice(index, 1); + if (i == "majorType") { + this.queryCondition.majorType = null; + } + if (i == "orgDomain") { + this.queryCondition.orgDomain = null; + } + this.getCaseData(); } } + }, getCaseUserData(caseList) { let ids = caseList.map((item, index) => { @@ -674,6 +695,9 @@ export default {