Bläddra i källkod

[v5.0.240918.1] 調整掃碼登入的client數權益

osbert 8 månader sedan
förälder
incheckning
a40910d7cf
1 ändrade filer med 9 tillägg och 1 borttagningar
  1. 9 1
      HiTeachCC/ClientApp/src/views/Board.vue

+ 9 - 1
HiTeachCC/ClientApp/src/views/Board.vue

@@ -7451,7 +7451,15 @@ export default {
     console.log(this.getFunc("aigpt"), "aigpt"); // AIGPT
     console.log(this.getFunc("works"), "works"); // 作品收集任務數
     console.log(this.getFunc("clients"), "clients"); // 連線人數
-    this.limitTime = this.getFunc("clients").isDeadline == true ? moment(this.getFunc("clients").exp * 1000).format("YYYY.MM.DD") : 0;
+    if(this.getFunc("clients").isDeadline == true) {
+      let clientExp = this.getFunc("clients").exp * 1000
+      let now = new Date().getTime()
+
+      if((clientExp - now) < 1576800000000) {
+        this.limitTime = moment(this.getFunc("clients").exp * 1000).format("YYYY.MM.DD")
+      }
+    }
+    // this.limitTime = this.getFunc("clients").isDeadline == true ? moment(this.getFunc("clients").exp * 1000).format("YYYY.MM.DD") : 0;
     this.aigptTime = this.getFunc("aigpt").isDeadline == true ? moment(this.getFunc("aigpt").exp * 1000).format("YYYY.MM.DD") : 0;
     console.log(this.limitTime, "exptime");
     console.log(this.aigptTime, "aigptTime");