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
d38d16b6
Commit
d38d16b6
authored
Feb 15, 2022
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改首页图片资讯后台预览
parent
afd79760
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
27 deletions
+60
-27
home.js
src/axios/module/home.js
+4
-0
index.vue
src/views/Home/index.vue
+56
-27
No files found.
src/axios/module/home.js
View file @
d38d16b6
...
@@ -9,6 +9,9 @@ const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '';
...
@@ -9,6 +9,9 @@ const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '';
const
indexCarouselManage
=
(
params
=
{})
=>
{
const
indexCarouselManage
=
(
params
=
{})
=>
{
return
GET
(
`
${
Prefix
}
/office/indexCarouselManage/api/info/
${
params
.
id
}
`
,
{})
return
GET
(
`
${
Prefix
}
/office/indexCarouselManage/api/info/
${
params
.
id
}
`
,
{})
}
}
const
homePicture
=
(
params
=
{})
=>
{
return
GET
(
`
${
Prefix
}
/office/picture/api/info/
${
params
.
id
}
`
,
{})
}
// 首页大轮播图
// 首页大轮播图
const
homeBigImages
=
(
params
=
{})
=>
{
const
homeBigImages
=
(
params
=
{})
=>
{
...
@@ -51,6 +54,7 @@ const updateCustomService = (params = {}) => {
...
@@ -51,6 +54,7 @@ const updateCustomService = (params = {}) => {
export
default
{
export
default
{
indexCarouselManage
,
indexCarouselManage
,
homePicture
,
homeBigImages
,
homeBigImages
,
homePictureImageList
,
homePictureImageList
,
homeImportantNewList
,
homeImportantNewList
,
...
...
src/views/Home/index.vue
View file @
d38d16b6
...
@@ -107,9 +107,7 @@
...
@@ -107,9 +107,7 @@
</li>
</li>
</ul>
</ul>
<div
class=
"tab-content marginTop15"
>
<div
class=
"tab-content marginTop15"
>
<div
<div
class=
"tab-pane fade show active"
>
class=
"tab-pane fade show active"
>
<list
:list=
"news[0].data"
/>
<list
:list=
"news[0].data"
/>
</div>
</div>
</div>
</div>
...
@@ -893,7 +891,7 @@ export default {
...
@@ -893,7 +891,7 @@ export default {
{
{
name
:
"国家射频识别产品质量检验检测中心"
,
name
:
"国家射频识别产品质量检验检测中心"
,
url
:
"http://www.spjc.org.cn/"
,
url
:
"http://www.spjc.org.cn/"
,
type
:
'link'
,
type
:
"link"
,
},
},
{
{
name
:
"国家条码质量检验检测中心"
,
name
:
"国家条码质量检验检测中心"
,
...
@@ -905,24 +903,24 @@ export default {
...
@@ -905,24 +903,24 @@ export default {
{
{
name
:
"中国自动识别技术协会"
,
name
:
"中国自动识别技术协会"
,
url
:
"http://www.aimchina.org.cn/"
,
url
:
"http://www.aimchina.org.cn/"
,
type
:
'link'
,
type
:
"link"
,
},
},
{
{
name
:
"中国条码技术与应用协会"
,
name
:
"中国条码技术与应用协会"
,
url
:
"http://www.cabc.net.cn/"
,
url
:
"http://www.cabc.net.cn/"
,
type
:
'link'
,
type
:
"link"
,
},
},
{
{
name
:
"《中国自动识别技术》杂志社"
,
name
:
"《中国自动识别技术》杂志社"
,
subName
:
"电子版"
,
subName
:
"电子版"
,
url
:
"http://www.aidchina.com.cn/"
,
url
:
"http://www.aidchina.com.cn/"
,
subUrl
:
"http://www.aidchina.com.cn/zzzq/index.htm"
,
subUrl
:
"http://www.aidchina.com.cn/zzzq/index.htm"
,
type
:
'link'
,
type
:
"link"
,
},
},
{
{
name
:
"中国ECR委员会"
,
name
:
"中国ECR委员会"
,
url
:
"http://www.ecrchina.org/"
,
url
:
"http://www.ecrchina.org/"
,
type
:
'link'
,
type
:
"link"
,
},
},
{
{
name
:
"全国物品编码标准化技术委员会"
,
name
:
"全国物品编码标准化技术委员会"
,
...
@@ -966,7 +964,7 @@ export default {
...
@@ -966,7 +964,7 @@ export default {
{
{
name
:
"北京东方捷码科技开发中心"
,
name
:
"北京东方捷码科技开发中心"
,
url
:
"http://www.anccweb.com/"
,
url
:
"http://www.anccweb.com/"
,
type
:
'link'
,
type
:
"link"
,
},
},
],
],
},
},
...
@@ -1032,7 +1030,7 @@ export default {
...
@@ -1032,7 +1030,7 @@ export default {
async
getCustomServiceFromServer
()
{
async
getCustomServiceFromServer
()
{
// 判断是否登录
// 判断是否登录
if
(
localStorage
.
getItem
(
'loginInfo'
))
{
if
(
localStorage
.
getItem
(
"loginInfo"
))
{
const
searchGlnRes
=
await
this
.
$api
.
home
.
customService
();
const
searchGlnRes
=
await
this
.
$api
.
home
.
customService
();
const
{
returnCode
,
data
}
=
searchGlnRes
;
const
{
returnCode
,
data
}
=
searchGlnRes
;
if
(
returnCode
===
"0"
)
{
if
(
returnCode
===
"0"
)
{
...
@@ -1071,26 +1069,34 @@ export default {
...
@@ -1071,26 +1069,34 @@ export default {
},
},
// 初始化
// 初始化
init
()
{
init
()
{
// 首页大轮播图
this
.
homeBigImages
();
// 要闻左侧图片资讯
this
.
homePictureImageList
();
// 要闻右侧标题列表
// 要闻右侧标题列表
this
.
homeImportantNewList
();
this
.
homeImportantNewList
();
// 商品全球身份证
// 商品全球身份证
this
.
homeNewGtin
();
this
.
homeNewGtin
();
// 党建文化新闻列表
// 党建文化新闻列表
Promise
.
all
([
this
.
homeGet4PartyTopNews
(),
this
.
homeGet1PartyTopNews
()]).
then
((
result
=>
{
Promise
.
all
([
console
.
log
(
result
,
'党建文化新闻列表集合'
);
this
.
homeGet4PartyTopNews
(),
this
.
homeGet1PartyTopNews
(),
]).
then
((
result
)
=>
{
console
.
log
(
result
,
"党建文化新闻列表集合"
);
this
.
djwh
.
data
=
[].
concat
(
result
[
0
],
result
[
1
]);
this
.
djwh
.
data
=
[].
concat
(
result
[
0
],
result
[
1
]);
})
)
;
});
// 专题聚焦
// 专题聚焦
this
.
homeGetsdztListTopNews
();
this
.
homeGetsdztListTopNews
();
// 首页小轮播图
this
.
homeSmallImages
();
// 后台轮播图预览
// 后台轮播图预览
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
indexCarouselManageId
)
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
indexCarouselManageId
)
{
this
.
indexCarouselManage
(
this
.
$route
.
query
.
indexCarouselManageId
);
this
.
indexCarouselManage
(
this
.
$route
.
query
.
indexCarouselManageId
);
}
else
{
// 首页大轮播图
this
.
homeBigImages
();
// 首页小轮播图
this
.
homeSmallImages
();
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
pictureId
)
{
this
.
homePicture
(
this
.
$route
.
query
.
pictureId
);
}
else
{
// 要闻左侧图片资讯
this
.
homePictureImageList
();
}
}
},
},
// 后台轮播图预览
// 后台轮播图预览
...
@@ -1098,23 +1104,46 @@ export default {
...
@@ -1098,23 +1104,46 @@ export default {
// console.log(this.$api, 'this.$api');
// console.log(this.$api, 'this.$api');
const
query
=
{
const
query
=
{
id
:
indexCarouselManageId
,
id
:
indexCarouselManageId
,
}
};
const
indexCarouselManageRes
=
await
this
.
$api
.
home
.
indexCarouselManage
(
query
);
const
indexCarouselManageRes
=
await
this
.
$api
.
home
.
indexCarouselManage
(
query
);
const
{
returnCode
,
data
}
=
indexCarouselManageRes
;
const
{
returnCode
,
data
}
=
indexCarouselManageRes
;
console
.
log
(
indexCarouselManageRes
,
"后台轮播图预览"
);
console
.
log
(
indexCarouselManageRes
,
"后台轮播图预览"
);
if
(
returnCode
===
"0"
)
{
if
(
returnCode
===
"0"
)
{
const
list
=
[];
const
list
=
[];
const
childList
=
[];
const
childList
=
[];
if
(
data
.
classnum
===
'大轮播'
)
{
if
(
data
.
classnum
===
"大轮播"
)
{
list
.
push
(
data
);
list
.
push
(
data
);
this
.
banner
=
list
;
this
.
banner
=
list
;
// 首页小轮播图
this
.
homeSmallImages
();
}
else
{
}
else
{
childList
.
push
(
data
);
childList
.
push
(
data
);
list
.
push
(
childList
);
list
.
push
(
childList
);
this
.
smallPCImages
=
list
;
this
.
smallPCImages
=
list
;
// 首页大轮播图
this
.
homeBigImages
();
}
}
}
}
},
async
homePicture
(
pictureId
)
{
// console.log(this.$api, 'this.$api');
const
query
=
{
id
:
pictureId
,
};
const
indexCarouselManageRes
=
await
this
.
$api
.
home
.
indexCarouselManage
(
query
);
const
{
returnCode
,
data
}
=
indexCarouselManageRes
;
console
.
log
(
indexCarouselManageRes
,
"后台轮播图预览2"
);
if
(
returnCode
===
"0"
)
{
const
list
=
[];
data
.
jumppath
=
data
.
directpath
;
data
.
picFile
=
data
.
picIndexPath
;
list
.
push
(
data
);
this
.
newsBanner
=
list
;
}
},
},
// 首页大轮播图
// 首页大轮播图
async
homeBigImages
()
{
async
homeBigImages
()
{
...
@@ -1445,7 +1474,7 @@ export default {
...
@@ -1445,7 +1474,7 @@ export default {
height
:
18px
;
height
:
18px
;
background
:
url("../../assets/image/home/prevArrow-hover.png")
background
:
url("../../assets/image/home/prevArrow-hover.png")
no-repeat
;
no-repeat
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
}
}
}
}
...
@@ -1459,7 +1488,7 @@ export default {
...
@@ -1459,7 +1488,7 @@ export default {
height
:
18px
;
height
:
18px
;
background
:
url("../../assets/image/home/nextArrow-hover.png")
background
:
url("../../assets/image/home/nextArrow-hover.png")
no-repeat
;
no-repeat
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
}
}
}
}
}
}
...
@@ -1829,7 +1858,7 @@ export default {
...
@@ -1829,7 +1858,7 @@ export default {
padding
:
18px
0
;
padding
:
18px
0
;
}
}
.marginTop15
{
.marginTop15
{
margin-top
:
15px
;
margin-top
:
15px
;
}
}
...
@@ -2104,7 +2133,7 @@ export default {
...
@@ -2104,7 +2133,7 @@ export default {
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
width
:
100%
;
width
:
100%
;
.ywdt-bt{
.ywdt-bt
{
width
:
100%
;
width
:
100%
;
text-align
:
center
;
text-align
:
center
;
}
}
...
...
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