Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
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 930c000f
authored
Oct 27, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
直播间-控制台
1 parent
81dc9689
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
497 additions
and
87 deletions
src/api/modules/liveRoom.js
src/components/glsx-combi-form/index.vue
src/components/select-muti-pro/index.vue
src/router/routes.js
src/views/cmmodityLibrary/editProduct.vue
src/views/liveRoom/liveControl.vue
src/views/liveRoom/liveRoomList.vue
src/api/modules/liveRoom.js
View file @
930c000
...
@@ -33,4 +33,67 @@ const getLiveRoomInfoApi = params => {
...
@@ -33,4 +33,67 @@ const getLiveRoomInfoApi = params => {
})
})
}
}
export
{
getLiveRoomListApi
,
insertLiveRoomApi
,
getLiveRoomInfoApi
}
const
getControlInfoApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
get.control`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getControlImportListApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
get.import.goods`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getWaitImportListApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
get.wait.import.goods`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
importGoodsApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
import.goods`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
updateCommentApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
update.comment`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
updateReplayApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
update.replay`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
{
getLiveRoomListApi
,
insertLiveRoomApi
,
getLiveRoomInfoApi
,
getControlInfoApi
,
getControlImportListApi
,
getWaitImportListApi
,
importGoodsApi
,
updateCommentApi
,
updateReplayApi
}
src/components/glsx-combi-form/index.vue
View file @
930c000
<!-- 搜索 -->
<!-- 搜索 -->
<
template
>
<
template
>
<div
class=
"glsx-combi-form"
>
<div
class=
"glsx-combi-form"
>
<el-form
:ref=
"formRef"
:inline=
"true"
:model=
"formObj"
:label-width=
"labelWidth"
:rules=
"formRules"
size=
"
mini
"
class=
"glsx-combi-form-block"
>
<el-form
:ref=
"formRef"
:inline=
"true"
:model=
"formObj"
:label-width=
"labelWidth"
:rules=
"formRules"
size=
"
small
"
class=
"glsx-combi-form-block"
>
<template
v-for=
"(item, index) in formData"
>
<template
v-for=
"(item, index) in formData"
>
<el-form-item
v-if=
"!item.isHide"
:key=
"index"
:class=
"
{ 'no-label': !item.label, isBlock: isBlock }" :label="item.label ? item.label + ':' : ''" :prop="item.name">
<el-form-item
v-if=
"!item.isHide"
:key=
"index"
:class=
"
{ 'no-label': !item.label, isBlock: isBlock }" :label="item.label ? item.label + ':' : ''" :prop="item.name">
<span
v-if=
"!item.isHide && item.tips"
class=
"tips-block"
slot=
"label"
>
<span
v-if=
"!item.isHide && item.tips"
class=
"tips-block"
slot=
"label"
>
...
...
src/components/select-muti-pro/index.vue
0 → 100644
View file @
930c000
<!-- 选择商品弹窗 -->
<
template
>
<glsx-dialog
class=
"muti-pro"
title=
"选择商品"
:isVisible
.
sync=
"isMutiSelectVisible"
width=
"70%"
@
confirmDialog=
"handleMutiSelectConfirm"
@
closeDialog=
"handleMutiSelectClose"
>
<div
class=
"flex"
>
<el-form
:inline=
"true"
:model=
"searchForm"
>
<el-form-item
label=
"商品名称:"
>
<el-input
:size=
"size"
v-model=
"searchForm.name"
placeholder=
"请输入商品名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
:size=
"size"
type=
"primary"
@
click=
"getList(true)"
>
查询
</el-button>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
</div>
<GLTable
ref=
"mutiProRef"
:tableData=
"productList"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
>
<span
slot=
"coverImgUrl"
slot-scope=
"scope"
>
<img
class=
"m-t-10 img-60"
:src=
"scope.scope.coverImgUrl"
/>
</span>
</GLTable>
</glsx-dialog>
</
template
>
<
script
>
// import { getGoodsList } from '@/api/modules/common'
import
glsxDialog
from
'@/components/glsx-dialog'
export
default
{
name
:
'selectMutiProDialog'
,
data
()
{
return
{
size
:
'small'
,
// 表格组件
// getListApi: getGoodsList,
productList
:
[],
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams
:
{
listName
:
'list'
,
// 行数据的key
mutiSelectUniqueKey
:
'id'
,
// 多选ref的名称
mutiSelectName
:
'list'
,
tableColumns
:
[
{
label
:
'商品名称'
,
prop
:
'name'
},
{
label
:
'缩略图'
,
prop
:
'coverImgUrl'
,
addHtml
:
'coverImgUrl'
},
{
label
:
'价格(元)'
,
prop
:
'price1'
,
formatter
:
cellValue
=>
{
return
cellValue
.
price2
&&
cellValue
.
price1
!=
cellValue
.
price2
?
(
cellValue
.
price1
/
100
).
toFixed
(
2
)
+
'-'
+
(
cellValue
.
price2
/
100
).
toFixed
(
2
)
:
(
cellValue
.
price1
/
100
).
toFixed
(
2
)
}
},
{
label
:
'来源门店'
,
prop
:
'merchantName'
}
]
}
}
},
props
:
{
isMutiSelectVisible
:
{
type
:
Boolean
,
default
:
false
},
selectedProList
:
{
type
:
Array
,
default
:
()
=>
[]
},
getListApi
:
{
type
:
Function
,
default
:
()
=>
{}
},
searchForm
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
components
:
{
glsxDialog
},
mounted
()
{
this
.
getList
(
true
)
},
methods
:
{
getList
(
isMounted
=
false
)
{
var
params
=
{
// goodsStatus: 1,
// goodsSource: 1,
...
this
.
searchForm
,
pageNum
:
isMounted
?
1
:
this
.
$refs
.
mutiProRef
.
page
.
pageNum
,
pageSize
:
isMounted
?
10
:
this
.
$refs
.
mutiProRef
.
page
.
pageSize
}
var
that
=
this
this
.
getListApi
(
params
).
then
(
res
=>
{
// console.log(res)
this
.
productList
=
res
.
list
this
.
$refs
.
mutiProRef
.
tableTotal
=
res
.
total
this
.
recoverySelected
()
})
},
handleReset
()
{
this
.
searchForm
.
name
=
''
this
.
getList
()
},
recoverySelected
()
{
if
(
this
.
selectedProList
.
length
)
{
this
.
selectedProList
.
forEach
(
row
=>
{
this
.
$refs
.
mutiProRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
row
)
})
}
},
handleMutiSelectConfirm
()
{
var
selectedData
=
this
.
$refs
.
mutiProRef
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
console
.
log
(
selectedData
)
this
.
$emit
(
'handleMutiSelectConfirm'
,
selectedData
)
},
handleMutiSelectClose
()
{
this
.
$emit
(
'handleMutiSelectClose'
)
}
}
}
</
script
>
<
style
>
.muti-pro
.m-t-10
{
margin-top
:
10px
;
}
</
style
>
src/router/routes.js
View file @
930c000
...
@@ -49,7 +49,7 @@ const staticRoutes = Object.freeze([
...
@@ -49,7 +49,7 @@ const staticRoutes = Object.freeze([
},
},
{
{
name
:
'liveControl'
,
name
:
'liveControl'
,
path
:
'/liveRoom/liveControl'
,
path
:
'/liveRoom/liveControl
/:id
'
,
component
:
resolve
=>
require
([
`@/views/liveRoom/liveControl.vue`
],
resolve
),
component
:
resolve
=>
require
([
`@/views/liveRoom/liveControl.vue`
],
resolve
),
meta
:
{}
meta
:
{}
}
}
...
...
src/views/cmmodityLibrary/editProduct.vue
View file @
930c000
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
<
script
>
<
script
>
import
_
from
'lodash'
import
_
from
'lodash'
// import '@/assets/css/public.scss'
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
selectSingleProDialog
from
'./selectSingleProDialog'
import
selectSingleProDialog
from
'./selectSingleProDialog'
import
{
uploadImg
}
from
'@/api/modules/common'
import
{
uploadImg
}
from
'@/api/modules/common'
...
...
src/views/liveRoom/liveControl.vue
View file @
930c000
<!-- 控制台 -->
<!-- 控制台 -->
<
template
>
<
template
>
<div
class=
"live-control"
>
<div
class=
"live-
room live-
control"
>
<div
class=
"container
edit-container
"
>
<div
class=
"container"
>
<div
class=
"box"
>
<div
class=
"box"
>
<p
class=
"edit-title"
>
直播控制台
</p>
<p
class=
"edit-title"
>
直播控制台
</p>
<div
class=
"head-box flex"
>
<div
class=
"head-box flex
-start
"
>
<img
class=
"head-img"
src=
"https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500
"
/>
<img
class=
"head-img"
:src=
"editForm.shareImgUrl
"
/>
<div>
<div>
<p>
{{
liveRoomData
.
title
}}
</p>
<p
class=
"head-title m-b-18"
>
{{
editForm
.
name
}}
</p>
<p>
开播时间:
{{
liveRoomData
.
time
}}
</p>
<p
class=
"txt m-b-18"
>
开播时间:
{{
editForm
.
startTime
+
'-'
+
editForm
.
endTime
}}
</p>
<p>
房间号:
{{
liveRoomData
.
roomNum
}}
</p>
<p
class=
"txt m-b-18"
>
房间号:
{{
editForm
.
id
}}
</p>
<p>
主播:
{{
liveRoomData
.
anchor
}}
</p>
<p
class=
"txt m-b-18"
>
<p>
微信号:
{{
liveRoomData
.
wechat
}}
</p>
<span
class=
"m-r-20"
>
主播:
{{
editForm
.
anchorName
}}
</span>
<p
v-if=
"countDown"
>
开播倒计时:
{{
countDown
}}
</p>
<span>
微信号:
{{
editForm
.
anchorWechat
}}
</span>
</p>
<p
class=
"count-down"
v-if=
"countDown"
>
倒计时
{{
countDown
}}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"container"
>
<div
class=
"box"
>
<div
class=
"content"
>
<div
class=
"content"
>
<p
class=
"edit-sub-title"
>
直播数据
</p>
<p
class=
"edit-title no-border"
>
直播数据
</p>
<GLTable
:tableParams=
"liveTableParams"
:tableData=
"liveDataTable"
:hasPage=
"false"
>
<span
slot=
"coverImgUrl"
slot-scope=
"scope"
>
<img
class=
"img-60"
:src=
"scope.scope.coverImgUrl"
/>
</span>
</GLTable>
</div>
</div>
</div>
</div>
<div
class=
"container"
>
<div
class=
"box"
>
<div
class=
"content"
>
<div
class=
"content"
>
<p
class=
"edit-sub-title"
>
商品数据
</p>
<p
class=
"edit-title"
>
商品数据
</p>
<div
class=
"flex pro-data"
>
<div
class=
"w-25"
>
<p>
直播成交总金额
</p>
<p
class=
"price"
>
¥
{{
editForm
.
saleAmtTotal
||
'0'
}}
</p>
</div>
<div
class=
"w-25"
>
<p>
累计推送次数
</p>
<p>
累计推送次数
</p>
<p
class=
"price"
>
{{
editForm
.
pushNum
}}
</p>
</div>
<div
class=
"w-25"
>
<p>
商品点击人数
</p>
<p>
商品点击人数
</p>
<p
class=
"price"
>
{{
editForm
.
clickUserNum
}}
</p>
</div>
<div
class=
"w-25"
>
<p>
商品点击次数
</p>
<p>
商品点击次数
</p>
<p
class=
"price"
>
{{
editForm
.
clickNum
}}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"container"
>
<div
class=
"box"
>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"flex"
style=
"justify-content: space-between;"
>
<p
class=
"edit-title no-border"
>
商品配置
</p>
<p
class=
"edit-sub-title"
>
商品配置
</p>
<div
class=
"flex"
>
<el-button
size=
"mini"
@
click=
"handleImportPro"
>
导入商品
</el-button>
<el-form
:inline=
"true"
:model=
"searchConfigForm"
>
<el-form-item
label=
"商品名称:"
>
<el-input
:size=
"size"
v-model=
"searchConfigForm.name"
placeholder=
"请输入商品名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleConfigSearch"
>
查询
</el-button>
<el-button
:size=
"size"
@
click=
"handleConfigReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-form>
<el-form-item>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleConfigImport"
>
导入商品
</el-button>
</el-form-item>
</el-form>
</div>
</div>
<GLTable
ref=
"
liveRoomRef"
:searchForm=
"searchConfigForm"
:tableParams=
"tableParams"
:tableData=
"tableData
"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeConfigSearchFn"
>
<GLTable
ref=
"
controlConfigRef"
:searchForm=
"searchConfigForm"
:tableParams=
"tableParams"
:getListApi=
"getControlImportListApi
"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeConfigSearchFn"
>
<span
slot=
"
showImg
"
slot-scope=
"scope"
>
<span
slot=
"
coverImgUrl
"
slot-scope=
"scope"
>
<img
style=
"width: 100px; height: 100px;"
:src=
"scope.scope.img
"
/>
<img
class=
"img-60"
:src=
"scope.scope.coverImgUrl
"
/>
</span>
</span>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"handlePush(scope.scope.id)"
>
{{
targetId
===
scope
.
scope
.
id
?
'已推送'
+
pushCountDown
+
's'
:
'推送'
}}
</el-button>
<el-button
type=
"text"
@
click=
"handlePush(scope.scope.id)"
>
{{
targetId
===
scope
.
scope
.
id
?
'已推送'
+
pushCountDown
+
's'
:
'推送'
}}
</el-button>
<el-button
type=
"text"
@
click=
"handleUpOrDown(scope.scope)"
>
{{
scope
.
scope
.
status
==
'1'
?
'下架'
:
'上架'
}}
</el-button>
<el-button
type=
"text"
@
click=
"handleUpOrDown(scope.scope)"
>
{{
scope
.
scope
.
onSale
==
'1'
?
'下架'
:
'上架'
}}
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
</span>
</span>
</GLTable>
</GLTable>
</div>
</div>
</div>
</div>
<div
class=
"container"
>
<div
class=
"box"
>
<div
class=
"content"
>
<div
class=
"content"
>
<p
class=
"edit-sub-title"
>
直播设置
</p>
<p
class=
"edit-title"
>
直播设置
</p>
<div
class=
"flex"
>
<div>
<p
class=
"edit-title no-border"
>
直播间禁言
</p>
<p
class=
"txt"
>
开启后,所有观众无法在直播间发表评论。
<el-switch
:size=
"size"
v-model=
"editForm.closeComment"
active-value=
"1"
inactive-value=
"0"
@
change=
"handleChangeComment"
></el-switch>
</p>
</div>
<div>
<p
class=
"edit-title no-border"
>
直播回放
</p>
<p
class=
"txt"
>
开启后,观众可在直播结束页面查看本场直播。
<el-switch
:size=
"size"
v-model=
"editForm.closeReplay"
active-value=
"1"
inactive-value=
"0"
@
change=
"handleChangeReplay"
></el-switch>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<select-muti-pro-dialog
:isMutiSelectVisible=
"isMutiSelectVisible"
@
handleMutiSelectConfirm=
"handleMutiSelectConfirm"
@
handleMutiSelectClose=
"handleMutiSelectClose"
></select-muti-pro-dialog>
</div>
</div>
<select-muti-pro-dialog
v-if=
"isMutiSelectVisible"
:isMutiSelectVisible=
"isMutiSelectVisible"
:searchForm=
"searchWaitForm"
:getListApi=
"getWaitImportListApi"
:selectedProList=
"selectedProList"
@
handleMutiSelectConfirm=
"handleMutiSelectConfirm"
@
handleMutiSelectClose=
"handleMutiSelectClose"
>
<!--
<template
slot=
"search"
>
<div
class=
"flex"
>
<el-form
:inline=
"true"
:model=
"searchWaitForm"
>
<el-form-item
label=
"商品名称:"
>
<el-input
:size=
"size"
v-model=
"searchWaitForm.name"
placeholder=
"请输入商品名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleConfigSearch"
>
查询
</el-button>
<el-button
:size=
"size"
@
click=
"handleConfigReset"
>
重置
</el-button>
</el-form-item>
</el-form>
</div>
</
template
>
-->
</select-muti-pro-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
selectMutiProDialog
from
'./selectMutiProDialog'
import
{
getControlInfoApi
,
getControlImportListApi
,
getWaitImportListApi
,
importGoodsApi
,
updateCommentApi
,
updateReplayApi
}
from
'@/api/modules/liveRoom'
// import selectMutiProDialog from './selectMutiProDialog'
import
selectMutiProDialog
from
'@/components/select-muti-pro'
export
default
{
export
default
{
name
:
'liveControl'
,
name
:
'liveControl'
,
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
countDown
:
0
,
countDown
:
0
,
timer
:
null
,
timer
:
null
,
liveRoomData
:
{
editForm
:
{},
tilte
:
'直播间名字'
,
// 直播数据 - 表格
time
:
'2021-9-27 10:00:00'
,
liveDataTable
:
[],
roomNum
:
'1'
,
liveTableParams
:
{
anchor
:
'主播名字'
,
tableColumns
:
[
wechat
:
'微信号'
{
label
:
'商品名称'
,
prop
:
'goodsName'
,
line
:
1
},
{
label
:
'商品图片'
,
prop
:
'coverImgUrl'
,
addHtml
:
'coverImgUrl'
},
{
label
:
'成交单量'
,
prop
:
'saleNum'
,
line
:
1
},
{
label
:
'成交金额'
,
prop
:
'saleAmt'
,
line
:
1
},
{
label
:
'来源门店'
,
prop
:
'merchantName'
,
line
:
1
}
]
},
},
// 导入商品
// 导入商品
isMutiSelectVisible
:
false
,
isMutiSelectVisible
:
false
,
searchWaitForm
:
{},
selectedProList
:
[],
getWaitImportListApi
:
getWaitImportListApi
,
// 商品配置 - 表格
// 商品配置 - 表格
get
ListApi
:
''
,
get
ControlImportListApi
:
getControlImportListApi
,
searchConfigForm
:
{},
searchConfigForm
:
{},
pushTimer
:
null
,
pushTimer
:
null
,
pushCountDown
:
0
,
pushCountDown
:
0
,
targetId
:
''
,
targetId
:
''
,
tableData
:
[
{
id
:
'1'
,
status
:
'1'
,
img
:
'https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500'
},
{
id
:
'2'
,
status
:
'0'
,
img
:
'https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500'
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
...
@@ -91,44 +191,47 @@ export default {
...
@@ -91,44 +191,47 @@ export default {
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'商品图片'
,
label
:
'商品图片'
,
prop
:
'
img
'
,
prop
:
'
coverImgUrl
'
,
line
:
1
,
line
:
1
,
addHtml
:
'
showImg
'
addHtml
:
'
coverImgUrl
'
},
},
{
{
label
:
'商品标题'
,
label
:
'商品标题'
,
prop
:
''
,
prop
:
'
name
'
,
line
:
1
line
:
1
},
},
{
{
label
:
'商品价格'
,
label
:
'商品价格'
,
prop
:
''
prop
:
'price'
,
formatter
:
cellValue
=>
{
return
cellValue
.
price2
&&
cellValue
.
price1
!=
cellValue
.
price2
?
(
cellValue
.
price1
/
100
).
toFixed
(
2
)
+
'-'
+
(
cellValue
.
price2
/
100
).
toFixed
(
2
)
:
(
cellValue
.
price1
/
100
).
toFixed
(
2
)
}
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'
status
'
,
prop
:
'
onSale
'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
{
return
{
0
:
'下架'
,
0
:
'下架'
,
1
:
'
已
上架'
1
:
'上架'
}[
cellValue
.
status
]
}[
cellValue
.
onSale
]
}
}
},
},
{
{
label
:
'点击次数'
,
label
:
'点击次数'
,
prop
:
''
prop
:
'
clickNumber
'
},
},
{
{
label
:
'点击人数'
,
label
:
'点击人数'
,
prop
:
''
prop
:
'clickUserNumber'
},
{
label
:
'点赞次数'
,
prop
:
''
},
},
// {
// label: '点赞次数',
// prop: ''
// },
{
{
label
:
'来源门店'
,
label
:
'来源门店'
,
prop
:
''
prop
:
'
merchantName
'
}
}
]
]
}
}
...
@@ -142,7 +245,11 @@ export default {
...
@@ -142,7 +245,11 @@ export default {
computed
:
{},
computed
:
{},
mounted
()
{
mounted
()
{
this
.
countDownTime
()
this
.
routeInfo
=
this
.
$route
.
params
this
.
searchWaitForm
=
{
id
:
this
.
routeInfo
.
id
}
this
.
getInfo
()
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
timer
&&
clearInterval
(
this
.
timer
)
this
.
timer
&&
clearInterval
(
this
.
timer
)
...
@@ -150,11 +257,32 @@ export default {
...
@@ -150,11 +257,32 @@ export default {
},
},
methods
:
{
methods
:
{
getInfo
()
{
getControlInfoApi
({
id
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
this
.
editForm
=
res
this
.
liveDataTable
=
res
.
liveStatisticsDTOList
console
.
log
(
this
.
editForm
)
this
.
countDownTime
()
})
},
beforeConfigSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
searchConfigForm
.
id
=
this
.
$route
.
params
.
id
resolve
()
})
},
handleConfigSearch
()
{
this
.
$refs
.
controlConfigRef
.
refreshTable
()
},
handleConfigReset
()
{
this
.
searchConfigForm
.
name
=
''
this
.
handleConfigSearch
()
},
countDownTime
()
{
countDownTime
()
{
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
if
(
new
Date
()
<
new
Date
(
this
.
liveRoomData
.
t
ime
))
{
if
(
new
Date
()
<
new
Date
(
this
.
editForm
.
startT
ime
))
{
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
var
leftTime
=
new
Date
(
this
.
liveRoomData
.
t
ime
)
-
new
Date
()
var
leftTime
=
new
Date
(
this
.
editForm
.
startT
ime
)
-
new
Date
()
//计算剩余的天数
//计算剩余的天数
var
days
=
parseInt
(
leftTime
/
1000
/
60
/
60
/
24
,
10
)
var
days
=
parseInt
(
leftTime
/
1000
/
60
/
60
/
24
,
10
)
//计算剩余的小时
//计算剩余的小时
...
@@ -163,11 +291,11 @@ export default {
...
@@ -163,11 +291,11 @@ export default {
var
minutes
=
parseInt
((
leftTime
/
1000
/
60
)
%
60
,
10
)
var
minutes
=
parseInt
((
leftTime
/
1000
/
60
)
%
60
,
10
)
//计算剩余的秒数
//计算剩余的秒数
var
seconds
=
parseInt
((
leftTime
/
1000
)
%
60
,
10
)
var
seconds
=
parseInt
((
leftTime
/
1000
)
%
60
,
10
)
days
=
this
.
checkTime
(
days
)
//
days = this.checkTime(days)
hours
=
this
.
checkTime
(
hours
)
//
hours = this.checkTime(hours)
minutes
=
this
.
checkTime
(
minutes
)
//
minutes = this.checkTime(minutes)
seconds
=
this
.
checkTime
(
seconds
)
//
seconds = this.checkTime(seconds)
this
.
countDown
=
days
+
'天'
+
hours
+
'小时'
+
minutes
+
'分'
+
seconds
+
'秒'
this
.
countDown
=
(
days
?
days
+
'天'
:
''
)
+
hours
+
'小时'
+
minutes
+
'分'
+
seconds
+
'秒'
this
.
countDownTime
()
this
.
countDownTime
()
},
1000
)
},
1000
)
}
}
...
@@ -179,11 +307,6 @@ export default {
...
@@ -179,11 +307,6 @@ export default {
}
}
return
i
return
i
},
},
beforeConfigSearchFn
()
{
return
new
Promise
(
resolve
=>
{
resolve
()
})
},
handlePush
(
id
)
{
handlePush
(
id
)
{
if
(
!
this
.
targetId
)
{
if
(
!
this
.
targetId
)
{
this
.
targetId
=
id
this
.
targetId
=
id
...
@@ -202,37 +325,123 @@ export default {
...
@@ -202,37 +325,123 @@ export default {
this
.
pushCountDown
=
0
this
.
pushCountDown
=
0
}
}
},
},
handle
ImportPro
()
{
handle
ConfigImport
()
{
this
.
isMutiSelectVisible
=
!
this
.
isMutiSelectVisible
this
.
isMutiSelectVisible
=
!
this
.
isMutiSelectVisible
},
},
handleMutiSelectConfirm
(
selectData
)
{},
handleMutiSelectConfirm
(
selectedProInfo
)
{
var
params
=
{
roomId
:
this
.
routeInfo
.
id
,
goodsIds
:
selectedProInfo
.
map
(
item
=>
item
.
id
)
}
console
.
log
(
params
)
importGoodsApi
(
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
handleConfigReset
()
}
})
},
handleMutiSelectClose
()
{
handleMutiSelectClose
()
{
this
.
handleImportPro
()
this
.
handleConfigImport
()
},
handleChangeComment
(
val
)
{
var
params
=
{
id
:
this
.
routeInfo
.
id
,
banComment
:
val
}
updateCommentApi
(
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
!=
'0'
)
{
this
.
editForm
.
closeComment
=
val
?
0
:
1
}
})
},
handleChangeReplay
(
val
)
{
var
params
=
{
id
:
this
.
routeInfo
.
id
,
closeReplay
:
val
}
updateReplayApi
(
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
!=
'0'
)
{
this
.
editForm
.
closeReplay
=
val
?
0
:
1
}
}
})}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.live-control
{
/*
.live-control {
padding: 20px;
padding: 20px;
}
}
*/
.live-control
p
{
/*
.live-control p {
margin: 0 0 10px 0;
margin: 0 0 10px 0;
color: #666666;
color: #666666;
}
}
*/
.live-control
.box
{
/*
.live-control .box {
padding: 10px;
padding: 10px;
border: 1px solid #cccccc;
border: 1px solid #cccccc;
} */
.live-control
{
font-size
:
16px
;
color
:
#333333
;
}
}
.live-control
.flex
{
.live-control
.flex
-start
{
display
:
flex
;
display
:
flex
;
justify-content
:
flex-start
;
}
.live-control
.no-border
{
border
:
0
;
}
.live-control
.m-b-18
{
margin-bottom
:
18px
;
}
.live-control
.m-r-20
{
margin-right
:
20px
;
}
}
.live-control
.head-box
{
.live-control
.head-box
{
padding
:
16px
0
;
position
:
relative
;
padding
:
32px
10px
17px
;
}
.live-control
.head-box
.head-title
{
line-height
:
20px
;
font-weight
:
bold
;
}
.live-control
.txt
{
font-size
:
14px
;
line-height
:
20px
;
color
:
#666666
;
}
.live-control
.head-box
.count-down
{
position
:
absolute
;
right
:
20px
;
top
:
100px
;
font-size
:
20px
;
color
:
#5850FF
;
}
}
.live-control
.head-box
.head-img
{
.live-control
.head-box
.head-img
{
width
:
20
0px
;
width
:
17
0px
;
height
:
1
60
px
;
height
:
1
36
px
;
padding-right
:
20px
;
padding-right
:
20px
;
}
}
.live-control
.pro-data
{
padding
:
40px
20px
;
}
.pro-data
.w-25
{
width
:
25%
;
text-align
:
center
;
}
.live-control
.pro-data
.price
{
font-size
:
30px
;
margin-top
:
20px
;
}
</
style
>
</
style
>
src/views/liveRoom/liveRoomList.vue
View file @
930c000
...
@@ -149,9 +149,10 @@ export default {
...
@@ -149,9 +149,10 @@ export default {
handleDetail
(
row
)
{
handleDetail
(
row
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
// name: 'liveControl',
// name: 'liveControl',
path
:
'/liveroom/liveControl'
,
// path: '/liveRoom/liveControl',
query
:
{
name
:
'ServicesLiveRoomLiveControl'
,
id
:
row
?
row
.
id
:
''
params
:
{
id
:
row
.
id
}
}
})
})
},
},
...
...
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