0000
This commit is contained in:
8
pages/mall/goodsList/goodsList.js
Normal file
8
pages/mall/goodsList/goodsList.js
Normal file
@@ -0,0 +1,8 @@
|
||||
Component({
|
||||
properties: {
|
||||
list: Array,
|
||||
isdistance: Boolean
|
||||
},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
||||
4
pages/mall/goodsList/goodsList.json
Normal file
4
pages/mall/goodsList/goodsList.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
40
pages/mall/goodsList/goodsList.wxml
Normal file
40
pages/mall/goodsList/goodsList.wxml
Normal file
@@ -0,0 +1,40 @@
|
||||
<view>
|
||||
<view class="match-wrap">
|
||||
<view class="goods-match">
|
||||
<navigator class="item" hoverClass="hover" url="/pages/goodsDetails/goodsDetails?id={{item.id}}" wx:for="{{list}}" wx:key="index">
|
||||
<view class="hd">
|
||||
<view class="image-box __100">
|
||||
<image lazyLoad="true" src="{{item.image}}"></image>
|
||||
</view>
|
||||
<view class="issaled" wx:if="{{item.stock==0}}">
|
||||
<image src="/img/issaled.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view class="{{isdistance?'isdistance bd_name':'bd_name'}} ">{{item.name}}</view>
|
||||
<view class="bd_shop" wx:if="{{isdistance}}">
|
||||
<view>{{item.companyname}}</view>
|
||||
<view>{{item.distance}}km</view>
|
||||
</view>
|
||||
<view class="_btm">
|
||||
<view class="_btm_lt">
|
||||
<view class="bd_price">
|
||||
<view class="now-price __normal">
|
||||
<view class="symbol">¥</view>
|
||||
<view class="buck">{{item.price_buck}}.</view>
|
||||
<view class="cent">{{item.price_cent}}</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="old" wx:if="{{item.marketprice}}">¥{{item.marketprice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_btm_rt">
|
||||
<view class="bd_btn" wx:if="{{item.stock>0}}">立即抢购</view>
|
||||
<view class="bd_btn issele" wx:if="{{item.stock==0}}">已售罄</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
218
pages/mall/goodsList/goodsList.wxss
Normal file
218
pages/mall/goodsList/goodsList.wxss
Normal file
@@ -0,0 +1,218 @@
|
||||
.match-wrap {
|
||||
border-top: 2.667vw solid #f8f8f8;
|
||||
}
|
||||
|
||||
.goods-match {
|
||||
background-color: #fff;
|
||||
border-radius: 2.133vw;
|
||||
display: block;
|
||||
padding: 12vw 3.6vw 3.6vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.goods-match .til {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
background-color: #06a2b3;
|
||||
border-radius: .533vw 2.933vw 2.933vw .533vw;
|
||||
color: #fff;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.2vw;
|
||||
height: 5.867vw;
|
||||
left: -.267vw;
|
||||
padding-left: 1.467vw;
|
||||
position: absolute;
|
||||
top: 2.667vw;
|
||||
width: 33.333vw;
|
||||
}
|
||||
|
||||
.goods-match .til view {
|
||||
margin-right: 1.333vw;
|
||||
}
|
||||
|
||||
.goods-match .item {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.goods-match .hd {
|
||||
-webkit-box-flex: 25.333vw;
|
||||
border-radius: 1.6vw;
|
||||
flex: 25.333vw 0 0;
|
||||
height: 25.333vw;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 25.333vw;
|
||||
}
|
||||
|
||||
.image-box.__100 {
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
.image-box {
|
||||
background-color: #ebebeb;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-box image {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.goods-match .bd {
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 0 0 0 2.667vw;
|
||||
}
|
||||
|
||||
.goods-match .bd_name {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
font-size: 3.733vw;
|
||||
height: 16vw;
|
||||
line-height: 5.333vw;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.goods-match .bd_name.isdistance {
|
||||
-webkit-line-clamp: 2;
|
||||
height: 11vw;
|
||||
}
|
||||
|
||||
.goods-match .bd ._btm {
|
||||
-webkit-box-align: end;
|
||||
-ms-flex-align: end;
|
||||
align-items: flex-end;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.goods-match .bd ._btm_lt {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.goods-match .bd_price {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.now-price {
|
||||
color: #eb5252;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
line-height: 1.75em;
|
||||
}
|
||||
|
||||
.goods-match .bd_price .old {
|
||||
color: #9b9b9b;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
margin-left: 1.333vw;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.goods-match .bd_btn {
|
||||
background-color: #06a2b3;
|
||||
border-radius: 3.333vw;
|
||||
color: #fff;
|
||||
font-size: 3.2vw;
|
||||
height: 6.667vw;
|
||||
line-height: 6.667vw;
|
||||
padding: 0 3.6vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.now-price .symbol {
|
||||
display: inline;
|
||||
margin: 0 .267vw 0 0;
|
||||
}
|
||||
|
||||
.now-price.__normal .buck {
|
||||
display: inline;
|
||||
font-size: 4.8vw;
|
||||
}
|
||||
|
||||
.cent {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.hot {
|
||||
display: inline-block;
|
||||
height: 13px;
|
||||
margin-right: 4px;
|
||||
width: 13px;
|
||||
}
|
||||
|
||||
.goods-match .issele {
|
||||
background: #9b9b9b;
|
||||
}
|
||||
|
||||
.issaled {
|
||||
align-items: center;
|
||||
background: rgba(0,0,0,.4);
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.issaled image {
|
||||
height: 120rpx;
|
||||
width: 120rpx;
|
||||
}
|
||||
|
||||
.hover {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.bd_shop {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
color: #9b9b9b;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.2vw;
|
||||
justify-content: space-between;
|
||||
line-height: 4.533vw;
|
||||
margin: 0 0 1.6vw;
|
||||
}
|
||||
Reference in New Issue
Block a user