<!-- 前台导入wxs -->
<wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
<!-- 加载图层 -->
<loading wx:if="{{loading}}"></loading>
<!-- 顶部 -->
<view>
  <image src="{{imageUrl + 'home-back.png'}}" class="head-image"></image>
  <!-- 公司 -->
  <view class="company" style="top:{{statusHeight + 'rpx'}}">
    <view style="display: flex;align-items: center;" catchtap="changeCp">
      <view class="company-change-class">
        {{companyName?companyName:''}}
      </view>
      <image src="/static/image/triangle.png" style="width: 28rpx;height:28rpx;"></image>
    </view>
  </view>
</view>

<!--内容-->
<view class="content" style="padding-top: {{ (statusHeight + 90) + 'rpx'}};">
  <!--本周数据-->
  <view class="swiper-box" bindtouchmove="tauchMove" bindtouchstart="tauchStart" bindtouchend="tauchEnd">
    <view class="item-box {{item.zIndex==1?'none':''}}" wx:for-item="item" wx:for="{{swiperList}}" wx:key="index" style="--index: {{item.zIndex}}; --left: {{item.mLeft}}; ">
      <view class="swiper-item" style="background: {{item.background}};">
        <view class="content-data-title">{{item.title}}</view>
        <view class="content-data-items">
          <!--成交额-->
          <view class="content-data-item">
            <view class="content-data-item-title" >
              <image src="{{imageUrl + 'right.png'}}" style="width: 28rpx;height:28rpx;margin-right: 10rpx;"></image>
              {{$t['transactionAmount']}}
            </view>
            <view class="content-data-item-con">
              <dk-cell contentFontSize="18" height="40rpx" left="0rpx" contentFontWeight="700" contentColor="#FFFFFF" content="{{ item.transactionAmount}}"></dk-cell>
            </view>
          </view>
          <view class="split-class"></view>
          <!--收款额-->
          <view class="content-data-item">
            <view class="content-data-item-title">
              <image src="{{imageUrl + 'collect.png'}}" style="width: 28rpx;height:28rpx;margin-right: 10rpx;"></image>
              {{$t['collectionAmount']}}
            </view>
            <view class="content-data-item-con">
              <dk-cell contentFontSize="18" height="40rpx" left="0rpx" contentFontWeight="700" contentColor="#FFFFFF" content="{{ item.collectionAmount}}"></dk-cell>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>

  <!-- 常用应用 -->
  <view class="com-menu-class">
    <view style="display: flex;flex-wrap: wrap;padding: 10rpx 0 20rpx 0;">
      <view class="app-item" style="width:20%;text-align: center;margin-top: 15rpx;margin-bottom: 15rpx;" wx:for="{{comMenuList}}" wx:for-item="item" data-code="{{item.menuUuid}}" data-url="{{item.objectPath}}" data-item="{{item}}" bindtap="toApp" wx:key="i">
        <view wx:if="{{item.isVip}}" class="vip-icon-view">
          <image src="{{imageUrl + 'diamond.png'}} " class="icon-title_vip" />
        </view>
        <image src="{{item.objectIcon?(imageUrl + item.objectIcon ):''}}" style="height: 80rpx;width:80rpx;"></image>
        <view class="index-grid-item-text-class">{{item.menuName}}</view>
      </view>
    </view>
  </view>

  <!--广告-->
  <view wx:if="{{advertisementList && advertisementList.length > 0}}">
    <swiper indicator-dots="{{true}}" autoplay="true" interval="10000" style="height: 200rpx;">
      <block wx:for="{{advertisementList}}" wx:key="{{index}}" wx:for-item="item">
        <swiper-item>
          <image src="{{item.adPath}}" mode="aspectFill" style="height: 200rpx;" data-item="{{item}}" catchtap="handClickImage" />
        </swiper-item>
      </block>
    </swiper>
  </view>

  <!-- 功能卡片 -->
  <view wx:if="{{advertisementList && advertisementList.length == 0}}" style="margin-top: 10rpx;"></view>
  <view class="func">
    <!-- 水印模块 -->
    <view class="permissions-masks-fa" wx:if="{{freeVersionFlag}}" catchtap="masksClick" style="height: {{ funcViewHeight }}px;">
      <canvas canvas-id="watermarkCanvas" id="watermarkCanvas" style="width: {{funcViewWidth}}px; height: {{ funcViewHeight }}px;"></canvas>
    </view>
    <view style="display:flex;flex-wrap: wrap;justify-content: center;">
      <view class="func-card-blue" wx:for="{{functionRegionItems}}" wx:for-item="item" wx:key="index" style="background: {{item.background}};">
        <!-- 卡片头部 -->
        <view class="card-title" data-url="{{item.url}}" style=" position: relative;">
          <image wx:if="{{item.diamondflg}}" src="{{imageUrl + 'diamond.png'}} " class="icon-title_diamond" />
          <!-- <image src="{{item.titlesrc}}" class="icon-title" /> -->
          <view style="display: flex;align-items: center;justify-content: center; width: 100%;">
            <view class="card-name card-name-blue" style="color:{{item.color}}">{{item.cardname}}</view>
            <view class="icon-arrow" style="background: {{item.arrowBackground}};">
              <van-icon name="orders-o" size="18rpx" color="#FFFFFF" />
            </view>
          </view>
        </view>

        <!-- 卡片底部 -->
        <view class="card-bottom">
          <view style="width: calc(100% - 90rpx);">
            <view class="card-bottom-button" wx:for="{{item.items}}" wx:for-item="cItem" wx:key="cItem" data-item="{{cItem}}" bindtap="toApp">
              <view class="card-bottom-button-font" style="color:{{cItem.color}}">{{cItem.title}}</view>
              <van-icon style="padding-left: 4rpx;" name="arrow" size="2.2vw" color="{{cItem.color}}" />
            </view>
          </view>
          <view>
            <image src="{{imageUrl + item.image + '.png'}} " class="card-bottom-image" />
          </view>
        </view>
      </view>
    </view>
  </view>
</view>