From e248239111c13e2d385078b3ae5c8025a65f2413 Mon Sep 17 00:00:00 2001 From: lenghui Date: Thu, 5 Dec 2024 18:25:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vueHomilyLink/src/views/ChannelView.vue | 11 ++++++----- vueHomilyLink/vite.config.js | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) 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/, '') } }