This commit is contained in:
hantao 2025-07-03 18:33:25 +08:00
parent 6fa48ad37a
commit a241484705
4 changed files with 54 additions and 10 deletions

View File

@ -1,6 +1,7 @@
const request = require('../../utils/request'); const request = require('../../utils/request');
Page({ Page({
data: { data: {
bannerList: [ bannerList: [
'http://192.168.1.11:8089/uploads/20250630/054c53776891b766c6f1bd65059a5b27.jpg', 'http://192.168.1.11:8089/uploads/20250630/054c53776891b766c6f1bd65059a5b27.jpg',
'http://192.168.1.11:8089/uploads/20250630/c7f45ec56c19eac42a23c5e987cacc93.jpg' 'http://192.168.1.11:8089/uploads/20250630/c7f45ec56c19eac42a23c5e987cacc93.jpg'

View File

@ -62,29 +62,51 @@ page {
.company-actions { .company-actions {
display: flex; display: flex;
gap: 16rpx; gap: 12rpx;
width: 100%;
text-align: center;
} }
.company-actions .van-button { .company-actions .van-button {
flex: 1; flex: 1;
background: rgba(255, 255, 255, 0.15); min-width: 0; /* 允许按钮缩小 */
border: 2rpx solid rgba(255, 255, 255, 0.3);
max-width: calc(50% - 6rpx); /* 确保不超过一半宽度 */
background: rgba(255, 255, 255, 0.15) !important;
border: 2rpx solid rgba(255, 255, 255, 0.3) !important;
color: #ffffff !important; color: #ffffff !important;
backdrop-filter: blur(10rpx); backdrop-filter: blur(10rpx);
border-radius: 16rpx; border-radius: 16rpx !important;
font-weight: 500; font-weight: 500 !important;
font-size: 26rpx !important;
padding: 12rpx 8rpx !important;
height: auto !important;
line-height: 1.2 !important;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
box-sizing: border-box;
} }
.company-actions .van-button:hover { .company-actions .van-button:hover {
background: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.25) !important;
}
/* 按钮内容样式调整 */
.company-actions .van-button .van-button__text {
font-size: 26rpx !important;
color: #ffffff !important;
}
.company-actions .van-button .van-icon {
font-size: 28rpx !important;
margin-right: 6rpx !important;
} }
/* 筛选栏样式 */ /* 筛选栏样式 */
.sticky-filter { .sticky-filter {
background: #ffffff; background: #ffffff;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
border-radius: 24rpx 24rpx 0 0;
margin: 0 24rpx;
overflow: hidden; overflow: hidden;
position: sticky; position: sticky;
top: 0; top: 0;
@ -326,6 +348,12 @@ page {
@media (max-width: 750rpx) { @media (max-width: 750rpx) {
.company-actions { .company-actions {
flex-direction: column; flex-direction: column;
gap: 8rpx;
}
.company-actions .van-button {
max-width: 100%;
min-height: 64rpx;
} }
.filter-tags { .filter-tags {
@ -339,6 +367,19 @@ page {
} }
} }
/* 更小屏幕的额外优化 */
@media (max-width: 600rpx) {
.company-actions .van-button {
font-size: 24rpx !important;
padding: 10rpx 6rpx !important;
}
.company-actions .van-button .van-icon {
font-size: 24rpx !important;
margin-right: 4rpx !important;
}
}
/* 动画效果 */ /* 动画效果 */
@keyframes fadeInUp { @keyframes fadeInUp {
from { from {

View File

@ -3,7 +3,7 @@
"projectname": "car_front", "projectname": "car_front",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": false, "urlCheck": true,
"coverView": true, "coverView": true,
"lazyloadPlaceholderEnable": false, "lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false, "skylineRenderEnable": false,

View File

@ -1,4 +1,4 @@
const BASE_URL = 'http://127.0.0.1:8089/'; // 👈 换成你的后端地址 const BASE_URL = 'https://car.cherrybless.com'; // 👈 换成你的后端地址
function request({ url, method = 'GET', data = {}, header = {} }) { function request({ url, method = 'GET', data = {}, header = {} }) {
const token = ''; const token = '';
@ -10,6 +10,7 @@ function request({ url, method = 'GET', data = {}, header = {} }) {
data, data,
header: { header: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': token ? `Bearer ${token}` : '', 'Authorization': token ? `Bearer ${token}` : '',
...header ...header
}, },
@ -23,6 +24,7 @@ function request({ url, method = 'GET', data = {}, header = {} }) {
} }
}, },
fail(err) { fail(err) {
console.log(err)
wx.showToast({ title: '网络错误', icon: 'none' }); wx.showToast({ title: '网络错误', icon: 'none' });
reject(err); reject(err);
} }