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()