|
@@ -2,11 +2,13 @@
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_vendor = require("../../common/vendor.js");
|
|
if (!Array) {
|
|
if (!Array) {
|
|
const _easycom_u_swiper2 = common_vendor.resolveComponent("u-swiper");
|
|
const _easycom_u_swiper2 = common_vendor.resolveComponent("u-swiper");
|
|
- _easycom_u_swiper2();
|
|
|
|
|
|
+ const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
|
|
|
+ (_easycom_u_swiper2 + _easycom_u_icon2)();
|
|
}
|
|
}
|
|
const _easycom_u_swiper = () => "../../node-modules/uview-plus/components/u-swiper/u-swiper.js";
|
|
const _easycom_u_swiper = () => "../../node-modules/uview-plus/components/u-swiper/u-swiper.js";
|
|
|
|
+const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
|
|
if (!Math) {
|
|
if (!Math) {
|
|
- _easycom_u_swiper();
|
|
|
|
|
|
+ (_easycom_u_swiper + _easycom_u_icon)();
|
|
}
|
|
}
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "index",
|
|
__name: "index",
|
|
@@ -15,59 +17,24 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
(_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$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;
|
|
(_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config;
|
|
const config = common_vendor.ref({ logo: [], file: [] });
|
|
const config = common_vendor.ref({ logo: [], file: [] });
|
|
- const list = common_vendor.ref([]);
|
|
|
|
- const total = common_vendor.ref(0);
|
|
|
|
- const skip = common_vendor.ref(0);
|
|
|
|
- const limit = common_vendor.ref(6);
|
|
|
|
- const page = common_vendor.ref(0);
|
|
|
|
- const is_bottom = common_vendor.ref(false);
|
|
|
|
|
|
+ common_vendor.ref([]);
|
|
common_vendor.ref(0);
|
|
common_vendor.ref(0);
|
|
common_vendor.onShow(async () => {
|
|
common_vendor.onShow(async () => {
|
|
await searchConfig();
|
|
await searchConfig();
|
|
- await clearPage();
|
|
|
|
await search();
|
|
await search();
|
|
});
|
|
});
|
|
- common_vendor.onPullDownRefresh(async () => {
|
|
|
|
- await clearPage();
|
|
|
|
- await search();
|
|
|
|
- common_vendor.index.stopPullDownRefresh();
|
|
|
|
- });
|
|
|
|
const searchConfig = async () => {
|
|
const searchConfig = async () => {
|
|
config.value = common_vendor.index.getStorageSync("config");
|
|
config.value = common_vendor.index.getStorageSync("config");
|
|
};
|
|
};
|
|
const search = async () => {
|
|
const search = async () => {
|
|
- ({
|
|
|
|
- skip: skip.value,
|
|
|
|
- limit: limit.value,
|
|
|
|
- status: "0"
|
|
|
|
- });
|
|
|
|
};
|
|
};
|
|
- const toView = (item) => {
|
|
|
|
|
|
+ const toCommon = (item) => {
|
|
common_vendor.index.navigateTo({
|
|
common_vendor.index.navigateTo({
|
|
- url: `/pagesHome/car/index?id=${item.id || item._id}`
|
|
|
|
|
|
+ url: `/pagesHome/search/index?type=${item.type || ""}`
|
|
});
|
|
});
|
|
};
|
|
};
|
|
- const toPage = () => {
|
|
|
|
- if (total.value > list.value.length) {
|
|
|
|
- common_vendor.index.showLoading({
|
|
|
|
- title: "加载中",
|
|
|
|
- mask: true
|
|
|
|
- });
|
|
|
|
- page.value = page.value + 1;
|
|
|
|
- skip.value = page.value * limit.value;
|
|
|
|
- search();
|
|
|
|
- common_vendor.index.hideLoading();
|
|
|
|
- } else
|
|
|
|
- is_bottom.value = true;
|
|
|
|
- };
|
|
|
|
- const clearPage = () => {
|
|
|
|
- list.value = [];
|
|
|
|
- skip.value = 0;
|
|
|
|
- limit.value = 6;
|
|
|
|
- page.value = 0;
|
|
|
|
- };
|
|
|
|
return (_ctx, _cache) => {
|
|
return (_ctx, _cache) => {
|
|
- return common_vendor.e({
|
|
|
|
|
|
+ return {
|
|
a: common_vendor.p({
|
|
a: common_vendor.p({
|
|
list: config.value.file,
|
|
list: config.value.file,
|
|
height: "240px",
|
|
height: "240px",
|
|
@@ -75,23 +42,21 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
indicatorMode: "line",
|
|
indicatorMode: "line",
|
|
circular: true
|
|
circular: true
|
|
}),
|
|
}),
|
|
- b: common_vendor.f(list.value, (item, index, i0) => {
|
|
|
|
|
|
+ b: common_vendor.f(_ctx.menuList, (item, index, i0) => {
|
|
return {
|
|
return {
|
|
- a: item.file && item.file.length > 0 ? item.file[0].url : "",
|
|
|
|
- b: common_vendor.t(item.series || "暂无"),
|
|
|
|
- c: common_vendor.t(item.year || "暂无"),
|
|
|
|
- d: common_vendor.t(item.style || "暂无"),
|
|
|
|
- e: common_vendor.t(item.total_money || "0"),
|
|
|
|
- f: index,
|
|
|
|
- g: common_vendor.o(($event) => toView(item), index)
|
|
|
|
|
|
+ a: item.url,
|
|
|
|
+ b: common_vendor.t(item.title),
|
|
|
|
+ c: common_vendor.t(item.brief),
|
|
|
|
+ d: "4978fed5-1-" + i0,
|
|
|
|
+ e: index,
|
|
|
|
+ f: common_vendor.o(($event) => toCommon(item.route), index)
|
|
};
|
|
};
|
|
}),
|
|
}),
|
|
- c: is_bottom.value
|
|
|
|
- }, is_bottom.value ? {
|
|
|
|
- d: common_vendor.t(config.value.bottom_title || "没有更多了!")
|
|
|
|
- } : {}, {
|
|
|
|
- e: common_vendor.o(toPage)
|
|
|
|
- });
|
|
|
|
|
|
+ c: common_vendor.p({
|
|
|
|
+ name: "arrow-right",
|
|
|
|
+ size: "20"
|
|
|
|
+ })
|
|
|
|
+ };
|
|
};
|
|
};
|
|
}
|
|
}
|
|
});
|
|
});
|