<!--component/plus/plus.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />

<view class="plus-wrap" wx:if="{{skuVOList}}">
	<scroll-view scroll-x class="scroll-view_H" scroll-with-animation="{{true}}">
		<block
		 wx:for="{{skuVOList}}"
		 wx:for-index="idx"
		 wx:for-item="navItem"
		 wx:key="idx"
		>
			<view
			 class="scroll-view-item {{currentTab == idx ?'poster-active':''}}"
			 data-current="{{idx}}"
			 data-startTimeStr="{{navItem.startTimeStr}}"
			 data-endTimeStr="{{navItem.endTimeStr}}"
			 data-btnText="{{navItem.buttonText}}"
			 data-id="{{navItem.id}}"
       data-price="{{navItem.price}}"
			 bindtap="switchNav"
			 style="{{currentTab == idx ? 'background-image: url('+ plusBgi.activeUrl +');' : 'background-image: url('+ plusBgi.inactiveUrl +');'}}"
       wx:if="{{navItem.valid}}"
			>
				<view class="plus-choose">
          <text wx:if="{{navItem.duration == 365}}">每月仅￥{{utils.numberFormat(navItem.price / 12)}}</text>
				  <text wx:else>每月仅￥{{utils.numberFormat(navItem.price / navItem.duration * 30)}}</text>
				</view>
				<view class="card-kinds">
					{{navItem.name}}
				</view>
				<view class="plus-price">
					<text class="rmb">￥</text>
					<text class="amount">{{navItem.price}}</text>
				</view>
				<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" />
					</view>
				</view>
			</view>
		</block>
	</scroll-view>
  <view class="pay-wrap">
    <view class="pay">
      <!--微信授权-->
      <block wx:if="{{!currentHasUserInfo}}">
        <button
        bindgetuserinfo="_getUserInfo"
        data-jflag="false"
        open-type='getUserInfo'
        class='btn btn-primary pay-btn'
        hover-class="btn-hover"
        >
          <text>立即支付</text>
          <text>￥{{currentPrice}}</text>
        </button>
      </block>
      <block wx:else>
        <button class="btn btn-primary pay-btn" bindtap="payPlus">
          <text>立即支付</text>
          <text>￥{{currentPrice}}</text>
        </button>
      </block>
    </view>
  </view>
</view>

