"use strict"; const common_vendor = require("../../common/vendor.js"); if (!Array) { const _easycom_u_search2 = common_vendor.resolveComponent("u-search"); const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); (_easycom_u_search2 + _easycom_u_icon2)(); } const _easycom_u_search = () => "../../node-modules/uview-plus/components/u-search/u-search.js"; const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; if (!Math) { (_easycom_u_search + _easycom_u_icon)(); } 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; (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$config; const config = common_vendor.ref({ logoUrl: [] }); 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 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(0); common_vendor.onLoad(async () => { await searchConfig(); await search(); }); const searchConfig = async () => { config.value = common_vendor.index.getStorageSync("config"); }; const search = async () => { }; const toChange = () => { common_vendor.index.navigateTo({ url: `/pagesHome/type/index` }); }; const toView = (item) => { common_vendor.index.navigateTo({ url: `/pagesHome/car/index?id=${item.id || item._id}` }); }; const toChat = (item) => { common_vendor.index.makePhoneCall({ phoneNumber: item.shop || "110", success: function() { console.log("拨打电话成功"); }, fail: function() { common_vendor.index.showToast({ title: "拨打电话失败", icon: "error" }); } }); }; const toDelete = () => { console.log("清空失效数据"); }; 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; }; return (_ctx, _cache) => { return common_vendor.e({ a: common_vendor.o(toChange), b: common_vendor.p({ shape: "square", ["show-action"]: false, placeholder: "品牌/车系" }), c: common_vendor.p({ name: "trash", size: "15" }), d: common_vendor.o(toDelete), e: 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 }, item.year ? { d: common_vendor.t(item.year || "暂无") } : {}, { e: item.kilometer }, item.kilometer ? { f: common_vendor.t(item.kilometer || "暂无") } : {}, { g: item.city }, item.city ? { h: common_vendor.t(item.city || "暂无") } : {}, { 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) }); }), f: is_bottom.value }, is_bottom.value ? { g: common_vendor.t(config.value.bottom_title || "没有更多了!") } : {}, { h: common_vendor.o(toPage) }); }; } }); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-523c5cf9"], ["__file", "D:/project/二手车/car_applet/pagesMy/collect/index.vue"]]); wx.createPage(MiniProgramPage);