123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- if (!Array) {
- const _easycom_u_subsection2 = common_vendor.resolveComponent("u-subsection");
- const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
- (_easycom_u_subsection2 + _easycom_u_icon2)();
- }
- const _easycom_u_subsection = () => "../../node-modules/uview-plus/components/u-subsection/u-subsection.js";
- const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
- if (!Math) {
- (_easycom_u_subsection + _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;
- common_vendor.ref(["-2px", "355px"]);
- const tabList = common_vendor.ref(["销量榜", "保值榜", "店铺规模榜"]);
- const curNow = common_vendor.ref(0);
- const config = common_vendor.ref({ logoUrl: [] });
- const list = common_vendor.ref([
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/1.jpg" }],
- brand: "夏朗",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/2.jpg" }],
- brand: "捷豹",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/3.jpg" }],
- brand: "大众",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/4.jpg" }],
- brand: "大众",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/5.jpg" }],
- brand: "大众",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/6.jpg" }],
- brand: "大众",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/7.jpg" }],
- brand: "奔驰",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/8.jpg" }],
- brand: "丰田",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/9.jpg" }],
- brand: "大众",
- year: "2014年 ",
- city: "丹东",
- kilometer: "8万公里",
- money: "7.80"
- },
- {
- id: "1",
- file: [{ url: "https://cdn.uviewui.com/uview/album/10.jpg" }],
- brand: "本田",
- 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 sectionChange = (index) => {
- curNow.value = index;
- };
- const toView = (item) => {
- common_vendor.index.navigateTo({
- url: `/pagesHome/car/index?id=${item.id || item._id}`
- });
- };
- 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(sectionChange),
- b: common_vendor.p({
- mode: "subsection",
- activeColor: "#ffbc00",
- list: tabList.value,
- current: curNow.value
- }),
- c: common_vendor.f(list.value, (item, index, i0) => {
- return {
- a: common_vendor.t(index + 1),
- b: common_vendor.n(`rank${index + 1}`),
- c: item.file && item.file.length > 0 ? item.file[0].url : "",
- d: common_vendor.t(item.brand || "暂无"),
- e: common_vendor.t(item.money || "0"),
- f: "581af8d0-1-" + i0,
- g: index,
- h: common_vendor.o(($event) => toView(item), index)
- };
- }),
- d: common_vendor.p({
- color: "#000",
- name: "heart",
- size: "20"
- }),
- e: is_bottom.value
- }, is_bottom.value ? {
- f: common_vendor.t(config.value.bottom_title || "没有更多了!")
- } : {}, {
- g: common_vendor.o(toPage)
- });
- };
- }
- });
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-581af8d0"], ["__file", "D:/project/二手车/car_applet/pagesHome/rank/index.vue"]]);
- wx.createPage(MiniProgramPage);
|