You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
1.7 KiB

/* pages/index/index.wxss */
.container {
padding: 20rpx;
background-color: #f5f5f5;
min-height: 100vh;
}
.header {
padding: 20rpx 0;
text-align: center;
margin-bottom: 20rpx;
}
.title {
font-size: 36rpx;
font-weight: bold;
color: #333;
}
.loading-container,
.error-container {
display: flex;
justify-content: center;
align-items: center;
height: 200rpx;
text-align: center;
}
.error-container {
flex-direction: column;
}
.error-msg {
color: #ff4d4f;
margin-bottom: 20rpx;
}
.retry-btn {
background-color: #1890ff;
color: white;
border-radius: 8rpx;
padding: 10rpx 20rpx;
}
.product-list {
display: flex;
flex-direction: column;
}
.product-item {
display: flex;
background: white;
margin-bottom: 20rpx;
border-radius: 12rpx;
overflow: hidden;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}
.product-image {
width: 200rpx;
height: 200rpx;
background-color: #f0f0f0;
}
.product-info {
flex: 1;
padding: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.product-name {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
display: block;
/* 限制一行显示,超出省略 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.product-price {
font-size: 32rpx;
color: #ff6b35;
font-weight: bold;
margin-bottom: 10rpx;
display: block;
}
.product-description {
font-size: 26rpx;
color: #666;
display: block;
/* 限制两行显示,超出省略 */
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.empty-state {
text-align: center;
padding: 100rpx 0;
color: #999;
}