<!--pageIndex/mine/mine.wxml-->
<van-notify id="van-notify" />
<van-action-sheet
  show="{{ show }}"
  actions="{{ actions }}"
  bind:close="onClose"
  bind:select="onSelect"
/>
<view class="mine">
  <view class="head flex" wx:if="{{isLogin}}">
    <view class="flex">
      <wux-avatar size="large" wx:if="{{userinfo.fileGuid}}" src="{{imgHttp}}{{userinfo.fileGuid}}" bind:tap="editMessage"></wux-avatar>
      <wux-avatar size="large" wx:else src="/static/image/unlogin.jpeg" bind:tap="editMessage"></wux-avatar>
      <view class="message">
        <view class="name">{{userinfo.name || userinfo.phoneNum}}
          <span wx:if="{{userinfo.vip.name}}" class="vipicon">vip</span>
        </view>
        <!-- <view class="type"> <text class="iconfont myIconrenyuan icon"></text> {{userinfo.vip.name|| '普通用户'}}</view> -->
      </view>
    </view>
    <view class="right" bind:tap="openVIP">
      <text class="VIP">VIP</text>
      <text class="VIP_name">会员中心</text>
    </view>
  </view>
  <view class="head flex" wx:else>
    <view class="flex">
      <wux-avatar size="large" src="/static/image/unlogin.jpeg"></wux-avatar>
      <view class="message">
        <view class="name">未登录</view>
        <!-- <view> </view> -->
      </view>
    </view>
    <view class="right" bind:tap="login" style="font-size: 25rpx;">
      立即登录
    </view>
  </view>
  <wux-divider wux-class="line" show-text="{{ false }}" />
  <view class="menu_icon">
    <view class="menu_icon_item" wx:for="{{menu1}}" wx:key="index" data-page="{{item.page}}" data-type="{{item.type}}" bind:tap="clickMenu2">
      <view class="iconfont {{item.icon}} menu_icon_size" style="font-size: 40rpx;"></view>
      <view style="font-size: 20rpx;">{{item.label}}</view>
    </view>
  </view>
  <wux-divider wux-class="line" show-text="{{ false }}" />
  <!-- 活动 -->
  <view>
    <swiper indicator-dots="{{true}}"  autoplay="{{true}}" interval="{{2000}}" duration="{{500}}">
      <block wx:if="{{activityList && activityList.length>0}}" wx:for="{{activityList}}" wx:key="index">
        <swiper-item>
          <image src="{{item.image}}" data-item="{{item}}" bindtap="clickActivity" class="slide-image" 	show-menu-by-longpress mode="aspectFit"/>  
        </swiper-item>
      </block>
    </swiper>
  </view>
  <view class="menu_list">
      <van-cell custom-class='vanCell' wx:for="{{menu2}}" wx:key="index" title="{{item.label}}" is-link data-page="{{item.page}}" data-login="{{item.noLogin}}" bind:click="clickMenu">
        <van-icon slot="right-icon" name="arrow" color="green" />
      </van-cell>
      <!-- <van-cell custom-class='vanCell' wx:for="{{menu1}}" title="{{item.label}}" is-link data-page="{{item.page}}" data-login="{{true}}" bind:click="clickMenu">
        <van-icon slot="right-icon" name="arrow" color="green" />
      </van-cell> -->
  </view>
</view>