"use strict"; const common_vendor = require("../../common/vendor.js"); const utils_assets = require("../../utils/assets.js"); const api_system_phone = require("../../api/system/phone.js"); const ErpTabBar = () => "../../components/erp-tab-bar.js"; const ErpNavBar = () => "../../components/erp-nav-bar.js"; const _sfc_main = { components: { ErpTabBar, ErpNavBar }, data() { return { assets: utils_assets.assets, statusBarHeight: 0, currentBanner: 0, expertPhone: "13888888888", banners: [ { url: "/static/index/banner1.jpg", tag: "领航品质", title: "工业铝型材定制", subTitle: "提供一站式工业型材解决方案" }, { url: "/static/index/banner2.jpg", tag: "建筑美学", title: "高端系统门窗", subTitle: "智造美好生活空间" } ], cubeProducts: [ { name: "建筑铝材", desc: "门窗/幕墙/家装", image: "/static/index/cube1.jpg" }, { name: "工业型材", desc: "光伏/轨道/汽配", image: "/static/index/cube2.jpg" }, { name: "特种定制", desc: "精密开模/特种合金", image: "/static/index/cube3.jpg" }, { name: "深加工", desc: "切割/冲压/CNC", image: "/static/index/cube4.jpg" } ] }; }, onLoad() { this.loadPhone(); }, methods: { async loadPhone() { try { const res = await api_system_phone.getPhone(); if (res.data && res.data.expertPhone) { this.expertPhone = res.data.expertPhone; } } catch (e) { common_vendor.index.__f__("error", "at pages/index/index.vue:154", "加载联系电话失败", e); common_vendor.index.showToast({ title: e || "加载联系电话失败", icon: "none" }); } }, handleBannerChange(e) { this.currentBanner = e.detail.current; }, callService() { common_vendor.index.showModal({ title: "管家式服务", content: "即将为您拨打华晟型材专家电话 " + this.expertPhone, confirmText: "立即咨询", confirmColor: "#C1001C", cancelText: "稍后再说", cancelColor: "#999", success: (res) => { if (res.confirm) { common_vendor.index.makePhoneCall({ phoneNumber: this.expertPhone }); } } }); }, goToOrder() { common_vendor.index.reLaunch({ url: "/pages/order/index" }); } } }; if (!Array) { const _component_erp_nav_bar = common_vendor.resolveComponent("erp-nav-bar"); const _component_erp_tab_bar = common_vendor.resolveComponent("erp-tab-bar"); (_component_erp_nav_bar + _component_erp_tab_bar)(); } function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_vendor.p({ title: "华晶型材", ["show-back"]: false }), b: common_vendor.f($data.banners, (item, index, i0) => { return { a: item.url, b: common_vendor.t(item.tag), c: common_vendor.t(item.title), d: common_vendor.t(item.subTitle), e: index }; }), c: common_vendor.o((...args) => $options.handleBannerChange && $options.handleBannerChange(...args), "84"), d: common_vendor.f($data.banners, (item, index, i0) => { return { a: index, b: $data.currentBanner === index ? 1 : "" }; }), e: common_vendor.o((...args) => $options.callService && $options.callService(...args), "c9"), f: common_vendor.f($data.cubeProducts, (item, index, i0) => { return { a: item.image, b: common_vendor.t(item.name), c: common_vendor.t(item.desc), d: index, e: common_vendor.o((...args) => $options.goToOrder && $options.goToOrder(...args), index) }; }), g: common_vendor.p({ active: "home" }) }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map