Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
live-management-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
live-management-web
Commits
c00044ec
Commit
c00044ec
authored
Aug 07, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决第二次创建直播没有uuid的问题
parent
7227ad85
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
100 additions
and
106 deletions
+100
-106
src/components/Button.vue
+1
-1
src/hooks/useScript.ts
+2
-0
src/layouts/components/Header.vue
+1
-1
src/layouts/components/ToolBar.vue
+3
-24
src/pages/OnlyVideoLive/index.vue
+15
-1
src/pages/createInteract/components/AddInteractDialog.vue
+29
-28
src/pages/createInteract/components/AddInteractLib.vue
+2
-2
src/pages/createInteract/components/InteractTable.vue
+1
-1
src/pages/createLive/components/scripts.vue
+0
-19
src/pages/createLive/index.vue
+23
-17
src/pages/home/index.vue
+5
-5
src/router/jump.ts
+13
-0
src/service/Common.ts
+0
-2
src/utils/request.ts
+2
-2
vite.config.ts
+3
-3
No files found.
src/components/Button.vue
View file @
c00044ec
...
...
@@ -11,7 +11,7 @@
</
template
>
<
script
lang=
"ts"
setup
>
const
props
=
withDefaults
(
withDefaults
(
defineProps
<
{
theme
?:
string
;
size
?:
string
;
...
...
src/hooks/useScript.ts
View file @
c00044ec
...
...
@@ -312,9 +312,11 @@ export const processTextCallback = () => {
return
uuid
;
}
if
(
isConfuse
)
{
console
.
log
(
'洗稿任务uuid'
,
currentConfuseId
.
value
);
// 是洗稿任务
return
currentConfuseId
.
value
;
}
console
.
log
(
'store uuid'
,
createLiveInfo
.
value
[
createLiveKeys
.
scriptUuid
]);
return
createLiveInfo
.
value
[
createLiveKeys
.
scriptUuid
];
};
...
...
src/layouts/components/Header.vue
View file @
c00044ec
...
...
@@ -42,7 +42,7 @@ const liveNameEvent = async (value: string) => {
path
:
routerConfig
.
createLive
.
path
,
name
:
routerConfig
.
createLive
.
name
,
query
:
{
id
:
route
.
query
.
id
,
...
route
.
query
,
title
:
value
,
},
});
...
...
src/layouts/components/ToolBar.vue
View file @
c00044ec
...
...
@@ -37,29 +37,6 @@ const imgs = {
close
:
new
URL
(
'../../assets/svg/home/close.svg'
,
import
.
meta
.
url
).
href
,
};
// const navigatorList = [
// {
// icon: imgs.live,
// label: '直播创建',
// path: routerConfig.createLive.path,
// },
// {
// icon: imgs.person,
// label: '形象定制',
// path: routerConfig.ImageCustomization.path,
// },
// {
// icon: imgs.speak,
// label: '声音定制',
// path: routerConfig.VocalCustomization.path,
// },
// {
// icon: imgs.interaction,
// label: '互动回答',
// path: routerConfig.createInteract.path,
// },
// ];
const
goHome
=
()
=>
{
router
.
push
({
path
:
routerConfig
.
home
.
path
,
...
...
@@ -77,7 +54,9 @@ const jump = (item: any) => {
}
router
.
push
({
path
:
item
.
path
,
query
:
params
,
query
:
{
...
params
,
},
});
};
...
...
src/pages/OnlyVideoLive/index.vue
View file @
c00044ec
...
...
@@ -21,7 +21,7 @@
<
script
lang=
"ts"
setup
>
import
{
computed
,
onBeforeUnmount
,
onMounted
,
ref
,
watch
}
from
'vue'
;
import
AddVideoPlay
from
'@/components/AddVideoPlay.vue'
;
import
{
getLiveDetail
}
from
'@/utils/api/userApi'
;
import
{
getLiveDetail
,
closeLiveTask
}
from
'@/utils/api/userApi'
;
import
{
useRoute
,
useRouter
}
from
'vue-router'
;
import
{
show_message
,
isDev
,
DataType
}
from
'@/utils/tool'
;
import
{
callPyjsInWindow
,
injectWindow
}
from
'@/utils/pyqt'
;
...
...
@@ -519,9 +519,23 @@ const getTone = async () => {
}
};
//
const
closeLive
=
async
()
=>
{
try
{
let
res
:
any
=
await
closeLiveTask
(
route
.
query
.
id
);
if
(
res
.
code
==
0
)
{
// 通知python刷新所有首页的直播列表
callPyjsInWindow
(
'reloadLiveTaskList'
);
}
}
catch
(
e
)
{
console
.
log
(
e
);
}
};
onMounted
(
async
()
=>
{
// 将通知方法注入window
injectWindow
(
'mergeCallback'
,
mergeCallback
);
injectWindow
(
'closeLive'
,
closeLive
);
// 传递用户token
try
{
window
.
pyjs
.
setToken
(
getUserCookie
());
...
...
src/pages/createInteract/components/AddInteractDialog.vue
View file @
c00044ec
...
...
@@ -333,36 +333,36 @@ watch(
watch
(
()
=>
props
.
info
,
(
v
)
=>
{
if
(
v
)
{
console
.
log
(
v
);
if
(
Object
.
keys
(
v
).
length
)
{
questionValue
.
value
=
v
.
problem
;
switchStatus
.
value
=
v
.
status
==
1
?
true
:
false
;
// 根据type赋值
if
(
v
.
type
==
1
)
{
currentTab
.
value
=
'1'
;
// 音频回复类型
tonesValue
.
value
=
v
.
phonetic_timbres_id
;
tonesFile
.
value
=
v
.
reply_content
;
}
else
{
currentTab
.
value
=
'2'
;
// 文字
textTonesValue
.
value
=
v
.
tone_id
;
soundColorValue
.
value
=
v
.
phonetic_timbres_id
;
textValue
.
value
=
v
.
reply_content
;
// 选中后的音调信息
let
tonesObj
=
lists
.
tones
.
find
((
item
:
any
)
=>
item
.
id
==
v
.
tone_id
);
if
(
tonesObj
)
{
textTonesInfo
.
value
=
tonesObj
;
}
// 选中后的音色信息
let
soundColorObj
=
lists
.
soundColor
.
find
((
item
:
any
)
=>
item
.
id
==
v
.
phonetic_timbres_id
);
if
(
soundColorObj
)
{
soundColorInfo
.
value
=
soundColorObj
;
}
if
(
v
&&
Object
.
keys
(
v
).
length
)
{
questionValue
.
value
=
v
.
problem
;
switchStatus
.
value
=
v
.
status
==
1
?
true
:
false
;
// 根据type赋值
if
(
v
.
type
==
1
)
{
currentTab
.
value
=
'1'
;
// 音频回复类型
tonesValue
.
value
=
v
.
phonetic_timbres_id
;
tonesFile
.
value
=
v
.
reply_content
;
// 选择后的音色
let
soundColorObj
=
lists
.
soundColor
.
find
((
item
:
any
)
=>
item
.
id
==
v
.
phonetic_timbres_id
);
if
(
soundColorObj
)
{
tonesInfo
.
value
=
soundColorObj
;
}
}
else
{
//
currentTab
.
value
=
'2'
;
// 文字
textTonesValue
.
value
=
v
.
tone_id
;
soundColorValue
.
value
=
v
.
phonetic_timbres_id
;
textValue
.
value
=
v
.
reply_content
;
// 选中后的音调信息
let
tonesObj
=
lists
.
tones
.
find
((
item
:
any
)
=>
item
.
id
==
v
.
tone_id
);
if
(
tonesObj
)
{
textTonesInfo
.
value
=
tonesObj
;
}
// 选中后的音色信息
let
soundColorObj
=
lists
.
soundColor
.
find
((
item
:
any
)
=>
item
.
id
==
v
.
phonetic_timbres_id
);
if
(
soundColorObj
)
{
soundColorInfo
.
value
=
soundColorObj
;
}
}
}
},
...
...
@@ -498,6 +498,7 @@ onMounted(() => {
}
.my-tones-active
{
width
:
100px
;
height
:
38px
;
border-radius
:
6px
;
border
:
1px
solid
#04ae8a
;
display
:
flex
;
...
...
src/pages/createInteract/components/AddInteractLib.vue
View file @
c00044ec
...
...
@@ -2,8 +2,8 @@
<Dialog
v-model=
"visible"
@
confirm=
"confirm"
>
<template
#
body
>
<div
class=
"custom-add-interact-lib-dialog-body"
>
<span
class=
"input-label"
>
请输入
互动库标题:
</span>
<CustomInput
v-model=
"inputValue"
align=
"left"
></CustomInput>
<span
class=
"input-label"
>
互动库标题:
</span>
<CustomInput
v-model=
"inputValue"
align=
"left"
placeholder=
"请输入互动库标题"
></CustomInput>
</div>
</
template
>
</Dialog>
...
...
src/pages/createInteract/components/InteractTable.vue
View file @
c00044ec
...
...
@@ -149,7 +149,7 @@ const columns = [
{
title
:
'操作'
,
colKey
:
'get3'
,
cell
:
(
h
,
{
col
,
row
})
=>
(
cell
:
(
h
,
{
row
})
=>
(
<
div
class
=
"edit-box"
>
<
span
class
=
"edit-icon"
onClick
=
{
rowChange
.
bind
(
this
,
row
)}
>
<
EditSvg
><
/EditSvg
>
...
...
src/pages/createLive/components/scripts.vue
View file @
c00044ec
...
...
@@ -618,14 +618,6 @@ const getList = async () => {
updateTonesInfo
(
tonesValue
.
value
,
soundColorValue
.
value
);
};
// 获取uuid
const
getUuid
=
()
=>
{
if
(
isDev
())
{
return
'e6e973a5-ccdd-4779-a09a-be1658ecbea2'
;
}
return
v4
();
};
onMounted
(
async
()
=>
{
// 获取上传配置
ossConfig
.
value
=
await
getUploadConfig
();
...
...
@@ -637,17 +629,6 @@ onMounted(async () => {
// 获取音色音调列表
getList
();
commitInfo
({
// 文本脚本的uuid
[
createLiveKeys
.
scriptUuid
]:
getUuid
(),
});
});
onActivated
(()
=>
{
commitInfo
({
// 文本脚本的uuid
[
createLiveKeys
.
scriptUuid
]:
getUuid
(),
});
});
</
script
>
...
...
src/pages/createLive/index.vue
View file @
c00044ec
...
...
@@ -73,7 +73,7 @@ import HomeSvg from '@/assets/svg/createLive/home.svg';
import
InteractSvg
from
'@/assets/svg/createLive/interact.svg'
;
import
ScriptsSvg
from
'@/assets/svg/createLive/scripts.svg'
;
import
{
computed
,
onMounted
,
onBeforeMount
,
ref
,
onBeforeUnmount
,
onActivated
,
onDeactivated
}
from
'vue'
;
import
{
getElBounding
,
show_message
,
DataType
,
dimensionalConvert
}
from
'@/utils/tool'
;
import
{
getElBounding
,
show_message
,
isDev
,
DataType
,
dimensionalConvert
}
from
'@/utils/tool'
;
import
{
useStore
}
from
'vuex'
;
import
{
createLiveKeys
,
scriptTypeText
,
scriptTypePhonetics
}
from
'@/service/CreateLive'
;
import
{
createLiveTask
,
getLiveTaskInfo
,
createDrafts
,
getDraftsDetail
,
liveTts
}
from
'@/utils/api/userApi'
;
...
...
@@ -84,6 +84,7 @@ import { callPyjsInWindow } from '@/utils/pyqt';
import
{
useLiveInfoSubmit
}
from
'@/hooks/useStoreCommit'
;
import
{
processTextCallback
}
from
'@/hooks/useScript'
;
import
CustomException
from
'@/utils/error'
;
import
{
v4
}
from
'uuid'
;
const
{
loading
,
initNum
,
currentSetp
,
openInterval
,
filterFiled
,
backHome
,
submitSuccessed
,
submit
,
initCreateStore
}
=
processTextCallback
();
const
[
commitInfo
]
=
useLiveInfoSubmit
();
...
...
@@ -454,14 +455,13 @@ const initPage = () => {
}
};
onBeforeMount
(()
=>
{
initPage
();
let
newQuery
=
JSON
.
parse
(
JSON
.
stringify
(
route
.
query
));
store
.
commit
(
'navbar/setNavbar'
,
{
path
:
routerConfig
.
createLive
.
path
,
query
:
newQuery
,
});
});
// 获取uuid
const
getUuid
=
()
=>
{
if
(
isDev
())
{
return
'e6e973a5-ccdd-4779-a09a-be1658ecbea2'
;
}
return
v4
();
};
const
enterPageEvent
=
()
=>
{
initPage
();
...
...
@@ -482,24 +482,30 @@ const enterPageEvent = () => {
path
:
routerConfig
.
createLive
.
path
,
query
:
newQuery
,
});
// 创建uuid
commitInfo
({
// 文本脚本的uuid
[
createLiveKeys
.
scriptUuid
]:
getUuid
(),
});
};
onBeforeMount
(()
=>
{
initPage
();
let
newQuery
=
JSON
.
parse
(
JSON
.
stringify
(
route
.
query
));
store
.
commit
(
'navbar/setNavbar'
,
{
path
:
routerConfig
.
createLive
.
path
,
query
:
newQuery
,
});
});
// 缓存进入
onActivated
(()
=>
{
// 初始化页面的参数
if
(
currentQuery
.
value
.
type
===
'new'
&&
route
.
query
.
type
===
'edit'
)
{
submitSuccessed
(
''
,
false
);
}
enterPageEvent
();
});
// 路由离开前保存query
onBeforeRouteLeave
(()
=>
{
currentQuery
.
value
=
route
.
query
;
let
type
=
currentQuery
.
value
.
type
;
if
(
type
===
'edit'
||
type
===
'edit_drafts'
)
{
submitSuccessed
(
''
,
false
);
}
});
// 缓存离开
...
...
src/pages/home/index.vue
View file @
c00044ec
...
...
@@ -80,6 +80,7 @@ import { useRouter } from 'vue-router';
import
{
getDigitalPeopleList
}
from
'@/service/Common'
;
import
Button
from
'@/components/Button.vue'
;
import
{
callPyjsInWindow
}
from
'@/utils/pyqt'
;
import
{
jumpToCreateLivePage
}
from
'@/router/jump'
;
const
router
=
useRouter
();
...
...
@@ -152,15 +153,14 @@ const cardClick = (id: string | number) => {
// 弹窗确认
const
dialogConfirm
=
()
=>
{
dialogVisible
.
value
=
false
;
router
.
push
({
path
:
routerConfig
.
createLive
.
path
,
name
:
routerConfig
.
createLive
.
name
,
query
:
{
jumpToCreateLivePage
(
{
id
:
currentCard
.
value
,
title
:
liveName
.
value
,
type
:
'new'
,
},
});
true
,
);
};
const
getList
=
async
()
=>
{
...
...
src/router/jump.ts
0 → 100644
View file @
c00044ec
import
router
from
'@/router'
;
import
routerConfig
from
'@/router/tool'
;
// 跳转到创建直播页面
export
const
jumpToCreateLivePage
=
(
query
:
any
,
clearCache
:
boolean
=
false
)
=>
{
router
.
push
({
path
:
routerConfig
.
createLive
.
path
,
name
:
routerConfig
.
createLive
.
name
,
query
:
{
...
query
,
clearCache
:
clearCache
,
},
});
};
src/service/Common.ts
View file @
c00044ec
...
...
@@ -5,8 +5,6 @@ import {
updateLiveTask
,
getGroupsInteraction
,
updateDrafts
,
liveContentRegenerate
,
liveContentRegenerateCallback
,
}
from
'@/utils/api/userApi'
;
import
{
typeTones
,
typeSoundColor
}
from
'@/service/CreateLive'
;
import
{
show_message
}
from
'@/utils/tool'
;
...
...
src/utils/request.ts
View file @
c00044ec
...
...
@@ -11,8 +11,8 @@ const getBaseUrl = () => {
// return 'http://156.247.11.21:92/';
return
''
;
}
//
return 'http://video-assistant.test';
return
'http://156.247.11.21:92/'
;
return
'http://video-assistant.test'
;
//
return 'http://156.247.11.21:92/';
};
const
instance
=
axios
.
create
({
...
...
vite.config.ts
View file @
c00044ec
...
...
@@ -26,9 +26,9 @@ export default defineConfig(({ command, mode }) => {
plugins
:
[
createVuePlugin
(),
vueJsx
(),
//
eslintPlugin({
//
include: ['src/**/*.ts', 'src/**/*.vue', 'src/*.ts', 'src/*.vue'],
//
}),
eslintPlugin
({
include
:
[
'src/**/*.ts'
,
'src/**/*.vue'
,
'src/*.ts'
,
'src/*.vue'
],
}),
viteMockServe
({
mockPath
:
'mock'
,
localEnabled
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment