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.

116 lines
2.2 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="请输入小区名称"/>
  6. </view>
  7. <view class="poz flex-b">
  8. <view class="lab">当前定位城市</view>
  9. <view class="flex">
  10. <view class="icon">
  11. <image src="@/static/images/pozicon.png" mode=""></image>
  12. </view>
  13. <view class="city">杭州市</view>
  14. </view>
  15. </view> -->
  16. <!-- <view class="huicity">杭州市</view> -->
  17. <view class="ul">
  18. <view class="li" v-for="(item,index) in houseList" :key="index" @click="chooseItem(item)">{{ item.communityName }}</view>
  19. </view>
  20. </view>
  21. </template>
  22. <script setup>
  23. import { houseTree } from '@/config/api.js'
  24. import { ref } from 'vue'
  25. import {userStore} from '@/store/index.js';
  26. const counterStore = userStore();
  27. let houseList = ref([])
  28. async function houseTreeFn() {
  29. console.log('没有请求吗、')
  30. const {data: res} = await houseTree()
  31. res.forEach(item=>{
  32. houseList.value.push(item.root)
  33. })
  34. console.log(res)
  35. console.log(houseList.value)
  36. }
  37. function chooseItem(item) {
  38. counterStore.upDateHouse('communityId', item.communityId)
  39. counterStore.upDateHouse('communityName', item.communityName)
  40. uni.navigateTo({
  41. url: '/pages/subPage/authentication/comp/select2'
  42. })
  43. }
  44. houseTreeFn()
  45. </script>
  46. <style lang="scss" scoped>
  47. image {
  48. display: block;
  49. width: 100%;
  50. height: 100%;
  51. }
  52. .content {
  53. .tit {
  54. font-size: 54rpx;
  55. color: #2E2E2E;
  56. padding: 40rpx 0 30rpx 0;
  57. }
  58. .searchBox {
  59. height: 68rpx;
  60. }
  61. .poz {
  62. height: 86rpx;
  63. .lab {
  64. font-size: 28rpx;
  65. }
  66. .flex {
  67. .icon {
  68. width: 32rpx;
  69. height: 32rpx;
  70. }
  71. .city {
  72. font-size: 28rpx;
  73. margin-left: 10rpx;
  74. color: $themC;
  75. }
  76. }
  77. }
  78. .huicity {
  79. width: 100%;
  80. height: 48rpx;
  81. background: #EFEFEF;
  82. border-radius: 10rpx;
  83. line-height: 48rpx;
  84. color: #9C9C9C;
  85. font-size: 28rpx;
  86. line-height: 48rpx;
  87. padding-left: 20rpx;
  88. }
  89. .ul {
  90. width: 100%;
  91. .li {
  92. width: 100%;
  93. height: 94rpx;
  94. line-height: 94rpx;
  95. font-size: 36rpx;
  96. border-bottom: 1px solid #EFEFEF;
  97. }
  98. }
  99. }
  100. </style>