warrior 1 тиждень тому
батько
коміт
f106676d50

+ 1 - 1
projects/live-app/src/modules/tabs/my/my.component.html

@@ -186,7 +186,7 @@
       <div class="row-right">
         <div class="row-tpis">距离第一名</div>
         <div class="row-tpis-num">
-          {{ orderList[0].credit - item.credit }}
+          {{ formatNumber(orderList[0].credit, item.credit) }}
         </div>
       </div>
     </div>

+ 3 - 2
projects/live-app/src/modules/tabs/my/my.component.scss

@@ -351,7 +351,7 @@
         display: flex;
         align-items: center;
         justify-content: space-between;
-        padding: 1.0256vw 2.5641vw;
+        padding: 6px 2.5641vw;
         .tabs-left {
           display: flex;
           align-items: center;
@@ -389,7 +389,8 @@
           justify-content: space-between;
           flex: 1;
           border-bottom: 0.2564vw solid #efefef;
-          padding-bottom: 1.0256vw;
+          // padding-bottom: 1.0256vw;
+          padding: 6px 0;
           ion-icon {
             color: #666666;
           }

+ 4 - 0
projects/live-app/src/modules/tabs/my/my.component.ts

@@ -275,4 +275,8 @@ export class MyComponent implements OnInit {
   updateVersion(){
     this.updateServ.updateVersion(true)
   }
+  formatNumber(num1:number,num2:number){
+    let n = num1 - num2;
+    return Math.round(n * 100) / 100;
+  }
 }

+ 1 - 1
projects/live-app/src/modules/user/ranking/ranking.component.html

@@ -87,7 +87,7 @@
       <div class="row-right">
         <div class="row-tpis">距离第一名</div>
         <div class="row-tpis-num">
-          {{ (orderList[0].credit - item.credit).toFixed(2) }}
+          {{ formatNumber(orderList[0].credit, item.credit) }}
         </div>
       </div>
     </div>

+ 4 - 0
projects/live-app/src/modules/user/ranking/ranking.component.ts

@@ -37,4 +37,8 @@ export class RankingComponent implements OnInit {
     e.cancelBubble = true;
     this.orderList = await this.aiServ.getOrderAnchor(this.active,null,type);
   }
+  formatNumber(num1:number,num2:number){
+    let n = num1 - num2;
+    return Math.round(n * 100) / 100;
+  }
 }