Commit 526de358 by haojie

重新进入创建直播页面会初始化页面的问题

parent c00044ec
......@@ -21,6 +21,7 @@ import { useRoute, useRouter } from 'vue-router';
import { createLiveRouteKey } from '@/constants/token';
import { useStore } from 'vuex';
import { computed } from 'vue';
import { jumpToCreateLivePage } from '@/router/jump';
const store = useStore();
const route = useRoute();
......@@ -50,14 +51,16 @@ const jump = (item: any) => {
let query = window.localStorage.getItem(createLiveRouteKey);
if (query) {
params = JSON.parse(query);
jumpToCreateLivePage(params, false);
}
}
} else {
router.push({
path: item.path,
query: {
...params,
},
});
}
};
// 删除当前导航
......
......@@ -58,6 +58,7 @@ import { useRouter } from 'vue-router';
import routerConfig from '@/router/tool';
import { getDigitalPeopleList } from '@/service/Common';
import { LIVE_AUDIT_STATUS } from '@/service/Live';
import { jumpToCreateLivePage } from '@/router/jump';
const router = useRouter();
const personList = reactive({
......@@ -89,14 +90,13 @@ const getList = async () => {
loading.value = false;
};
const startLive = (item: any) => {
router.push({
path: routerConfig.createLive.path,
name: routerConfig.createLive.name,
query: {
jumpToCreateLivePage(
{
id: item.id,
title: '',
},
});
true,
);
};
onMounted(() => {
......
......@@ -450,7 +450,7 @@ const confirm = async () => {
const initPage = () => {
let type = route.query.type;
// 清空缓存数据
if (type === 'new') {
if (route.query.clearCache === 'true') {
submitSuccessed('', false);
}
};
......
......@@ -52,6 +52,7 @@ import Dialog from '@/components/Dialog.vue';
import { ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import routerConfig from '@/router/tool';
import { jumpToCreateLivePage } from '@/router/jump';
const props = withDefaults(
defineProps<{
......@@ -92,15 +93,7 @@ const changeBtn = (item: any) => {
// 确认
const confirm = () => {
visible.value = false;
router.push({
path: routerConfig.createLive.path,
name: routerConfig.createLive.name,
query: {
id: currentCard.value,
title: '',
type: 'new',
},
});
jumpToCreateLivePage({ id: currentCard.value, title: '', type: 'new' }, true);
};
watch(
......
......@@ -37,6 +37,7 @@ import { onUpdateDrafts } from '@/service/Common';
import { useRouter } from 'vue-router';
import routerConfig from '@/router/tool';
import { show_message } from '@/utils/tool';
import { jumpToCreateLivePage } from '@/router/jump';
const router = useRouter();
......@@ -95,15 +96,14 @@ const nameChange = async (id: any, value: string) => {
};
const onEdit = (item: any) => {
router.push({
path: routerConfig.createLive.path,
name: routerConfig.createLive.name,
query: {
jumpToCreateLivePage(
{
id: item.id,
title: item.name,
type: 'edit_drafts',
},
});
true,
);
};
onMounted(() => {
......
......@@ -69,6 +69,7 @@ import { onUpdateLiveTask } from '@/service/Common';
import { getLiveTask, deleteLiveTask } from '@/utils/api/userApi';
import { isDev, show_message } from '@/utils/tool';
import { callPyjsInWindow, injectWindow } from '@/utils/pyqt';
import { jumpToCreateLivePage } from '@/router/jump';
const props = withDefaults(
defineProps<{
......@@ -172,15 +173,14 @@ const onEdit = (item: any) => {
show_message('直播中的禁止编辑');
return;
}
router.push({
path: routerConfig.createLive.path,
name: routerConfig.createLive.name,
query: {
jumpToCreateLivePage(
{
id: item.id,
status: item.status,
type: 'edit',
},
});
true,
);
};
const onDelete = (item: any) => {
......
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