index.js 3.4 KB

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