You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
2.0 KiB
113 lines
2.0 KiB
<template>
|
|
<view class="content padding">
|
|
<view class="tit">选择房屋房号</view>
|
|
<view class="searchBox">
|
|
<searchRow placeholder="请输入您的房号" @searchFn="searchFn"/>
|
|
</view>
|
|
|
|
<view class="ul">
|
|
<view class="li" v-for="(item,index) in houseList" :key="index" @click="chooseItem(item)">{{ item.roomNumDesc }}</view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
import { houseRoom } from '@/config/api.js'
|
|
import { ref } from 'vue'
|
|
import {userStore} from '@/store/index.js';
|
|
const counterStore = userStore();
|
|
|
|
let houseList = ref([])
|
|
|
|
async function houseTreeFn(roomNum='') {
|
|
let obj = {
|
|
"roomNum": roomNum,
|
|
"houseType": counterStore.chooseHouse.houseType,
|
|
"communityId": counterStore.chooseHouse.communityId
|
|
}
|
|
const {data: res} = await houseRoom(obj)
|
|
if(!res) return houseList.value = []
|
|
houseList.value = res
|
|
console.log(res)
|
|
console.log(houseList.value)
|
|
}
|
|
|
|
function chooseItem(item) {
|
|
counterStore.upDateHouse('roomNum', item.roomNumDesc)
|
|
counterStore.upDateHouse('houseId', item.houseId)
|
|
uni.navigateTo({
|
|
url: '/pages/subPage/authentication/authentication'
|
|
})
|
|
}
|
|
|
|
function searchFn(val) {
|
|
houseTreeFn(val)
|
|
}
|
|
houseTreeFn()
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
image {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
.content {
|
|
.tit {
|
|
font-size: 54rpx;
|
|
color: #2E2E2E;
|
|
padding: 40rpx 0 30rpx 0;
|
|
}
|
|
|
|
.searchBox {
|
|
height: 68rpx;
|
|
}
|
|
|
|
.poz {
|
|
height: 86rpx;
|
|
.lab {
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
.flex {
|
|
.icon {
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
}
|
|
|
|
.city {
|
|
font-size: 28rpx;
|
|
margin-left: 10rpx;
|
|
color: $themC;
|
|
}
|
|
}
|
|
}
|
|
|
|
.huicity {
|
|
width: 100%;
|
|
height: 48rpx;
|
|
background: #EFEFEF;
|
|
border-radius: 10rpx;
|
|
line-height: 48rpx;
|
|
color: #9C9C9C;
|
|
font-size: 28rpx;
|
|
line-height: 48rpx;
|
|
padding-left: 20rpx;
|
|
}
|
|
|
|
.ul {
|
|
width: 100%;
|
|
.li {
|
|
width: 100%;
|
|
height: 94rpx;
|
|
line-height: 94rpx;
|
|
font-size: 36rpx;
|
|
border-bottom: 1px solid #EFEFEF;
|
|
}
|
|
}
|
|
}
|
|
|
|
</style>
|