Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
online-edu
online-edu-admin
Commits
29808f01
Commit
29808f01
authored
Jun 01, 2021
by
Liu Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加轮播图发布,删除功能
parent
b434c5cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
9 deletions
+39
-9
settings.js
src/api/biz/settings.js
+8
-0
index.vue
src/views/biz/homePageSetting/index.vue
+31
-9
No files found.
src/api/biz/settings.js
View file @
29808f01
...
@@ -41,3 +41,11 @@ export const removeHomeRecVideos = (id) => {
...
@@ -41,3 +41,11 @@ export const removeHomeRecVideos = (id) => {
return
request
(
"get"
,
`/api/mgr/recommendConfig/delete/
${
id
}
`
,
{});
return
request
(
"get"
,
`/api/mgr/recommendConfig/delete/
${
id
}
`
,
{});
};
};
export
const
removeSwiper
=
(
id
)
=>
{
return
request
(
"get"
,
`/api/mgr/swiperConfig/remove/
${
id
}
`
,
{});
};
export
const
changeSwiperStatus
=
(
data
)
=>
{
return
request
(
"post"
,
`/api/mgr/swiperConfig/modifyStatus`
,
data
);
};
src/views/biz/homePageSetting/index.vue
View file @
29808f01
...
@@ -10,18 +10,15 @@
...
@@ -10,18 +10,15 @@
:key=
"swiper.id"
:key=
"swiper.id"
:value=
"swiper.id"
:value=
"swiper.id"
>
>
<div
<div
class=
"swiper-div"
>
class=
"swiper-div"
@
click=
"updateSwiper(swiper)"
>
<div
class=
"img-container"
>
<div
class=
"img-container"
>
<img
<img
@
click=
"updateSwiper(swiper)"
class=
"image"
class=
"image"
v-if=
"swiper.imageUrl"
v-if=
"swiper.imageUrl"
:src=
"swiper.imageUrl"
:src=
"swiper.imageUrl"
/>
/>
<div
class=
"swiper-image-status"
>
<div
class=
"swiper-image-status"
>
<a-tooltip
<a-tooltip
v-if=
"swiper.status === 'ENABLE'"
v-if=
"swiper.status === 'ENABLE'"
placement=
"bottom"
placement=
"bottom"
...
@@ -30,6 +27,8 @@
...
@@ -30,6 +27,8 @@
<a-icon
<a-icon
type=
"star"
type=
"star"
theme=
"filled"
theme=
"filled"
class=
"published-swiper"
@
click=
"changeSwiperStatus(swiper,false)"
/>
/>
</a-tooltip>
</a-tooltip>
<a-tooltip
<a-tooltip
...
@@ -37,8 +36,15 @@
...
@@ -37,8 +36,15 @@
placement=
"bottom"
placement=
"bottom"
title=
"未发布"
title=
"未发布"
>
>
<a-icon
type=
"star"
/>
<a-icon
type=
"star"
@
click=
"changeSwiperStatus(swiper,true)"
/>
</a-tooltip>
</a-tooltip>
<a-icon
type=
"delete"
@
click=
"removeSwiper(swiper)"
/>
</div>
</div>
</div>
</div>
<div
class=
"course-name"
>
<div
class=
"course-name"
>
...
@@ -198,8 +204,8 @@
...
@@ -198,8 +204,8 @@
v-model=
"currentSwiper.status"
v-model=
"currentSwiper.status"
default-value=
"DISABLE"
default-value=
"DISABLE"
>
>
<a-radio
value=
"ENABLE"
>
上架
</a-radio>
<a-radio
value=
"ENABLE"
>
已发布
</a-radio>
<a-radio
value=
"DISABLE"
>
下架
</a-radio>
<a-radio
value=
"DISABLE"
>
未发布
</a-radio>
</a-radio-group>
</a-radio-group>
</a-form-item>
</a-form-item>
</a-form>
</a-form>
...
@@ -279,6 +285,8 @@ import {
...
@@ -279,6 +285,8 @@ import {
fetchAvailRecVideos
,
fetchAvailRecVideos
,
addHomeRecVideos
,
addHomeRecVideos
,
removeHomeRecVideos
,
removeHomeRecVideos
,
removeSwiper
,
changeSwiperStatus
,
}
from
"@/api/biz/settings"
;
}
from
"@/api/biz/settings"
;
import
{
uploadFile
}
from
"@/api/biz/resource"
;
import
{
uploadFile
}
from
"@/api/biz/resource"
;
import
{
fetchList
as
fetchCourseList
}
from
"@/api/biz/course"
;
import
{
fetchList
as
fetchCourseList
}
from
"@/api/biz/course"
;
...
@@ -323,8 +331,10 @@ export default {
...
@@ -323,8 +331,10 @@ export default {
},
},
beforeUpdate
()
{},
beforeUpdate
()
{},
methods
:
{
methods
:
{
removeSwiper
(
swiper
)
{
console
.
log
(
swiper
);
},
removeHomeRecVideo
(
video
)
{
removeHomeRecVideo
(
video
)
{
console
.
log
(
video
);
removeHomeRecVideos
(
video
.
id
).
then
((
resp
)
=>
{
removeHomeRecVideos
(
video
.
id
).
then
((
resp
)
=>
{
this
.
fetchHomeRecVideos
();
this
.
fetchHomeRecVideos
();
});
});
...
@@ -389,6 +399,14 @@ export default {
...
@@ -389,6 +399,14 @@ export default {
this
.
currentSwiper
=
swiper
;
this
.
currentSwiper
=
swiper
;
this
.
showSwiperCreator
=
true
;
this
.
showSwiperCreator
=
true
;
},
},
changeSwiperStatus
(
swiper
,
status
)
{
changeSwiperStatus
({
id
:
swiper
.
id
,
status
:
status
?
"ENABLE"
:
"DISABLE"
,
}).
then
((
resp
)
=>
{
this
.
loadAllSwiper
();
});
},
loadAllSwiper
()
{
loadAllSwiper
()
{
fetchAllSwiper
().
then
((
resp
)
=>
{
fetchAllSwiper
().
then
((
resp
)
=>
{
this
.
swipers
=
resp
.
datas
;
this
.
swipers
=
resp
.
datas
;
...
@@ -495,6 +513,10 @@ export default {
...
@@ -495,6 +513,10 @@ export default {
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.price-config-container
.swiper-config
.published-swiper
{
color
:
#f0943c
;
}
.price-config-container
.swiper-config-hometags
{
.price-config-container
.swiper-config-hometags
{
padding-top
:
20px
;
padding-top
:
20px
;
}
}
...
...
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