"use strict"; const common_vendor = require("../../common/vendor.js"); const utils_file = require("../../utils/file.js"); const _sfc_main = { __name: "index", setup(__props) { const quantity = common_vendor.ref(1); const handleIncrease = () => { if (quantity.value >= 99) return; quantity.value++; }; const handleDecrease = () => { if (quantity.value > 0) { quantity.value--; } }; const handleAddToCart = () => { common_vendor.index.__f__("log", "at pages/foodDetail/index.vue:91", "加入购物车,数量:", quantity.value); common_vendor.index.navigateBack(); common_vendor.index.showToast({ title: "加入购物车成功", icon: "none" }); }; common_vendor.onLoad((e) => { }); return (_ctx, _cache) => { return { a: common_vendor.unref(utils_file.getFileUrl)("/static/demo.png"), b: common_vendor.unref(utils_file.getFileUrl)("/static/demo.png"), c: common_vendor.unref(utils_file.getFileUrl)("/static/demo.png"), d: common_vendor.unref(utils_file.getFileUrl)("img/icon/star.png"), e: common_vendor.unref(utils_file.getFileUrl)("img/icon/reduce1.png"), f: quantity.value == 0, g: common_vendor.unref(utils_file.getFileUrl)("img/icon/reduce2.png"), h: quantity.value != 0, i: quantity.value === 0 ? 1 : "", j: common_vendor.o(handleDecrease), k: common_vendor.t(quantity.value || 0), l: common_vendor.unref(utils_file.getFileUrl)("img/icon/add2.png"), m: quantity.value < 99, n: common_vendor.unref(utils_file.getFileUrl)("img/icon/add1.png"), o: quantity.value >= 99, p: common_vendor.o(handleIncrease), q: common_vendor.o(handleAddToCart) }; }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e0bb3f86"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/foodDetail/index.js.map