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.

112 lines
2.0 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view class="content padding">
  3. <view class="tit">选择房屋房号</view>
  4. <view class="searchBox">
  5. <searchRow placeholder="请输入您的房号" @searchFn="searchFn"/>
  6. </view>
  7. <view class="ul">
  8. <view class="li" v-for="(item,index) in houseList" :key="index" @click="chooseItem(item)">{{ item.roomNumDesc }}</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script setup>
  13. import { houseRoom } from '@/config/api.js'
  14. import { ref } from 'vue'
  15. import {userStore} from '@/store/index.js';
  16. const counterStore = userStore();
  17. let houseList = ref([])
  18. async function houseTreeFn(roomNum='') {
  19. let obj = {
  20. "roomNum": roomNum,
  21. "houseType": counterStore.chooseHouse.houseType,
  22. "communityId": counterStore.chooseHouse.communityId
  23. }
  24. const {data: res} = await houseRoom(obj)
  25. if(!res) return houseList.value = []
  26. houseList.value = res
  27. console.log(res)
  28. console.log(houseList.value)
  29. }
  30. function chooseItem(item) {
  31. counterStore.upDateHouse('roomNum', item.roomNumDesc)
  32. counterStore.upDateHouse('houseId', item.houseId)
  33. uni.navigateTo({
  34. url: '/pages/subPage/authentication/authentication'
  35. })
  36. }
  37. function searchFn(val) {
  38. houseTreeFn(val)
  39. }
  40. houseTreeFn()
  41. </script>
  42. <style lang="scss" scoped>
  43. image {
  44. display: block;
  45. width: 100%;
  46. height: 100%;
  47. }
  48. .content {
  49. .tit {
  50. font-size: 54rpx;
  51. color: #2E2E2E;
  52. padding: 40rpx 0 30rpx 0;
  53. }
  54. .searchBox {
  55. height: 68rpx;
  56. }
  57. .poz {
  58. height: 86rpx;
  59. .lab {
  60. font-size: 28rpx;
  61. }
  62. .flex {
  63. .icon {
  64. width: 32rpx;
  65. height: 32rpx;
  66. }
  67. .city {
  68. font-size: 28rpx;
  69. margin-left: 10rpx;
  70. color: $themC;
  71. }
  72. }
  73. }
  74. .huicity {
  75. width: 100%;
  76. height: 48rpx;
  77. background: #EFEFEF;
  78. border-radius: 10rpx;
  79. line-height: 48rpx;
  80. color: #9C9C9C;
  81. font-size: 28rpx;
  82. line-height: 48rpx;
  83. padding-left: 20rpx;
  84. }
  85. .ul {
  86. width: 100%;
  87. .li {
  88. width: 100%;
  89. height: 94rpx;
  90. line-height: 94rpx;
  91. font-size: 36rpx;
  92. border-bottom: 1px solid #EFEFEF;
  93. }
  94. }
  95. }
  96. </style>