Commit 4532a364 by haojie

空音频链接不播放

parent a4ee149f
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<span class="label"> <span class="label">
{{ item.label }} {{ item.label }}
</span> </span>
<div class="close-icon" @click="clearNavbar(item)"> <div class="close-icon" @click.stop="clearNavbar(item)">
<img :src="imgs.close" alt="" /> <img :src="imgs.close" alt="" />
</div> </div>
</div> </div>
......
...@@ -33,11 +33,13 @@ import CustomTabs from '@/components/CustomTabs'; ...@@ -33,11 +33,13 @@ import CustomTabs from '@/components/CustomTabs';
import CustomTabPanel from '@/components/CustomTabPanel'; import CustomTabPanel from '@/components/CustomTabPanel';
import Customizable from '@/components/Customizable'; import Customizable from '@/components/Customizable';
import PersonSvg from '@/assets/svg/custom/person.svg'; import PersonSvg from '@/assets/svg/custom/person.svg';
import { onActivated, onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { customizedImageSubmission } from '@/utils/api/userApi'; import { customizedImageSubmission } from '@/utils/api/userApi';
import { show_message } from '@/utils/tool'; import { show_message } from '@/utils/tool';
import routerConfig from '@/router/tool'; import routerConfig from '@/router/tool';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { jumpPageAddNavigation } from '@/router/jump';
const { addNavigation } = jumpPageAddNavigation();
const store = useStore(); const store = useStore();
...@@ -79,17 +81,7 @@ const submit = async (params: any) => { ...@@ -79,17 +81,7 @@ const submit = async (params: any) => {
}; };
onMounted(() => { onMounted(() => {
// 添加导航 addNavigation(routerConfig.ImageCustomization.path);
store.commit('navbar/setNavbar', {
path: routerConfig.ImageCustomization.path,
});
});
onActivated(() => {
// 添加导航
store.commit('navbar/setNavbar', {
path: routerConfig.ImageCustomization.path,
});
}); });
</script> </script>
......
...@@ -49,7 +49,7 @@ import ChangeName from '@/components/changeName.vue'; ...@@ -49,7 +49,7 @@ import ChangeName from '@/components/changeName.vue';
import Audio from '@/components/Audio.vue'; import Audio from '@/components/Audio.vue';
import ConfirmDialog from '@/components/ConfirmDialog.vue'; import ConfirmDialog from '@/components/ConfirmDialog.vue';
import Loading from '@/components/loading.vue'; import Loading from '@/components/loading.vue';
import { onMounted, reactive, ref } from 'vue'; import { onActivated, reactive, ref } from 'vue';
import { getTonesList } from '@/service/Common'; import { getTonesList } from '@/service/Common';
import { LIVE_AUDIT_STATUS } from '@/service/Live'; import { LIVE_AUDIT_STATUS } from '@/service/Live';
...@@ -59,6 +59,7 @@ const personList = reactive({ ...@@ -59,6 +59,7 @@ const personList = reactive({
const confirmDialog = ref(false); const confirmDialog = ref(false);
const loading = ref(false); const loading = ref(false);
const isFirstRequest = ref(true);
// 音频开始直播 // 音频开始直播
const startPlay = (id: number) => { const startPlay = (id: number) => {
...@@ -93,8 +94,10 @@ const getList = async () => { ...@@ -93,8 +94,10 @@ const getList = async () => {
} }
}; };
onMounted(() => { onActivated(() => {
getList(); if (isFirstRequest.value) {
getList();
}
}); });
</script> </script>
......
...@@ -81,9 +81,10 @@ import { useRouter } from 'vue-router'; ...@@ -81,9 +81,10 @@ import { useRouter } from 'vue-router';
import { getDigitalPeopleList } from '@/service/Common'; import { getDigitalPeopleList } from '@/service/Common';
import Button from '@/components/Button.vue'; import Button from '@/components/Button.vue';
import { callPyjsInWindow } from '@/utils/pyqt'; import { callPyjsInWindow } from '@/utils/pyqt';
import { jumpToCreateLivePage } from '@/router/jump'; import { jumpPageAddNavigation, jumpToCreateLivePage } from '@/router/jump';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { show_message } from '@/utils/tool'; import { show_message } from '@/utils/tool';
const { addNavigation } = jumpPageAddNavigation();
const router = useRouter(); const router = useRouter();
const store = useStore(); const store = useStore();
...@@ -149,6 +150,8 @@ const openPage = (item: any) => { ...@@ -149,6 +150,8 @@ const openPage = (item: any) => {
path: item.path, path: item.path,
name: item.name, name: item.name,
}); });
// 添加导航
addNavigation(item.path);
} }
}; };
......
import router from '@/router'; import router from '@/router';
import routerConfig from '@/router/tool'; import routerConfig from '@/router/tool';
import { useStore } from 'vuex';
// 跳转到创建直播页面 // 跳转到创建直播页面
export const jumpToCreateLivePage = (query: any, clearCache: boolean = false) => { export const jumpToCreateLivePage = (query: any, clearCache: boolean = false) => {
router.push({ router.push({
...@@ -11,3 +12,16 @@ export const jumpToCreateLivePage = (query: any, clearCache: boolean = false) => ...@@ -11,3 +12,16 @@ export const jumpToCreateLivePage = (query: any, clearCache: boolean = false) =>
}, },
}); });
}; };
// 路由跳转添加导航卡
export const jumpPageAddNavigation = () => {
const store = useStore();
const addNavigation = (path: string) => {
store.commit('navbar/setNavbar', {
path: path,
});
};
return { addNavigation };
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment