Authored by 李奇

店铺首页修改

... ... @@ -2,6 +2,8 @@
"component": true,
"usingComponents": {
"shop-carousel": "./shop/carousel/carousel",
"shop-single-image": "./shop/single-image/single"
"shop-single-image": "./shop/single-image/single",
"shop-double-image": "./shop/double-image/double",
"shop-four-image": "./shop/four-image/four"
}
}
... ...
... ... @@ -18,5 +18,23 @@
floor-name="{{item.template_name}}"
floor-index="{{floorIndex}}">
</shop-single-image>
<shop-double-image
bindclickreport="report"
wx:if="{{item.module_type == 'DoubleImage'}}"
images="{{item.data}}"
padding-class="{{'padding-bottom-20'}}"
floor-id="{{item.template_id}}"
floor-name="{{item.template_name}}"
floor-index="{{floorIndex}}">
</shop-double-image>
<shop-four-image
bindclickreport="report"
wx:if="{{item.module_type == 'FourImage'}}"
images="{{item.data}}"
padding-class="{{'padding-bottom-20'}}"
floor-id="{{item.template_id}}"
floor-name="{{item.template_name}}"
floor-index="{{floorIndex}}">
</shop-four-image>
</view>
</view>
... ...
... ... @@ -18,7 +18,7 @@
</swiper-item>
</block>
</swiper>
<view class="dots">
<view class="dots" wx:if="{{images.length > 1}}">
<block wx:for="{{images}}" wx:key="unique">
<view class="dot{{index == swiperCurrent ? ' active' : ''}}"></view>
</block>
... ...
Component({
properties: {
images: {
type: Array,
value: []
},
marginClass: {
type: String,
value: ''
},
paddingClass: {
type: String,
value: ''
}
},
methods: {
}
});
... ...
{
"component": true,
"usingComponents": {
"anchor": "../../anchor/anchor"
}
}
... ...
<wxs src="../../../../wxs/helper.wxs" module="helper" />
<view class="resource-shop-double-image {{paddingClass}}">
<anchor
class="anchor-item"
bindclickreport="report"
url="{{item.url}}"
floor-id="{{floorId}}"
floor-name="{{floorName}}"
floor-url="{{item.url}}"
floor-index="{{floorIndex}}"
floor-item-index="{{index + 1}}">
<image class="image-item" src="{{images[0].pic}}" mode="widthFix"></image>
</anchor>
<anchor
class="anchor-item"
bindclickreport="report"
url="{{item.url}}"
floor-id="{{floorId}}"
floor-name="{{floorName}}"
floor-url="{{item.url}}"
floor-index="{{floorIndex}}"
floor-item-index="{{index + 1}}">
<image class="image-item" src="{{images[1].pic}}" mode="widthFix"></image>
</anchor>
</view>
... ...
.resource-shop-double-image {
font-size: 0;
}
.resource-shop-double-image .anchor-item {
display: inline-block;
width: 50%;
font-size: 0;
}
.resource-shop-double-image .image-item {
width: 100%;
font-size: 0;
}
.resource-shop-double-image.margin-bottom-20 {
margin-bottom: 20rpx;
}
.resource-shop-double-image.margin-bottom-30 {
margin-bottom: 30rpx;
}
.resource-shop-double-image.padding-bottom-20 {
padding-bottom: 20rpx;
background-color: #f2f2f2;
}
.resource-shop-double-image.padding-bottom-30 {
padding-bottom: 30rpx;
background-color: #f2f2f2;
}
... ...
Component({
properties: {
images: {
type: Array,
value: []
},
marginClass: {
type: String,
value: ''
},
paddingClass: {
type: String,
value: ''
}
},
methods: {
}
});
... ...
{
"component": true,
"usingComponents": {
"anchor": "../../anchor/anchor"
}
}
... ...
<wxs src="../../../../wxs/helper.wxs" module="helper" />
<view class="resource-shop-four-image {{paddingClass}}">
<anchor
wx:for="{{images}}"
class="anchor-item"
bindclickreport="report"
url="{{item.url}}"
floor-id="{{floorId}}"
floor-name="{{floorName}}"
floor-url="{{item.url}}"
floor-index="{{floorIndex}}"
floor-item-index="{{index + 1}}">
<image class="image-item" src="{{item.pic}}" mode="widthFix"></image>
<text class="image-text">{{item.text}}</text>
</anchor>
</view>
... ...
.resource-shop-four-image .anchor-item {
display: inline-block;
width: 25%;
font-size: 0;
box-sizing: border-box;
border-left: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
}
.resource-shop-four-image .image-item {
width: 100%;
font-size: 0;
}
.resource-shop-four-image .image-text {
display: inline-block;
max-width: 100%;
font-size: 24rpx;
text-align: center;
box-sizing: border-box;
padding: 5rpx 10rpx;
background-color: #fff;
}
.resource-shop-four-image.margin-bottom-20 {
margin-bottom: 20rpx;
}
.resource-shop-four-image.margin-bottom-30 {
margin-bottom: 30rpx;
}
.resource-shop-four-image.padding-bottom-20 {
padding-bottom: 20rpx;
background-color: #f2f2f2;
}
.resource-shop-four-image.padding-bottom-30 {
padding-bottom: 30rpx;
background-color: #f2f2f2;
}
... ...
... ... @@ -3,6 +3,14 @@ Component({
images: {
type: Array,
value: []
},
marginClass: {
type: String,
value: ''
},
paddingClass: {
type: String,
value: ''
}
},
methods: {
... ...
<wxs src="../../../../wxs/helper.wxs" module="helper" />
<view class="resource-shop-single-image {{paddingClass}}">
<image class="image" src="{{images[0].pic}}" mode="widthFix"></image>
<anchor
class="anchor-item"
bindclickreport="report"
url="{{item.url}}"
floor-id="{{floorId}}"
floor-name="{{floorName}}"
floor-url="{{item.url}}"
floor-index="{{floorIndex}}"
floor-item-index="{{index + 1}}">
<image class="image" src="{{images[0].pic}}" mode="widthFix"></image>
</anchor>
</view>
... ...