首页优化

This commit is contained in:
Dev
2026-10-15 17:12:09 +08:00
parent 373ac94411
commit 30460cb925
5 changed files with 20 additions and 12 deletions
@@ -57,7 +57,7 @@
/>
<t-input
label="联系方式"
placeholder="请输入微信号或电话(英文/数字/下划线/中划线)"
placeholder="请输入微信号或手机号"
borderless="{{true}}"
data-field="contact"
bindchange="onInputChange"
@@ -75,7 +75,7 @@ Page({
duration: 500,
interval: 5000,
soldNum: 0, // 已售数量
caseView: wx.getStorageSync('goodsCaseView') === true, // 案例展示:使用默认标题,不显示购买和规格
caseView: wx.getStorageSync('goodsCaseView') === true, // 案例展示:标题改为详情,不显示购买和规格
},
handlePopupHide() {
@@ -419,12 +419,10 @@ Page({
async applyCaseView() {
if (this.data.caseView) {
wx.setNavigationBarTitle({ title: '' });
wx.setNavigationBarTitle({ title: '详情' });
}
const caseView = await fetchGoodsCaseView();
this.setData({ caseView });
if (caseView) {
wx.setNavigationBarTitle({ title: '' });
}
wx.setNavigationBarTitle({ title: caseView ? '详情' : '商品详情' });
},
});
+1 -1
View File
@@ -29,7 +29,7 @@ Page({
bannerCurrent: 0, // 当前轮播下标
currentBanner: {}, // 当前轮播的标题数据
bannerNavigation: {
type: 'dots',
type: 'dots-bar',
minShowNum: 2,
},
bannerImageProps: {
+1 -1
View File
@@ -19,8 +19,8 @@
duration="{{500}}"
interval="{{5000}}"
navigation="{{bannerNavigation}}"
paginationPosition="top-right"
imageProps="{{bannerImageProps}}"
t-class-nav="entry-swiper__nav"
list="{{bannerList}}"
height="416rpx"
bind:change="onBannerChange"
+14 -4
View File
@@ -33,12 +33,12 @@ page {
/* ============ 分类 Tabs ============ */
.home-page-container .t-tabs {
background: var(--bg-card) !important;
margin-bottom: 20rpx;
margin-bottom: 0;
}
.home-page-container .t-tabs .t-tabs__nav {
background-color: transparent;
line-height: 80rpx;
line-height: 72rpx;
font-size: 28rpx;
color: var(--text-primary);
}
@@ -81,7 +81,7 @@ page {
.t-tabs.t-tabs--top .t-tabs__item,
.t-tabs.t-tabs--bottom .t-tabs__item {
height: 86rpx !important;
height: 72rpx !important;
}
.t-tabs.t-tabs--top .t-tabs__scroll {
@@ -110,13 +110,17 @@ page {
--td-swiper-nav-dot-active-color: #ffffff;
}
.entry-swiper__nav {
z-index: 3;
}
.entry-swiper__caption {
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
padding: 48rpx 24rpx 24rpx;
padding: 48rpx 24rpx 56rpx;
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.62) 100%);
pointer-events: none;
}
@@ -193,7 +197,9 @@ page {
--td-tab-nav-bg-color: var(--bg-card);
--td-tab-border-color: transparent;
--td-tab-item-color: var(--text-tertiary);
--td-tab-item-height: 72rpx;
--td-tab-track-color: var(--brand);
margin-bottom: 12rpx;
margin-left: 0;
margin-right: 0;
width: 100%;
@@ -203,6 +209,10 @@ page {
overflow: hidden;
}
.home-page-tabs .t-tabs__content {
display: none;
}
.home-page-margin {
display: block;
height: 20rpx;