<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
  <view class="panelTopPanel FlexColumn">
    <view wx:if="{{Search}}" class="panelTop FlexRow">
      <view class="panelLeft FlexRow">
        <view class="panelTopSearch FlexRow"  bindtap='onSearch'>
          <image class="universalpic_magnifier_gray_30x30" src='../images/universalpic_magnifier_gray_30x30.png' />
          <text class="panelTopSearchText">{{Search}}</text>
        </view>
      </view>

      <view class="panelRight FlexRow">
        <view class='panelTop1 FlexRow' bindtap='onSearch' data-id="2">
          <view class="panelTop3">取消</view>
        </view>
      </view>
    </view>
    <view class="panelTop FlexRow">
      <view class="panelLeft FlexRow">
        <view wx:if="{{!IsFilter && !PrintID && (CardType==2 || CardType==0 || CardType==1 || CardType==-1 || IsCollect==1) && !Search && IsToday!=1 && IsToday!=2}}"
          class='panelTop1 FlexRow' bindtap='redirect' data-url="searchCard?">
          <image class="universalpic_magnifier_black_30x30" src='../images/universalpic_magnifier_black_30x30.png' />
        </view>
        <view wx:if="{{!IsFilter && (CardType==-2 || IsToday==1 || IsToday==2 || Search || PrintID)}}" class='panelTop5'>
        </view>
        <view wx:if="{{!IsFilter && !IsCollect && !FolderID }}" class="panelTop2">{{Count}}张</view>
        <view wx:if="{{!IsFilter && (IsCollect || FolderID)}}" class="panelTop21" bindtap="showSelectCardType">{{CardTypeStr}} {{Count}} 张</view>
        <image wx:if="{{!IsFilter && (IsCollect || FolderID)}}" class="universalpic_arrow_down_black_14x10_0"
          src='../images/universalpic_arrow_down_black_14x10.png' bindtap="showSelectCardType" />
        <block wx:if="{{IsFilter}}">
          <view class='{{item[2]}} panelTop4' wx:for="{{FilterArr}}" wx:key="index" catchtap='gotoNextPage' data-id="0" data-iscollect="{{item[4]}}" data-cardtype="{{item[3]}}">
            {{item[0]}} <block wx:if="{{item[1]>0}}">{{item[1]}}</block>
          </view>
        </block>
      </view>

      <view class="panelRight FlexRow">
        <view class='panelTop1 FlexRow' bindtap="goto" data-url="./folderEdit?type=edit&FolderID={{FolderID}}" wx:if="{{FolderID}}">
          <view class="panelTop3">编辑</view>
        </view>
        <view wx:if="{{(CardType==0 || CardType==1 || CardType==-1 || IsCollect==1) && !FolderID}}" class='panelTop1 FlexRow'
          bindtap='showHelp'>
          <image class="universalpic_light_black_22x30" src='../images/universalpic_light_black_22x30.png' />
        </view>
        <view class='panelTop1 FlexRow' bindtap='showOrder' wx:if="{{CardType!=-2 && !PrintID && IsToday!=1}}">
          <image class="universalpic_arrow_updown_black_26x22"
            src='../images/universalpic_arrow_updown_black_26x22.png' />
        </view>
        <view class='panelTop1 FlexRow' bindtap='addCard'
          wx:if="{{(CardType==2 || CardType==0 || CardType==1 || CardType==-1) && !IsToday && !PrintID}}">
          <image class="universalpic_magnifier_black_30x30" src='../images/universalpic_add_black_30x30.png' />
        </view>
      </view>
    </view>
  </view>
  <view class="Null1" wx:if="{{Search}}"></view>
  <view class="Null1"></view>
  
  <!-- 有卡单的情况 -->
  <block wx:if="{{FolderID}}">
    <view class="panelFolder FlexColumn" style="background-color:{{ColorName}};">
      <image class="cardlist_huawen_750x500" src='{{ImagePath}}web/cardlist_huawen_750x500.png' />
      <image class="iconClass" src='{{ImagePath}}web/{{IconName}}-big.png' />
    </view>
    <view class="panelFolder2 FlexColumn">
      <view class="panelFolder21">{{FolderName}}</view>
    </view>
  </block>

  <view class="panelHelp FlexRow" wx:if="{{(OrderType==5 || OrderType==6) && PageType!=1 && PageType!=2 }}">
    <image class="universalpic_exclamation_orange_40x40" src='../images/universalpic_exclamation_orange_40x40.png' />
    <text
      class="panelHelpText">在本清单中用「到期时间」排序时，您的题卡数量可能变少。由于题卡归档后不被练习没有到期时间概念，所以不能以到期时间排序，去除归档题卡总数就减少了。日常和紧急题卡不受影响，可以正常排序。</text>
  </view>
  <view class="panelHelp1 panelHelp FlexRow" wx:if="{{CardType==1}}">
    <image class="universalpic_exclamation_orange_40x40" src='../images/universalpic_infor_green_40x40.png' />
    <text class="panelHelpText">紧急练习最多容纳200张题卡，属于临时强化措施不能取代日常练习，一般练习1个月建议停用或者更换一批题卡。经常使用请常换常新。</text>
  </view>
  <view class="panelHelp1 panelHelp FlexRow" wx:if="{{CardType==-2}}">
    <image class="universalpic_exclamation_orange_40x40" src='../images/universalpic_infor_green_40x40.png' />
    <text class="panelHelpText">题卡自删除之日起3个月后会自动清理，也可手动放回原处。\n小建议：不练的题卡请归档，彻底不要的再删除。</text>
  </view>

  <view class="panelList FlexColumn">

    <block wx:if="{{List.length>0}}" wx:for="{{List}}" wx:key="index">
      <!-- <view class="panelListCategory FlexRow" wx:if="{{item.TimeCategory}}">
        <image class="universalpic_calendar_black_30x32" src='../images/universalpic_calendar_black_30x32.png' />
        <view class="panelListCategoryText">{{item.TimeCategory}}</view>
      </view> -->
      <scroll-view class="ScrollView" scroll-left="{{item.ScrollLeft}}" scroll-x="true" data-index="{{index}}">
        <view class='CellItem'>
          <view class="panelListItem FlexColumn" bindtap='onPreview' data-id="{{item.MiaoguoCardID}}">
            <view class="panelListItem1 FlexRow">
              <image class="panelListItem1Image" mode="aspectFill" src='{{item.ImageUrlTemp}}'
                wx:if="{{item.ImageUrlServer}}" binderror="onBindError" data-id="{{item.MiaoguoCardID}}"
                data-serverurl="{{item.ImageUrlServer}}" />
              <view class="panelListItem11 FlexColumn">
                <view class="panelListItem11Name1">
                  {{item.Content[1].ContentStr}}
                </view>
                <view class="panelListItem11Name2">
                  {{item.Content[2].ContentStr}}
                </view>
              </view>
            </view>
            <view class="panelListItem2 FlexRow">
              <block wx:if="{{item.FolderID && !FolderID}}">
                <image class="universalpic_cardlist_gray_22x20" src='../images/universalpic_cardlist_gray_22x20.png' />
                <view class="panelListItem21">
                  {{item.FolderName}}
                </view>
              </block>

              <image wx:if="{{item.IsCollect}}" class="universalpic_star_yellow_20x20"
                src='../images/universalpic_star_yellow_20x20.png' />
              <view class="panelListItem22 panelListItem21">
                {{item.CardTypeStr}}
              </view>
              <view class="panelListItem23 panelListItem21">
                {{item.CardCategory}}
              </view>
              <view class="panelListItemLine">
              </view>

              <view class="panelListItem24 panelListItem21">
                {{CardShowDetailStr}}
              </view>
              <view class="panelListItem25 panelListItem21">
                {{item.CardShowDetailStr2}}
              </view>
              <image wx:if="{{!PrintID && CardType!=-2}}" class="universalpic_arrow_down_black_14x10"
                src='../images/universalpic_arrow_down_black_14x10.png' />

            </view>
            <view class="clickCardShowDetail" catchtap="showSelectCardShowDetail" wx:if="{{!PrintID && CardType!=-2}}"></view>

          </view>
        </view>
        <view class='{{FolderListCss}} CellHide' wx:if="{{CardType!=-2 && !PrintID}}">
          <view class="CellHide1 FlexRow">
            <view wx:if="{{item.DeleteType==0}}" class="CellHide112 CellHide111 FlexRow" bindtap="DeleteItem" data-id="{{item.MiaoguoCardID}}"><text>删除</text></view>
            <view wx:if="{{item.DeleteType==1}}" class="CellHide113 CellHide111 FlexRow" bindtap="DeleteItem" data-id="{{item.MiaoguoCardID}}"><text>确定\n删除</text></view>
            <view class="CellHideLine"></view>
            <view wx:if="{{item.IsCollect==0}}" class="CellHide111 FlexRow" bindtap='setCollect' data-id="{{item.MiaoguoCardID}}" data-collect="{{item.IsCollect}}"><text>加注\n星标</text></view>
            <view wx:if="{{item.IsCollect==1}}" class="CellHide111 FlexRow" bindtap='setCollect' data-id="{{item.MiaoguoCardID}}" data-collect="{{item.IsCollect}}"><text>清除\n星标</text></view>
            <view class="CellHideLine"></view>
            <view class="CellHide111 FlexRow" bindtap='editField' data-id="{{item.MiaoguoCardID}}"><text>编辑</text></view>
            <block wx:if="{{FolderID}}">
              <view class="CellHideLine"></view>
              <view class="CellHide111 FlexRow" bindtap='removeFolder' data-id="{{item.MiaoguoCardID}}"><text>移出\n卡单</text></view>
            </block>
          </view>
        </view>
        <view class='CellHide0 CellHide' wx:if="{{CardType==-2}}">
          <view class="CellHide10 CellHide1 FlexRow" bindtap="recoverItem" data-id="{{item.MiaoguoCardID}}">
            <view class="CellHide111 FlexRow"><text>放回\n原处</text></view>
          </view>
        </view>
      </scroll-view>

    </block>
    <view class="panelMore" wx:if="{{HasPage}}" bindtap='gotoNextPage' data-id="{{List[List.length-1].MiaoguoCardID}}"
      data-iscollect="{{IsCollect}}" data-folderid="{{FolderID}}">更多</view>
    <view class="panelEnd" wx:if="{{!HasPage && List.length>0}}">到底了</view>
  </view>

  <view wx:if="{{List.length==0}}" class="panelNull FlexColumn">
    <image class="universalpic_card_none_gray_90x84" src='../images/universalpic_card_none_gray_90x84.png' />
    <text wx:if="{{IsCollect==0 && CardType==2 && IsToday==0}}" class="panelNullText">没有题卡\n创建一张新题卡吧</text>
    <text wx:if="{{IsCollect==0 && CardType==0 && IsToday==0}}" class="panelNullText">没有题卡\n新建一张日常题卡吧</text>
    <text wx:if="{{IsCollect==0 && CardType==1 && IsToday==0}}" class="panelNullText">没有题卡\n新建一张紧急题卡吧</text>
    <text wx:if="{{IsCollect==1 && IsToday==0}}" class="panelNullText">没有题卡\n试试给题卡加注星标吧</text>
    <text wx:if="{{IsCollect==0 && CardType==-1 && IsToday==0}}" class="panelNullText">没有题卡\n把不需要练习的题卡归档吧</text>
    <text wx:if="{{CardType==-2}}" class="panelNullText">没有题卡\n不再需要的知识就删除吧</text>
    <text wx:if="{{IsToday==1}}" class="panelNullText">没有题卡\n很棒啊！今天的任务量已经完成了</text>
    <text wx:if="{{IsToday==2}}" class="panelNullText">没有题卡\n今天的练习还没开始呢</text>
  </view>
</view>

<view wx:if="{{IsShowCardShowDetail}}" class="MenuContainer container FlexColumn"
  style='min-height:{{Containnerheight}}rpx;'>
  <view class="PanelMenu FlexColumn">
    <view class="{{CardShowDetailArr[0].IsSelected}} PanelBorderTop PanelMenuItem FlexRow"
      catchtap="selectCardShowDetail" data-id="0"><text>{{CardShowDetailArr[0].Name}}</text></view>
    <view class="PanelMenuLine"></view>
    <view class="{{CardShowDetailArr[1].IsSelected}} PanelMenuItem FlexRow" catchtap="selectCardShowDetail" data-id="1">
      <text>{{CardShowDetailArr[1].Name}}</text></view>
    <view class="PanelMenuLine"></view>
    <view class="{{CardShowDetailArr[2].IsSelected}} PanelMenuItem FlexRow" catchtap="selectCardShowDetail" data-id="2">
      <text>{{CardShowDetailArr[2].Name}}</text></view>
    <view class="PanelMenuLine"></view>
    <view class="{{CardShowDetailArr[3].IsSelected}} PanelMenuItem FlexRow" catchtap="selectCardShowDetail" data-id="3">
      <text>{{CardShowDetailArr[3].Name}}</text></view>
    <view class="PanelMenuLine"></view>
    <view class="{{CardShowDetailArr[4].IsSelected}} PanelBorderBottom PanelMenuItem FlexRow"
      catchtap="selectCardShowDetail" data-id="4"><text>{{CardShowDetailArr[4].Name}}</text></view>
  </view>
  <view class="PanelMenuCancel PanelMenu FlexRow" catchtap="hideSelectCardShowDetail">取消</view>
</view>

<view wx:if="{{IsOrder || IsShowSelectCardType}}" class="HelpContainer container FlexColumn"
  style='height:{{Containnerheight}}rpx;'>
  <view class="HelpPanel1 FlexColumn">
    <view class="HelpPanel11 FlexRow">
      <view class="HelpPanel111 FlexRow" catchtap="closeHelp">
        <image src='../images/universalpic_close_black_24x24.png' class="universalpic_close_black_24x24" />
      </view>
      <view></view>
    </view>
    <view class="PanelOrder FlexColumn">
      <block wx:if="{{IsOrder}}">
        <view class="PanelOrder1 FlexRow">
          <view class="PanelOrder11">选择题卡排列顺序</view>
        </view>
        <view class="PanelOrderLine30"></view>
        <view class="PanelOrder2 FlexRow">
          <view class="{{ArrOrder[1].CSS}} PanelOrderBtn2 PanelOrderBtn" catchtap='onOrder' data-value='1'>按最近练习时间
          </view>
          <view class="{{ArrOrder[2].CSS}} PanelOrderBtn2 PanelOrderBtn" catchtap='onOrder' data-value='2'>按最近修改时间
          </view>
        </view>
        <view class="PanelOrder1 FlexRow">
          <view class="PanelOrder31">按创建时间</view>
          <view class="PanelOrder32 PanelOrder31" wx:if="{{CardType!=-1}}">按到期时间</view>
          <view class="PanelOrder32 PanelOrder31" wx:if="{{CardType==-1}}">按归档时间</view>
        </view>
        <view class="PanelOrder2 FlexRow">
          <view class="{{ArrOrder[3].CSS}} PanelOrderBtn3 PanelOrderBtn" catchtap='onOrder' data-value='3'>最早</view>
          <view class="{{ArrOrder[4].CSS}} PanelOrderBtn" catchtap='onOrder' data-value='4'>最近</view>
          <block wx:if="{{CardType!=-1}}">
            <view class="{{ArrOrder[5].CSS}} PanelOrderBtn" catchtap='onOrder' data-value='5'>最早</view>
            <view class="{{ArrOrder[6].CSS}} PanelOrderBtn3 PanelOrderBtn" catchtap='onOrder' data-value='6'>最晚</view>
          </block>
          <block wx:if="{{CardType==-1}}">
            <view class="{{ArrOrder[9].CSS}} PanelOrderBtn" catchtap='onOrder' data-value='9'>最早</view>
            <view class="{{ArrOrder[10].CSS}} PanelOrderBtn3 PanelOrderBtn" catchtap='onOrder' data-value='10'>最近</view>
          </block>
        </view>
        <view class="PanelOrder1 FlexRow">
          <view class="PanelOrder31">按练习次数</view>
        </view>
        <view class="PanelOrder2 FlexRow">
          <view class="{{ArrOrder[7].CSS}} PanelOrderBtn3 PanelOrderBtn" catchtap='onOrder' data-value='7'>较少</view>
          <view class="{{ArrOrder[8].CSS}} PanelOrderBtn" catchtap='onOrder' data-value='8'>较多</view>
          <view class="PanelOrderBtn0"></view>
        </view>
      </block>
      <block wx:if="{{IsShowSelectCardType}}">
        <view class="PanelOrder1 FlexRow">
          <view class="PanelOrder11">选择要罗列的题卡顺序</view>
        </view>
        <view class="PanelOrderLine30"></view>
        <view class="PanelOrder2 FlexColumn">
          <view wx:for="{{CardTypeArr}}" wx:key="index" class="{{item[1]}} PanelOrderBtn4 PanelOrderBtn FlexRow"
            catchtap='gotoNextPage' data-id="0" data-iscollect="{{IsCollect}}" data-cardtype="{{item[2]}}" data-folderid="{{FolderID}}">
            <view class="PanelOrderBtnText">{{item[0]}}</view>
            <view class="PanelOrderBtnText"></view>
          </view>
        </view>
      </block>
      <view class="PanelOrderLine60"></view>
    </view>
  </view>
</view>

<view wx:if="{{IsHelp}}" class="HelpContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
  <view class="HelpPanel1 FlexColumn">
    <view class="HelpPanel11 FlexRow">
      <view class="HelpPanel111 FlexRow" catchtap="closeHelp">
        <image src='../images/universalpic_close_black_24x24.png' class="universalpic_close_black_24x24" />
      </view>
      <view></view>
    </view>
    <view class="HelpPanel12 FlexColumn">
      <image wx:if="{{IsCollect==0 && CardType==0}}" src='{{ImagePath}}web/help_board_tips_richang.png'
        class="help_board_tips_richang" />
      <image wx:if="{{IsCollect==0 && CardType==1}}" src='{{ImagePath}}web/help_board_tips_jinji.png' class="help_board_tips_jinji" />
      <image wx:if="{{IsCollect==1}}" src='{{ImagePath}}web/help_board_tips_xingbiao.png'
        class="help_board_tips_xingbiao" />
      <image wx:if="{{IsCollect==0 && CardType==-1}}" src='{{ImagePath}}web/help_board_tips_guidang.png'
        class="help_board_tips_guidang" />
    </view>
  </view>
</view>