Authored by 李奇

首页修改

... ... @@ -36,7 +36,8 @@
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"backgroundColor": "#f0f0f0"
},
"tabBar": {
"borderStyle": "#e0e0e0",
... ...
/**app.wxss**/
/*.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
} */
.clearfix:after {
content: '';
display: block;
... ...
<wxs src="../../wxs/helper.wxs" module="helper" />
<view class="product-item">
<image class="item-image" mode="aspectFit" src="{{helper.image(item.default_images, 860, 644)}}"></image>
<text class="item-title">{{item.product_name}}</text>
<view class="item-price">
<text class="price1" style="color:{{item.showOriginPrice ? '#d0021b' : '#444444'}}">¥{{item.salePriceStr}}</text>
<!--<text class="price2">¥{{item.showOriginPrice ? item.originPriceStr : ''}}</text>-->
<view class="item-detail">
<text class="item-title">{{item.product_name}}</text>
<view class="item-price">
<text class="price1" style="color:{{item.showOriginPrice ? '#d0021b' : '#444444'}}">¥{{item.salePriceStr}}</text>
<text class="price2" wx:if="{{item.showOriginPrice}}">¥{{item.originPriceStr}}</text>
</view>
</view>
</view>
... ...
... ... @@ -4,10 +4,30 @@
margin-top: 65rpx;
}
.product-item .item-detail {
position: relative;
height: 128rpx;
}
.product-item .item-price {
position: absolute;
bottom: 0;
font-family: PingFang-SC-Regular;
font-size: 24rpx;
color: #444;
width: 322rpx;
max-width: 322rpx;
letter-spacing: 0.28px;
}
.product-item .item-price .price2 {
color: #444;
text-decoration: line-through;
}
.product-item .item-image {
width: 322rpx;
height: 430rpx;
}
.product-item .item-title {
... ... @@ -16,7 +36,7 @@
color: #444;
width: 322rpx;
max-width: 322rpx;
line-height: 1.5;
line-height: 1.3;
letter-spacing: 0.28px;
display: -webkit-box;
overflow: hidden;
... ... @@ -24,38 +44,6 @@
white-space: pre-wrap;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
margin: 24rpx 0;
}
.product-item .item-price {
font-family: PingFang-SC-Regular;
font-size: 24rpx;
color: #444;
width: 322rpx;
max-width: 322rpx;
letter-spacing: 0.28px;
}
.product-item .item-image {
}
.product-item .item-image {
margin: 20rpx 0;
}
.product-item .item-image {
}
.product-item .item-image {
}
.product-item .item-image {
}
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@ Component({
product_name: '测试商品名称有点长你懂得地方大幅度的测试商品名称有点长你懂得地方大幅度的测试商品名称有点长你懂得地方大幅度的',
salePriceStr: '3',
originPriceStr: '3',
showOriginPrice: false
showOriginPrice: true
},
{
... ...
... ... @@ -13,7 +13,7 @@
<view class="filter">
<product-list-filter></product-list-filter>
</view>
<product-list></product-list>
<view class="list"><product-list></product-list></view>
</view>
<view>
<copyright></copyright>
... ...
... ... @@ -70,6 +70,7 @@
background-color: #eee;
transform: scaleY(0.5);
}
.recommend-product .filter:after {
display: inline-block;
content: '';
... ... @@ -82,3 +83,7 @@
transform: scaleY(0.5);
}
.recommend-product .list {
padding-bottom: 90rpx;
}
... ...