purchase-let/unpackage/dist/dev/mp-weixin/pages/index/index.js

165 lines
5.6 KiB
JavaScript

"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)();
}
const viewPopup = () => "../../components/viewPopup.js";
const _sfc_main = {
__name: "index",
setup(__props) {
const show = common_vendor.ref(0);
const topActive = common_vendor.ref(0);
const changeOne = (item, index) => {
console.log("选择", item, index);
topActive.value = index;
show.value = 0;
};
const leftActive = common_vendor.ref(2);
const changeTwo = (item, index) => {
console.log("选择", item, index);
leftActive.value = index;
show.value = 0;
};
const rightActive = common_vendor.ref(1);
const changeThree = (item, index) => {
console.log("选择", item, index);
rightActive.value = index;
show.value = 0;
};
const keyword = common_vendor.ref("");
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();
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(searchKeyword),
b: common_vendor.o(($event) => keyword.value = $event),
c: common_vendor.p({
placeholder: "请输入商品",
showAction: false,
modelValue: keyword.value
}),
d: common_vendor.p({
placeholder: true
}),
e: common_vendor.f(10, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: topActive.value == index ? 1 : "",
c: index,
d: common_vendor.o(($event) => changeOne(item, index), index)
};
}),
f: common_vendor.p({
name: "list"
}),
g: common_vendor.o(($event) => show.value = 1),
h: show.value === 1
}, show.value === 1 ? {
i: common_vendor.f(10, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: topActive.value == index ? 1 : "",
c: index,
d: common_vendor.o(($event) => changeOne(item, index), index)
};
}),
j: common_vendor.o(($event) => show.value = 0),
k: common_vendor.p({
nav: true
})
} : {}, {
l: common_vendor.f(20, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: leftActive.value == index ? 1 : "",
c: index,
d: common_vendor.o(($event) => changeTwo(item, index), index)
};
}),
m: common_vendor.f(6, (item, index, i0) => {
return {
a: rightActive.value == index ? 1 : "",
b: index,
c: common_vendor.o(($event) => changeThree(item, index), index)
};
}),
n: common_vendor.p({
name: "arrow-down"
}),
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
}, show.value === 2 ? {
x: common_vendor.f(6, (item, index, i0) => {
return {
a: rightActive.value == index ? 1 : "",
b: index,
c: common_vendor.o(($event) => changeThree(item, index), index)
};
}),
y: common_vendor.o(($event) => show.value = 0)
} : {}, {
z: common_vendor.f(20, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: "1ba6254c-6-" + i0,
c: "1ba6254c-7-" + i0,
d: index
};
}),
A: common_vendor.p({
name: "minus-circle-fill",
size: "20",
color: "#20b128"
}),
B: common_vendor.t(1),
C: common_vendor.p({
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);