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
410eef8f
Commit
410eef8f
authored
Nov 14, 2021
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页党建文化、小轮播图联调
parent
c62ab753
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
50 deletions
+54
-50
fetch.js
src/axios/fetch.js
+1
-1
home.js
src/axios/module/home.js
+6
-0
list2.vue
src/views/Home/comps/list2.vue
+1
-1
index.vue
src/views/Home/index.vue
+46
-48
No files found.
src/axios/fetch.js
View file @
410eef8f
...
...
@@ -58,7 +58,7 @@ function fetch(options) {
}
})
//响应数据的拦截
instance
().
then
(
res
=>
{
console
.
log
(
res
,
'响应数据的拦截'
);
//
console.log(res, '响应数据的拦截');
const
resData
=
res
.
data
||
{}
const
code
=
String
(
resData
.
code
)
if
(
code
===
ResponseCode
.
success
)
{
...
...
src/axios/module/home.js
View file @
410eef8f
...
...
@@ -27,10 +27,16 @@ const homeGet4PartyTopNews = (params = {}) => {
}
// 首页小轮播图
const
homeSmallImages
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/indexCarouselManage/api/smallImages`
,
params
)
}
export
default
{
homeBigImages
,
homePictureImageList
,
homeImportantNewList
,
homeGet4PartyTopNews
,
homeSmallImages
,
}
src/views/Home/comps/list2.vue
View file @
410eef8f
...
...
@@ -3,7 +3,7 @@
<div
v-for=
"(tmp, i) in list"
:key=
"i"
class=
"row"
@
click=
"handelMsg"
>
<div
class=
"col li"
>
<span></span>
<span>
{{
tmp
.
nam
e
}}
</span>
<span>
{{
tmp
.
titl
e
}}
</span>
</div>
</div>
</div>
...
...
src/views/Home/index.vue
View file @
410eef8f
...
...
@@ -453,29 +453,14 @@
data-bs-interval=
"false"
>
<div
class=
"carousel-inner"
>
<div
class=
"carousel-item active"
>
<div
class=
"row"
>
<div
class=
"col-lg-4"
>
<img
src=
"../../assets/image/home/advert-tp1.png"
/>
</div>
<div
class=
"col-lg-4"
>
<img
src=
"../../assets/image/home/advert-tp2.png"
/>
</div>
<div
class=
"col-lg-4"
>
<img
src=
"../../assets/image/home/advert-tp3.png"
/>
</div>
</div>
</div>
<div
class=
"carousel-item"
>
<div
:class=
"['carousel-item', { active: i === 0 }]"
v-for=
"(tmpA, i) in smallImages"
:key=
"i"
>
<div
class=
"row"
>
<div
class=
"col-lg-4"
>
<img
src=
"../../assets/image/home/advert-tp3.png"
/>
</div>
<div
class=
"col-lg-4"
>
<img
src=
"../../assets/image/home/advert-tp2.png"
/>
</div>
<div
class=
"col-lg-4"
>
<img
src=
"../../assets/image/home/advert-tp1.png"
/>
<div
class=
"col-lg-4"
v-for=
"(tmpB, ii) in tmpA"
:key=
"ii"
@
click=
"handelSmallImagesClick(tmpB)"
>
<img
:src=
"tmpB.picIndexPath"
/>
</div>
</div>
</div>
...
...
@@ -791,40 +776,24 @@ export default {
},
spqqsfz
:
{},
// 商品全球身份证
djwh
:
{
data
:
[
{
name
:
"办公室党支部组织第三季度党课和青年小组学习"
,
},
{
name
:
"党委办公室党支部、编码管理部党支部、成员服务部党支部联合开展主题党日活动"
,
},
{
name
:
"编码中心党委理论学习中心组举行2021年度第九次集体学习"
,
},
{
name
:
"办公室党支部召开党史学习教育专题组织生活会"
,
},
{
name
:
"编码中心党委理论学习中心组 举行2021年度第八次集体学习"
,
},
],
data
:
[],
},
ztjj
:
{
data
:
[
{
nam
e
:
"“扫”遍双十一 “码”上确定性"
,
titl
e
:
"“扫”遍双十一 “码”上确定性"
,
},
{
nam
e
:
"“码上”陪你笑傲电商江湖"
,
titl
e
:
"“码上”陪你笑傲电商江湖"
,
},
{
nam
e
:
"进口商品如何发布全网,拿好这个跨境进口数据法宝"
,
titl
e
:
"进口商品如何发布全网,拿好这个跨境进口数据法宝"
,
},
{
nam
e
:
"小条码,大未来"
,
titl
e
:
"小条码,大未来"
,
},
{
nam
e
:
"助力电商逆生长,“码”上加速有法宝"
,
titl
e
:
"助力电商逆生长,“码”上加速有法宝"
,
},
],
},
...
...
@@ -908,6 +877,7 @@ export default {
},
],
},
smallImages
:
[],
};
},
created
()
{
...
...
@@ -928,6 +898,8 @@ export default {
this
.
homeNewGtin
();
// 党建文化新闻列表
this
.
homeGet4PartyTopNews
();
// 首页小轮播图
this
.
homeSmallImages
();
},
// 首页大轮播图
async
homeBigImages
()
{
...
...
@@ -990,15 +962,40 @@ export default {
async
homeGet4PartyTopNews
()
{
const
params
=
{
count
:
5
,
classid
:
''
,
}
const
homeGet4PartyTopNewsRes
=
await
this
.
$api
.
home
.
homeGet4PartyTopNews
(
params
);
classid
:
428
,
};
const
homeGet4PartyTopNewsRes
=
await
this
.
$api
.
home
.
homeGet4PartyTopNews
(
params
);
const
{
returnCode
,
data
}
=
homeGet4PartyTopNewsRes
;
if
(
returnCode
===
"0"
)
{
console
.
log
(
homeGet4PartyTopNewsRes
,
"党建文化新闻列表"
);
this
.
djwh
.
data
=
data
;
}
},
// 首页小轮播图
async
homeSmallImages
()
{
const
homeSmallImagesRes
=
await
this
.
$api
.
home
.
homeSmallImages
();
const
{
returnCode
,
data
}
=
homeSmallImagesRes
;
if
(
returnCode
===
"0"
)
{
let
list
=
[];
data
.
forEach
((
el
,
i
)
=>
{
el
.
picIndexPath
=
`http://www.gs1cn.org/img/demo/
${
el
.
picIndexPath
}
`
;
list
.
push
(
el
);
if
((
i
+
1
)
%
3
===
0
)
{
this
.
smallImages
.
push
(
list
);
list
=
[];
}
else
if
(
i
===
data
.
length
-
1
)
{
this
.
smallImages
.
push
(
list
);
}
});
console
.
log
(
homeSmallImagesRes
,
"首页小轮播图"
);
}
},
// 首页小轮播图点击跳转
handelSmallImagesClick
(
obj
)
{
window
.
open
(
obj
.
directpath
,
"_blank"
);
},
// 我要申请商品条码
wysqsptmHandelClick
()
{
this
.
$router
.
push
({
...
...
@@ -1600,6 +1597,7 @@ export default {
.carousel-item
{
img
{
width
:
100%
;
cursor
:
pointer
;
}
}
.carousel-control-prev
,
...
...
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