Browse Source

房屋详情下添加按钮

xiaowang-V4.4
mk 1 year ago
parent
commit
63297ce9aa
  1. 1
      pages/resiAndHouse/resiAndHouse.js
  2. 50
      subpages/house/pages/housePortrait/housePortrait.js
  3. 7
      subpages/house/pages/housePortrait/housePortrait.wxml
  4. 33
      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) { onClickJump(e) {
console.log(e)
wx.navigateTo({ wx.navigateTo({
url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${e.currentTarget.dataset.resiid}`, url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${e.currentTarget.dataset.resiid}`,
}) })

50
subpages/house/pages/housePortrait/housePortrait.js

@ -1,6 +1,7 @@
// subpages/house/pages/housePortrait/housePortrait.js // subpages/house/pages/housePortrait/housePortrait.js
import api from "../../../../utils/api" import api from "../../../../utils/api"
import { getComplainList, getShengList, getPunchRecord, getShequList, getshijianList, getxuqiuList, getfuwuList, getMultiLogList } from "../../../../utils/businessRecords.js"; import { getComplainList, getShengList, getPunchRecord, getShequList, getshijianList, getxuqiuList, getfuwuList, getMultiLogList } from "../../../../utils/businessRecords.js";
const app = getApp()
Page({ Page({
/** /**
@ -8,7 +9,7 @@ Page({
*/ */
data: { data: {
houseId: '', houseId: '',
detail: {}, detail: null,
logs: [], logs: [],
residIds: [], residIds: [],
ywData: {}, ywData: {},
@ -20,10 +21,13 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if( options.resiId){
this.setData({ this.setData({
houseId: options.resiId, houseId: options.resiId,
agencyLevel: app.globalData.user.level
}) })
this.getData() this.getData()
}
}, },
getData() { getData() {
api.getClearHouseDeatilById(this.data.houseId).then((res) => { api.getClearHouseDeatilById(this.data.houseId).then((res) => {
@ -47,8 +51,51 @@ Page({
this.setData({ this.setData({
detail: null, 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(){ handelClickAddResi(){
wx.navigateTo({ 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}`, 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({ this.setData({
ywVisible: true ywVisible: true
}) })

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

@ -82,3 +82,10 @@
</view> </view>
</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>

33
subpages/house/pages/housePortrait/housePortrait.wxss

@ -149,3 +149,36 @@
background: #3A80E7; background: #3A80E7;
border-radius: 50%; 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() { toWebView() {
console.log(app.globalData);
if (app.globalData.questionnaireUrl) { if (app.globalData.questionnaireUrl) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/webView/webView?url=' + app.globalData.questionnaireUrl, 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="toEvent">上报诉求</view>
<view class="btn" bind:tap="toWebView" wx:if="{{agencyLevel!=='street'}}"> <view class="btn" bind:tap="toWebView" wx:if="{{agencyLevel!=='street'}}">
满意度调查</view> 满意度调查</view>
<!-- -->
<view class="btn blue" bind:tap="handelTopunchCard">走访打卡</view> <view class="btn blue" bind:tap="handelTopunchCard">走访打卡</view>
</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"> <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