tanyanfei 4 lat temu
rodzic
commit
eac63efe39

+ 6 - 4
pages/day/day.wxml

@@ -4,15 +4,17 @@
         <text class="tag">日期</text>{{item.stock_date}}
     </view>
     <view class="item">
-        <text class="tag red">资产</text>{{item.today_fund}} 
-         <text class="tag border">当日收益</text><text>{{item.today_income}}</text>  
-         <text class="tag border">总收益</text><text>{{item.total_income}}</text>
+        <text class="tag red">资产</text>{{item.today_fund}}w 
+         <text class="tag border">当日收益</text>
+         <text class="{{item.today_income[0]=='-'?'down':'up'}}">{{item.today_income}}</text>  
+         <text class="tag border">总收益</text>
+         <text class="{{item.total_income[0]=='-'?'down':'up'}}">{{item.total_income}}</text>
     </view>
     <view class="item">
         <text class="tag blue">持仓</text>
         <view class="list">
             <view wx:for='{{item.today_stock}}' wx:for-item='stock'>
-            {{stock.name}}  <text>{{stock.fund}}</text></view>
+            {{stock.name}}  <text>{{stock.fund}}w</text></view>
         </view>
     </view>
 </navigator>

+ 6 - 6
pages/detail/detail.wxml

@@ -11,23 +11,23 @@
 </view>
 
 <view class="info">
-    <view> <text>{{datas.init_fund}}</text>初始资产  </view>
-    <view> <text>{{datas.today_fund}}</text>今日资产  </view>
-    <view> <text style="color:#3FB35B;">{{datas.today_income}}</text>当日收益  </view>
-    <view> <text style="color:#FF5151;">{{datas.total_income}}</text>总收益  </view>
+    <view> <text>{{datas.init_fund}}w</text>初始资产  </view>
+    <view> <text>{{datas.today_fund}}w</text>今日资产  </view>
+    <view> <text  class="{{datas.today_income<0?'down':'up'}}">{{datas.today_income}}%</text>当日收益  </view>
+    <view> <text  class="{{datas.total_income<0?'down':'up'}}">{{datas.total_income}}%</text>总收益  </view>
 </view>
 
 <view class="part">
   <text class="tag blue">昨日持股</text>
   <view class="list">
       <view wx:for='{{datas.yesterday_stock}}' wx:for-item='stock'>
-            {{stock.name}}  <text>{{stock.fund}}</text>
+            {{stock.name}}  <text>{{stock.fund}}w</text>
       </view>
   </view>
   <text class="tag blue">今日持股</text>
   <view class="list">
       <view wx:for='{{datas.today_stock}}' wx:for-item='stock'>
-            {{stock.name}}  <text>{{stock.fund}}</text>
+            {{stock.name}}  <text>{{stock.fund}}w</text>
       </view>
   </view>
 </view>

+ 1 - 1
pages/gameDetail/gameDetail.wxml

@@ -6,7 +6,7 @@
 </view>
 <view class="part info" wx:if='{{datas.today_record}}'>
     <view> <text>{{datas.today_record.rank}}</text>排名  </view>
-    <view> <text style="color:#FF5151;">{{datas.today_record.today_income}}</text>盈亏  </view>
+    <view> <text  class="{{datas.today_record.today_income[0]=='-'?'down':'up'}}">{{datas.today_record.today_income}}</text>盈亏  </view>
     <view> <text>{{datas.today_record.init_fund}}</text>初始资产(万)  </view>
     <view> <text >{{datas.today_record.today_fund}}</text>今日资产(万)  </view>
 </view>

+ 0 - 2
pages/index/index.js

@@ -43,11 +43,9 @@ Page({
     })
   },
   onShow(){
-    
     if (!this.data.userInfo.token) {
       this.onLoad()
     }else{
-      console.log(233)
       wx.showNavigationBarLoading()
       this.getData()
     }