Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
吴迪
gs1
Commits
d3f626c9
Commit
d3f626c9
authored
Jan 23, 2022
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页新增后台轮播图预览
parent
e81eb035
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
2 deletions
+35
-2
home.js
src/axios/module/home.js
+7
-1
parameter.js
src/axios/parameter.js
+1
-1
index.vue
src/views/Home/index.vue
+27
-0
No files found.
src/axios/module/home.js
View file @
d3f626c9
import
{
POST
,
POSTFORM
,
GET
,
POST
,
POSTFORM
,
}
from
"../fetch.js"
const
Prefix
=
process
.
env
.
NODE_ENV
===
'development'
?
'/gs1'
:
''
;
// 后台轮播图预览
const
indexCarouselManage
=
(
params
=
{})
=>
{
return
GET
(
`
${
Prefix
}
/office/indexCarouselManage/info/
${
params
.
id
}
`
,
{})
}
// 首页大轮播图
const
homeBigImages
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/indexCarouselManage/api/bigImages`
,
params
)
...
...
@@ -45,6 +50,7 @@ const updateCustomService = (params = {}) => {
export
default
{
indexCarouselManage
,
homeBigImages
,
homePictureImageList
,
homeImportantNewList
,
...
...
src/axios/parameter.js
View file @
d3f626c9
...
...
@@ -69,7 +69,7 @@ export function handleResponseSuccess(res = {}) {
success
:
true
,
returnCode
:
res
.
code
||
ResponseCode
.
success
[
0
],
returnMsg
:
res
.
msg
||
"请求成功"
,
data
:
res
.
data
||
res
.
page
||
res
.
member
||
null
data
:
res
.
data
||
res
.
page
||
res
.
member
||
res
.
indexCarouselManage
||
null
}
}
...
...
src/views/Home/index.vue
View file @
d3f626c9
...
...
@@ -1088,6 +1088,33 @@ export default {
this
.
homeGetsdztListTopNews
();
// 首页小轮播图
this
.
homeSmallImages
();
// 后台轮播图预览
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
indexCarouselManageId
)
{
this
.
indexCarouselManage
(
this
.
$route
.
query
.
indexCarouselManageId
);
}
},
// 后台轮播图预览
async
indexCarouselManage
(
indexCarouselManageId
)
{
// console.log(this.$api, 'this.$api');
const
query
=
{
id
:
indexCarouselManageId
,
}
const
indexCarouselManageRes
=
await
this
.
$api
.
home
.
indexCarouselManage
(
query
);
const
{
returnCode
,
data
}
=
indexCarouselManageRes
;
console
.
log
(
indexCarouselManageRes
,
"后台轮播图预览"
);
if
(
returnCode
===
"0"
)
{
const
list
=
[];
const
childList
=
[];
if
(
data
.
classnum
===
'大轮播'
)
{
list
.
push
(
data
);
this
.
banner
=
list
;
}
else
{
childList
.
push
(
data
);
list
.
push
(
childList
);
this
.
smallPCImages
=
list
;
}
}
},
// 首页大轮播图
async
homeBigImages
()
{
...
...
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