12345678910111213141516171819202122232425262728293031 |
- <view class="container">
- <view class="collect-switch">
- <view class="item {{ type == 0 ? 'active' : ''}}" bindtap="switchTab" data-index='0'>
- <view class="txt">商品收藏</view>
- </view>
- <view class="item {{ type == 1 ? 'active' : ''}}" bindtap="switchTab" data-index='1'>
- <view class="txt">专题收藏</view>
- </view>
- </view>
- <view class="no-collect" wx:if="{{collectList.length <= 0}}">
- <view class="c">
- <text>还没有收藏</text>
- </view>
- </view>
- <view class="{{type==0 ? 'goods-list' : 'topic-list'}}" wx:else>
- <view class="item" bindtap="openCollect" bindtouchstart="touchStart" bindtouchend="touchEnd" wx:for="{{collectList}}" wx:key="id" data-index="{{index}}">
- <image class="img" src="{{item.picUrl}}"></image>
- <view class="info" wx:if="{{type==0}}" >
- <view class="name">{{item.name}}</view>
- <view class="subtitle">{{item.brief}}</view>
- <view class="price">¥{{item.retailPrice}}</view>
- </view>
- <view class="info" wx:if="{{type==1}}">
- <text class="title">{{item.title}}</text>
- <text class="desc">{{item.subtitle}}</text>
- <text class="price">{{item.price}}元起</text>
- </view>
- </view>
- </view>
- </view>
|