Commit 2dcda9fa by 林家欣

修改首页党建文化接口

parent 4a798cf2
......@@ -1078,7 +1078,10 @@ export default {
// 商品全球身份证
this.homeNewGtin();
// 党建文化新闻列表
this.homeGet4PartyTopNews();
Promise.all([this.homeGet4PartyTopNews(), this.homeGet1PartyTopNews()]).then((result => {
console.log(result, '党建文化新闻列表集合');
this.djwh.data = [].concat(result[0], result[1]);
}));
// 专题聚焦
this.homeGetsdztListTopNews();
// 首页小轮播图
......@@ -1145,7 +1148,7 @@ export default {
// 党建文化新闻列表
async homeGet4PartyTopNews() {
const params = {
count: 5,
count: 4,
classid: 428,
};
const homeGet4PartyTopNewsRes = await this.$api.home.homeGet4PartyTopNews(
......@@ -1154,7 +1157,23 @@ export default {
const { returnCode, data } = homeGet4PartyTopNewsRes;
if (returnCode === "0") {
console.log(homeGet4PartyTopNewsRes, "党建文化新闻列表");
this.djwh.data = data;
// this.djwh.data = data;
return data;
}
},
async homeGet1PartyTopNews() {
const params = {
count: 1,
classid: 429,
};
const homeGet1PartyTopNewsRes = await this.$api.home.homeGet4PartyTopNews(
params
);
const { returnCode, data } = homeGet1PartyTopNewsRes;
if (returnCode === "0") {
console.log(homeGet1PartyTopNewsRes, "党建文化新闻列表");
// this.djwh.data = data;
return data;
}
},
// 专题聚焦
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment