Browse Source

细节修改

begmoon 2 years ago
parent
commit
ba5dc8cffd

+ 3 - 3
pages/homepage/homepage.wxml

@@ -48,9 +48,9 @@
       </view>
 
       <view class="match_ratio">
-        总收益<label class="{{item.today_record.today_income[0]=='-' ?'down':'up'}}">{{item.today_record.total_income}}</label>
-        胜率<label class="{{item.today_record.today_income[0]=='-' ?'down':'up'}}">{{item.today_record.win_rate}}</label>
-        排名<label class="{{item.today_record.today_income[0]=='-' ?'down':'up'}}">{{item.today_record.rank}}</label>
+        总收益<label class="{{item.today_record.total_income[0]=='-' ?'down':'up'}}">{{item.today_record.total_income}}</label>
+        胜率<label class="{{item.today_record.total_income[0]=='-' ?'down':'up'}}">{{item.today_record.win_rate}}</label>
+        排名<label class="{{item.today_record.total_income[0]=='-' ?'down':'up'}}">{{item.today_record.rank}}</label>
       </view>
     </view>
     

+ 4 - 1
pages/homepage/homepage.wxss

@@ -314,7 +314,8 @@ picker{
 }
 
 .match_title{
-  font-size: 28rpx;
+  font-size: 30rpx;
+  color: #5f5e5e;
 }
 
 .match_list{
@@ -348,11 +349,13 @@ picker{
 .match_money{
   font-size: 30rpx;
   padding-top: 10rpx;
+  color: #5f5e5e;
 }
 
 .match_ratio{
   font-size: 30rpx;
   padding-top: 10rpx;
+  color: #5f5e5e;
 }
 
 .up{

+ 3 - 3
pages/matchdetail/matchdetail.js

@@ -199,7 +199,7 @@ function initChart(canvas, width, height, dpr) {
     },
     grid: {
       x: 50,
-      y: 40,
+      y: 10,
       x2: 10,
       y2: 35
     },
@@ -223,7 +223,7 @@ function initChart(canvas, width, height, dpr) {
         show: true
       },
       type: 'value',
-      name: '收益曲线',
+      name: '',
       axisLabel: {
         formatter: function (value, index) {//隐藏 0
           let texts = [];
@@ -237,7 +237,7 @@ function initChart(canvas, width, height, dpr) {
       name: 'A',
       type: 'line',
       smooth: true,
-      symbolSize: 8,
+      symbolSize: 4,
       lineStyle: {
         color: '#FF2D68'
         // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{

+ 12 - 10
pages/matchdetail/matchdetail.wxml

@@ -1,8 +1,8 @@
 <!--pages/matchdetail/matchdetail.wxml-->
-<view class="style" style="margin: 0;">
-  <view class="title">
+<view class="title">
     {{datas.match.name}}
-  </view>
+</view>
+<view class="style" style="margin: 0;">
   <view>
     比赛日期: {{datas.match.start_time}} 至 {{datas.match.end_time}}
   </view>
@@ -16,13 +16,17 @@
     结束资产: {{datas.today_record.today_fund}}w
   </view>
   <view class="match_ratio">
-    总收益<label class="{{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.total_income}}</label>
-    胜率<label class="{{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.win_rate}}</label>
-    排名<label class="{{datas.today_record.today_income[0]=='-' ?'down':'up'}}">{{datas.today_record.rank}}</label>
+    总收益<label class="{{datas.today_record.total_income[0]=='-' ?'down':'up'}}">{{datas.today_record.total_income}}</label>
+    胜率<label class="{{datas.today_record.total_income[0]=='-' ?'down':'up'}}">{{datas.today_record.win_rate}}</label>
+    排名<label class="{{datas.today_record.total_income[0]=='-' ?'down':'up'}}">{{datas.today_record.rank}}</label>
   </view>
 </view>
+<view wx:if='{{datas.records.length>1}}'>
+  <view class="title">收益曲线</view>
+</view>
+
 <view class="content">
-    <view class="container" wx:if='{{datas.records.length>0}}'>
+    <view class="container" wx:if='{{datas.records.length>1}}'>
           <ec-canvas   ec="{{ ec }}">
           </ec-canvas>
     </view>
@@ -56,10 +60,8 @@
     </view>
   </view>
 </view>
-
+<view class="title">每日持股</view>
 <view class="days_stock">
-  <view class="title">每日持股
-  </view>
   <view  class="stock" wx:for='{{datas.records}}'>
     <navigator hover-class="none" url='../today/today?id={{item.match_id}}&record_id={{item.id}}&user_id={{user_id}}'>
       <view class="info">

+ 5 - 5
pages/matchdetail/matchdetail.wxss

@@ -69,7 +69,7 @@ ec-canvas {
 }
 .style{
   background: #fff;
-  padding: 30rpx;
+  padding: 20rpx;
   margin-bottom: 20rpx;
   font-size: 30rpx;
   color: #333;
@@ -156,13 +156,13 @@ ec-canvas {
 }
 .title{
   font-weight: 500;
-  font-size: 32rpx;
-  margin-bottom: 24rpx;
+  font-size: 30rpx;
+  margin-top: 20rpx;
+  margin-left: 20rpx;
 }
 .content{
   font-size: 30rpx;
-  margin-bottom: 24rpx;
-  line-height: 48rpx;
+  font-weight: 500;
 }
 .days_stock{
   background: #fff;

+ 5 - 6
pages/today/today.js

@@ -43,7 +43,6 @@ Page({
       })
     })
     this.getData();
-    
   },
   getzan(){
     $api.getZanCount({record_id:this.data.record_id,match_id:this.data.id}).then(res=>{
@@ -129,7 +128,7 @@ Page({
       })
       records = res.data.data.records
       today_stock = res.data.data.today_record.today_stock
-      // this.getDays()
+      this.getDays()
       this.getzan()
       this.getComment()
       wx.hideNavigationBarLoading()
@@ -328,8 +327,8 @@ function initChart(canvas, width, height, dpr) {
         show: false
       },
       grid: {
-        x: 50,
-        y: 40,
+        x: 40,
+        y: 10,
         x2: 10,
         y2: 35
       },
@@ -353,7 +352,7 @@ function initChart(canvas, width, height, dpr) {
           show: true
         },
         type: 'value',
-        name: '收益曲线',
+        // name: '收益曲线',
         axisLabel: {
           formatter: function (value, index) {//隐藏 0
             let texts = [];
@@ -367,7 +366,7 @@ function initChart(canvas, width, height, dpr) {
         name: 'A',
         type: 'line',
         smooth: true,
-        symbolSize: 8,
+        symbolSize: 4,
         lineStyle: {
           color: '#FF2D68'
           // color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{

+ 43 - 7
pages/today/today.wxml

@@ -50,20 +50,56 @@
   <view wx:if='{{datas.today_record.today_stock.length>8}}' class="container" style="height:550rpx;">
     <ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec1 }}"></ec-canvas>
   </view>
-  <!-- <view class="legend">
-      <view>久盛电气  80w</view>
-      <view>久盛电气  80w</view>
-      <view>久盛电气  80w</view>
-  </view> -->
 </view>
 
+<view class="title">交割单</view>
 <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>
 </view>
+<view wx:if='{{datas.records.length>1}}'>
+  <view class="title">收益曲线</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>
+      <view wx:else   class="{{item.income[0]=='-' ? 'down1':'up1'}}"> 
+        {{item.day}}
+        <text>{{item.income}}</text>
+      </view>
+    </view>
+  </view>
+</view>
+
+<view class="title">今日反思</view>
 <view class="content" wx:if='{{datas.today_record.experience}}'>
-    <view class="title">今日反思</view>
      {{datas.today_record.experience?datas.today_record.experience:'无'}}
 </view>
 

+ 10 - 10
pages/today/today.wxss

@@ -1,6 +1,6 @@
 /* pages/today/today.wxss */
 page{
-  background: #F7F7F7;
+  background: #fff;
   padding-bottom: 180rpx;
 }
 .page_top{
@@ -29,20 +29,20 @@ ec-canvas {
 .per_top{
   height: 138rpx;
   position: relative;
-  padding:24rpx;
+  padding:20rpx;
   background: #D94B24;
 }
 .per_top>image{
   width: 90rpx;
   height: 90rpx;
   position: absolute;
-  left: 24rpx;
-  top: 24rpx;
+  left: 20rpx;
+  top: 20rpx;
   border-radius: 100%;
 }
 
 .name{
-  font-size:32rpx;
+  font-size:30rpx;
   font-weight: 500;
   margin-left: 110rpx;
   color: #fff;
@@ -68,7 +68,7 @@ ec-canvas {
   padding: 5rpx 8rpx;
 }
 .per_info{
-  padding: 24rpx;
+  padding: 20rpx;
   position: relative;
   background: #fff;
 }
@@ -195,13 +195,13 @@ ec-canvas {
 }
 .title{
   font-weight: 500;
-  font-size: 32rpx;
-  margin-bottom: 24rpx;
+  font-size: 30rpx;
+  margin-top: 20rpx;
+  margin-left: 20rpx;
 }
 .content{
   font-size: 30rpx;
-  margin-bottom: 24rpx;
-  line-height: 48rpx;
+  font-weight: 500;
 }
 .days_stock{
   background: #fff;