按照文档修改
This commit is contained in:
@@ -74,19 +74,19 @@
|
||||
<view class="item col-2">
|
||||
租金(元/m²):{{ form.rent || '' }}
|
||||
</view>
|
||||
<view class="item col-2">
|
||||
<view v-if="isManager" class="item col-2">
|
||||
房号:{{ form.roomNumber || '' }}
|
||||
</view>
|
||||
<view class="item col-2">
|
||||
<view v-if="isManager" class="item col-2">
|
||||
密码:{{ form.password || '' }}
|
||||
</view>
|
||||
<view class="item col-2">业主电话:{{ form.phone || '' }}</view>
|
||||
<view class="item col-2">物业费:{{ form.propertyFees || '' }}</view>
|
||||
<view class="item col-2">租期:{{ form.tenancy || '' }}</view>
|
||||
<view class="item col-2" v-if="form.gradeName == '公司员工'">
|
||||
<view v-if="isManager" class="item col-2">业主电话:{{ form.phone || '' }}</view>
|
||||
<view v-if="isManager" class="item col-2">物业费:{{ form.propertyFees || '' }}</view>
|
||||
<view v-if="isManager" class="item col-2">租期:{{ form.tenancy || '' }}</view>
|
||||
<view class="item col-2" v-if="isManager">
|
||||
佣金:{{ form.commission || '' }}
|
||||
</view>
|
||||
<view class="item col-2" v-if="form.gradeName == '公司员工'">
|
||||
<view class="item col-2" v-if="isManager">
|
||||
是否可溢价:{{ form.premium || '' }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -152,9 +152,9 @@
|
||||
<u-gap height="100"></u-gap>
|
||||
<view class="pay-tools">
|
||||
<view class="item" @click="onHeart">
|
||||
<u-icon name="heart-fill" size="28" color="#ff0000" v-if="heart"></u-icon>
|
||||
<u-icon name="heart-fill" size="28" color="#ff0000" v-if="form.liked"></u-icon>
|
||||
<u-icon name="heart" size="28" v-else></u-icon>
|
||||
<text v-if="heart">已收藏</text>
|
||||
<text v-if="form.liked">已收藏</text>
|
||||
<text v-else>收藏</text>
|
||||
</view>
|
||||
<view class="item" @click="$push('sub_pages/checkout/checkout?id=' + form.houseId)">
|
||||
@@ -172,6 +172,10 @@
|
||||
import store from '@/store'
|
||||
import storage from '@/utils/storage'
|
||||
import * as HouseInfoApi from '@/api/house-info.js'
|
||||
import {
|
||||
getAgentUser,
|
||||
getUser
|
||||
} from '@/api/user.js'
|
||||
|
||||
const menu = [{
|
||||
name: '推荐',
|
||||
@@ -302,7 +306,6 @@
|
||||
padding: '12rpx 0',
|
||||
borderRadius: '12rpx'
|
||||
},
|
||||
heart: false,
|
||||
swiperType: 'video',
|
||||
latitude: 39.909,
|
||||
longitude: 116.39742,
|
||||
@@ -310,13 +313,26 @@
|
||||
latitude: 39.909,
|
||||
longitude: 116.39742,
|
||||
iconPath: 'https://oss.wsdns.cn/20230803/49fe9c001370488caf29c3decb34f6c7.png?x-oss-process=image/resize,w_750/quality,Q_90'
|
||||
}]
|
||||
}],
|
||||
agentUser: {},
|
||||
isManager: false
|
||||
};
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
this.houseId = options.houseId
|
||||
this.getHouseInfo()
|
||||
|
||||
if(options.user_id) {
|
||||
getAgentUser(options.user_id).then(res => {
|
||||
this.agentUser = res.data
|
||||
})
|
||||
}
|
||||
getUser().then(res=>{
|
||||
this.isManager = res.data.gradeId == 15
|
||||
}).catch((err)=>{
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
onShow() {},
|
||||
onBackPress() {},
|
||||
@@ -349,15 +365,26 @@
|
||||
})
|
||||
},
|
||||
onHeart() {
|
||||
this.heart = !this.heart
|
||||
const app = this;
|
||||
HouseInfoApi.likeHouse({
|
||||
houseId: this.form.houseId,
|
||||
houseUserId: this.form.userId
|
||||
}).then(res=>{
|
||||
app.form.liked = res.data
|
||||
})
|
||||
},
|
||||
onCall(phone) {
|
||||
if (!phone) {
|
||||
return false
|
||||
if (this.agentUser && this.agentUser.phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.agentUser.phone
|
||||
})
|
||||
}else if(phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
})
|
||||
}
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user