Browse Source

我的e家过滤掉网格

master
mk 2 years ago
parent
commit
3800a7c838
  1. 4
      epdc-resident-mp-yushan/pages/index/index.wxss
  2. 7
      epdc-resident-mp-yushan/subpages/family/pages/index/index.js

4
epdc-resident-mp-yushan/pages/index/index.wxss

@ -420,8 +420,8 @@ justify-content: center;
} }
.module-list .module-item .icon { .module-list .module-item .icon {
width: 150rpx; width: 74rpx;
height: 150rpx; height: 74rpx;
} }
.module-list .module-item .icon image { .module-list .module-item .icon image {
width: 100%; width: 100%;

7
epdc-resident-mp-yushan/subpages/family/pages/index/index.js

@ -82,8 +82,15 @@ Page({
async getInfo(code){ async getInfo(code){
const res = await getHouseInfo({roomCode:code}) const res = await getHouseInfo({roomCode:code})
if(res.msg === 'success' && res.code === 0){ if(res.msg === 'success' && res.code === 0){
let str = res.data.gridName;
let startStr = '社区';
let endStr = '格';
let startIndex = str.indexOf(startStr); // 获取 "社区" 的起始索引
let endIndex = str.indexOf(endStr) + endStr.length; // 获取 "格" 的结束索引
let result = str.slice(0, startIndex + startStr.length) + str.slice(endIndex);
this.setData({ this.setData({
'familyInfo':res.data, 'familyInfo':res.data,
'familyInfo.gridName':result,
'roomCode':res.data.members 'roomCode':res.data.members
}) })
} }

Loading…
Cancel
Save