index.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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 _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/banner1.jpg",
  15. tag: "领航品质",
  16. title: "工业铝型材定制",
  17. subTitle: "提供一站式工业型材解决方案"
  18. },
  19. {
  20. url: "/static/index/banner2.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/index" });
  57. }
  58. }
  59. };
  60. if (!Array) {
  61. const _component_erp_tab_bar = common_vendor.resolveComponent("erp-tab-bar");
  62. _component_erp_tab_bar();
  63. }
  64. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  65. return {
  66. a: common_vendor.f($data.banners, (item, index, i0) => {
  67. return {
  68. a: item.url,
  69. b: common_vendor.t(item.tag),
  70. c: common_vendor.t(item.title),
  71. d: common_vendor.t(item.subTitle),
  72. e: index
  73. };
  74. }),
  75. b: common_vendor.o((...args) => $options.handleBannerChange && $options.handleBannerChange(...args), "ff"),
  76. c: common_vendor.f($data.banners, (item, index, i0) => {
  77. return {
  78. a: index,
  79. b: $data.currentBanner === index ? 1 : ""
  80. };
  81. }),
  82. d: common_vendor.o((...args) => $options.callService && $options.callService(...args), "35"),
  83. e: common_vendor.f($data.cubeProducts, (item, index, i0) => {
  84. return {
  85. a: item.image,
  86. b: common_vendor.t(item.name),
  87. c: common_vendor.t(item.desc),
  88. d: index,
  89. e: common_vendor.o((...args) => $options.goToOrder && $options.goToOrder(...args), index)
  90. };
  91. }),
  92. f: common_vendor.p({
  93. active: "home"
  94. })
  95. };
  96. }
  97. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1cf27b2a"]]);
  98. wx.createPage(MiniProgramPage);
  99. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map