diff --git a/api/v2Community.js b/api/v2Community.js
index 31073f6a..f2bed11f 100644
--- a/api/v2Community.js
+++ b/api/v2Community.js
@@ -14,6 +14,8 @@ export const apiArr = {
navPage: '/api/v2/wechat/community-navigation-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', // 公告分类信息分页
infoPage: '/api/v2/wechat/announcement-crud/page', // 公告信息分页
};
diff --git a/packages/community/index/index.vue b/packages/community/index/index.vue
index a7315526..ab2aed8d 100644
--- a/packages/community/index/index.vue
+++ b/packages/community/index/index.vue
@@ -82,7 +82,8 @@
-
+
+
@@ -151,7 +152,10 @@
infoList: [],
selectedTab: 0,
- currentAdIndex: 0
+ currentAdIndex: 0,
+
+ rowNum: 0,
+ colNum: 0,
}
},
async onLoad(options) {
@@ -161,7 +165,7 @@
this.localHeight = meun.height;
// this.getCommunityList()
this.communityVal = uni.getStorageSync('changeCommData').name
- await this.getfunctionList()
+ await this.getfunctionNum()
this.getAdvertising()
this.getCategoryList()
},
@@ -211,19 +215,46 @@
// 获取当前轮播图索引
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() {
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 => {
+ });
+ // 获取 rowNum 和 colNum 的乘积
+ const totalItems = this.rowNum * this.colNum;
+ // 使用 slice 方法截取前 totalItems 个元素
+ this.functionList = res.rows.slice(0, totalItems).map(item => {
return {
...item,
nav_icon: picUrl + item.nav_icon
};
});
- console.log(this.functionList)
+ console.log(this.functionList);
},
async getAdvertising() {
diff --git a/packages/storeManagement/index/index.vue b/packages/storeManagement/index/index.vue
index 00d7ad59..c0572132 100644
--- a/packages/storeManagement/index/index.vue
+++ b/packages/storeManagement/index/index.vue
@@ -90,7 +90,7 @@
show: false,
show2: false,
baseList: [{
- image: "",
+ image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1568.png",
name: "订单",
url: "",
}],