4.6接接口

This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-05-13 19:05:34 +08:00
parent 8640fb8de5
commit 4b84dd558e
4 changed files with 144 additions and 66 deletions

View File

@@ -97,8 +97,8 @@
<div class="option-item flexflex" style="padding-bottom: 15px">
<div class="option-title">标签筛选</div>
<div class="option-box flexflex flex1">
<div class="school-item flexcenter" :class="{ pitch: 0 == pitchValue['school'] }" @click="selectOption('nearSchool', 0)">不限</div>
<div class="school-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 class="school-item flexcenter" :class="{ pitch: tag == '' }" @click="selectOption('nearSchool', 0)">不限</div>
<div class="school-item flexcenter" v-for="(item, index) in tagList" :key="index" :class="{ pitch: item == pitchValue['tag'] }" @click="selectOption('tag', item)">{{ item }}</div>
</div>
</div>
<div class="option-item flexflex" :class="{ 'show-eliminate': pitchValue['rent_min'] || pitchValue['rent_max'] }" style="padding-bottom: 23px">
@@ -437,6 +437,9 @@ const selectOption = (type, value) => {
case "roomlistings":
pitchValue.value["roomlistings"] = value;
break;
case "tag":
pitchValue.value["tag"] = value;
break;
default:
break;
}
@@ -450,6 +453,10 @@ let deleteSeachVal = (i) => {
historyArr.value.splice(i, 1);
localStorage.setItem("historyArr", JSON.stringify(historyArr.value));
};
const tagList = ["单人间", "大床房", "独立卫浴", "两房整租", "电梯"];
let tag = ref(""); // 标签筛选选择
</script>
<style scoped lang="less">
* {