tanyanfei 3 سال پیش
والد
کامیت
e20c95be1e
6فایلهای تغییر یافته به همراه50 افزوده شده و 22 حذف شده
  1. 3 3
      pages/comment/comment.wxml
  2. 4 2
      pages/index/index.js
  3. 4 5
      pages/index/index.wxml
  4. 1 0
      pages/style/style.wxml
  5. 21 11
      pages/today/today.wxml
  6. 17 1
      pages/today/today.wxss

+ 3 - 3
pages/comment/comment.wxml

@@ -1,6 +1,6 @@
 <!--pages/comment/comment.wxml-->
 <scroll-view scroll-y='{{true}}' bindscrolltolower='next'>
-  <view class="list" wx:for='{{list}}'>
+  <navigator class="list" wx:for='{{list}}' url="../today/today?id={{item.match_id}}&record_id={{item.id}}&player_id={{item.player_id}}">
         <view class="name">{{item.username}}  <text>选手</text> <view>TOP <text>{{item.group_rank}}</text></view></view> 
         <view class="info">
                   日期: <view>{{item.stock_date}}(收益 <text  class="{{item.today_income[0]=='-' ?'down':'up'}}">{{item.today_income}}</text>)</view>
@@ -12,7 +12,7 @@
                   持仓: 
                   <view wx:if='{{item.is_markt}}'>开超市</view>
                   <view wx:elif='{{item.today_stock.length>0}}'>
-                      <block wx:for="{{item.today_stock}}" wx:for-item='i'>{{i.name}}</block>
+                      <block wx:for="{{item.today_stock}}" wx:for-item='i'>{{i.name}}({{i.fund}}w)</block>
                   </view>
                   <view wx:else>空仓</view>
         </view>
@@ -20,7 +20,7 @@
             <text>顽主点评</text>
             {{item.wanzhu_comment}}
         </view>
-  </view>
+  </navigator>
   <block wx:if='{{total >= 20}}'>
     <view class='loading' wx:if='{{list.length < total}}'>上拉加载更多...</view>
   </block>

+ 4 - 2
pages/index/index.js

@@ -24,6 +24,7 @@ Page({
     error:0
   },
   onLoad() {
+    wx.showNavigationBarLoading()
     var y = new Date().getFullYear(), m = (new Date().getMonth() + 1), d = new Date().getDate();
     m = m > 9 ? m : '0' + m;
     d = d > 9 ? d : '0' + d;
@@ -68,6 +69,7 @@ Page({
     $api.getMyFollow({
       page: this.data.page, page_size: 20
     }).then(res => {
+      wx.hideNavigationBarLoading()
       res.data.data.list.forEach(item=>{
         followList.push(item)
       })
@@ -166,6 +168,7 @@ Page({
     $api.getHotFollow({
       page: this.data.page3, page_size: 20, stock_date: stock_date
     }).then(res => {
+      
       res.data.data.list.forEach(item => {
         hotFollowList.push(item)
       })
@@ -184,7 +187,7 @@ Page({
       })
     })
     $api.getHotbuyList({ stock_date: stock_date }).then(res => {
-      wx.hideNavigationBarLoading()
+      
       this.setData({
         hotbuyList: res.data.data.list
       })
@@ -194,7 +197,6 @@ Page({
       this.setData({
         hotsellList: res.data.data.list
       })
-      wx.hideNavigationBarLoading()
     })
   },
   tabChange(e){

+ 4 - 5
pages/index/index.wxml

@@ -103,8 +103,8 @@
                     资产:  
                     <view><label>{{item.today_fund}}w</label>(总收益 <text class='up'> {{item.total_income}} </text> 
                       <text style="color:#F5F5F5;">  |  </text>
-                      <text style="color:#666;">最大回撤</text>
-                      <text class="{{item.badest_income[0]=='-' ?'down':'up'}}"> {{item.badest_income}} </text>)
+                      <text style="color:#666;">胜率</text>
+                      <text class="{{item.win_rate[0]=='-' ?'down':'up'}}"> {{item.win_rate}} </text>)
                   </view>
                 </view>
              </navigator>
@@ -117,7 +117,7 @@
   <swiper-item>
       <scroll-view  scroll-y='{{true}}' bindscrolltolower='next1'>
           <view class="item3">
-          <view class="exp">胜率榜释义:开赛以来的单日收益为正的天数占总天数比重,检验选手的进攻稳定性</view>
+          <view class="exp">释义:开赛以来选手单日收益为正天数占总天数比重,检验进攻稳定性</view>
              <navigator class="win" wx:for='{{winList}}' url="../today/today?id={{item.match_id}}&player_id={{item.player_id}}">
                 <image wx:if='{{index==0}}' mode="widthFix" src="../../images/1.png"></image>
                 <image wx:if='{{index==1}}' mode="widthFix" src="../../images/2.png"></image>
@@ -149,8 +149,7 @@
   <swiper-item>
       <scroll-view  scroll-y='{{true}}' bindscrolltolower='next2'>
           <view class="item4">
-          <view class="exp">防守榜释义:开赛以来的单日最大回撤排名,按从下到大排列,
-          检验选手的回撤控制能力</view>
+          <view class="exp">释义:开赛以来选手最大单日回撤,检验防守稳固性</view>
             <navigator class="win" wx:for='{{defendList}}' url="../today/today?id={{item.match_id}}&player_id={{item.player_id}}">
                 <image wx:if='{{index==0}}' mode="widthFix" src="../../images/1.png"></image>
                 <image wx:if='{{index==1}}' mode="widthFix" src="../../images/2.png"></image>

+ 1 - 0
pages/style/style.wxml

@@ -41,6 +41,7 @@
   <view class="tags">
       <input wx:if="{{!form.init_fund}}" type="digit" value="{{form.init_fund}}" bindinput="bindinput" placeholder-style="color:#999;" placeholder="请填写"></input>
       <input wx:else disabled="{{true}}" style="background:#eee;" value="{{form.init_fund}}"></input>
+      <view style="color:red;font-size:24rpx;">参赛金额修改需在提交作业之前联系顽主</view>
   </view>
 </view>
 <view class="item">

+ 21 - 11
pages/today/today.wxml

@@ -15,23 +15,27 @@
                   胜率: <view>{{datas.today_record.win_rate}}(最大回撤 <text class="{{datas.today_record.badest_income[0]=='-' ?'down':'up'}}"> {{datas.today_record.badest_income}} </text>)</view>
           </view>
           <view class="info">
-                  日期: <view>{{datas.today_record.stock_date}}</view>
+                  日期: <view>{{datas.today_record.stock_date}}(今日收益
+               <text  class="{{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.today_income}}</text>)</view>
           </view>
           <view class="info">
               资产: 
-               <view><label>{{datas.today_record.today_fund}}w</label>(今日收益
-               <text  class="{{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.today_income}}</text>
-              <text style="color:#F5F5F5;display:block;height:0;"> </text>
-              总收益
+               <view><label>{{datas.today_record.today_fund}}w</label>
+              <!-- <text style="color:#F5F5F5;display:block;height:0;"> </text> -->
+              (总收益
               <text  class="{{datas.today_record.total_income[0]=='-' ?'down':'up'}}">{{datas.today_record.total_income}}</text>
-              </view>
+              )</view>
           </view>
-          <view class="bottom" wx:if='{{!datas.today_record.is_markt}}'>
+          <view class="bottom" wx:if='{{datas.today_record.is_markt}}'>
+            开超市
+          </view>
+          <view class="bottom" wx:elif='{{datas.today_record.today_stock_total>0}}'>
+
               今日持仓 <text>{{datas.today_record.today_stock_total}}W</text>
               仓位 <text>{{datas.today_record.cangwei}}</text>
           </view>
           <view class="bottom" wx:else>
-            开超市
+            空仓
           </view>
       </view>          
 </view>
@@ -49,7 +53,7 @@
   </view> -->
 </view>
 
-<view class="imgs">
+<view class="imgs" wx:if='{{datas.today_record.today_stock_img.length>0}}'>
     <view class="title">交割单</view>
     <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>
@@ -87,8 +91,14 @@
   </view>
   <view class="days">
     <view wx:for='{{days}}'>
-      {{item.day}}
-      <text>{{item.income}}</text>
+      <view wx:if='{{!item.income}}' style="color:#999;">
+        {{item.day}}
+        <text>{{item.income}}</text>
+      </view>
+      <view wx:else   class="{{item.income[0]=='-' ? 'down1':'up1'}}"> 
+        {{item.day}}
+        <text>{{item.income}}</text>
+      </view>
     </view>
   </view>
 </view>

+ 17 - 1
pages/today/today.wxss

@@ -211,7 +211,8 @@ picker{
   width: 14%;
   text-align: center;
   font-weight: 500;
-  margin-bottom: 10rpx;
+  height: 96rpx;
+  /* margin-bottom: 10rpx; */
 }
 .days text{
   display: block;
@@ -220,4 +221,19 @@ picker{
   position: relative;
   top: -5rpx;
   font-weight: 400;
+}
+.days view view{
+  width: 100% !important;
+}
+.days view view text{
+   color: #fff;
+}
+.down1{
+  background: #07B20B;
+  color: #fff;
+  
+}
+.up1{
+  background: #E90001;
+  color: #fff;
 }