<!--pages/avg/avg.wxml-->
<view class="title"><text>{{match_name}}</text></view>
<view class="info">当日人均盈亏（算术平均）
</view>

<view wx:if="{{cur >= 0}}" class="tab">
    <view wx:for='{{list}}' bindtap="tabChange" data-id='{{index}}' class="{{index==cur?'act':''}}">
    {{index==0 ? '全体选手':item.name}}
   </view>
</view>

<view class="content">
    <view class="container" wx:if="{{days.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>
      <view   class="{{item.income[0]=='-' ? 'down1':'up1'}}"> 
        {{item.day}}
        <text>{{item.income}}</text>
      </view>
    </view>
  </view>
</view>