diff --git a/vueHomilyLink/src/views/ChannelView.vue b/vueHomilyLink/src/views/ChannelView.vue index 12ec0ec..5a6b3fb 100644 --- a/vueHomilyLink/src/views/ChannelView.vue +++ b/vueHomilyLink/src/views/ChannelView.vue @@ -48,9 +48,10 @@ function toLink(channelId) { -function changeTab(channelId, flagType) { - currentTab.value = flagType; - loadShows(channelId,flagType); +function changeTab(channelId, type) { + currentTab.value = type; + flagType.value = type; + loadShows(channelId,type); } // 展示列表1 @@ -72,7 +73,7 @@ function submit(channelId) { ChannelApi.subscribe(channelId,90000000).then((result)=>{ if(result.code ==200){ ElMessage.success('订阅成功!'); - loadShows(channelId,null); + loadShows(channelId,flagType.value); }else{ ElMessage.error(result.messsage); } @@ -87,7 +88,7 @@ function unsubmit(channelId){ if(result.code ==200){ console.log("取消频道id+++++++",channelId); ElMessage.success('取消订阅成功!'); - loadShows(channelId,null); + loadShows(channelId,flagType.value); }else{ ElMessage.error(result.messsage); } diff --git a/vueHomilyLink/vite.config.js b/vueHomilyLink/vite.config.js index a44a510..8167483 100644 --- a/vueHomilyLink/vite.config.js +++ b/vueHomilyLink/vite.config.js @@ -2,13 +2,11 @@ import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' -import vueDevTools from 'vite-plugin-vue-devtools' // https://vite.dev/config/ export default defineConfig({ plugins: [ vue(), - vueDevTools(), ], resolve: { alias: { @@ -20,6 +18,7 @@ export default defineConfig({ '/api': { target: 'http://192.168.9.19:8080', changeOrigin: true, + rewrite: (path) => path.replace(/^\/api/, '') } }