From 56f661fe4d94da0e844145ab3079e5e53e6443e8 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Wed, 31 Jul 2024 16:50:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E7=94=A8keepalive=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=BC=93=E5=AD=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ec_api/BasicConfig.vue | 17 ----------------- src/layout/index.vue | 10 +++++++++- src/request/index.js | 2 -- src/router/index.js | 19 +++++++++++++++++-- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/components/ec_api/BasicConfig.vue b/src/components/ec_api/BasicConfig.vue index 8dd6b6c..f8ceca1 100644 --- a/src/components/ec_api/BasicConfig.vue +++ b/src/components/ec_api/BasicConfig.vue @@ -192,19 +192,6 @@ function store_data() { store.commit('ecApiModule/change_ec_select_api', SelectApi.value) } -// 切换回接口测试页面需要重新加载 -function restore_data() { - SelectEnv.value = store.state.ecApiModule.ec_api_data.env - SelectCinema.value = store.state.ecApiModule.ec_api_data.cinema - SelectType.value = store.state.ecApiModule.ec_api_data.type - SelectChannel.value = store.state.ecApiModule.ec_api_data.channel - SelectApiGroup.value = store.state.ecApiModule.ec_api_data.api_group - SelectApiId.value = store.state.ecApiModule.ec_api_data.select_api_id - CinemaByEnv.value = store.state.ecApiModule.ec_api_data.cinema_env - ChannelByType.value = store.state.ecApiModule.ec_api_data.channel_type - SelectApi.value = store.state.ecApiModule.ec_api_data.select_api ? store.state.ecApiModule.ec_api_data.select_api : [] -} - onMounted(() => { console.log('onMounted BasicConfig') SelectType.value = store.state.ecApiModule.ec_api_data.type @@ -220,10 +207,6 @@ onMounted(() => { get_api_by_type(SelectType.value) // 获取接口参数 get_api_params_by_type(SelectType.value) - - // 恢复数据 - restore_data() - console.log('BasicConfig onMounted store.state.ecApiModule.ec_api_data', store.state.ecApiModule.ec_api_data) }) diff --git a/src/layout/index.vue b/src/layout/index.vue index c510b9b..0fdf47a 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -3,6 +3,9 @@ import Index from "@/views/update/index.vue"; import PageHeader from "@/layout/components/PageHeader.vue"; import PageAside from "@/layout/components/PageAside.vue"; +import {useRoute} from 'vue-router' + +const route = useRoute()