card-mini/packagecard/marketing/marketingposter.wxml

104 lines
5.4 KiB
Plaintext
Raw Normal View History

2021-09-01 16:55:20 +08:00
<cu-custom isBack="{{true}}">
<view slot="content">营销海报</view>
</cu-custom>
<view class="tab">
<view class="tab-box">
<van-tabs style="width: 100%;" active="{{ currentIndex }}" bind:change="onChange" ellipsis="{{false}}"
z-index="{{100}}" color="#E6B980">
<block wx:for="{{tabList}}" wx:key="index">
<van-tab title="{{item.name}}">
</van-tab>
</block>
</van-tabs>
2021-09-03 15:03:38 +08:00
<view style="width: 180rpx;text-align: center;" catchtap="showType">
{{curTypeName}}
2021-09-01 16:55:20 +08:00
<text class="cuIcon-triangledownfill"></text>
</view>
</view>
<view class="options-box" wx:if="{{isShowOptions}}">
<block wx:for="{{optionsList}}" wx:key="index">
2021-09-03 15:03:38 +08:00
<view class="item" catchtap="chooseType" data-id="{{item.dataId}}" data-idx="{{index}}"
data-name="{{item.dataName}}">
2021-09-01 16:55:20 +08:00
<view class="{{currentTypeIndex==index ? 'line-yellowlight2' : 'text-black'}}">{{item.dataName}}</view>
<text
class="{{currentTypeIndex==index ? 'cuIcon-radiobox line-yellowlight2' : 'cuIcon-round text-black'}}"></text>
</view>
</block>
</view>
</view>
<!-- 模板 -->
<scroll-view style="margin-top: 70rpx;" refresher-enabled="true" refresher-threshold="{{50}}"
wx:if="{{currentIndex == 0}}" refresher-background="#fff" enhanced="{{true}}" scroll-y
bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}">
<block wx:if="{{posterTempleteList.length>0}}">
<view class="img-box">
<block wx:for="{{posterTempleteList}}" wx:key="index">
<view class="item" style="margin-left:{{(index + 1) % 2 == 0 ? '15rpx' :'0rpx'}};">
<image src="{{imgUrl+item.picturesTemplatePictureUrl}}" mode="aspectFill" bindtap="toCreate"
data-id="{{item.cardTemplateId}}" data-idx="{{index}}">
</image>
<!-- favorfill -->
<text wx:if="{{curTypeId != '1'}}" catchtap="doFavor"
class="{{item.cardCollect ? 'cuIcon-favorfill line-yellowlight2':'cuIcon-favor text-white'}} start"
data-idx="{{index}}" data-id="{{item.cardTemplateId}}" data-favor="{{item.cardCollect}}"
style="color:{{item.cardCollect ? '#E6B980':'#fff'}}"></text>
<view class="number-box">
<image src="/images/ic_hot_number_bg.png" mode="scaleToFill"></image>
<view class="number-content">
<text>使用次数:{{item.picturesTemplateNumber > 999 ? '999+':
item.picturesTemplateNumber}}</text>
</view>
</view>
</view>
</block>
</view>
<view class="loading-box" wx:if="{{isLoadMore}}">
<van-loading type="spinner" color="#E6B980" size="16px" text-size="14px">加载中...</van-loading>
</view>
</block>
<view wx:else style="margin-top:200rpx;width:100%;">
<van-empty description="暂无数据" />
</view>
</scroll-view>
<!-- 发布历史 -->
<scroll-view style="margin-top: 70rpx;" refresher-enabled="true" refresher-threshold="{{50}}"
refresher-background="#fff" enhanced="{{true}}" scroll-y bindrefresherrefresh="dorefreshList"
refresher-triggered="{{isRefreshing}}" wx:else>
<block wx:if="{{posterHistoryList.length>0}}">
<view class="img-box">
<block wx:for="{{posterHistoryList}}" wx:key="index">
<view style="margin-left:{{(index + 1) % 2 == 0 ? '15rpx' :'0rpx'}};" class="item">
<image src="{{imgUrl+item.cardTemplateUsePhotoUrl}}" mode="scaleToFill" style="width:100%;"
catchtap="toEdit" data-id="{{item.cardTemplateUseId}}" data-idx="{{index}}">
</image>
<button data-url="{{imgUrl+item.cardTemplateUsePhotoUrl}}" catchtap="doShare" data-idx="{{index}}"
style="width: 50%;position: absolute;bottom: 15rpx;padding: 0rpx;margin: 0rpx;z-index: 10;text-align: center;font-size: 28rpx;background-color: #E6B980;color: #fff;left: 25%;">分享</button>
</view>
</block>
</view>
<view class="loading-box" wx:if="{{isLoadMore}}">
<van-loading type="spinner" color="#E6B980" size="16px" text-size="14px">加载中...</van-loading>
</view>
</block>
<view wx:else style="margin-top:200rpx;width:100%;">
<van-empty description="暂无数据" />
</view>
</scroll-view>
<van-action-sheet show="{{ isShowSel }}" cancel-text="取消" bind:close="onClose" bind:cancel="onClose">
<view class="share-item" catchtap="toImg">
<image src="/images/ic_share_moment.png" mode="scaleToFill"></image>
<text>生成朋友圈分享图</text>
</view>
<button class="share-item" open-type="share"
style="width: 100%;margin: 15rpx;color: #323233;background-color: #fff;font-weight: normal;">
<image src="/images/ic_share_cir_icon.png" mode="scaleToFill"></image>
<text>转发给好友或群聊</text>
</button>
<view class="share-item" bindtap="toAlbum">
<image src="/images/ic_share_img.png" mode="scaleToFill"></image>
<text>将分享图保存至相册</text>
</view>
</van-action-sheet>