<!-- <wxs src="../../pages/commonWxs/format.wxs" module="format" /> -->
<template name="my">
  <view class='mine-container'>
    <view class='follow-details'>
      <view class='follow-info'>
        <view class="info-placerholder"></view>
        <view class='set-msg' wx:if="{{myData.user.user.wechatName}}">
          <view class='avatar-box'>
            <image class='avatar-image' src='{{ myData.user.user.avatar }}'></image>
            <!-- <view class='occupation-title' wx:if="{{myData.user.user.profession}}">{{ myData.user.user.profession }}</view> -->
          </view>
          <view class='avatar-msg'>
            <view class='avatar-nickname'>微信昵称:{{ myData.user.user.wechatName }}</view>
            <view class='avatar-nickname'>宝贝昵称:{{ myData.user.user.wechatName }}的宝贝</view>
            <view class='mine-category'>
              <view class='amount-text'>{{ myData.user.playAmount || 0 }} 播放</view>
              <view class='amount-text'>{{ myData.user.likeAmount || 0 }} 赞</view>
              <view class='amount-text'>{{ myData.user.fansAmount || 0 }} 粉丝</view>
            </view>
          </view>
          <!-- <view class='avatar-birthday'>{{ myData.user.user.birthday }}</view>
            <view class='avatar-address'>{{ myData.user.user.schoolName }}</view> -->
        </view>
      </view>
      <!-- ios只显示红花 -->
      <view class="only-flower" wx:if="{{myData.isIOS}}">
        <view class="grey-point"></view>
        <view class="flower-amount">
          <image class="" src='../../static/image/flower_small.png' />
          <view>小红花:{{myData.user.pointAmount || 0 }}</view>
        </view>
        <view class="flower-tips">
          <text class="flower-last">{{myData.user.taskAmount }}</text>
          个任务福利还没有领哦
        </view>
      </view>
      <!-- android 显示两个 -->
      <view class="wallet-section" wx:if="{{!myData.isIOS}}">
        <view class="wallet-box" bindtap="toWalletDetail">
          <view class="grey-point"></view>
          <image class="wallet-icon" src='../../static/image/wallet.png' />
          <view>钱包:{{myData.user.walletAmount / 100  || 0 }}</view>
        </view>
        <view class="flower-box">
          <view class="grey-point"></view>
          <image class="flower-icon" src='../../static/image/flower_small.png' />
          <view class="flower-text">
            <view>小红花:{{myData.user.pointAmount || 0 }}</view>
            <view class="flower-tips-text">
              <text class="flower-last">{{myData.user.taskAmount }}</text>
              个任务福利还没有领哦
            </view>
          </view>
        </view>
      </view>
      <view class="btn-section">
        <view class="btn" bindtap='toMyConcern'>
          <image src="../../static/image/concern.png" />
          <view class="btn-title">我的关注</view>
        </view>
        <view class="btn" bindtap='toMyKeep' data-title='{{ myData.keep }}'>
          <image src="../../static/image/collect.png" />
          <view class="btn-title">我的收藏</view>
        </view>
        <view class="btn" bindtap='toMyCollage' data-title='{{ myData.collage }}'>
          <image src="../../static/image/firends.png" />
          <view class="btn-title">我的{{myData.isIOS? '助力' : '拼团'}}</view>
        </view>
        <view class="btn">
          <image src="../../static/image/message.png" />
          <view class="btn-title">消息通知</view>
        </view>
      </view>
      <view class="my-reading-section">
        <view class="my-reading-title" wx:if="{{myData.user.myRead}}">
          <view class="title-left">我的作品</view>
          <view class="title-right" bindtap="toMyRead">
            更多
            <image src="../../static/image/black_to.png" />
          </view>
        </view>
        <view class="my-reading-section-placeholder" wx:if="{{!myData.user.myRead}}">
          您还没有朗读过,快去留下声音吧
        </view>
        <view class="my-reading-gut" wx:if="{{myData.user.myRead}}">
          <view  class="worksCard" style="margin-bottom: 0;" bindtap="openWorks" data-readId="{{myData.user.myRead.id}}" data-title="{{myData.user.myRead.title}}">
            <view class="topData">
              <view class="worksLeft">
                <image class="authorAvatar" lazy-load="true" src="{{myData.user.user.avatar}}" />
                <view class="profession" wx:if="{{item.profession}}">{{item.profession}}</view>
                <view class="worksInfo">
                  <view class="authorName">{{myData.user.user.wechatName}}</view>
                  <view class="time">{{myData.user.myRead.gmtCreated}}</view>
                </view>
              </view>
              <view class="numberInfo">
                <view class="wareCardPlays">
                  <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
                  <text>{{myData.user.myRead.playAmount}}</text>
                </view>
                <view class="wareCardLikes">
                  <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/flower_small.png" />
                  <text>{{myData.user.myRead.likeAmount}}</text>
                </view>
              </view>
            </view>
            <image class="wareCardImg" src="{{myData.user.myRead.iconImg}}" />
            <view class="titleSummary">
              <text class="wareCardTitle">{{myData.user.myRead.title}}</text>
              <text class="wareCardTip">{{myData.user.myRead.summary}}</text>
            </view>
          </view>
        </view>
      </view>
      <view class="my-reading-section ">
        <view class="my-reading-title">
          <view class="title-left">关注的人的作品</view>
          <view class="title-right">
            更多
            <image src="../../static/image/black_to.png" />
          </view>
        </view>
        <view class="my-reading-gut">
          <view wx:for="{{followData}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readid="{{item.id}}" data-title="{{item.title}}">
            <view class="topData">
              <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
                <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
                <view class="profession" wx:if="{{item.profession}}">{{item.profession}}</view>
                <view class="worksInfo">
                  <view class="authorName">{{item.nickName}}</view>
                  <view class="time">{{item.time}}</view>
                </view>
              </view>
              <view class="numberInfo">
                <view class="wareCardPlays">
                  <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
                  <text>{{item.plays}}</text>
                </view>
                <view class="wareCardLikes">
                  <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/flower_small.png" />
                  <text>{{item.likes}}</text>
                </view>
              </view>
            </view>
            <image class="wareCardImg" src="{{item.img}}" />
            <view class="titleSummary">
              <text class="wareCardTitle">{{item.title}}</text>
              <text class="wareCardTip">{{item.summary}}</text>
            </view>
          </view>
        </view>
      </view>
    </view>
    <view class="footer-section" wx:if="{{ifHaveMore}}">
      加载更多
    </view>
  </view>
</template>