<view bindtap="blur">
<view class="per_top">
    <image src="{{datas.today_record.avatar}}" ></image>
    <view class="name">
      {{datas.today_record.username}}

      <view class="fans">
          <navigator url="../follow/follow?id={{user_id}}&type=2" style="display: inline-block;"><text>{{fans}}</text>粉丝</navigator>
          <navigator url="../follow/follow?id={{user_id}}&type=1" style="display: inline-block;"><text style="margin-left: 20rpx;">{{followers}}</text>关注</navigator>
      </view>
    </view>
    <navigator url="../homepage/homepage?id={{id}}&record_id={{record_id}}&user_id={{user_id}}">Ta的主页</navigator>
</view>
<view class="per_info">
    <view class="rank">
      <view class="jp"><image src="../../images/jp.png" ></image></view>
      <view class="num">{{datas.today_record.group_rank}}</view>
      排名
    </view>
    <view class="today_income {{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.today_income_fund}} 
      <text  class="{{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.today_income}}</text>
    </view>
    <view class="label">今日收益</view>
    <view class="data" style="padding-right:30rpx;border-right: 1px solid rgba(245, 245, 245, 1);">
      <text class="label">日期</text><text>{{datas.today_record.stock_date}}</text>
      <text class="label">今日资产</text><text>{{datas.today_record.today_fund}}W</text>
      <view  class = "label" wx:if='{{datas.today_record.is_markt}}'>
            开超市
      </view>
      <block wx:elif='{{datas.today_record.today_stock_total>0}}'>
        <text class="label">今日持仓</text><text>{{datas.today_record.today_stock_total}}W</text>
      </block>
      <view class="label"  wx:else>
            空仓
      </view>
    </view>
    <view class="data" style="padding-left:30rpx;">
      <text class="label">胜率</text><text>{{datas.today_record.win_rate}}</text>
      <text class="label">总收益</text><text  class="{{datas.today_record.total_income[0]=='-' ?'down':'up'}}"> {{datas.today_record.total_income}}</text>
      <block wx:if='{{datas.today_record.today_stock_total>0}}'>
        <text class="label">仓位</text><text>{{datas.today_record.cangwei}}</text>
      </block>
    </view>
</view>

<view class="page_top">
  <view class="totay_title">
        <view class="totay_title_1"><text>持仓(万)</text> <text>  盈亏(万)</text></view>
        <view wx:for="{{today_stock}}" class="totay_title_item">
          <text style="width: 100rpx;">{{item.name}}</text>
          <text style="width: 70rpx;">{{item.fund}}</text>
          <text style="width: 70rpx;" class="{{item.money[0]=='-' ?'down':'up'}}">{{item.money}}</text>
        </view>
    </view>
  <view wx:if='{{datas.today_record.today_stock.length>0&&datas.today_record.today_stock.length<9}}' class="container" style="height:400rpx;width: 65%;">
    <ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec1 }}"></ec-canvas>
  </view>
  <view wx:if='{{datas.today_record.today_stock.length>8}}' class="container" style="height:550rpx;width: 65%;">
    <ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec1 }}"></ec-canvas>
  </view>
</view>

<view class="title">持仓图<text class="des"> 除持仓图外，欢迎选手上传买卖点神图</text>
  <navigator style="font-size: 26rpx;text-decoration: underline;color: rgb(128, 128, 128);" url="../winloseRank/winloseRank?user_id={{user_id}}&match_id={{datas.match.id}}">个股盈亏排名<image class="more" mode="widthFix" src="../../images/right_icon.png">
      </image>
    </navigator>
</view>

<view class="imgs" wx:if='{{datas.today_record.today_stock_img.length>0}}'>
    <image wx:for='{{datas.today_record.today_stock_img}}' wx:for-item='i'  bindtap="preview" data-src='{{i}}' data-urls='{{datas.today_record.today_stock_img}}'
                 class="img" src="{{i}}"></image>
</view>
<view wx:if='{{datas.records.length>1}}'>
  <view class="quxian">
    <label class="quxian_title">收益曲线</label>
    <navigator class="match_info" url="../matchdetail/matchdetail?user_id={{user_id}}&match_id={{datas.match.id}}">本届完整赛况<image class="more" mode="widthFix" src="../../images/right_icon.png">
      </image>
    </navigator>
  </view>
  
</view>

<view class="content">

    <view class="container" wx:if='{{datas.records.length>1}}'>
          <ec-canvas   ec="{{ ec }}">
          </ec-canvas>
    </view>
    
</view>

<view class="content">
  <view>每月盈亏</view>
  <view class="month">
    <image bindtap="prev" mode="heightFix"  src="../../images/left.png"></image>
    <picker mode="date" fields="month" value="{{date}}"  bindchange="bindDateChange">
                <view class="date-picker">
                   {{date}}
                   <image  mode="heightFix"  src="../../images/icon_down@2x.png"></image>
                </view>
    </picker>
    <image bindtap="next" mode="heightFix"  src="../../images/right.png"></image>
  </view>
  <view class="day">
    <text>日</text><text>一</text><text>二</text>
    <text>三</text><text>四</text><text>五</text><text>六</text>
  </view>
  <view class="days">
    <view wx:for='{{days}}'>
      <view wx:if='{{!item.income}}' style="color:#999;">
        {{item.day}}
        <text>{{item.income}}</text>
      </view>
      <navigator wx:else bind:tap="pushToday" data-match_id="{{id}}" data-record_id="{{item.record_id}}" data-user_id = "{{user_id}}">
      <view   class="{{item.income[0]=='-' ? 'down1':'up1'}}"> 
        {{item.day}}
        <text>{{item.income}}</text>
      </view>
      </navigator>
    </view>
  </view>
  <view class="calendar" >
      点击具体日期可查看当日持仓
  </view>
</view>

<view class="title">今日反思</view>
<view class="content" wx:if='{{datas.today_record.experience}}'>
     {{datas.today_record.experience?datas.today_record.experience:'无'}}
</view>

<view class="tab">
    <view  data-id='0' class="{{page==0?'act':''}}">评论 {{comment_count}}</view>
    <view  data-id='1' class="{{page==1?'act':''}}" >点赞 {{zan_count?zan_count:0}}</view>
</view>
<view class="content" wx:if='{{comment_list}}'>
  <view class="list" wx:for="{{comment_list}}">
    <image src="{{item.user_avatar}}" ></image>
      <view class="msg">
          <text class="_name">{{item.user_name}}</text>
          <view class="_content">{{item.content}}</view>
          <view class="answer" wx:if="{{item.children.length>0}}">
              <view  wx:for="{{item.children}}" wx:for-item='i'>
              <text>{{i.user_name}}：</text>
              {{i.content}}</view>
          </view>
          <view class="addr">
              <text>{{item.ctime}}</text><text>来自{{item.location}}</text>
              <image wx:if="{{author_user_id==datas.today_record.user_id||item.user_id==author_user_id}}" class="del" data-id='{{item.id}}' data-name='{{item.user_name}}' catchtap="delmsg" mode="widthFix" src="../../images/delete.png"></image>
              <image data-id='{{item.id}}' data-name='{{item.user_name}}' catchtap="answer" mode="widthFix" src="../../images/msg.png"></image>
          </view>
      </view>
  </view>
</view>

<!-- <view class="content" wx:if='{{datas.today_record.wanzhu_comment}}'>
    <view class="title">顽主点评</view>
    {{datas.today_record.wanzhu_comment?datas.today_record.wanzhu_comment:'无'}}
</view> -->
</view>
<view class="post">
    <image class="{{zan?'zan':''}}" bindtap="zan"  mode="widthFix" src="../../images/zan.png"></image>
    <input 	confirm-type='send' bindconfirm='sendmsg' value="{{comment}}" placeholder-style="color:#999" maxlength="1000" bindinput="inputchange" focus='{{focus}}' type="text" placeholder="{{text}}"/>
    <button bindtap="sendmsg">提交</button>
</view>


