| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <template>
- <view :class="$isEmpty(room_list)?'empty-wrap':''">
- <view v-if="!$isEmpty(room_list)" style="padding-bottom: 90rpx;">
- <view class="data" v-for="(item, index) in room_list" :key="index">
- <view class="top">
- <view class="left">
- <u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon>
- <view class="title">{{item.residentialName}}</view>
- </view>
- </view>
- <view class="item">
- <view class="left">
- <view style="padding: 0 30rpx;">
- <view class="content">
- <text>楼栋信息:</text>
- <text >{{item.unitName}}</text>
- </view>
- <view class="content">
- <text>房间信息:</text>
- <text>{{item.name}}</text>
- </view>
- <view class="content">
- <text>身份:</text>
- <text v-if="item.relationshipType==0">业主</text>
- <text v-if="item.relationshipType==1">成员</text>
- <text v-if="item.relationshipType==2">租户</text>
- <text v-if="item.relationshipType==3">访客</text>
- </view>
- </view>
- </view>
- </view>
- <view class="bottom" >
- <view class="cu-btn sm round bg-red-btn" @click="jump(item.id)">
- 房屋成员
- </view>
- </view>
- </view>
- <view @tap="choosePlot" class="footer-fixed" >
- <view class="cu-btn flex text-lg bg-red-btn" style="padding: 46rpx 0;">
- 添加房屋认证
- </view>
- </view>
- </view>
- <view class="default" v-else>
- <image src="/static/common/empty.png" mode="heightFix"></image>
- <view>
- <text>没有获取到我的房屋信息</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- //获取app实例
- var app = getApp();
- export default {
- data() {
- return {
- room_list: null
- };
- },
- components: {},
- props: {},
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- //获取房屋信息
- this.geRoomByMemberId();
- },
- methods: {
-
- jump(id){
- uni.navigateTo({
- url:"./familyList?room_id="+id
- })
- },
- //根据会员id获取我的房屋列表
- geRoomByMemberId: function () {
- let that = this;
- let params = {};
- params['member_id'] = app.globalData.member.id;
- params['pageSize'] = 200;
- let operation = 'estate/getRoomByMemberId';
- app.globalData.postRequest(params, operation, function (res) {
- console.info("获取成功" + res.data.result_msg); //获取成功
- if (res.data.result_code == 1) {
- let list = [];
- if (uni.getStorageSync('plotName')) {
- res.data.list.map(item => {
- if (item.residentialName == uni.getStorageSync('plotName')) {
- list.push(item);
- }
- });
- } else {
- list = res.data.list;
- }
- that.setData({
- room_list: list
- });
- app.globalData.room_list = list;
- }
- });
- },
- choosePlot() {
- if(!this.$isEmpty(app.globalData.totalStep)){
- app.globalData.totalStep=2
- }
- uni.navigateTo({
- url:"../auth/auth"
- })
- }
- }
- };
- </script>
- <style lang="scss">
- view,
- button
- {
- box-sizing: border-box;
- }
- .cu-btn.sm {
- padding: 0 24upx;
- font-size: 24upx;
- height: 52upx;
- }
- .data {
- width: 710rpx;
- background-color: #ffffff;
- margin: 20rpx auto;
- border-radius: 6rpx;
- box-sizing: border-box;
- padding: 20rpx;
- font-size: 28rpx;
- .top {
- display: flex;
- justify-content: space-between;
- .left {
- display: flex;
- align-items: center;
- .title {
- margin: 0 10rpx;
- font-size: 32rpx;
- font-weight: bold;
- }
- }
- }
- .item {
- margin: 40rpx 0 20rpx 0;
- .content {
- border-bottom: 1rpx dashed #DDDDDD;
- display: flex;
- justify-content: space-between;
- padding: 30rpx 0;
- }
- }
- .bottom {
- display: flex;
- margin-top: 30rpx;
- justify-content: flex-end;
- align-items: center;
- }
- }
- .default {
- text-align: center;
- position: fixed;
- left: 50%;
- top: 40%;
- transform: translate(-50%, -50%);
- }
- .default text{
- color: #AAAAAA;
- }
- .default image {
- height: 250rpx;
- display: inline-block;
- }
- .empty-wrap{
- background-color: #FFFFFF;
- min-height: 100vh;
- }
- </style>
|