index.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const utils_assets = require("../../utils/assets.js");
  4. const ErpTabBar = () => "../../components/erp-tab-bar.js";
  5. const ErpNavBar = () => "../../components/erp-nav-bar.js";
  6. const _sfc_main = {
  7. components: { ErpTabBar, ErpNavBar },
  8. data() {
  9. return {
  10. assets: utils_assets.assets,
  11. statusBarHeight: 0,
  12. currentBanner: 0,
  13. banners: [
  14. {
  15. url: "/static/index/banner1.jpg",
  16. tag: "领航品质",
  17. title: "工业铝型材定制",
  18. subTitle: "提供一站式工业型材解决方案"
  19. },
  20. {
  21. url: "/static/index/banner2.jpg",
  22. tag: "建筑美学",
  23. title: "高端系统门窗",
  24. subTitle: "智造美好生活空间"
  25. }
  26. ],
  27. cubeProducts: [
  28. { name: "建筑铝材", desc: "门窗/幕墙/家装", image: "/static/index/cube1.jpg" },
  29. { name: "工业型材", desc: "光伏/轨道/汽配", image: "/static/index/cube2.jpg" },
  30. { name: "特种定制", desc: "精密开模/特种合金", image: "/static/index/cube3.jpg" },
  31. { name: "深加工", desc: "切割/冲压/CNC", image: "/static/index/cube4.jpg" }
  32. ]
  33. };
  34. },
  35. onLoad() {
  36. },
  37. methods: {
  38. handleBannerChange(e) {
  39. this.currentBanner = e.detail.current;
  40. },
  41. callService() {
  42. common_vendor.index.showModal({
  43. title: "管家式服务",
  44. content: "即将为您拨打华晟型材专家电话 13888888888",
  45. confirmText: "立即咨询",
  46. confirmColor: "#C1001C",
  47. cancelText: "稍后再说",
  48. cancelColor: "#999",
  49. success: (res) => {
  50. if (res.confirm) {
  51. common_vendor.index.makePhoneCall({ phoneNumber: "13888888888" });
  52. }
  53. }
  54. });
  55. },
  56. goToOrder() {
  57. common_vendor.index.reLaunch({ url: "/pages/order/index" });
  58. }
  59. }
  60. };
  61. if (!Array) {
  62. const _component_erp_nav_bar = common_vendor.resolveComponent("erp-nav-bar");
  63. const _component_erp_tab_bar = common_vendor.resolveComponent("erp-tab-bar");
  64. (_component_erp_nav_bar + _component_erp_tab_bar)();
  65. }
  66. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  67. return {
  68. a: common_vendor.p({
  69. title: "华晶型材",
  70. ["show-back"]: false
  71. }),
  72. b: common_vendor.f($data.banners, (item, index, i0) => {
  73. return {
  74. a: item.url,
  75. b: common_vendor.t(item.tag),
  76. c: common_vendor.t(item.title),
  77. d: common_vendor.t(item.subTitle),
  78. e: index
  79. };
  80. }),
  81. c: common_vendor.o((...args) => $options.handleBannerChange && $options.handleBannerChange(...args), "84"),
  82. d: common_vendor.f($data.banners, (item, index, i0) => {
  83. return {
  84. a: index,
  85. b: $data.currentBanner === index ? 1 : ""
  86. };
  87. }),
  88. e: common_vendor.o((...args) => $options.callService && $options.callService(...args), "c9"),
  89. f: common_vendor.f($data.cubeProducts, (item, index, i0) => {
  90. return {
  91. a: item.image,
  92. b: common_vendor.t(item.name),
  93. c: common_vendor.t(item.desc),
  94. d: index,
  95. e: common_vendor.o((...args) => $options.goToOrder && $options.goToOrder(...args), index)
  96. };
  97. }),
  98. g: common_vendor.p({
  99. active: "home"
  100. })
  101. };
  102. }
  103. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"]]);
  104. wx.createPage(MiniProgramPage);
  105. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map