Browse Source

扫别的社区门牌号弹出报错

xiaowang-bug
mk 1 year ago
parent
commit
a1c3b5080d
  1. 29
      subpages/house/pages/housePortrait/housePortrait.js
  2. 4
      subpages/house/pages/housePortrait/housePortrait.wxml

29
subpages/house/pages/housePortrait/housePortrait.js

@ -30,25 +30,24 @@ Page({
this.setData({
detail: res.data,
houseName: res.data.houseName
})
}).catch((error) => {
});
api.houseResidentChangeRecord({ houseId: this.data.houseId }).then((res) => {
});
return api.houseResidentChangeRecord({ houseId: this.data.houseId });
}).then((res) => {
this.setData({
logs: res.data
})
}).catch((error) => {
console.error("发生错误:", error);
});
api.getResiList({ homeId: this.data.houseId, pageNo: 1, pageSize: 1000 }).then(res => {
const arr = res.data.list.map(item => {
return item.resiId
})
});
return api.getResiList({ homeId: this.data.houseId, pageNo: 1, pageSize: 1000 });
}).then((res) => {
const arr = res.data.list.map(item => item.resiId);
this.setData({
residIds: arr,
})
this.getTabData()
})
});
this.getTabData();
}).catch((error) => {
this.setData({
detail: null,
});
});
},
handelClickAddResi(){
wx.navigateTo({

4
subpages/house/pages/housePortrait/housePortrait.wxml

@ -24,13 +24,13 @@
<view class="card">
<view class="title">
<text>关系图谱</text>
<text>关系图谱 </text>
<view class="view" bind:tap="handelClickAddResi">
新增居民
<image mode="widthFix" src="../../../../images/right.png"></image>
</view>
</view>
<house-graph houseId="{{houseId}}" bind:clickGraphNode="clickGraphNode" ></house-graph>
<house-graph wx:if="{{detail}}" houseId="{{houseId}}" bind:clickGraphNode="clickGraphNode" ></house-graph>
</view>
<view class="card">

Loading…
Cancel
Save