jhzh
2025-04-27 c6c703c80be3ee1f1f2d28f820c4d3b730e17040
pages/exchange/contract-history.vue
@@ -165,18 +165,19 @@
          });
      },
      sha(ress,i){
        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,Math.round(Math.random()*arr.length));
          var share_imgs=arr[Math.round(Math.random()*arr.length)];
          if(!share_imgs||!this.detail){
           console.log(this.detail,share_imgs);
           console.log('123123123',this.detail,share_imgs);
              this.$toast(this.$t('recharge.a6'))
              this.canvasShow=false
              return
@@ -197,10 +198,16 @@
          // 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.fillText('WmagiBIT',88,windowHeight*0.63);
          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')
          myCanvas.fillText(i.symbol+'/USDT',25,windowHeight*0.53);