tanyanfei 8 ヶ月 前
コミット
172d5ba463
3 ファイル変更20 行追加9 行削除
  1. 3 3
      pages/today/today.js
  2. 5 3
      pages/today/today.wxml
  3. 12 3
      pages/today/today.wxss

+ 3 - 3
pages/today/today.js

@@ -420,7 +420,7 @@ function initChart1(canvas, width, height, dpr) {
     legend: {
       show: true,
       orient: 'vertical',
-      right: '1%',
+      right: 0,
       itemWidth:10,
       itemHeight:10,
       textStyle:{
@@ -433,7 +433,7 @@ function initChart1(canvas, width, height, dpr) {
             index = i;
           }
         });
-        return name;
+        return '';
         // + "  " + today_stock[index].value+ "  " + today_stock[index].money
       }
     },
@@ -452,7 +452,7 @@ function initChart1(canvas, width, height, dpr) {
         }
       },
       type: 'pie',
-      center: ['38%', '40%'],
+      center: ['45%', '40%'],
       radius: ['0%', radius],
       data: today_stock
       

+ 5 - 3
pages/today/today.wxml

@@ -47,13 +47,15 @@
   <view class="totay_title">
         <view class="totay_title_1"><text>持仓(万)</text> <text>  盈亏(万)</text></view>
         <view wx:for="{{today_stock}}" class="totay_title_item">
-          <text>{{item.fund}}</text><text class="{{item.money[0]=='-' ?'down':'up'}}">{{item.money}}</text>
+          <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: 80%;">
+  <view wx:if='{{datas.today_record.today_stock.length>0&&datas.today_record.today_stock.length<9}}' class="container" style="height:400rpx;width: 70%;">
     <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: 80%;">
+  <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>

+ 12 - 3
pages/today/today.wxss

@@ -491,17 +491,26 @@ picker{
 }
 .totay_title text{
   display: inline-block;
-  font-size: 20rpx;
-  color: #999;
+  font-size: 12px;
+  /* color: #999; */
   /* padding-right: 15rpx; */
   /* width: 47%; */
 }
+.totay_title_1{
+  /* margin-bottom: 3px; */
+}
 .totay_title_1 text{
   font-size: 20rpx;
   padding-left: 4rpx;
 }
+.totay_title_item{
+  height: 10px;
+  margin-bottom: 10px;
+}
 .totay_title_item text{
   width: 70rpx;
   text-align: left;
-  margin-bottom: 7rpx;
+  /* margin-bottom: 7rpx; */
+  /* border: 1px solid red; */
+  /* line-height: 20px; */
 }