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
c9ec9cdc
Commit
c9ec9cdc
authored
Sep 14, 2023
by
haojie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v4test' of
http://124.223.61.50:8099/haojie/live-management-web
into v5
parents
b9282d44
a3d210c3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
217 additions
and
44 deletions
+217
-44
src/pages/OnlyVideoLive/useScript.ts
+38
-36
src/pages/home/components/myDigtalPeople.vue
+97
-7
src/pages/onlyAudioLive/index.vue
+72
-0
src/pages/onlyAudioLive/useScript.ts
+0
-0
src/service/Live.ts
+8
-0
src/utils/request.ts
+2
-1
No files found.
src/pages/OnlyVideoLive/useScript.ts
View file @
c9ec9cdc
...
@@ -591,52 +591,54 @@ export default function () {
...
@@ -591,52 +591,54 @@ export default function () {
try
{
try
{
let
res
:
any
=
await
getLiveDetail
(
getRouteId
());
let
res
:
any
=
await
getLiveDetail
(
getRouteId
());
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
if
(
isDev
())
{
// if (isDev()) {
// 创建url
// // 创建url
res
.
data
=
{};
// res.data = {};
let
url
=
'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-22c130e428-cab2-4e1e-8904-88054d84bc1b.mp4'
;
// let url =
// let url =
// 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-21c68c10b7-611a-47b3-a3e7-8362c4a206b3.mp4';
// 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-22c130e428-cab2-4e1e-8904-88054d84bc1b.mp4';
let
list
=
[
// // let url =
{
// // 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-21c68c10b7-611a-47b3-a3e7-8362c4a206b3.mp4';
url
:
url
,
// let list = [
type
:
1
,
},
// {
// {
// url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
// url: url,
// type: 3,
// type: 1,
// play_time: 10,
// },
// 动作视频
// {
// url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-2192d4a904-c78a-4a87-9728-d93bb40cad77.mp4',
// type: 3,
// play_time: 172,
// },
// },
// // {
// // url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
// // type: 3,
// // play_time: 10,
// // },
// // 动作视频
// // {
// // url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-2192d4a904-c78a-4a87-9728-d93bb40cad77.mp4',
// // type: 3,
// // play_time: 172,
// // },
// // {
// // url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
// // type: 3,
// // play_time: 172,
// // },
// {
// {
// url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
// url: url,
// type: 3,
// type: 1,
// play_time: 172,
// },
// },
{
// // {
url
:
url
,
// // url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
type
:
1
,
// // type: 3,
},
// // play_time: 0,
// {
// // },
// url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
// ];
// type: 3,
// play_time: 0,
// res.data.url = list;
// },
// }
];
console
.
log
(
res
.
data
);
res
.
data
.
url
=
list
;
}
if
(
DataType
(
res
.
data
,
'object'
)
&&
res
.
data
.
url
&&
res
.
data
.
url
.
length
)
{
if
(
DataType
(
res
.
data
,
'object'
)
&&
res
.
data
.
url
&&
res
.
data
.
url
.
length
)
{
res
.
data
.
url
.
forEach
((
item
:
any
)
=>
{
res
.
data
.
url
.
forEach
((
item
:
any
)
=>
{
item
.
uuid
=
v4
();
item
.
uuid
=
v4
();
});
});
const
mainUrl
=
res
.
data
.
url
.
filter
((
item
:
any
)
=>
item
.
type
==
mainVideoType
);
const
mainUrl
=
res
.
data
.
url
.
filter
((
item
:
any
)
=>
item
.
type
==
mainVideoType
);
console
.
log
(
mainUrl
,
'mainUrl'
);
const
actionUrl
=
res
.
data
.
url
.
filter
((
item
:
any
)
=>
{
const
actionUrl
=
res
.
data
.
url
.
filter
((
item
:
any
)
=>
{
if
(
item
.
type
==
actionVideoType
)
{
if
(
item
.
type
==
actionVideoType
)
{
item
.
remove
=
false
;
item
.
remove
=
false
;
...
...
src/pages/home/components/myDigtalPeople.vue
View file @
c9ec9cdc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<div
class=
"my-digtal-people"
>
<div
class=
"my-digtal-people"
>
<Grid
:length=
"myDigtalList.list.length"
:marginLeft=
"35"
>
<Grid
:length=
"myDigtalList.list.length"
:marginLeft=
"35"
>
<template
v-for=
"item in myDigtalList.list"
:key=
"item.id"
>
<template
v-for=
"item in myDigtalList.list"
:key=
"item.id"
>
<template
v-if=
"item.type == LIVE_TYPES.VIDEO_LIVE"
>
<CardTwo
<CardTwo
:id=
"item.id"
:id=
"item.id"
:img=
"item.cover_url"
:img=
"item.cover_url"
...
@@ -19,7 +20,11 @@
...
@@ -19,7 +20,11 @@
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<Button
class=
"digtal-people-start-end"
theme=
"danger"
height=
"40px"
>
开播中
</Button>
<Button
class=
"digtal-people-start-end"
theme=
"danger"
height=
"40px"
>
开播中
</Button>
<Button
class=
"digtal-people-ctrl"
theme=
"danger"
height=
"40px"
@
click=
"openInteractiveResponse(item)"
<Button
class=
"digtal-people-ctrl"
theme=
"danger"
height=
"40px"
@
click=
"openInteractiveResponse(item)"
>
控制台
</Button
>
控制台
</Button
>
>
</
template
>
</
template
>
...
@@ -44,6 +49,28 @@
...
@@ -44,6 +49,28 @@
</template>
</template>
</CardTwo>
</CardTwo>
</template>
</template>
<
template
v-else
>
<div
class=
"my-digtal-people-audio"
>
<div
class=
"digtal-people-audio-content"
>
<img
:src=
"imgs.start"
alt=
""
@
click=
"startLive(item)"
/>
<Button
class=
"digtal-people-ctrl"
v-if=
"item.is_live || isDev()"
theme=
"danger"
height=
"40px"
@
click=
"openInteractiveResponse(item)"
>
控制台
</Button
>
</div>
<div
class=
"digtal-people-audio-footer"
>
<ChangeName
:value=
"item.name"
@
change=
"nameChange"
></ChangeName>
<div
class=
"create-time"
>
{{
item
.
created_at
}}
</div>
</div>
</div>
</
template
>
</template>
</Grid>
</Grid>
<CustomLoading
v-show=
"myDigtalList.loading"
></CustomLoading>
<CustomLoading
v-show=
"myDigtalList.loading"
></CustomLoading>
<ConfirmDialog
v-model=
"confirmVisible"
title=
"确定删除吗?"
@
confirm=
"confirm"
></ConfirmDialog>
<ConfirmDialog
v-model=
"confirmVisible"
title=
"确定删除吗?"
@
confirm=
"confirm"
></ConfirmDialog>
...
@@ -51,6 +78,7 @@
...
@@ -51,6 +78,7 @@
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
ChangeName
from
'@/components/changeName.vue'
;
import
OtherLoading
from
'@/components/Loading/FirstCircle.vue'
;
import
OtherLoading
from
'@/components/Loading/FirstCircle.vue'
;
import
Grid
from
'@/components/Grid.vue'
;
import
Grid
from
'@/components/Grid.vue'
;
import
{
onMounted
,
reactive
,
ref
,
watch
}
from
'vue'
;
import
{
onMounted
,
reactive
,
ref
,
watch
}
from
'vue'
;
...
@@ -64,6 +92,7 @@ import { onUpdateLiveTask } from '@/service/Common';
...
@@ -64,6 +92,7 @@ import { onUpdateLiveTask } from '@/service/Common';
import
{
getLiveTask
,
deleteLiveTask
,
liveVideoDownload
}
from
'@/utils/api/userApi'
;
import
{
getLiveTask
,
deleteLiveTask
,
liveVideoDownload
}
from
'@/utils/api/userApi'
;
import
{
isDev
,
show_message
}
from
'@/utils/tool'
;
import
{
isDev
,
show_message
}
from
'@/utils/tool'
;
import
{
callPyjsInWindow
,
injectWindow
,
pyDownloadVideo
}
from
'@/utils/pyqt'
;
import
{
callPyjsInWindow
,
injectWindow
,
pyDownloadVideo
}
from
'@/utils/pyqt'
;
import
{
LIVE_TYPES
}
from
'@/service/Live'
;
// import { jumpToCreateLivePage } from '@/router/jump';
// import { jumpToCreateLivePage } from '@/router/jump';
const
props
=
withDefaults
(
const
props
=
withDefaults
(
...
@@ -73,6 +102,11 @@ const props = withDefaults(
...
@@ -73,6 +102,11 @@ const props = withDefaults(
{},
{},
);
);
const
imgs
=
{
start
:
new
URL
(
'@/assets/svg/custom/startAudio.svg'
,
import
.
meta
.
url
).
href
,
stop
:
new
URL
(
'@/assets/svg/custom/stopAudio.svg'
,
import
.
meta
.
url
).
href
,
};
const
router
=
useRouter
();
const
router
=
useRouter
();
const
myDigtalList
=
reactive
({
const
myDigtalList
=
reactive
({
...
@@ -86,24 +120,36 @@ const confirmId = ref('');
...
@@ -86,24 +120,36 @@ const confirmId = ref('');
// 页面跳转前的校验
// 页面跳转前的校验
const
beforePageJump
=
(
item
:
any
)
=>
{
const
beforePageJump
=
(
item
:
any
)
=>
{
if
(
item
.
status
==
2
)
{
if
(
item
.
status
==
2
&&
!
isDev
()
)
{
show_message
(
'直播未准备完毕'
);
show_message
(
'直播未准备完毕'
);
return
;
return
;
}
}
let
obj
=
myDigtalList
.
list
.
find
((
it
:
any
)
=>
it
.
is_live
==
1
);
let
obj
=
myDigtalList
.
list
.
find
((
it
:
any
)
=>
it
.
is_live
==
1
);
if
(
obj
&&
obj
.
id
!=
item
.
id
)
{
if
(
obj
&&
obj
.
id
!=
item
.
id
&&
!
isDev
()
)
{
show_message
(
'已有开播任务,请先关闭直播'
);
show_message
(
'已有开播任务,请先关闭直播'
);
return
;
return
;
}
}
let
params
:
{
let
params
=
{
id
:
number
;
status
:
number
;
digital_image
?:
string
;
digital_name
?:
string
;
is_live
:
number
;
page_path
?:
string
;
type
:
number
;
}
=
{
id
:
item
.
id
,
id
:
item
.
id
,
status
:
item
.
status
,
status
:
item
.
status
,
digital_image
:
item
.
cover_url
,
digital_name
:
item
.
name
,
is_live
:
item
.
is_live
,
is_live
:
item
.
is_live
,
page_path
:
''
,
page_path
:
''
,
type
:
item
.
type
,
};
};
if
(
item
.
type
==
LIVE_TYPES
.
VIDEO_LIVE
)
{
params
.
digital_image
=
item
.
cover_url
;
params
.
digital_name
=
item
.
name
;
}
else
if
(
item
.
type
==
LIVE_TYPES
.
AUDIO_LIVE
)
{
// params = {};
}
return
params
;
return
params
;
};
};
...
@@ -135,8 +181,10 @@ const downLoadVideo = async (item: any) => {
...
@@ -135,8 +181,10 @@ const downLoadVideo = async (item: any) => {
};
};
const
startLive
=
(
item
:
any
)
=>
{
const
startLive
=
(
item
:
any
)
=>
{
// 视频直播页
let
params
=
beforePageJump
(
item
);
let
params
=
beforePageJump
(
item
);
if
(
params
)
{
if
(
params
)
{
if
(
item
.
type
==
LIVE_TYPES
.
VIDEO_LIVE
)
{
if
(
isDev
())
{
if
(
isDev
())
{
// 新的播放页面
// 新的播放页面
router
.
push
({
router
.
push
({
...
@@ -149,6 +197,16 @@ const startLive = (item: any) => {
...
@@ -149,6 +197,16 @@ const startLive = (item: any) => {
// 打开只有视频播放的页面
// 打开只有视频播放的页面
callPyjsInWindow
(
'openLivePage'
,
params
);
callPyjsInWindow
(
'openLivePage'
,
params
);
}
}
}
else
if
(
item
.
type
==
LIVE_TYPES
.
AUDIO_LIVE
)
{
// 音频直播页
if
(
isDev
())
{
router
.
push
({
path
:
routerConfig
.
onlyVideoLive
.
path
,
name
:
routerConfig
.
onlyVideoLive
.
name
,
query
:
params
,
});
}
}
}
}
};
};
...
@@ -252,6 +310,38 @@ watch(
...
@@ -252,6 +310,38 @@ watch(
background
:
#303030
;
background
:
#303030
;
position
:
relative
;
position
:
relative
;
min-height
:
300px
;
min-height
:
300px
;
.my-digtal-people-audio
{
width
:
200px
;
height
:
411px
;
border-radius
:
8px
;
background
:
#1e1e1e
;
.dja();
flex-direction
:
column
;
.digtal-people-audio-content
{
flex
:
1
;
.dja(space-evenly);
flex-direction
:
column
;
img
{
cursor
:
pointer
;
}
.t-button
{
width
:
176px
;
}
}
.digtal-people-audio-footer
{
width
:
100%
;
padding
:
6px
12px
;
display
:
flex
;
flex-direction
:
column
;
border-top
:
1px
solid
#303030
;
justify-content
:
space-evenly
;
.create-time
{
font-size
:
@
size-13
;
color
:
#b3b3b3
;
text-align
:
left
;
}
}
}
.custom-loading-two
{
.custom-loading-two
{
top
:
150px
;
top
:
150px
;
transform
:
translate
(
-50%
,
0
);
transform
:
translate
(
-50%
,
0
);
...
...
src/pages/onlyAudioLive/index.vue
0 → 100644
View file @
c9ec9cdc
<
template
>
<div
class=
"custom-start-only-video-page"
>
<div
class=
"start-only-video-live"
>
<AddVideoPlay
v-model:currentPlayMainIndex=
"currentPlayMainIndex"
v-model:showActionVideo=
"showActionVideo"
v-model:firstVideoIsMain=
"firstVideoIsMain"
v-model:endVideoIsMain=
"endVideoIsMain"
:loading=
"loading"
:playId=
"addVideoId"
:liveDetail=
"liveDetail"
:video2=
"addVideo"
:actionVideo=
"actionVideo"
:mainVideoList=
"mainVideoList"
:currentMainVideoIndex=
"currentMainVideoIndex"
:playInfo=
"playInfo"
:realVideoList=
"realVideoList"
@
playEnd=
"playEnd"
@
actionPlayChange=
"actionPlayChange"
@
initActionVideo=
"initActionVideo"
@
currentTime=
"currentTimeChange"
@
mainVideoListChange=
"mainVideoListChange"
></AddVideoPlay>
</div>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
AddVideoPlay
from
'@/components/AddVideoPlay.vue'
;
import
useScript
from
'./useScript'
;
const
{
currentPlayMainIndex
,
loading
,
addVideoId
,
liveDetail
,
addVideo
,
actionVideo
,
mainVideoList
,
currentMainVideoIndex
,
playInfo
,
firstVideoIsMain
,
endVideoIsMain
,
showActionVideo
,
realVideoList
,
playEnd
,
actionPlayChange
,
currentTimeChange
,
mainVideoListChange
,
initActionVideo
,
}
=
useScript
();
</
script
>
<
style
lang=
"less"
>
@import
'@/style/variables.less'
;
.custom-start-only-video-page
{
display
:
flex
;
width
:
100%
!important
;
padding
:
0
!important
;
overflow
:
hidden
;
&
>
*
{
width
:
100%
;
background
:
#303030
;
height
:
100%
;
}
.start-only-video-live
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
box-sizing
:
border-box
;
}
}
</
style
>
src/pages/
OnlyVideoLive/index.vue
→
src/pages/
onlyAudioLive/useScript.ts
View file @
c9ec9cdc
This diff is collapsed.
Click to expand it.
src/service/Live.ts
View file @
c9ec9cdc
...
@@ -20,3 +20,11 @@ export const CONFUSE_STATUS = {
...
@@ -20,3 +20,11 @@ export const CONFUSE_STATUS = {
CONFUSE_STATUS_PROGRESS
:
2
,
// 进行中
CONFUSE_STATUS_PROGRESS
:
2
,
// 进行中
CONFUSE_STATUS_SUCCESS
:
3
,
// 已完成
CONFUSE_STATUS_SUCCESS
:
3
,
// 已完成
};
};
/**
* 直播间类型
*/
export
const
LIVE_TYPES
=
{
VIDEO_LIVE
:
1
,
// 视频直播
AUDIO_LIVE
:
2
,
// 音频直播
};
src/utils/request.ts
View file @
c9ec9cdc
...
@@ -8,7 +8,8 @@ const error_messaage = '请求错误';
...
@@ -8,7 +8,8 @@ const error_messaage = '请求错误';
const
getBaseUrl
=
async
()
=>
{
const
getBaseUrl
=
async
()
=>
{
if
(
isDev
())
{
if
(
isDev
())
{
return
'http://rpc.chensav.top'
;
// return 'http://rpc.chensav.top';
// return 'http://156.247.11.21:93';
return
''
;
return
''
;
}
}
// 默认线上地址
// 默认线上地址
...
...
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