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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
22 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 => {
...
@@ -292,4 +292,16 @@ const getCrowdfundingParams = params => {
sign
:
true
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 @@
...
@@ -935,7 +935,7 @@
<el-tabs
v-model=
"editForm.liveBroadcastMediaType"
>
<el-tabs
v-model=
"editForm.liveBroadcastMediaType"
>
<el-tab-pane
<el-tab-pane
label=
"选择直播"
label=
"选择直播"
name=
"1"
:
name=
"1"
>
>
<glsx-combi-form
<glsx-combi-form
class=
"edit-form-container"
class=
"edit-form-container"
...
@@ -986,7 +986,7 @@
...
@@ -986,7 +986,7 @@
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
<el-tab-pane
label=
"选择视频"
label=
"选择视频"
name=
"2"
:
name=
"2"
>
>
<glsx-combi-form
<glsx-combi-form
class=
"edit-form-container"
class=
"edit-form-container"
...
@@ -1261,13 +1261,14 @@ export default {
...
@@ -1261,13 +1261,14 @@ export default {
// formDescribeThird: '',
// formDescribeThird: '',
showAvatarNicknameFlag
:
1
,
showAvatarNicknameFlag
:
1
,
liveFlag
:
false
,
liveFlag
:
false
,
liveBroadcastMediaType
:
'1'
,
//直播方式:1直播间,2短视频
liveBroadcastMediaType
:
1
,
//直播方式:1直播间,2短视频
liveBroadcastRoomId
:
''
,
liveBroadcastRoomId
:
''
,
groupQrCode
:
''
,
groupQrCode
:
''
,
floatingMaskDiagram
:
''
,
floatingMaskDiagram
:
''
,
liveBroadcastRoomCover
:
''
,
liveBroadcastRoomCover
:
''
,
liveBroadcastRoomEndCover
:
''
,
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直播回放
liveBroadcastStateFlag
:
1
,
//直播(2短视频)状态标签:1直播中,2直播回放
employeeRegistrationLinkFlag
:
2
,
employeeRegistrationLinkFlag
:
2
,
reservationInstallContactsName
:
''
,
reservationInstallContactsName
:
''
,
...
@@ -2118,7 +2119,7 @@ export default {
...
@@ -2118,7 +2119,7 @@ export default {
liveEditFormData_2
:
[
liveEditFormData_2
:
[
{
{
label
:
'视频'
,
label
:
'视频'
,
name
:
'liveBroadcastMedia
Url
'
,
name
:
'liveBroadcastMedia
Id
'
,
type
:
'select'
,
type
:
'select'
,
// tips: '暂无视频,请到运营平台直播间管理创建新的视频',
// tips: '暂无视频,请到运营平台直播间管理创建新的视频',
maxlength
:
30
,
maxlength
:
30
,
...
@@ -2187,7 +2188,7 @@ export default {
...
@@ -2187,7 +2188,7 @@ export default {
},
},
//直播验证规则_2
//直播验证规则_2
liveEditRule_2
:
{
liveEditRule_2
:
{
liveBroadcastMediaUrl
:
[{
required
:
true
,
message
:
'请选择
直播
'
,
trigger
:
'change'
}],
liveBroadcastMediaUrl
:
[{
required
:
true
,
message
:
'请选择
视频
'
,
trigger
:
'change'
}],
liveBroadcastRoomCover
:
[
liveBroadcastRoomCover
:
[
{
{
required
:
true
,
required
:
true
,
...
@@ -2218,6 +2219,7 @@ export default {
...
@@ -2218,6 +2219,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
getLiveList
()
this
.
getLiveList
()
this
.
getVideoList
()
this
.
setMinHeight
(
'.crowd-config'
)
this
.
setMinHeight
(
'.crowd-config'
)
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
this
.
getPayList
()
this
.
routeInfo
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
this
.
getPayList
()
...
@@ -2256,9 +2258,22 @@ export default {
...
@@ -2256,9 +2258,22 @@ export default {
'editForm.fictitiousViewQuantity'
(
newValue
,
oldValue
)
{
'editForm.fictitiousViewQuantity'
(
newValue
,
oldValue
)
{
this
.
editForm
.
fictitiousViewQuantity
=
limitPrice
(
newValue
,
oldValue
,
7
,
0
,
0
)
this
.
editForm
.
fictitiousViewQuantity
=
limitPrice
(
newValue
,
oldValue
,
7
,
0
,
0
)
},
},
'editForm.liveBroadcastRoomId'
(
newValue
,
oldValue
)
{
'editForm.liveBroadcastMediaId'
(
newValue
,
oldValue
)
{
this
.
editForm
.
liveFlag
=
newValue
?
true
:
false
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
)
{
'editForm.targetStock'
(
newValue
,
oldValue
)
{
this
.
editForm
.
targetStock
=
limitPrice
(
newValue
,
oldValue
,
99999
,
0
)
this
.
editForm
.
targetStock
=
limitPrice
(
newValue
,
oldValue
,
99999
,
0
)
},
},
...
@@ -2759,16 +2774,31 @@ export default {
...
@@ -2759,16 +2774,31 @@ export default {
this
.
$apis
.
seckillActivity
this
.
$apis
.
seckillActivity
.
getActivityDetailApi
({
id
:
this
.
routeInfo
.
id
})
.
getActivityDetailApi
({
id
:
this
.
routeInfo
.
id
})
.
then
(
res
=>
{
.
then
(
res
=>
{
var
info
=
res
var
info
=
res
,
selectedProInfo
=
[],
goodsList
=
[]
/**商品 */
/**商品 */
info
.
goodsList
&&
info
.
goodsList
.
map
(
e
=>
{
res
.
goodsList
&&
res
.
goodsList
.
map
(
e
=>
{
e
.
activityPrice
=
(
e
.
activityPrice
/
100
).
toFixed
(
2
)
goodsList
.
push
({
e
.
crowdFundingPrice
=
(
e
.
crowdFundingPrice
/
100
).
toFixed
(
2
)
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
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
activityInfo
=
info
this
.
activityInfo
=
info
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
startTime
,
info
.
endTime
])
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
startTime
,
info
.
endTime
])
this
.
selectedProInfo
=
info
.
goodsList
this
.
selectedProInfo
=
selectedProInfo
// 预估销量
// 预估销量
if
(
info
.
predictVolume
)
{
if
(
info
.
predictVolume
)
{
this
.
editForm
.
predictVolume
=
(
info
.
predictVolume
/
100
).
toFixed
(
2
)
this
.
editForm
.
predictVolume
=
(
info
.
predictVolume
/
100
).
toFixed
(
2
)
...
@@ -2940,11 +2970,17 @@ export default {
...
@@ -2940,11 +2970,17 @@ export default {
})
})
//直播
//直播
if
(
param
.
liveFlag
)
{
if
(
param
.
liveFlag
)
{
//直播
if
(
param
.
liveBroadcastMediaType
==
1
)
{
if
(
!
param
.
floatingMaskDiagram
)
param
.
floatingMaskDiagram
=
this
.
defaultFloatingMaskDiagram
if
(
!
param
.
floatingMaskDiagram
)
param
.
floatingMaskDiagram
=
this
.
defaultFloatingMaskDiagram
if
(
!
param
.
liveBroadcastRoomCover
)
param
.
liveBroadcastRoomCover
=
this
.
defaultImgObj
.
COVER_LIVE
if
(
!
param
.
liveBroadcastRoomCover
)
param
.
liveBroadcastRoomCover
=
this
.
defaultImgObj
.
COVER_LIVE
if
(
!
param
.
liveBroadcastRoomEndCover
)
param
.
liveBroadcastRoomEndCover
=
this
.
defaultImgObj
.
COVER_REPLAY
if
(
!
param
.
liveBroadcastRoomEndCover
)
param
.
liveBroadcastRoomEndCover
=
this
.
defaultImgObj
.
COVER_REPLAY
}
else
{
}
else
{
let
resetAttr
=
this
.
liveEditFormData
.
map
(
item
=>
item
.
name
)
// 视频直播
delete
param
.
liveBroadcastMediaId
}
}
else
{
let
resetAttr
=
this
.
liveEditFormData_1
.
map
(
item
=>
item
.
name
)
resetAttr
.
forEach
(
item
=>
{
resetAttr
.
forEach
(
item
=>
{
param
[
item
]
=
''
param
[
item
]
=
''
})
})
...
@@ -3018,7 +3054,7 @@ export default {
...
@@ -3018,7 +3054,7 @@ export default {
addOrUpdate
()
{
addOrUpdate
()
{
this
.
loading
=
true
this
.
loading
=
true
var
params
=
this
.
getCouponInfoParams
()
var
params
=
this
.
getCouponInfoParams
()
console
.
table
({
...
params
}
)
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
params
))
)
this
.
$apis
.
seckillActivity
this
.
$apis
.
seckillActivity
.
addOrUpdateActivityApi
(
params
)
.
addOrUpdateActivityApi
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -3179,20 +3215,30 @@ export default {
...
@@ -3179,20 +3215,30 @@ export default {
this
.
cancelJump
()
this
.
cancelJump
()
}
}
},
},
//获取跟进员工
getLiveList
()
{
getLiveList
()
{
this
.
$apis
.
seckillActivity
.
getLiveListApi
({}).
then
(
res
=>
{
this
.
$apis
.
seckillActivity
.
getLiveListApi
({}).
then
(
res
=>
{
if
(
res
.
length
==
0
)
return
''
if
(
res
.
length
==
0
)
return
''
const
index
=
this
.
liveEditFormData
.
findIndex
(
item
=>
{
return
item
.
name
==
'liveBroadcastRoomId'
})
const
staff
=
res
.
map
(
item
=>
{
const
staff
=
res
.
map
(
item
=>
{
return
{
return
{
label
:
item
.
name
+
' - '
+
item
.
code
,
label
:
item
.
name
+
' - '
+
item
.
code
,
value
:
item
.
id
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
()
{
getPayMerchatList
()
{
...
@@ -3232,7 +3278,7 @@ export default {
...
@@ -3232,7 +3278,7 @@ export default {
},
},
//预览直播视频
//预览直播视频
hideVideo
()
{
hideVideo
()
{
this
.
liveVideoVisible
=
false
this
.
liveVideoVisible
=
false
this
.
$refs
.
liveVideo
.
pause
()
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