From c6c703c80be3ee1f1f2d28f820c4d3b730e17040 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Sun, 27 Apr 2025 10:08:36 +0800
Subject: [PATCH] 修改: 文档问题

---
 pages/exchange/contract-history.vue |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/pages/exchange/contract-history.vue b/pages/exchange/contract-history.vue
index f133d30..cef9b7c 100644
--- a/pages/exchange/contract-history.vue
+++ b/pages/exchange/contract-history.vue
@@ -168,13 +168,13 @@
 		  console.log('ress',ress);
           let arr=[];
           ress.data.share_imgs.forEach((res)=>{
-              if(i.profit>0&&res.type==1){
+              // if(i.profit>0&&res.type==1){
+              //     arr.push(res)
+              // }else if(i.profit<0&&res.type==2){
                   arr.push(res)
-              }else if(i.profit<0&&res.type==2){
-                  arr.push(res)
-              }
+              // }
           })
-          console.log('arr',arr);
+          // console.log('arr',arr,Math.round(Math.random()*arr.length));
           var share_imgs=arr[Math.round(Math.random()*arr.length)];
           if(!share_imgs||!this.detail){
 			  console.log('123123123',this.detail,share_imgs);
@@ -198,9 +198,15 @@
           // myCanvas.drawImage(this.detail,windowWidth*0.58,windowHeight*0.59,65,65);
           myCanvas.textAlign = 'left';
           myCanvas.setFillStyle('#000000')
-          myCanvas.font = '12px Arial';//绘制文字
-          // myCanvas.fillText('全球合约领跑者',88,windowHeight*0.653);
-          myCanvas.font = '16px Arial';
+          myCanvas.font = '16px Arial';//绘制文字
+		  if(i.profit==0){
+			  myCanvas.fillText(this.$t("common.c22")+'  '+0,88,windowHeight*0.653);
+			  myCanvas.font = '16px Arial';
+		  }else{
+			myCanvas.fillText(this.$t("common.c22")+'  '+i.profit,88,windowHeight*0.653);
+			myCanvas.font = '16px Arial';	
+		  }
+
           myCanvas.fillText('KCS',88,windowHeight*0.63);
           myCanvas.font = '14px Arial';
           myCanvas.setFillStyle('#717171')

--
Gitblit v1.9.3