diff --git a/src/components/BayWindow/BayWindow.vue b/src/components/BayWindow/BayWindow.vue index d45477f..6ba6b1c 100644 --- a/src/components/BayWindow/BayWindow.vue +++ b/src/components/BayWindow/BayWindow.vue @@ -2,7 +2,7 @@
-
+
{{ item }}
@@ -84,6 +84,12 @@ export default { close() { this.$emit('closeBay'); }, + openPage() { + this.$router.push({ + path: '/notice', + query: { code: '0505' }, + }); + }, }, }; diff --git a/src/components/Carousel/Carousel.vue b/src/components/Carousel/Carousel.vue index fe98118..e7af86a 100644 --- a/src/components/Carousel/Carousel.vue +++ b/src/components/Carousel/Carousel.vue @@ -2,7 +2,7 @@
- +
@@ -26,15 +26,28 @@ export default { return { imgList: [], str: '', + code: '0000', }; }, + watch: { + '$route.query.code'(val) { + console.log('val: ', val); + if (val) { + this.code = val; + } else { + this.code = '0000'; + } + this.getImg(); + }, + }, created() { + this.code = this.$route.query.code || '0000'; this.getImg(); }, methods: { async getImg() { try { - const params = { param: { showPage: '0000' } }; + const params = { param: { showPage: this.code } }; const res = await carouselQuery(params); const { data, code, msg } = res.data; this.imgList = [...data]; diff --git a/src/components/Footer/Footer.vue b/src/components/Footer/Footer.vue index a6bed02..99bf767 100644 --- a/src/components/Footer/Footer.vue +++ b/src/components/Footer/Footer.vue @@ -11,7 +11,7 @@
@@ -79,7 +79,6 @@ export default { async getData() { try { const res = await getLink(); - console.log(res.data.data); const { code, msg, data } = res.data; if (code === 200) { const obj = { @@ -93,6 +92,13 @@ export default { openPage(url) { window.open(url); }, + jumpPage(url, code) { + // this.$router.push({ + // path: url, + // query: { code }, + // }); + window.open(`http://${window.location.host}/${url}?code=${code}`); + }, }, }; diff --git a/src/components/HeadNav/HeadNav.vue b/src/components/HeadNav/HeadNav.vue index 51a9b70..7fdfdfd 100644 --- a/src/components/HeadNav/HeadNav.vue +++ b/src/components/HeadNav/HeadNav.vue @@ -396,6 +396,19 @@ export default { showPage: 0, }; }, + watch: { + '$route.path'(val) { + for (let i = 0; i < this.tabList.length; i++) { + const item = this.tabList[i]; + if (val === item.url) { + this.showPage = i; + return; + } else { + this.showPage = 99; + } + } + }, + }, created() { setTimeout(() => { for (let i = 0; i < this.tabList.length; i++) { @@ -406,8 +419,8 @@ export default { }, 100); }, methods: { - onSearch() { - console.log('点击了搜索按钮,但是没有搜索事件'); + onSearch(e) { + window.open(`http://${window.location.host}/search?text=${e}`); }, jumpPage(index, url, children) { if (this.showPage === index) { @@ -507,13 +520,16 @@ export default { color: #cc2626; } /deep/.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) { - border-color: #d9d9d9; + border-color: #ae0002; border-right-width: 1px !important; } /deep/.ant-input:focus { - border-color: #d9d9d9; + border-color: #ae0002; border-right-width: 1px !important; outline: 0; box-shadow: 0 0 0 2px rgb(217 217 217 /20%); } +/* /deep/.ant-input { + border-color: #ae0002; +} */ diff --git a/src/components/LeftNav/LeftNav.vue b/src/components/LeftNav/LeftNav.vue index 3f31fb3..a5f3321 100644 --- a/src/components/LeftNav/LeftNav.vue +++ b/src/components/LeftNav/LeftNav.vue @@ -1,6 +1,6 @@