|
@@ -91,12 +91,15 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
limit: 1,
|
|
limit: 1,
|
|
status: "0"
|
|
status: "0"
|
|
};
|
|
};
|
|
- if (searchInfo.value.brand)
|
|
|
|
- info.brand = searchInfo.value.brand;
|
|
|
|
- if (searchInfo.value.place)
|
|
|
|
- info.place = searchInfo.value.place;
|
|
|
|
|
|
+ for (let val of searchList.value) {
|
|
|
|
+ if (val.code == "displacement")
|
|
|
|
+ info[val.code] = val.label;
|
|
|
|
+ else
|
|
|
|
+ info[val.code] = val.value;
|
|
|
|
+ }
|
|
const res = await $api("car", "GET", {
|
|
const res = await $api("car", "GET", {
|
|
- ...info
|
|
|
|
|
|
+ ...info,
|
|
|
|
+ ...searchInfo.value
|
|
});
|
|
});
|
|
if (res.errcode === 0) {
|
|
if (res.errcode === 0) {
|
|
total.value = res.total;
|
|
total.value = res.total;
|
|
@@ -164,7 +167,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
});
|
|
});
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- const changeSliderValue = (e, data) => {
|
|
|
|
|
|
+ const changeSliderValue = async (e, data) => {
|
|
tabbar.value = tabbar.value.map((item, index) => {
|
|
tabbar.value = tabbar.value.map((item, index) => {
|
|
if (item.name == data.name) {
|
|
if (item.name == data.name) {
|
|
if (e.firstValue == 0)
|
|
if (e.firstValue == 0)
|
|
@@ -175,6 +178,13 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
}
|
|
}
|
|
return item;
|
|
return item;
|
|
});
|
|
});
|
|
|
|
+ if (data.name == "价格")
|
|
|
|
+ searchInfo.value.money = data.content;
|
|
|
|
+ else if (data.name == "车龄")
|
|
|
|
+ searchInfo.value.year = data.content;
|
|
|
|
+ else
|
|
|
|
+ searchInfo.value.mileage = data.content;
|
|
|
|
+ await searchCar();
|
|
};
|
|
};
|
|
const toSelect = async (arr, data) => {
|
|
const toSelect = async (arr, data) => {
|
|
searchList.value.push(data);
|
|
searchList.value.push(data);
|
|
@@ -188,15 +198,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
}
|
|
}
|
|
return item;
|
|
return item;
|
|
});
|
|
});
|
|
|
|
+ await searchCar();
|
|
};
|
|
};
|
|
const toSearch = () => {
|
|
const toSearch = () => {
|
|
common_vendor.index.navigateTo({
|
|
common_vendor.index.navigateTo({
|
|
url: `/pagesHome/search/index`
|
|
url: `/pagesHome/search/index`
|
|
});
|
|
});
|
|
};
|
|
};
|
|
- const toReset = () => {
|
|
|
|
|
|
+ const toReset = async () => {
|
|
searchInfo.value = {};
|
|
searchInfo.value = {};
|
|
- searchCar();
|
|
|
|
|
|
+ searchList.value = [];
|
|
|
|
+ await search();
|
|
|
|
+ await searchCar();
|
|
};
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
return {
|