index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. <template>
  2. <view class="home-page">
  3. <erp-nav-bar title="华晶型材" :show-back="false" />
  4. <scroll-view class="main-scroll" scroll-y :show-scrollbar="false" :enhanced="true">
  5. <!-- 1. 灵动大屏轮播 (无缝全屏感) -->
  6. <view class="hero-section">
  7. <swiper class="hero-swiper" circular autoplay interval="5000" duration="800"
  8. @change="handleBannerChange">
  9. <swiper-item v-for="(item, index) in banners" :key="index">
  10. <view class="hero-card">
  11. <image :src="item.url" mode="aspectFill" class="hero-img"></image>
  12. <view class="hero-overlay"></view>
  13. <view class="hero-text-content">
  14. <text class="hero-tag">{{ item.tag }}</text>
  15. <text class="hero-main-title">{{ item.title }}</text>
  16. <text class="hero-sub-title">{{ item.subTitle }}</text>
  17. </view>
  18. </view>
  19. </swiper-item>
  20. </swiper>
  21. <!-- 胶囊样式指示器 -->
  22. <view class="hero-indicators">
  23. <view v-for="(item, index) in banners" :key="index" class="indicator-pill"
  24. :class="{ active: currentBanner === index }"></view>
  25. </view>
  26. </view>
  27. <!-- 2. 精英咨询入口 (悬浮毛玻璃效果) -->
  28. <view class="contact-card" @click="callService">
  29. <view class="contact-info">
  30. <view class="contact-icon-box">
  31. <image src="https://img.icons8.com/ios-filled/50/C1001C/phone.png" mode="aspectFit"></image>
  32. </view>
  33. <view class="contact-texts">
  34. <text class="main-txt">尊享 VIP 咨询服务</text>
  35. <text class="sub-txt">15年行业专家 为您定制型材解决方案</text>
  36. </view>
  37. </view>
  38. <view class="call-btn-circle">
  39. <image src="https://img.icons8.com/ios-glyphs/30/ffffff/phone--v1.png" mode="aspectFit"></image>
  40. </view>
  41. </view>
  42. <!-- 3. 魔幻型材空间 (2x2 魔方布局) -->
  43. <view class="cube-section">
  44. <view class="section-header">
  45. <view class="title-with-line">
  46. <text class="zh">精选分类</text>
  47. <text class="en">CATEGORIES</text>
  48. </view>
  49. </view>
  50. <view class="cube-container">
  51. <view class="cube-grid">
  52. <view class="cube-card" v-for="(item, index) in cubeProducts" :key="index" @click="goToOrder">
  53. <image :src="item.image" mode="aspectFill" class="cube-bg"></image>
  54. <view class="cube-mask"></view>
  55. <view class="cube-content">
  56. <text class="cube-title">{{ item.name }}</text>
  57. <view class="cube-line"></view>
  58. <text class="cube-desc">{{ item.desc }}</text>
  59. </view>
  60. <view class="cube-arrow">→</view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 4. 品牌硬实力 (深色大气卡片) -->
  66. <view class="brand-strength">
  67. <view class="strength-card">
  68. <view class="s-header">
  69. <text class="s-title">华晟 · 硬核实力</text>
  70. <text class="s-subtitle">Reliable Quality & Professional Service</text>
  71. </view>
  72. <view class="s-stats">
  73. <view class="stat-box">
  74. <text class="num">15<text class="unit">年</text></text>
  75. <text class="label">专注型材研发</text>
  76. </view>
  77. <view class="stat-divider"></view>
  78. <view class="stat-box">
  79. <text class="num">3<text class="unit">大</text></text>
  80. <text class="label">现代生产基地</text>
  81. </view>
  82. <view class="stat-divider"></view>
  83. <view class="stat-box">
  84. <text class="num">500<text class="unit">+</text></text>
  85. <text class="label">合作伙伴认可</text>
  86. </view>
  87. </view>
  88. <view class="s-footer">
  89. <text>品质铸就品牌 · 服务创造价值</text>
  90. </view>
  91. </view>
  92. </view>
  93. <!-- 底部占位 -->
  94. <view class="safe-bottom-gap"></view>
  95. </scroll-view>
  96. <!-- 底部通用导航 -->
  97. <erp-tab-bar active="home"></erp-tab-bar>
  98. </view>
  99. </template>
  100. <script>
  101. import ErpTabBar from '@/components/erp-tab-bar.vue';
  102. import ErpNavBar from '@/components/erp-nav-bar.vue';
  103. import assets from '@/utils/assets.js';
  104. export default {
  105. components: { ErpTabBar, ErpNavBar },
  106. data() {
  107. return {
  108. assets,
  109. statusBarHeight: 0,
  110. currentBanner: 0,
  111. banners: [
  112. {
  113. url: '/static/index/banner1.jpg',
  114. tag: '领航品质',
  115. title: '工业铝型材定制',
  116. subTitle: '提供一站式工业型材解决方案'
  117. },
  118. {
  119. url: '/static/index/banner2.jpg',
  120. tag: '建筑美学',
  121. title: '高端系统门窗',
  122. subTitle: '智造美好生活空间'
  123. }
  124. ],
  125. cubeProducts: [
  126. { name: '建筑铝材', desc: '门窗/幕墙/家装', image: '/static/index/cube1.jpg' },
  127. { name: '工业型材', desc: '光伏/轨道/汽配', image: '/static/index/cube2.jpg' },
  128. { name: '特种定制', desc: '精密开模/特种合金', image: '/static/index/cube3.jpg' },
  129. { name: '深加工', desc: '切割/冲压/CNC', image: '/static/index/cube4.jpg' }
  130. ]
  131. }
  132. },
  133. onLoad() {
  134. },
  135. methods: {
  136. handleBannerChange(e) { this.currentBanner = e.detail.current; },
  137. callService() {
  138. uni.showModal({
  139. title: '管家式服务',
  140. content: '即将为您拨打华晟型材专家电话 13888888888',
  141. confirmText: '立即咨询',
  142. confirmColor: '#C1001C',
  143. cancelText: '稍后再说',
  144. cancelColor: '#999',
  145. success: (res) => {
  146. if (res.confirm) {
  147. uni.makePhoneCall({ phoneNumber: '13888888888' });
  148. }
  149. }
  150. });
  151. },
  152. goToOrder() { uni.reLaunch({ url: '/pages/order/index' }); }
  153. }
  154. }
  155. </script>
  156. <style scoped>
  157. .home-page {
  158. width: 100vw;
  159. height: 100vh;
  160. background-color: #F8FAFC;
  161. display: flex;
  162. flex-direction: column;
  163. }
  164. .main-scroll {
  165. flex: 1;
  166. height: 0;
  167. }
  168. /* 英雄轮播区 */
  169. .hero-section {
  170. position: relative;
  171. width: 100%;
  172. height: 500rpx;
  173. overflow: hidden;
  174. }
  175. .hero-swiper {
  176. height: 100%;
  177. }
  178. .hero-card {
  179. position: relative;
  180. width: 100%;
  181. height: 100%;
  182. }
  183. .hero-img {
  184. width: 100%;
  185. height: 100%;
  186. }
  187. .hero-overlay {
  188. position: absolute;
  189. inset: 0;
  190. background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
  191. }
  192. .hero-text-content {
  193. position: absolute;
  194. left: 40rpx;
  195. bottom: 80rpx;
  196. color: #fff;
  197. z-index: 2;
  198. }
  199. .hero-tag {
  200. font-size: 20rpx;
  201. background: rgba(193, 0, 28, 0.8);
  202. padding: 4rpx 16rpx;
  203. border-radius: 4rpx;
  204. margin-bottom: 12rpx;
  205. display: inline-block;
  206. }
  207. .hero-main-title {
  208. font-size: 44rpx;
  209. font-weight: bold;
  210. display: block;
  211. margin-bottom: 8rpx;
  212. }
  213. .hero-sub-title {
  214. font-size: 24rpx;
  215. opacity: 0.8;
  216. letter-spacing: 1rpx;
  217. }
  218. .hero-indicators {
  219. position: absolute;
  220. bottom: 40rpx;
  221. right: 40rpx;
  222. display: flex;
  223. gap: 8rpx;
  224. }
  225. .indicator-pill {
  226. width: 12rpx;
  227. height: 6rpx;
  228. background: rgba(255, 255, 255, 0.3);
  229. border-radius: 4rpx;
  230. transition: 0.3s;
  231. }
  232. .indicator-pill.active {
  233. width: 32rpx;
  234. background: #fff;
  235. }
  236. /* 咨询卡片 */
  237. .contact-card {
  238. margin: -40rpx 40rpx 40rpx;
  239. position: relative;
  240. z-index: 10;
  241. background: rgba(255, 255, 255, 0.9);
  242. backdrop-filter: blur(20px);
  243. border-radius: 24rpx;
  244. padding: 32rpx 40rpx;
  245. display: flex;
  246. align-items: center;
  247. justify-content: space-between;
  248. border: 1rpx solid #fff;
  249. box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.06);
  250. }
  251. .contact-info {
  252. display: flex;
  253. align-items: center;
  254. }
  255. .contact-icon-box {
  256. width: 88rpx;
  257. height: 88rpx;
  258. background: #FFF1F2;
  259. border-radius: 50%;
  260. display: flex;
  261. align-items: center;
  262. justify-content: center;
  263. margin-right: 24rpx;
  264. }
  265. .contact-icon-box image {
  266. width: 44rpx;
  267. height: 44rpx;
  268. }
  269. .main-txt {
  270. font-size: 30rpx;
  271. font-weight: bold;
  272. color: #1a1a1a;
  273. display: block;
  274. margin-bottom: 4rpx;
  275. }
  276. .sub-txt {
  277. font-size: 22rpx;
  278. color: #7a7a7a;
  279. }
  280. .call-btn-circle {
  281. width: 72rpx;
  282. height: 72rpx;
  283. background: #C1001C;
  284. border-radius: 50%;
  285. display: flex;
  286. align-items: center;
  287. justify-content: center;
  288. box-shadow: 0 6rpx 12rpx rgba(193, 0, 28, 0.3);
  289. }
  290. .call-btn-circle image {
  291. width: 32rpx;
  292. height: 32rpx;
  293. }
  294. /* 魔方布局 */
  295. .cube-section {
  296. padding: 20rpx 40rpx;
  297. }
  298. .section-header {
  299. margin-bottom: 30rpx;
  300. }
  301. .title-with-line {
  302. display: flex;
  303. align-items: baseline;
  304. gap: 16rpx;
  305. }
  306. .title-with-line .zh {
  307. font-size: 36rpx;
  308. font-weight: 800;
  309. color: #1a1a1a;
  310. }
  311. .title-with-line .en {
  312. font-size: 20rpx;
  313. color: #999;
  314. font-family: 'Georgia';
  315. letter-spacing: 2rpx;
  316. }
  317. .cube-container {
  318. width: 100%;
  319. }
  320. .cube-grid {
  321. display: grid;
  322. grid-template-columns: repeat(2, 1fr);
  323. gap: 20rpx;
  324. }
  325. .cube-card {
  326. position: relative;
  327. height: 320rpx;
  328. border-radius: 20rpx;
  329. overflow: hidden;
  330. background: #eee;
  331. transition: 0.3s;
  332. }
  333. .cube-bg {
  334. width: 100%;
  335. height: 100%;
  336. }
  337. .cube-mask {
  338. position: absolute;
  339. inset: 0;
  340. background: rgba(0, 0, 0, 0.3);
  341. }
  342. .cube-content {
  343. position: absolute;
  344. left: 30rpx;
  345. top: 30rpx;
  346. z-index: 2;
  347. }
  348. .cube-title {
  349. font-size: 32rpx;
  350. font-weight: bold;
  351. color: #fff;
  352. margin-bottom: 12rpx;
  353. display: block;
  354. }
  355. .cube-line {
  356. width: 40rpx;
  357. height: 4rpx;
  358. background: #C1001C;
  359. margin-bottom: 12rpx;
  360. }
  361. .cube-desc {
  362. font-size: 20rpx;
  363. color: rgba(255, 255, 255, 0.8);
  364. max-width: 240rpx;
  365. line-height: 1.4;
  366. display: block;
  367. }
  368. .cube-arrow {
  369. position: absolute;
  370. right: 30rpx;
  371. bottom: 30rpx;
  372. color: #fff;
  373. font-size: 30rpx;
  374. opacity: 0.6;
  375. }
  376. /* 企业实力 */
  377. .brand-strength {
  378. padding: 40rpx;
  379. margin-bottom: 40rpx;
  380. }
  381. .strength-card {
  382. background: #1a1a1a;
  383. border-radius: 32rpx;
  384. padding: 48rpx 40rpx;
  385. color: #fff;
  386. box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15);
  387. }
  388. .s-header {
  389. margin-bottom: 50rpx;
  390. }
  391. .s-title {
  392. font-size: 34rpx;
  393. font-weight: bold;
  394. display: block;
  395. margin-bottom: 8rpx;
  396. color: #fff;
  397. letter-spacing: 4rpx;
  398. }
  399. .s-subtitle {
  400. font-size: 18rpx;
  401. color: #666;
  402. font-family: 'Arial';
  403. text-transform: uppercase;
  404. }
  405. .s-stats {
  406. display: flex;
  407. justify-content: space-between;
  408. align-items: center;
  409. margin-bottom: 40rpx;
  410. }
  411. .stat-box {
  412. text-align: center;
  413. flex: 1;
  414. }
  415. .stat-box .num {
  416. font-size: 44rpx;
  417. font-weight: 800;
  418. color: #FFD700;
  419. display: block;
  420. margin-bottom: 4rpx;
  421. }
  422. .stat-box .unit {
  423. font-size: 20rpx;
  424. margin-left: 4rpx;
  425. font-weight: normal;
  426. }
  427. .stat-box .label {
  428. font-size: 22rpx;
  429. color: #ababab;
  430. }
  431. .stat-divider {
  432. width: 1rpx;
  433. height: 50rpx;
  434. background: rgba(255, 255, 255, 0.1);
  435. }
  436. .s-footer {
  437. border-top: 1rpx solid rgba(255, 255, 255, 0.05);
  438. padding-top: 30rpx;
  439. text-align: center;
  440. }
  441. .s-footer text {
  442. font-size: 18rpx;
  443. color: #555;
  444. letter-spacing: 6rpx;
  445. }
  446. .safe-bottom-gap {
  447. height: 140rpx;
  448. }
  449. </style>