Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-activity-center
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0b3e8565
authored
Feb 09, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
视频直播
1 parent
6f95253b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
25 deletions
src/api/modules/seckillActivity.js
src/views/seckillActivity/editCrowdFund.vue
src/api/modules/seckillActivity.js
View file @
0b3e856
...
...
@@ -292,4 +292,16 @@ const getCrowdfundingParams = params => {
sign
:
true
})
}
export
default
{
getPayListApi
,
getPayMerchatListApi
,
liveroomDetailexport
,
liveroomDetailpage
,
liveroomOverview
,
getActivityPageApi
,
getCrowdfundListApi
,
exportCrowdfundApi
,
getBrowseListApi
,
exportBrowseApi
,
toggleStatusApi
,
deleteActivityApi
,
topActivityApi
,
getSharedApi
,
addOrUpdateActivityApi
,
getActivityDetailApi
,
getCrowdSharedApi
,
getLiveListApi
,
getRankListApi
,
exportRankListApi
,
getDataBoardApi
,
getVisitorListApi
,
getSharedListApi
,
getDailyOrderQuantityStatistics
,
exportDailyOrderQuantityStatistics
,
getCrowdfundingParams
}
/**众筹活动直播视频列表 */
const
getTencentcloudmediaList
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.tencentcloudmedia.list'
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getPayListApi
,
getPayMerchatListApi
,
liveroomDetailexport
,
liveroomDetailpage
,
liveroomOverview
,
getActivityPageApi
,
getCrowdfundListApi
,
exportCrowdfundApi
,
getBrowseListApi
,
exportBrowseApi
,
toggleStatusApi
,
deleteActivityApi
,
topActivityApi
,
getSharedApi
,
addOrUpdateActivityApi
,
getActivityDetailApi
,
getCrowdSharedApi
,
getLiveListApi
,
getRankListApi
,
exportRankListApi
,
getDataBoardApi
,
getVisitorListApi
,
getSharedListApi
,
getDailyOrderQuantityStatistics
,
exportDailyOrderQuantityStatistics
,
getCrowdfundingParams
,
getTencentcloudmediaList
}
src/views/seckillActivity/editCrowdFund.vue
View file @
0b3e856
...
...
@@ -935,7 +935,7 @@
<el-tabs
v-model=
"editForm.liveBroadcastMediaType"
>
<el-tab-pane
label=
"选择直播"
name=
"1"
:
name=
"1"
>
<glsx-combi-form
class=
"edit-form-container"
...
...
@@ -986,7 +986,7 @@
</el-tab-pane>
<el-tab-pane
label=
"选择视频"
name=
"2"
:
name=
"2"
>
<glsx-combi-form
class=
"edit-form-container"
...
...
@@ -1261,13 +1261,14 @@ export default {
// formDescribeThird: '',
showAvatarNicknameFlag
:
1
,
liveFlag
:
false
,
liveBroadcastMediaType
:
'1'
,
//直播方式:1直播间,2短视频
liveBroadcastMediaType
:
1
,
//直播方式:1直播间,2短视频
liveBroadcastRoomId
:
''
,
groupQrCode
:
''
,
floatingMaskDiagram
:
''
,
liveBroadcastRoomCover
:
''
,
liveBroadcastRoomEndCover
:
''
,
liveBroadcastMediaUrl
:
'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/video/360_AR.mp4'
,
//直播(2短视频)播放媒体url
liveBroadcastMediaUrl
:
''
,
//直播(2短视频)播放媒体url
liveBroadcastMediaId
:
''
,
liveBroadcastStateFlag
:
1
,
//直播(2短视频)状态标签:1直播中,2直播回放
employeeRegistrationLinkFlag
:
2
,
reservationInstallContactsName
:
''
,
...
...
@@ -2118,7 +2119,7 @@ export default {
liveEditFormData_2
:
[
{
label
:
'视频'
,
name
:
'liveBroadcastMedia
Url
'
,
name
:
'liveBroadcastMedia
Id
'
,
type
:
'select'
,
// tips: '暂无视频,请到运营平台直播间管理创建新的视频',
maxlength
:
30
,
...
...
@@ -2187,7 +2188,7 @@ export default {
},
//直播验证规则_2
liveEditRule_2
:
{
liveBroadcastMediaUrl
:
[{
required
:
true
,
message
:
'请选择
直播
'
,
trigger
:
'change'
}],
liveBroadcastMediaUrl
:
[{
required
:
true
,
message
:
'请选择
视频
'
,
trigger
:
'change'
}],
liveBroadcastRoomCover
:
[
{
required
:
true
,
...
...
@@ -2218,6 +2219,7 @@ export default {
},
mounted
()
{
this
.
getLiveList
()
this
.
getVideoList
()
this
.
setMinHeight
(
'.crowd-config'
)
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
this
.
getPayList
()
...
...
@@ -2256,9 +2258,22 @@ export default {
'editForm.fictitiousViewQuantity'
(
newValue
,
oldValue
)
{
this
.
editForm
.
fictitiousViewQuantity
=
limitPrice
(
newValue
,
oldValue
,
7
,
0
,
0
)
},
'editForm.liveBroadcastRoomId'
(
newValue
,
oldValue
)
{
this
.
editForm
.
liveFlag
=
newValue
?
true
:
false
'editForm.liveBroadcastMediaId'
(
newValue
,
oldValue
)
{
this
.
liveEditFormData_2
[
0
].
optionList
.
map
(
e
=>
{
if
(
newValue
)
{
if
(
e
.
value
==
newValue
)
{
this
.
editForm
.
liveBroadcastRoomCover
=
e
.
coverUrl
this
.
editForm
.
liveBroadcastMediaUrl
=
e
.
mediaUrl
}
}
else
{
if
(
this
.
editForm
.
liveBroadcastMediaUrl
==
e
.
mediaUrl
)
{
console
.
log
(
e
.
value
)
this
.
editForm
.
liveBroadcastMediaId
=
e
.
value
}
}
})
},
'editForm.targetStock'
(
newValue
,
oldValue
)
{
this
.
editForm
.
targetStock
=
limitPrice
(
newValue
,
oldValue
,
99999
,
0
)
},
...
...
@@ -2759,16 +2774,31 @@ export default {
this
.
$apis
.
seckillActivity
.
getActivityDetailApi
({
id
:
this
.
routeInfo
.
id
})
.
then
(
res
=>
{
var
info
=
res
var
info
=
res
,
selectedProInfo
=
[],
goodsList
=
[]
/**商品 */
info
.
goodsList
&&
info
.
goodsList
.
map
(
e
=>
{
e
.
activityPrice
=
(
e
.
activityPrice
/
100
).
toFixed
(
2
)
e
.
crowdFundingPrice
=
(
e
.
crowdFundingPrice
/
100
).
toFixed
(
2
)
res
.
goodsList
&&
res
.
goodsList
.
map
(
e
=>
{
goodsList
.
push
({
activityPrice
:
(
e
.
activityPrice
/
100
).
toFixed
(
2
),
crowdFundingPrice
:
(
e
.
crowdFundingPrice
/
100
).
toFixed
(
2
),
goodsId
:
e
.
goodsId
,
goodsStock
:
e
.
activityGoodsStock
})
selectedProInfo
.
push
({
goodsId
:
e
.
goodsId
,
goodsImage
:
e
.
goodsImage
,
retailPrice
:
e
.
originalPrice
,
goodsStock
:
e
.
goodsStock
,
goodsName
:
e
.
goodsName
})
})
if
(
res
.
liveBroadcastMediaUrl
||
res
.
liveBroadcastRoomId
)
res
.
liveFlag
=
true
info
.
goodsList
=
goodsList
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
activityInfo
=
info
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
startTime
,
info
.
endTime
])
this
.
selectedProInfo
=
info
.
goodsList
this
.
selectedProInfo
=
selectedProInfo
// 预估销量
if
(
info
.
predictVolume
)
{
this
.
editForm
.
predictVolume
=
(
info
.
predictVolume
/
100
).
toFixed
(
2
)
...
...
@@ -2940,11 +2970,17 @@ export default {
})
//直播
if
(
param
.
liveFlag
)
{
if
(
!
param
.
floatingMaskDiagram
)
param
.
floatingMaskDiagram
=
this
.
defaultFloatingMaskDiagram
if
(
!
param
.
liveBroadcastRoomCover
)
param
.
liveBroadcastRoomCover
=
this
.
defaultImgObj
.
COVER_LIVE
if
(
!
param
.
liveBroadcastRoomEndCover
)
param
.
liveBroadcastRoomEndCover
=
this
.
defaultImgObj
.
COVER_REPLAY
//直播
if
(
param
.
liveBroadcastMediaType
==
1
)
{
if
(
!
param
.
floatingMaskDiagram
)
param
.
floatingMaskDiagram
=
this
.
defaultFloatingMaskDiagram
if
(
!
param
.
liveBroadcastRoomCover
)
param
.
liveBroadcastRoomCover
=
this
.
defaultImgObj
.
COVER_LIVE
if
(
!
param
.
liveBroadcastRoomEndCover
)
param
.
liveBroadcastRoomEndCover
=
this
.
defaultImgObj
.
COVER_REPLAY
}
else
{
// 视频直播
delete
param
.
liveBroadcastMediaId
}
}
else
{
let
resetAttr
=
this
.
liveEditFormData
.
map
(
item
=>
item
.
name
)
let
resetAttr
=
this
.
liveEditFormData
_1
.
map
(
item
=>
item
.
name
)
resetAttr
.
forEach
(
item
=>
{
param
[
item
]
=
''
})
...
...
@@ -3018,7 +3054,7 @@ export default {
addOrUpdate
()
{
this
.
loading
=
true
var
params
=
this
.
getCouponInfoParams
()
console
.
table
({
...
params
}
)
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
params
))
)
this
.
$apis
.
seckillActivity
.
addOrUpdateActivityApi
(
params
)
.
then
(
res
=>
{
...
...
@@ -3179,20 +3215,30 @@ export default {
this
.
cancelJump
()
}
},
//获取跟进员工
getLiveList
()
{
this
.
$apis
.
seckillActivity
.
getLiveListApi
({}).
then
(
res
=>
{
if
(
res
.
length
==
0
)
return
''
const
index
=
this
.
liveEditFormData
.
findIndex
(
item
=>
{
return
item
.
name
==
'liveBroadcastRoomId'
})
const
staff
=
res
.
map
(
item
=>
{
return
{
label
:
item
.
name
+
' - '
+
item
.
code
,
value
:
item
.
id
}
})
this
.
liveEditFormData
.
find
(
item
=>
item
.
name
==
'liveBroadcastRoomId'
).
optionList
=
staff
this
.
liveEditFormData_1
.
find
(
item
=>
item
.
name
==
'liveBroadcastRoomId'
).
optionList
=
staff
})
},
getVideoList
()
{
this
.
$apis
.
seckillActivity
.
getTencentcloudmediaList
({}).
then
(
res
=>
{
if
(
res
.
length
==
0
)
return
''
const
staff
=
res
.
map
(
item
=>
{
return
{
label
:
item
.
fileName
,
mediaUrl
:
item
.
mediaUrl
,
value
:
item
.
id
,
coverUrl
:
item
.
coverUrl
}
})
this
.
liveEditFormData_2
.
find
(
item
=>
item
.
name
==
'liveBroadcastMediaId'
).
optionList
=
staff
})
},
getPayMerchatList
()
{
...
...
@@ -3232,7 +3278,7 @@ export default {
},
//预览直播视频
hideVideo
()
{
hideVideo
()
{
this
.
liveVideoVisible
=
false
this
.
$refs
.
liveVideo
.
pause
()
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment