2024-04-25 18:02:30 +08:00
|
|
|
"use strict";
|
|
|
|
const common_vendor = require("../../common/vendor.js");
|
|
|
|
if (!Array) {
|
|
|
|
const _easycom_up_search2 = common_vendor.resolveComponent("up-search");
|
|
|
|
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
|
|
|
|
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
|
|
|
const _easycom_u__icon2 = common_vendor.resolveComponent("u--icon");
|
|
|
|
(_easycom_up_search2 + _easycom_up_navbar2 + _easycom_up_icon2 + _easycom_u__icon2)();
|
|
|
|
}
|
|
|
|
const _easycom_up_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js";
|
|
|
|
const _easycom_up_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
|
|
|
|
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
|
|
|
const _easycom_u__icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
|
|
|
if (!Math) {
|
|
|
|
(_easycom_up_search + _easycom_up_navbar + _easycom_up_icon + viewPopup + _easycom_u__icon)();
|
|
|
|
}
|
2024-04-27 18:02:43 +08:00
|
|
|
const viewPopup = () => "../../components/viewPopup.js";
|
2024-04-25 18:02:30 +08:00
|
|
|
const _sfc_main = {
|
|
|
|
__name: "index",
|
|
|
|
setup(__props) {
|
2024-04-27 18:02:43 +08:00
|
|
|
const show = common_vendor.ref(0);
|
2024-04-25 18:02:30 +08:00
|
|
|
const topActive = common_vendor.ref(0);
|
2024-04-27 18:02:43 +08:00
|
|
|
const changeOne = (item, index) => {
|
|
|
|
console.log("选择", item, index);
|
|
|
|
topActive.value = index;
|
|
|
|
show.value = 0;
|
|
|
|
};
|
2024-04-25 18:02:30 +08:00
|
|
|
const leftActive = common_vendor.ref(2);
|
2024-04-27 18:02:43 +08:00
|
|
|
const changeTwo = (item, index) => {
|
|
|
|
console.log("选择", item, index);
|
|
|
|
leftActive.value = index;
|
|
|
|
show.value = 0;
|
|
|
|
};
|
2024-04-25 18:02:30 +08:00
|
|
|
const rightActive = common_vendor.ref(1);
|
2024-04-27 18:02:43 +08:00
|
|
|
const changeThree = (item, index) => {
|
|
|
|
console.log("选择", item, index);
|
|
|
|
rightActive.value = index;
|
|
|
|
show.value = 0;
|
|
|
|
};
|
2024-04-25 18:02:30 +08:00
|
|
|
const keyword = common_vendor.ref("");
|
2024-04-27 18:02:43 +08:00
|
|
|
const searchKeyword = () => {
|
|
|
|
console.log("搜索", keyword.value);
|
|
|
|
where.value = keyword.value;
|
|
|
|
};
|
|
|
|
const changeOrder = (order) => {
|
|
|
|
console.log("排序", order);
|
|
|
|
where.value.order = order;
|
|
|
|
};
|
|
|
|
const where = common_vendor.ref({
|
|
|
|
page: 1,
|
|
|
|
pageSize: 15,
|
|
|
|
keyword: "",
|
|
|
|
order: ""
|
|
|
|
});
|
|
|
|
const loading = common_vendor.ref(true);
|
|
|
|
const getGoodList = () => {
|
|
|
|
loading.value = true;
|
|
|
|
setTimeout(() => {
|
|
|
|
loading.value = false;
|
|
|
|
}, 3e3);
|
|
|
|
};
|
|
|
|
common_vendor.onLoad(() => {
|
|
|
|
getGoodList();
|
|
|
|
});
|
2024-04-25 18:02:30 +08:00
|
|
|
return (_ctx, _cache) => {
|
|
|
|
return common_vendor.e({
|
2024-04-27 18:02:43 +08:00
|
|
|
a: common_vendor.o(searchKeyword),
|
|
|
|
b: common_vendor.o(($event) => keyword.value = $event),
|
|
|
|
c: common_vendor.p({
|
2024-04-25 18:02:30 +08:00
|
|
|
placeholder: "请输入商品",
|
|
|
|
showAction: false,
|
|
|
|
modelValue: keyword.value
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
d: common_vendor.p({
|
2024-04-25 18:02:30 +08:00
|
|
|
placeholder: true
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
e: common_vendor.f(10, (item, index, i0) => {
|
2024-04-25 18:02:30 +08:00
|
|
|
return {
|
|
|
|
a: common_vendor.t(item),
|
|
|
|
b: topActive.value == index ? 1 : "",
|
2024-04-27 18:02:43 +08:00
|
|
|
c: index,
|
|
|
|
d: common_vendor.o(($event) => changeOne(item, index), index)
|
2024-04-25 18:02:30 +08:00
|
|
|
};
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
f: common_vendor.p({
|
2024-04-25 18:02:30 +08:00
|
|
|
name: "list"
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
g: common_vendor.o(($event) => show.value = 1),
|
|
|
|
h: show.value === 1
|
2024-04-25 18:02:30 +08:00
|
|
|
}, show.value === 1 ? {
|
2024-04-27 18:02:43 +08:00
|
|
|
i: common_vendor.f(10, (item, index, i0) => {
|
2024-04-25 18:02:30 +08:00
|
|
|
return {
|
|
|
|
a: common_vendor.t(item),
|
|
|
|
b: topActive.value == index ? 1 : "",
|
2024-04-27 18:02:43 +08:00
|
|
|
c: index,
|
|
|
|
d: common_vendor.o(($event) => changeOne(item, index), index)
|
2024-04-25 18:02:30 +08:00
|
|
|
};
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
j: common_vendor.o(($event) => show.value = 0),
|
|
|
|
k: common_vendor.p({
|
2024-04-25 18:02:30 +08:00
|
|
|
nav: true
|
|
|
|
})
|
|
|
|
} : {}, {
|
2024-04-27 18:02:43 +08:00
|
|
|
l: common_vendor.f(20, (item, index, i0) => {
|
2024-04-25 18:02:30 +08:00
|
|
|
return {
|
|
|
|
a: common_vendor.t(item),
|
|
|
|
b: leftActive.value == index ? 1 : "",
|
2024-04-27 18:02:43 +08:00
|
|
|
c: index,
|
|
|
|
d: common_vendor.o(($event) => changeTwo(item, index), index)
|
2024-04-25 18:02:30 +08:00
|
|
|
};
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
m: common_vendor.f(6, (item, index, i0) => {
|
2024-04-25 18:02:30 +08:00
|
|
|
return {
|
|
|
|
a: rightActive.value == index ? 1 : "",
|
2024-04-27 18:02:43 +08:00
|
|
|
b: index,
|
|
|
|
c: common_vendor.o(($event) => changeThree(item, index), index)
|
2024-04-25 18:02:30 +08:00
|
|
|
};
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
n: common_vendor.p({
|
2024-04-25 18:02:30 +08:00
|
|
|
name: "arrow-down"
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
o: common_vendor.o(($event) => show.value = 2),
|
|
|
|
p: where.value.order == "" ? 1 : "",
|
|
|
|
q: common_vendor.o(($event) => changeOrder("")),
|
|
|
|
r: where.value.order == "desc" || where.value.order == "asc" ? 1 : "",
|
|
|
|
s: common_vendor.o(($event) => changeOrder(where.value.order == "asc" ? "desc" : "asc")),
|
|
|
|
t: where.value.order == "sales" ? 1 : "",
|
|
|
|
v: common_vendor.o(($event) => changeOrder("sales")),
|
|
|
|
w: show.value === 2
|
2024-04-25 18:02:30 +08:00
|
|
|
}, show.value === 2 ? {
|
2024-04-27 18:02:43 +08:00
|
|
|
x: common_vendor.f(6, (item, index, i0) => {
|
2024-04-25 18:02:30 +08:00
|
|
|
return {
|
|
|
|
a: rightActive.value == index ? 1 : "",
|
2024-04-27 18:02:43 +08:00
|
|
|
b: index,
|
|
|
|
c: common_vendor.o(($event) => changeThree(item, index), index)
|
2024-04-25 18:02:30 +08:00
|
|
|
};
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
y: common_vendor.o(($event) => show.value = 0)
|
2024-04-25 18:02:30 +08:00
|
|
|
} : {}, {
|
2024-04-27 18:02:43 +08:00
|
|
|
z: common_vendor.f(20, (item, index, i0) => {
|
2024-04-25 18:02:30 +08:00
|
|
|
return {
|
|
|
|
a: common_vendor.t(item),
|
|
|
|
b: "1ba6254c-6-" + i0,
|
|
|
|
c: "1ba6254c-7-" + i0,
|
|
|
|
d: index
|
|
|
|
};
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
A: common_vendor.p({
|
2024-04-25 18:02:30 +08:00
|
|
|
name: "minus-circle-fill",
|
|
|
|
size: "20",
|
|
|
|
color: "#20b128"
|
|
|
|
}),
|
2024-04-27 18:02:43 +08:00
|
|
|
B: common_vendor.t(1),
|
|
|
|
C: common_vendor.p({
|
2024-04-25 18:02:30 +08:00
|
|
|
name: "plus-circle-fill",
|
|
|
|
size: "20",
|
|
|
|
color: "#20b128"
|
|
|
|
})
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/里海数字乡村/purchase-let/pages/index/index.vue"]]);
|
|
|
|
wx.createPage(MiniProgramPage);
|