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

113 lines
3.7 KiB
JavaScript
Raw Normal View History

2024-04-25 18:02:30 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
if (!Array) {
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
const _easycom_u__icon2 = common_vendor.resolveComponent("u--icon");
2024-04-26 18:04:56 +08:00
const _easycom_up_empty2 = common_vendor.resolveComponent("up-empty");
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
const _easycom_up_transition2 = common_vendor.resolveComponent("up-transition");
(_easycom_up_navbar2 + _easycom_u__icon2 + _easycom_up_empty2 + _easycom_up_button2 + _easycom_up_transition2)();
2024-04-25 18:02:30 +08:00
}
const _easycom_up_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
const _easycom_u__icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
2024-04-26 18:04:56 +08:00
const _easycom_up_empty = () => "../../uni_modules/uview-plus/components/u-empty/u-empty.js";
const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
const _easycom_up_transition = () => "../../uni_modules/uview-plus/components/u-transition/u-transition.js";
2024-04-25 18:02:30 +08:00
if (!Math) {
2024-04-26 18:04:56 +08:00
(_easycom_up_navbar + _easycom_u__icon + _easycom_up_empty + _easycom_up_button + _easycom_up_transition)();
2024-04-25 18:02:30 +08:00
}
const _sfc_main = {
__name: "cart",
setup(__props) {
2024-04-26 18:04:56 +08:00
const list = common_vendor.ref(["购物车", "常买"]);
2024-04-25 18:02:30 +08:00
const tabsActive = common_vendor.ref(0);
const changeTab = (e) => {
tabsActive.value = e;
2024-04-26 18:04:56 +08:00
swiperCurrent.value = e;
2024-04-25 18:02:30 +08:00
};
const swiperCurrent = common_vendor.ref(0);
const animationfinish = ({ detail: { current } }) => {
swiperCurrent.value = current;
tabsActive.value = current;
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.f(list.value, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: tabsActive.value == index ? 1 : "",
2024-04-26 18:04:56 +08:00
c: index,
d: common_vendor.o(($event) => changeTab(index), index)
2024-04-25 18:02:30 +08:00
};
}),
b: common_vendor.p({
placeholder: true
})
}, {}, {
c: common_vendor.f(20, (item, index, i0) => {
return common_vendor.e({
a: index % 3 == 0
}, index % 3 == 0 ? {
b: common_assets._imports_0
} : {
c: common_assets._imports_1
}, {
d: "da603134-1-" + i0,
e: "da603134-2-" + i0,
f: index
});
}),
d: common_vendor.p({
name: "minus-circle-fill",
size: "20",
color: "#20b128"
}),
e: common_vendor.t(1),
f: common_vendor.p({
name: "plus-circle-fill",
size: "20",
color: "#20b128"
2024-04-26 18:04:56 +08:00
})
}, {
h: common_vendor.f(20, (item, index, i0) => {
return {
a: "da603134-4-" + i0,
b: index
};
2024-04-25 18:02:30 +08:00
}),
2024-04-26 18:04:56 +08:00
i: common_vendor.p({
size: "small",
plain: true,
color: "#20b128",
shape: "circle"
})
}, {
k: swiperCurrent.value,
l: common_vendor.o(animationfinish)
}, {
n: common_assets._imports_1
}, {
p: common_vendor.p({
size: "small",
plain: true,
color: "#989898",
shape: "circle"
}),
q: common_vendor.p({
size: "small",
plain: true,
color: "#989898",
shape: "circle"
})
}, {
r: common_vendor.p({
show: tabsActive.value == 0
})
2024-04-25 18:02:30 +08:00
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/里海数字乡村/purchase-let/pages/cart/cart.vue"]]);
wx.createPage(MiniProgramPage);