"use strict"; const common_vendor = require("../../common/vendor.js"); const common_assets = require("../../common/assets.js"); const _sfc_main = { data() { return { todayAmount: "0.00", monthProfit: "0.00", stockQty: "0.00", activeTab: "home", notices: [ { text: "选材精工:不锈钢、合金钢,耐腐蚀更耐用", tag: "品质" }, { text: "表面工艺:电镀锌/镀镍/发黑处理,性能均衡", tag: "工艺" }, { text: "库存齐全:螺丝、螺母、垫圈、膨胀螺栓等现货", tag: "库存" }, { text: "企业采购支持:批量优惠,次日发货", tag: "服务" } ], features: [ { key: "customer", title: "客户", img: "/static/icons/customer.png", emoji: "👥" }, { key: "sale", title: "销售", img: "/static/icons/sale.png", emoji: "💰" }, { key: "account", title: "账户", img: "/static/icons/account.png", emoji: "💳" }, { key: "supplier", title: "供应商", img: "/static/icons/supplier.png", emoji: "🚚" }, { key: "purchase", title: "进货", img: "/static/icons/purchase.png", emoji: "🛒" }, { key: "otherPay", title: "其他支出", img: "/static/icons/other-pay.png", emoji: "💸" }, { key: "vip", title: "VIP会员", img: "/static/icons/vip.png", emoji: "👑" }, { key: "report", title: "报表", img: "/static/icons/report.png", emoji: "📊" }, { key: "more", title: "更多", img: "/static/icons/more.png", emoji: "⋯" } ] }; }, methods: { onFeatureTap(item) { common_vendor.index.showToast({ title: item.title + "(开发中)", icon: "none" }); }, onCreateOrder() { common_vendor.index.showToast({ title: "开单(开发中)", icon: "none" }); }, onNoticeTap(n) { common_vendor.index.showModal({ title: "公告", content: n.text, showCancel: false }); }, onNoticeList() { common_vendor.index.showToast({ title: "公告列表(开发中)", icon: "none" }); }, onIconError(item) { item.img = ""; } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_assets._imports_0, b: common_vendor.t($data.todayAmount), c: common_vendor.t($data.monthProfit), d: common_vendor.t($data.stockQty), e: common_vendor.f($data.notices, (n, idx, i0) => { return common_vendor.e({ a: common_vendor.t(n.text), b: n.tag }, n.tag ? { c: common_vendor.t(n.tag) } : {}, { d: common_vendor.o(($event) => $options.onNoticeTap(n), idx), e: idx }); }), f: common_vendor.o((...args) => $options.onNoticeList && $options.onNoticeList(...args)), g: common_vendor.f($data.features, (item, k0, i0) => { return common_vendor.e({ a: item.img }, item.img ? { b: item.img, c: common_vendor.o(($event) => $options.onIconError(item), item.key) } : item.emoji ? { e: common_vendor.t(item.emoji) } : {}, { d: item.emoji, f: common_vendor.t(item.title), g: item.key, h: common_vendor.o(($event) => $options.onFeatureTap(item), item.key) }); }), h: $data.activeTab === "home" ? 1 : "", i: common_vendor.o(($event) => $data.activeTab = "home"), j: common_vendor.o((...args) => $options.onCreateOrder && $options.onCreateOrder(...args)), k: $data.activeTab === "detail" ? 1 : "", l: common_vendor.o(($event) => $data.activeTab = "detail"), m: $data.activeTab === "me" ? 1 : "", n: common_vendor.o(($event) => $data.activeTab = "me") }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map