|
@@ -14,9 +14,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
|
__name: "index",
|
|
|
setup(__props) {
|
|
|
var _a, _b;
|
|
|
- (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
|
|
|
+ const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
|
|
|
(_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
|
|
|
const config = common_vendor.ref({ logoUrl: [] });
|
|
|
+ const searchInfo = common_vendor.ref({});
|
|
|
const type = common_vendor.ref("0");
|
|
|
const is_show = common_vendor.ref(false);
|
|
|
const searchList = common_vendor.ref([{ title: "默认排序", type: "0", is_open: false }, { title: "品牌", type: "1", is_open: false }, { title: "价格", type: "2", is_open: false }, { title: "更多筛选", type: "3", is_open: false }]);
|
|
@@ -25,98 +26,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
|
const brandInfo = common_vendor.ref({});
|
|
|
const moneyInfo = common_vendor.ref({});
|
|
|
const moreList = common_vendor.ref([]);
|
|
|
- const list = common_vendor.ref([
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/1.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/2.jpg" }],
|
|
|
- name: "捷豹XEL 2020款 2.0T 200PS S进取优雅版",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/3.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/4.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/5.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/6.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/7.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/8.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/9.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- },
|
|
|
- {
|
|
|
- id: "1",
|
|
|
- file: [{ url: "https://cdn.uviewui.com/uview/album/10.jpg" }],
|
|
|
- name: "夏朗 2013款 1.8TSI 标配型 欧IV",
|
|
|
- year: "2014年 ",
|
|
|
- city: "丹东",
|
|
|
- kilometer: "8万公里",
|
|
|
- money: "7.80"
|
|
|
- }
|
|
|
- ]);
|
|
|
+ const list = common_vendor.ref([]);
|
|
|
const total = common_vendor.ref(0);
|
|
|
const skip = common_vendor.ref(0);
|
|
|
const limit = common_vendor.ref(6);
|
|
@@ -176,6 +86,24 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
|
config.value = common_vendor.index.getStorageSync("config");
|
|
|
};
|
|
|
const search = async () => {
|
|
|
+ const info = {
|
|
|
+ skip: skip.value,
|
|
|
+ limit: limit.value,
|
|
|
+ status: "0"
|
|
|
+ };
|
|
|
+ const res = await $api("car", "GET", {
|
|
|
+ ...info,
|
|
|
+ ...searchInfo.value
|
|
|
+ });
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ list.value = list.value.concat(res.data);
|
|
|
+ total.value = res.total;
|
|
|
+ } else {
|
|
|
+ common_vendor.index.showToast({
|
|
|
+ title: res.errmsg || "",
|
|
|
+ icon: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
const toSearch = (value) => {
|
|
|
searchList.value = searchList.value.map((item, index) => {
|
|
@@ -399,23 +327,25 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
|
w: common_vendor.f(list.value, (item, index, i0) => {
|
|
|
return common_vendor.e({
|
|
|
a: item.file && item.file.length > 0 ? item.file[0].url : "",
|
|
|
- b: common_vendor.t(item.name || "暂无"),
|
|
|
- c: item.year
|
|
|
+ b: common_vendor.t(item.series || "暂无"),
|
|
|
+ c: common_vendor.t(item.year || "暂无"),
|
|
|
+ d: common_vendor.t(item.style || "暂无"),
|
|
|
+ e: item.year
|
|
|
}, item.year ? {
|
|
|
- d: common_vendor.t(item.year || "暂无")
|
|
|
+ f: common_vendor.t(item.year || "暂无")
|
|
|
} : {}, {
|
|
|
- e: item.kilometer
|
|
|
- }, item.kilometer ? {
|
|
|
- f: common_vendor.t(item.kilometer || "暂无")
|
|
|
+ g: item.mileage
|
|
|
+ }, item.mileage ? {
|
|
|
+ h: common_vendor.t(item.mileage || "暂无")
|
|
|
} : {}, {
|
|
|
- g: item.city
|
|
|
- }, item.city ? {
|
|
|
- h: common_vendor.t(item.city || "暂无")
|
|
|
+ i: item.place
|
|
|
+ }, item.place ? {
|
|
|
+ j: common_vendor.t(item.place || "暂无")
|
|
|
} : {}, {
|
|
|
- i: common_vendor.t(item.money || "0"),
|
|
|
- j: common_vendor.o(($event) => toChat(item), index),
|
|
|
- k: index,
|
|
|
- l: common_vendor.o(($event) => toView(item), index)
|
|
|
+ k: common_vendor.t(item.total_money || "0"),
|
|
|
+ l: common_vendor.o(($event) => toChat(item), index),
|
|
|
+ m: index,
|
|
|
+ n: common_vendor.o(($event) => toView(item), index)
|
|
|
});
|
|
|
}),
|
|
|
x: is_bottom.value
|