diff --git a/.env.development b/.env.development index 75d458d..77d49e7 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ VUE_APP_MODE=development VUE_APP_NODE_ENV=development VUE_APP_SCENE=/datang/ -VUE_APP_BASE_URL=http://test.tall.wiki/ +VUE_APP_BASE_URL=http://test.tall.wiki VUE_APP_API_URL=http://test.tall.wiki/datang/v1.0 VUE_APP_PROXY_URL=/datang/v1.0 VUE_APP_PUBLIC_PATH=/datang diff --git a/.env.production b/.env.production index 44a0ffe..cf94baf 100644 --- a/.env.production +++ b/.env.production @@ -1,7 +1,7 @@ VUE_APP_MODE=production VUE_APP_NODE_ENV=production VUE_APP_SCENE=/datang/ -VUE_APP_BASE_URL=http://test.tall.wiki/ +VUE_APP_BASE_URL=http://test.tall.wiki VUE_APP_API_URL=http://test.tall.wiki/datang/v1.0 VUE_APP_PROXY_URL=/datang/v1.0 VUE_APP_PUBLIC_PATH=/datang diff --git a/src/components/BayWindow/BayWindow.vue b/src/components/BayWindow/BayWindow.vue index 6ba6b1c..94e5081 100644 --- a/src/components/BayWindow/BayWindow.vue +++ b/src/components/BayWindow/BayWindow.vue @@ -87,7 +87,7 @@ export default { openPage() { this.$router.push({ path: '/notice', - query: { code: '0505' }, + query: { code: '0505', introId: this.content.content.id }, }); }, }, diff --git a/src/components/Carousel/Carousel.vue b/src/components/Carousel/Carousel.vue index e7af86a..e385fa6 100644 --- a/src/components/Carousel/Carousel.vue +++ b/src/components/Carousel/Carousel.vue @@ -47,6 +47,7 @@ export default { methods: { async getImg() { try { + if (this.code.length !== 4) return; const params = { param: { showPage: this.code } }; const res = await carouselQuery(params); const { data, code, msg } = res.data; diff --git a/src/components/Footer/Footer.vue b/src/components/Footer/Footer.vue index 99bf767..e945417 100644 --- a/src/components/Footer/Footer.vue +++ b/src/components/Footer/Footer.vue @@ -8,21 +8,23 @@
-
- - -
- +
@@ -394,10 +394,15 @@ export default { }, ], showPage: 0, + text: '', }; }, watch: { '$route.path'(val) { + if (this.$route.query.text) { + console.log('this.$route.query.text: ', this.$route.query.text); + this.text = this.$route.query.text; + } for (let i = 0; i < this.tabList.length; i++) { const item = this.tabList[i]; if (val === item.url) { @@ -410,6 +415,10 @@ export default { }, }, created() { + if (this.$route.query.text) { + console.log('this.$route.query.text: ', this.$route.query.text); + this.text = this.$route.query.text; + } setTimeout(() => { for (let i = 0; i < this.tabList.length; i++) { if (this.tabList[i].url && this.$route.path === this.tabList[i].url) { @@ -420,7 +429,7 @@ export default { }, methods: { onSearch(e) { - window.open(`http://${window.location.host}/search?text=${e}`); + window.open(`${process.env.VUE_APP_BASE_URL + process.env.VUE_APP_PUBLIC_PATH}/search?text=${e}`); }, jumpPage(index, url, children) { if (this.showPage === index) { diff --git a/src/components/LeftNav/LeftNav.vue b/src/components/LeftNav/LeftNav.vue index a5f3321..96e4221 100644 --- a/src/components/LeftNav/LeftNav.vue +++ b/src/components/LeftNav/LeftNav.vue @@ -3,15 +3,27 @@
{{ list.title }}
-
- {{ item.title }} -
+