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 3a1ca9d4
authored
Oct 28, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
控制台
1 parent
56fbbc0d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
5 deletions
src/api/modules/liveRoom.js
src/views/liveRoom/liveControl.vue
src/api/modules/liveRoom.js
View file @
3a1ca9d
...
@@ -107,4 +107,26 @@ const updateReplayApi = params => {
...
@@ -107,4 +107,26 @@ const updateReplayApi = params => {
})
})
}
}
export
{
getLiveRoomListApi
,
insertLiveRoomApi
,
deleteLiveRoomApi
,
getLiveRoomInfoApi
,
getControlInfoApi
,
getControlImportListApi
,
getWaitImportListApi
,
importGoodsApi
,
updateCommentApi
,
updateReplayApi
}
const
controlUpOrDownApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
toggle.status`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
controlDeleteApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
delete.room.goods`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
{
getLiveRoomListApi
,
insertLiveRoomApi
,
deleteLiveRoomApi
,
getLiveRoomInfoApi
,
getControlInfoApi
,
getControlImportListApi
,
getWaitImportListApi
,
importGoodsApi
,
updateCommentApi
,
updateReplayApi
,
controlUpOrDownApi
,
controlDeleteApi
}
src/views/liveRoom/liveControl.vue
View file @
3a1ca9d
...
@@ -81,9 +81,10 @@
...
@@ -81,9 +81,10 @@
<img
class=
"img-60"
:src=
"scope.scope.coverImgUrl"
/>
<img
class=
"img-60"
:src=
"scope.scope.coverImgUrl"
/>
</span>
</span>
<span
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
class=
"table-btns"
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
v-if=
"editForm.liveStatus == '101'"
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
.
onSale
==
'1'
?
'下架'
:
'上架'
}}
</el-button>
<!--
<el-button
type=
"text"
@
click=
"handlePush(scope.scope.id)"
>
{{
targetId
===
scope
.
scope
.
id
?
'已推送'
+
pushCountDown
+
's'
:
'推送'
}}
</el-button>
-->
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
<el-button
v-show=
"!targetId"
type=
"text"
@
click=
"handleUpOrDown(scope.scope)"
>
{{
scope
.
scope
.
onSale
==
'1'
?
'下架'
:
'上架'
}}
</el-button>
<el-button
v-show=
"!targetId"
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
</span>
</span>
</GLTable>
</GLTable>
</div>
</div>
...
@@ -136,7 +137,7 @@
...
@@ -136,7 +137,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
getControlInfoApi
,
getControlImportListApi
,
getWaitImportListApi
,
importGoodsApi
,
updateCommentApi
,
updateReplayApi
}
from
'@/api/modules/liveRoom'
import
{
getControlInfoApi
,
getControlImportListApi
,
getWaitImportListApi
,
importGoodsApi
,
updateCommentApi
,
updateReplayApi
,
controlUpOrDownApi
,
controlDeleteApi
}
from
'@/api/modules/liveRoom'
// import selectMutiProDialog from './selectMutiProDialog'
// import selectMutiProDialog from './selectMutiProDialog'
import
{
liveStatusList
}
from
'@/common/constant'
import
{
liveStatusList
}
from
'@/common/constant'
import
selectMutiProDialog
from
'@/components/select-muti-pro'
import
selectMutiProDialog
from
'@/components/select-muti-pro'
...
@@ -341,6 +342,47 @@ export default {
...
@@ -341,6 +342,47 @@ export default {
this
.
pushCountDown
=
0
this
.
pushCountDown
=
0
}
}
},
},
handleUpOrDown
(
row
)
{
var
upOrDownTxt
=
row
.
onSale
==
'1'
?
'下架'
:
'上架'
this
.
$messageBox
.
confirm
(
'是否'
+
upOrDownTxt
+
'该商品?'
,
upOrDownTxt
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'error'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
controlUpOrDownApi
({
roomId
:
this
.
editForm
.
roomId
,
goodsId
:
row
.
id
}).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
handleConfigSearch
()
}
})
}
}
})
},
handleDelete
(
row
)
{
this
.
$messageBox
.
confirm
(
'是否删除该商品?'
,
'删除'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'error'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
controlDeleteApi
({
roomId
:
this
.
editForm
.
roomId
,
goodsId
:
row
.
id
}).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
handleConfigSearch
()
}
})
}
}
})
},
handleConfigImport
()
{
handleConfigImport
()
{
var
that
=
this
var
that
=
this
this
.
getInfo
(()
=>
{
this
.
getInfo
(()
=>
{
...
...
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