<!--subPackage/page/pages/share/share.wxml-->
  <!-- <painter customStyle='margin-left:40rpx' palette="{{template}}" bind:imgOK="onImgOK" />
  <button bindtap="saveImage">保存</button> -->
  <view class="page-share">
    <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" current='{{swiperCurrent}}' 
  indicator-color="{{beforeColor}}" indicator-active-color="{{afterColor}}" circular='{{circular}}' 
  previous-margin="{{previousmargin}}" next-margin="{{nextmargin}}" bindchange="swiperChange">
      <block wx:for="{{posterImgData}}" wx:key="{{index}}"> 
      <swiper-item class="swiper-item">
        <image class="slide-image {{swiperCurrent == index ? 'active' : ''}}" src="{{item}}" 
  id="{{index}}"></image>
        <view class="poster-bottom" wx:if="{{swiperCurrent == index}}">
          <view class="avatar">
						<open-data type="userAvatarUrl" />
					</view>
          <view class="poster-title">
            <open-data type="userNickName"></open-data>
            <text>邀请您一起成为会员,共享优惠,赶快扫码加入吧~。</text>
          </view>
          <image class="code-img" src="{{codeImg}}"></image>
        </view>
        
      </swiper-item>
      </block> 
    </swiper>
    <view class="save-btn" bindtap="savePoster">
      <button class="btn btn-primary ">保存海报</button>
      <view class="save-tips">适用于朋友圈分享</view>
    </view>
 
    <view class="tab-sort" wx:if="{{posterImgData}}">
        <scroll-view scroll-x class="scroll-view_H" scroll-with-animation="{{true}}">
          <block
          wx:for="{{posterImgData}}"
          wx:for-index="idx"
          wx:for-item="navItem"
          wx:key="idx"

          >
            <view
            class="scroll-view-item {{currentTab == idx ?'poster-active':''}}"
            data-current="{{idx}}"
            data-img="{{navItem}}"
            bindtap="switchPoster"
           
            >
              <image class="poster-img" src="{{navItem}}"></image>
                <view class="select-plus" wx:if="{{idx == currentTab}}">
                <view class="circle-radio theme-color">
                  <image class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
                </view>
              </view>
            </view>
          </block>
        </scroll-view> 
    </view>

    <view class="poster-tips">
      <image src="/assets/imgs/7_1_0/poster-tips.png" mode="widthFix"></image>
    </view>

    <!-- 测试 -->
  <view class="test" >
    <painter palette="{{template}}" bind:imgOK="onImgOK" /> 
  </view>
 </view>

 
<!--goHome-->
<go-home />