From f1e0d96560aaab08f5b63fb059a4b724a6c0c79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?= <15778543+xufeiyang6017@user.noreply.gitee.com> Date: Fri, 19 Dec 2025 13:14:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5=E5=B8=83?= =?UTF-8?q?=E5=B1=80=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=AB=8B=E5=8D=B3=E5=85=A5?= =?UTF-8?q?=E9=A9=BB=E6=8C=89=E9=92=AE=E5=92=8C=E8=BD=AE=E6=92=AD=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 17 +++++++++ pages/index/index.wxml | 36 ++++++++++++++--- pages/index/index.wxss | 87 ++++++++++++++++++++++++++++++++++++++---- 3 files changed, 127 insertions(+), 13 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index f541067..fb3c659 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -46,6 +46,23 @@ Page({ }); }, + // 跳转到立即入驻页面 + navigateToSettlement() { + wx.navigateTo({ + url: '/pages/settlement/index', + success: function() { + console.log('成功跳转到立即入驻页面'); + }, + fail: function(error) { + console.error('跳转到立即入驻页面失败:', error); + wx.showToast({ + title: '跳转失败,请稍后重试', + icon: 'none' + }); + } + }); + }, + onLoad() { console.log('首页初始化') }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index fe199f8..1774abe 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,9 +1,35 @@ - - 中国最专业的鸡蛋现货交易平台 - - - + 中国最专业的鸡蛋现货交易平台 + + + + + + + + + + + + + + + + 💡 提示:您可以将自己的图片替换到 /images/ 目录下,命名为轮播图1.jpg、轮播图2.jpg、轮播图3.jpg + + + + + + + + + + + + + + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 46f69f2..04920cc 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -9,9 +9,13 @@ page { } .container { - padding: 0; + padding: 40rpx 0; margin: 0; width: 100%; + display: flex; + flex-direction: column; + justify-content: space-around; + min-height: calc(100vh - 100rpx); } .scrollarea { flex: 1; @@ -68,16 +72,29 @@ page { background: rgba(76, 175, 80, 0.15); } -/* 按钮容器样式,用于并排显示按钮 */ -.btn-container { +/* 按钮区域样式 */ +.buttons-section { + width: 80%; + margin: 20rpx auto; + display: flex; + flex-direction: column; + gap: 20rpx; + flex: 0 1 auto; +} + +/* 按钮行样式 */ +.btn-row { display: flex; flex-direction: row; - justify-content: space-around; - margin: 30rpx auto 0; - width: 80%; + justify-content: space-between; gap: 20rpx; } +/* 全宽按钮行样式 */ +.btn-row.full-width { + justify-content: center; +} + /* 消息按钮样式 */ .message-btn { color: #FF6B6B; @@ -98,6 +115,8 @@ page { .settlement-btn { color: #2196F3; background: rgba(33, 150, 243, 0.15); + margin: 0; + width: 100%; } /* 按钮点击效果 */ @@ -280,12 +299,64 @@ page { color: #1677ff; } +/* 滚动图片区域样式 */ +.swiper-container { + width: 80%; + margin: 20rpx auto; + border-radius: 20rpx; + overflow: hidden; + box-shadow: 0 8rpx 32rpx rgba(31, 38, 135, 0.1); + position: relative; + flex: 0 1 auto; +} + +/* 轮播图指示器样式 */ +.swiper-container .wx-swiper-dots { + bottom: 15rpx; +} + +.swiper-container .wx-swiper-dot { + width: 12rpx; + height: 12rpx; + background: rgba(255, 255, 255, 0.6); +} + +.swiper-container .wx-swiper-dot-active { + width: 36rpx; + background: #fff; +} + +/* 图片提示框样式 */ +.swiper-hint { + background: rgba(0, 0, 0, 0.7); + color: #fff; + padding: 15rpx; + border-radius: 0 0 20rpx 20rpx; + font-size: 24rpx; + text-align: center; + margin-top: -10rpx; +} + +.hint-text { + display: block; + line-height: 1.4; +} + +/* 顶部横幅图片样式 */ +.top-banner { + width: 100%; + height: 425rpx; + margin: -280rpx auto 10rpx; + display: block; +} + /* 标题样式 */ .title { font-size: 40rpx; font-weight: bold; text-align: center; color: #333; - margin-top: 20rpx; - margin-bottom: 10rpx; + margin: 20rpx auto; + padding: 0 20rpx; + flex: 0 1 auto; }