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

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

@ -24,13 +24,13 @@
<view class="card"> <view class="card">
<view class="title"> <view class="title">
<text>关系图谱</text> <text>关系图谱 </text>
<view class="view" bind:tap="handelClickAddResi"> <view class="view" bind:tap="handelClickAddResi">
新增居民 新增居民
<image mode="widthFix" src="../../../../images/right.png"></image> <image mode="widthFix" src="../../../../images/right.png"></image>
</view> </view>
</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>
<view class="card"> <view class="card">

Loading…
Cancel
Save