choose-date.swan 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. <view class="tips" s-if="{{type==0||type==2}}">
  2. <view>
  3. <text></text>
  4. <text>开始时间仅支持近半年内的月份,最多可购买12个月</text>
  5. </view>
  6. </view>
  7. <view class="tabbar" >
  8. <view id="tabbar">
  9. <view class="{{selected==0?'selected':''}} {{tabbarStatus?'choosed':''}}" id="tabItem"><text>开始月份</text><text s-if="calendarStatus">{{sy}}年{{sm}}月</text></view>
  10. <view class="{{selected==1?'selected':''}} {{tabbarStatus==2?'choosed':''}}"><text>结束月份</text><text s-if="{{calendarStatus==2}}">{{ey}}年{{em}}月</text></view>
  11. <view class="blueline" animation="{{animationData}}"></view>
  12. </view>
  13. </view>
  14. <view class="yearItem" s-for="yearData">
  15. <view class="year">{{item}}</view>
  16. <view class="monthBox">
  17. <view
  18. s-for="mItem,mIndex in monthData"
  19. class="{{mItem > sMonth[index][0]&&mItem < sMonth[index][1]?'':'disable'}}{{(item==sy&&mItem==sm)||(item==ey&&mItem==em)?'selectedMonth':''}}"
  20. data-status="{{mItem > sMonth[index][0]&&mItem < sMonth[index][1]?'able':'disable'}}"
  21. data-value="{{item}}{{mItem}}"
  22. bindtap="{{canChoose?'choose':''}}"
  23. style="visibility:{{mIndex>11? 'hidden':'inherit'}}">
  24. <text>{{mItem}}</text><text style="font-size:26rpx">月</text>
  25. <view class="bluebg">
  26. <text s-if="item==sy&&mItem==sm">开始</text>
  27. <text s-if="item==ey&&mItem==em" style="z-index:10">结束</text>
  28. </view>
  29. </view>
  30. </view>
  31. </view>