Browse Source

房屋详情下添加按钮

xiaowang-V4.4
mk 1 year ago
parent
commit
63297ce9aa
  1. 1
      pages/resiAndHouse/resiAndHouse.js
  2. 58
      subpages/house/pages/housePortrait/housePortrait.js
  3. 7
      subpages/house/pages/housePortrait/housePortrait.wxml
  4. 35
      subpages/house/pages/housePortrait/housePortrait.wxss
  5. 2
      subpages/searchResult/pages/resiInfo/resiInfo.js
  6. 1
      subpages/searchResult/pages/resiInfo/resiInfo.wxml

1
pages/resiAndHouse/resiAndHouse.js

@ -486,7 +486,6 @@ Page({
})
},
onClickJump(e) {
console.log(e)
wx.navigateTo({
url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${e.currentTarget.dataset.resiid}`,
})

58
subpages/house/pages/housePortrait/housePortrait.js

@ -1,6 +1,7 @@
// subpages/house/pages/housePortrait/housePortrait.js
import api from "../../../../utils/api"
import { getComplainList, getShengList, getPunchRecord, getShequList, getshijianList, getxuqiuList, getfuwuList, getMultiLogList } from "../../../../utils/businessRecords.js";
const app = getApp()
Page({
/**
@ -8,7 +9,7 @@ Page({
*/
data: {
houseId: '',
detail: {},
detail: null,
logs: [],
residIds: [],
ywData: {},
@ -20,10 +21,13 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
houseId: options.resiId,
})
this.getData()
if( options.resiId){
this.setData({
houseId: options.resiId,
agencyLevel: app.globalData.user.level
})
this.getData()
}
},
getData() {
api.getClearHouseDeatilById(this.data.houseId).then((res) => {
@ -47,8 +51,51 @@ Page({
this.setData({
detail: null,
});
if(error.code != 0){
wx.showToast({
title: error.msg,
icon:'none',
duration:3000,
success:function(){
setTimeout(()=>{
wx.navigateBack({
delta: 1
})
},3000)
}
})
}
});
},
toEvent() {
let obj = {
resiId: this.data.detail.residentId,
resiMobile: this.data.detail.ownerPhone,
resiName: this.data.detail.ownerName
}
wx.setStorageSync('resiDetail', obj)
wx.navigateTo({
url: '/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck',
})
},
handelTopunchCard(){
wx.navigateTo({
url: '/subpages/searchResult/pages/punchCard/punchCard?resiId=' + this.data.detail.residentId,
})
},
toWebView() {
if (app.globalData.questionnaireUrl) {
wx.navigateTo({
url: '/pages/webView/webView?url=' + app.globalData.questionnaireUrl,
})
} else {
wx.showToast({
icon: "none",
title: '未创建满意度调查问卷',
})
}
},
handelClickAddResi(){
wx.navigateTo({
url: `/subpages/addResi/pages/addResi/addResi?type=add&grid=${this.data.detail.gridId}&neighborHoodId=${this.data.detail.neighborHoodId}&buildingId=${this.data.detail.buildingId}&buildingUnitId=${this.data.detail.buildingUnitId}&doorId=${this.data.detail.id}`,
@ -271,7 +318,6 @@ Page({
})
}
})
this.setData({
ywVisible: true
})

7
subpages/house/pages/housePortrait/housePortrait.wxml

@ -81,4 +81,11 @@
<no-data isShow="{{logs.length===0}}" wx:if="{{logs.length===0}}"></no-data>
</view>
</view>
<view class="bto_btn">
<view class="btn" bind:tap="toEvent">上报诉求</view>
<view class="btn" bind:tap="toWebView" wx:if="{{agencyLevel!=='street'}}">
满意度调查</view>
<!-- -->
<view class="btn blue" bind:tap="handelTopunchCard">走访打卡</view>
</view>

35
subpages/house/pages/housePortrait/housePortrait.wxss

@ -148,4 +148,37 @@
height: 18rpx;
background: #3A80E7;
border-radius: 50%;
}
}
.bto_btn{
position: fixed;
bottom: 0;
display: flex;
justify-content: space-between;
align-items: center;
left: 0;
right: 0;
padding:0 20rpx;
box-sizing: border-box;
background: #fff;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.btn {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
text-align: center;
height: 76rpx;
border-radius: 39rpx;
margin: 30rpx 0;
border-radius: 76rpx;
border: 1rpx solid #999999;
width: 226rpx;
text-align: center;
}
.blue{
background-color:#3974f6;
color: #fff;
border-color: #3974f6;
}

2
subpages/searchResult/pages/resiInfo/resiInfo.js

@ -993,9 +993,7 @@ Page({
})
},
toWebView() {
console.log(app.globalData);
if (app.globalData.questionnaireUrl) {
wx.navigateTo({
url: '/pages/webView/webView?url=' + app.globalData.questionnaireUrl,
})

1
subpages/searchResult/pages/resiInfo/resiInfo.wxml

@ -379,7 +379,6 @@
<view class="btn" bind:tap="toEvent">上报诉求</view>
<view class="btn" bind:tap="toWebView" wx:if="{{agencyLevel!=='street'}}">
满意度调查</view>
<!-- -->
<view class="btn blue" bind:tap="handelTopunchCard">走访打卡</view>
</view>
<van-dialog use-slot title="密码验证" show="{{ checkPassword }}" show-cancel-button bind:close="onClosePassword" bind:confirm="onConfirmassword" custom-class="dialog" confirm-button-color="#3974f6">

Loading…
Cancel
Save