修改搜索公寓全局变量的指向问题
This commit is contained in:
@@ -71,9 +71,9 @@
|
||||
<div class="option-box flexflex flex1">
|
||||
<div class="item flexcenter" :class="{ 'pitch': 0 == pitchValue['school'] }"
|
||||
@click="selectOption('nearSchool', 0)">不限</div>
|
||||
<div class="item flexcenter" v-for="item in nearSchoolList"
|
||||
<div class="item flexcenter" v-for="(item,index) in nearSchoolList"
|
||||
:class="{ 'pitch': item['id'] == pitchValue['school'] }"
|
||||
@click="selectOption('nearSchool', item.id)">{{ item['name']
|
||||
@click="selectOption('nearSchool', item.id)" :key="index">{{ item['name']
|
||||
}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<div class="option-item flexflex" style="padding-bottom: 10px;">
|
||||
<div class="option-title">学校附近</div>
|
||||
<div class="option-box flexflex flex1">
|
||||
<div class="item flexcenter" :class="{ pitch: 0 == pitchValue['school'] }" @click="selectOption('nearSchool', 0)">不限</div>
|
||||
<!-- <div class="item flexcenter" :class="{ pitch: 0 == pitchValue['school'] }" @click="selectOption('nearSchool', 0)">不限</div> -->
|
||||
<div class="item flexcenter" v-for="(item, index) in nearSchoolList" :key="index" :class="{ pitch: item['id'] == pitchValue['school'] }" @click="selectOption('nearSchool', item.id)">{{ item["name"] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -290,6 +290,7 @@ let pitchValue = ref({
|
||||
watchEffect(() => {
|
||||
// nearSchoolList = store.state.apartment.school || []
|
||||
nearSchoolList = store.state.schoolList || []
|
||||
console.log("nearSchoolList",nearSchoolList);
|
||||
roomTypeList = store.state.apartment.roomtype || []
|
||||
roomTypeKey = store.state.roomTypeKey || {}
|
||||
roomlistingsList = store.state.apartment.roomlistings || []
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="location flexacenter" v-if="item['address']">
|
||||
<img class="location-icon" src="@/assets/img/publicImage/location-icon.png" />
|
||||
<div class="ellipsis">{{ item["address"] }}</div>
|
||||
<span class="area-distance" v-if="pitchValue['school'] && item['distance']">{{ Math.round(item["distance"] * 10) / 10 }}km</span>
|
||||
<span class="area-distance" v-if="pitchValue?.school && item['distance']">{{ Math.round(item["distance"] * 10) / 10 }}km</span>
|
||||
</div>
|
||||
|
||||
<div class="type-list" v-if="item['roomlist']">
|
||||
|
||||
@@ -381,7 +381,7 @@ let schoolSelectObj = reactive({ id: '', title: '不限', page: '' })
|
||||
let schoolPages = ref(0) //页数
|
||||
let shcoolData = shallowReactive([])
|
||||
let setSchoolData = () => {
|
||||
let arr = routePath.value === '/' ? store.state.seachTypeData[0] && store.state.seachTypeData[0].where : store.state.schoolList
|
||||
let arr = routePath.value === '/' ? store.state.seachTypeData[0] && store.state.seachTypeData[0].where : JSON.parse(JSON.stringify(store.state.schoolList))
|
||||
if (arr[0] && arr[0].id) arr.unshift({ name: '不限', id: '' })
|
||||
|
||||
let num = 0
|
||||
|
||||
Reference in New Issue
Block a user