Commit 9dae48af253f4bd1f3c17b21841b22ef897aa3ad
1 parent
e4f3b3b6
优化自定义商品组件,没有商品时,不在显示一直加载,显示没有数据
Showing
2 changed files
with
11 additions
and
5 deletions
components/diy_goodsGroup/diy_goodsGroup.wxml
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <wxs module="g_filter" src="g_filter.wxs"></wxs> | 3 | <wxs module="g_filter" src="g_filter.wxs"></wxs> |
| 4 | 4 | ||
| 5 | <!-- 要不要顶部标题 --> | 5 | <!-- 要不要顶部标题 --> |
| 6 | -<mp-loading show ="{{goods_array.length== 0}}" type="circle"></mp-loading> | 6 | +<!-- <mp-loading show ="{{goods_array.length== 0}}" type="circle"></mp-loading> --> |
| 7 | 7 | ||
| 8 | <view id="container"> | 8 | <view id="container"> |
| 9 | 9 | ||
| @@ -24,8 +24,8 @@ | @@ -24,8 +24,8 @@ | ||
| 24 | </view> | 24 | </view> |
| 25 | </block> | 25 | </block> |
| 26 | 26 | ||
| 27 | - | ||
| 28 | -<view style="background-color: {{bg_color}};"> | 27 | + |
| 28 | +<view style="background-color: {{bg_color}};" wx:if="{{goods_array.length > 0 }}"> | ||
| 29 | <!--1个列表的时候--> | 29 | <!--1个列表的时候--> |
| 30 | <view class="zs_goods_wai" wx:if='{{object.column==1}}'> | 30 | <view class="zs_goods_wai" wx:if='{{object.column==1}}'> |
| 31 | <block wx:for="{{goods_array}}"> | 31 | <block wx:for="{{goods_array}}"> |
| @@ -898,5 +898,5 @@ | @@ -898,5 +898,5 @@ | ||
| 898 | </swiper> | 898 | </swiper> |
| 899 | 899 | ||
| 900 | </view> | 900 | </view> |
| 901 | - | 901 | +<view class="nodata-title" wx:else>暂无数据</view> |
| 902 | </view> | 902 | </view> |
| 903 | \ No newline at end of file | 903 | \ No newline at end of file |
components/diy_goodsGroup/diy_goodsGroup.wxss
| @@ -904,7 +904,13 @@ top: 10rpx; | @@ -904,7 +904,13 @@ top: 10rpx; | ||
| 904 | .zs_goods_xiao_wai{ padding-top:1rpx } | 904 | .zs_goods_xiao_wai{ padding-top:1rpx } |
| 905 | .s1_gk_a1.list_border{ display: block; border-bottom: 1rpx solid #eee} | 905 | .s1_gk_a1.list_border{ display: block; border-bottom: 1rpx solid #eee} |
| 906 | 906 | ||
| 907 | - | 907 | +.nodata-title { |
| 908 | + padding-top: 40rpx; | ||
| 909 | + padding-bottom: 40rpx; | ||
| 910 | + color: #bbb; | ||
| 911 | + font-size: 28rpx; | ||
| 912 | + text-align: center; | ||
| 913 | +} | ||
| 908 | 914 | ||
| 909 | 915 | ||
| 910 | 916 |