修改我的小区金刚区显示数量
This commit is contained in:
parent
bef2944dff
commit
2c071d2d86
@ -14,6 +14,8 @@ export const apiArr = {
|
|||||||
navPage: '/api/v2/wechat/community-navigation-crud/page', // 小区图标导航信息分页
|
navPage: '/api/v2/wechat/community-navigation-crud/page', // 小区图标导航信息分页
|
||||||
advPage: '/api/v2/wechat/community-advertisement-crud/page', // 小区广告信息分页
|
advPage: '/api/v2/wechat/community-advertisement-crud/page', // 小区广告信息分页
|
||||||
|
|
||||||
|
commInfo: '//api/v2/wechat/nav-display-crud/comm/info', // 小区导航设置信息详情
|
||||||
|
|
||||||
categoryPage: '/api/v2/wechat/announcement-category-crud/page', // 公告分类信息分页
|
categoryPage: '/api/v2/wechat/announcement-category-crud/page', // 公告分类信息分页
|
||||||
infoPage: '/api/v2/wechat/announcement-crud/page', // 公告信息分页
|
infoPage: '/api/v2/wechat/announcement-crud/page', // 公告信息分页
|
||||||
};
|
};
|
||||||
|
|||||||
@ -82,7 +82,8 @@
|
|||||||
</swiper>
|
</swiper>
|
||||||
</div>
|
</div>
|
||||||
<div class="close" @click="closeAds">
|
<div class="close" @click="closeAds">
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png"></image>
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png">
|
||||||
|
</image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -151,7 +152,10 @@
|
|||||||
infoList: [],
|
infoList: [],
|
||||||
selectedTab: 0,
|
selectedTab: 0,
|
||||||
|
|
||||||
currentAdIndex: 0
|
currentAdIndex: 0,
|
||||||
|
|
||||||
|
rowNum: 0,
|
||||||
|
colNum: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
@ -161,7 +165,7 @@
|
|||||||
this.localHeight = meun.height;
|
this.localHeight = meun.height;
|
||||||
// this.getCommunityList()
|
// this.getCommunityList()
|
||||||
this.communityVal = uni.getStorageSync('changeCommData').name
|
this.communityVal = uni.getStorageSync('changeCommData').name
|
||||||
await this.getfunctionList()
|
await this.getfunctionNum()
|
||||||
this.getAdvertising()
|
this.getAdvertising()
|
||||||
this.getCategoryList()
|
this.getCategoryList()
|
||||||
},
|
},
|
||||||
@ -211,19 +215,46 @@
|
|||||||
// 获取当前轮播图索引
|
// 获取当前轮播图索引
|
||||||
this.currentIdx = event.detail.current;
|
this.currentIdx = event.detail.current;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async getfunctionNum() {
|
||||||
|
const res = await request(apiArr.commInfo, "POST", {}, {
|
||||||
|
slice: false
|
||||||
|
});
|
||||||
|
this.rowNum = res.nav_row_num_comm
|
||||||
|
this.colNum = res.nav_row_total_comm
|
||||||
|
return await this.getfunctionList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// async getfunctionList() {
|
||||||
|
// const res = await request(apiArr.navPage, "POST", {
|
||||||
|
// community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||||
|
// page_num: 1,
|
||||||
|
// page_size: 50
|
||||||
|
// })
|
||||||
|
// this.functionList = res.rows.map(item => {
|
||||||
|
// return {
|
||||||
|
// ...item,
|
||||||
|
// nav_icon: picUrl + item.nav_icon
|
||||||
|
// };
|
||||||
|
// });
|
||||||
|
// console.log(this.functionList)
|
||||||
|
// },
|
||||||
async getfunctionList() {
|
async getfunctionList() {
|
||||||
const res = await request(apiArr.navPage, "POST", {
|
const res = await request(apiArr.navPage, "POST", {
|
||||||
community_id: Number(uni.getStorageSync('changeCommData').id),
|
community_id: Number(uni.getStorageSync('changeCommData').id),
|
||||||
page_num: 1,
|
page_num: 1,
|
||||||
page_size: 50
|
page_size: 50
|
||||||
})
|
});
|
||||||
this.functionList = res.rows.map(item => {
|
// 获取 rowNum 和 colNum 的乘积
|
||||||
|
const totalItems = this.rowNum * this.colNum;
|
||||||
|
// 使用 slice 方法截取前 totalItems 个元素
|
||||||
|
this.functionList = res.rows.slice(0, totalItems).map(item => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
nav_icon: picUrl + item.nav_icon
|
nav_icon: picUrl + item.nav_icon
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
console.log(this.functionList)
|
console.log(this.functionList);
|
||||||
},
|
},
|
||||||
|
|
||||||
async getAdvertising() {
|
async getAdvertising() {
|
||||||
|
|||||||
@ -90,7 +90,7 @@
|
|||||||
show: false,
|
show: false,
|
||||||
show2: false,
|
show2: false,
|
||||||
baseList: [{
|
baseList: [{
|
||||||
image: "",
|
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1568.png",
|
||||||
name: "订单",
|
name: "订单",
|
||||||
url: "",
|
url: "",
|
||||||
}],
|
}],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user