Commit 2eb67703 by 谢中龙

修改商品显示最小高度

parent 0539e015
......@@ -101,12 +101,6 @@ Component({
* 组件的方法列表
*/
methods: {
_getUserInfo(res = {}) {
wxService.nextTick(() => {
this.triggerEvent('getAuth', res);
})
},
//获取标签下的商品列表
getTagProducts(e){
console.log(4564)
......
......@@ -8,13 +8,16 @@ Component({
type: Array,
value: [],
},
defaultProductUrl : {
type : String,
value : 'https://img3.bigaka.com/prd/3001/202005/20200528/3001780a626b-077b-4165-abd0-bc2123d40586.png'
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
......@@ -23,7 +26,7 @@ Component({
methods: {
//图片加载失败
imgLoadError(e){
let defaultUrl = 'https://img3.bigaka.com/prd/3001/202003/20200331/30019aa78220-546f-41e0-8075-c2feb69e10b8.jpg';
let defaultUrl = 'https://img3.bigaka.com/prd/3001/202005/20200528/3001780a626b-077b-4165-abd0-bc2123d40586.png';
let index = e.currentTarget.dataset.index;
this.data.imageData[index].indexUrl = defaultUrl;
this.setData({
......
......@@ -20,7 +20,7 @@
<image wx:if="{{isFlashSale}}" class="limited-icon" src="https://img3.bigaka.com/prd/3001/202005/20200508/3001a6dcdf69-369a-4f43-8757-60f071946ea8.png" />
<!-- 图片主图时 -->
<image class="item-img"
src="{{indexUrl}}"
src="{{indexUrl ? indexUrl : 'https://img3.bigaka.com/prd/3001/202005/20200528/3001780a626b-077b-4165-abd0-bc2123d40586.png'}}"
mode="widthFix" lazy-load
wx:if="{{!utils.isVideo(indexUrl)}}"
binderror="imgLoadError"
......
......@@ -45,6 +45,7 @@
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
min-height: 200rpx;
}
.video-cover{
max-height: 188px;
......
......@@ -14,13 +14,20 @@ Component({
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
//图片加载失败
imgLoadError(e){
let defaultUrl = 'https://img3.bigaka.com/prd/3001/202005/20200528/3001780a626b-077b-4165-abd0-bc2123d40586.png';
let index = e.currentTarget.dataset.index;
this.data.imageData[index].indexUrl = defaultUrl;
this.setData({
imageData: this.data.imageData
});
}
}
})
......@@ -5,7 +5,10 @@
<view class="hot-item border_box">
<view class="hot-img-box">
<image wx:if="{{item.isFlashSale}}" class="limited-icon" src="https://img3.bigaka.com/prd/3001/202005/20200508/3001a6dcdf69-369a-4f43-8757-60f071946ea8.png" />
<image class="hot-img" src="{{item.indexUrl}}" mode="aspectFit" lazy-load wx:if="{{!utils.isVideo(item.indexUrl)}}" />
<image class="hot-img" src="{{item.indexUrl || 'https://img3.bigaka.com/prd/3001/202005/20200528/3001780a626b-077b-4165-abd0-bc2123d40586.png'}}"
mode="aspectFit"
lazy-load
wx:if="{{!utils.isVideo(item.indexUrl)}}" binderror="imgLoadError"/>
<video id="myVideo" class="hot-img" src="{{item.indexUrl}}" muted wx:if="{{utils.isVideo(item.indexUrl)}}"></video>
<view class="promotion-tag" wx:if="{{item.hasPromotionTag}}">
......
......@@ -96,6 +96,14 @@ wxService.page({
},300);
},
// 页面滚动到底部
onReachBottom(){
console.log(this.categoryTabComponent)
if(this.categoryTabComponent){
this.categoryTabComponent.getTagProducts(2);
}
},
//页面滚动
onPageScroll(e){
let scrollTop = e.scrollTop;
......@@ -126,7 +134,6 @@ wxService.page({
if(res){
this.scrollTop = res.top;
this.categoryTabComponent = this.selectComponent('#categoryTab');
console.log(this.categoryTabComponent)
}
}).exec();
},
......
......@@ -47,11 +47,11 @@
currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
<!-- 分类组件 -->
<view class="categoryTab" wx:if="{{pItem.type == 7}}">
<!-- <view class="categoryTab" wx:if="{{pItem.type == 7}}">
<category-tab currHomePageId="{{currHomePageId}}" categoryTab="{{pItem.categoryType}}" categoryTabFixed="{{categoryTabFixed}}"
id="categoryTab"
bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view>
</view> -->
</block>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment