diff --git a/new-company-2024-7-4.zip b/new-company-2024-7-4.zip index fa264f5..2d06403 100644 Binary files a/new-company-2024-7-4.zip and b/new-company-2024-7-4.zip differ diff --git a/src/api/home.js b/src/api/home.js index a3c43fa..69fdc14 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -12,5 +12,5 @@ import request from '@/utils/request.js'; */ // 获取地址列表 export const ceshi =(params) => { - return request.get('/sys/baseDict/queryChannleDict',params,{},'pro'); + // return request.get('/sys/baseDict/queryChannleDict',params,{},'pro'); } diff --git a/src/components/tabbar/navbar.vue b/src/components/tabbar/navbar.vue index 7e75451..7994860 100644 --- a/src/components/tabbar/navbar.vue +++ b/src/components/tabbar/navbar.vue @@ -138,6 +138,7 @@ }, + methods: { setColor() { if( @@ -152,14 +153,19 @@ window.location.href= `http://56carrier.com:82/#/home/index` } }, + watch: { '$route'(to, from) { + console.log(from,to,'from') // 路由变化时调用 if(to.path ==='/newsHome') { this.color = 'white'; }else { this.color = 'black'; } + // if(from.path === '/developmentDocking/main'){ + // window.location() + // } } } }; diff --git a/src/router/index.js b/src/router/index.js index b8e38f0..dc987b0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -167,5 +167,13 @@ const router = new VueRouter({ base: process.env.BASE_URL, routes }); +// const originalPush = router.push; +// // 重写 router.push 方法 +// router.push = function push(location, onResolve, onReject) { +// if (onResolve || onReject) { +// return originalPush.call(this, location, onResolve, onReject); +// } +// return originalPush.call(this, location).catch(err => err); +// } export default router; diff --git a/src/view/developmentDocking/index.css b/src/view/developmentDocking/index.css index e8ccb50..28292f3 100644 --- a/src/view/developmentDocking/index.css +++ b/src/view/developmentDocking/index.css @@ -1,4 +1,4 @@ -::v-deep .el-icon-arrow-down:before { +::v-deep .mainComponents .el-icon-arrow-down:before { display: none; } .version-selector { diff --git a/src/view/developmentDocking/index.vue b/src/view/developmentDocking/index.vue index f07b563..bcf826a 100644 --- a/src/view/developmentDocking/index.vue +++ b/src/view/developmentDocking/index.vue @@ -168,6 +168,14 @@ export default { } }; }, + beforeRouteLeave(to, from, next) { + // console.log('211111111',from) + if (from.path === '/developmentDocking/main') { + window.location.href = to.fullPath; + } else { + next(); + } + }, mounted() { console.log(this.selectedVersion,'this.selectedVersion') this.$router.push({ name: 'mainComponents', query: { api: '1-0',selectedVersion:this.selectedVersion } }); diff --git a/src/view/developmentDocking/mainComponents.vue b/src/view/developmentDocking/mainComponents.vue index 83fbf5e..4e678a6 100644 --- a/src/view/developmentDocking/mainComponents.vue +++ b/src/view/developmentDocking/mainComponents.vue @@ -1,5 +1,6 @@