Browse Source

修复部分问题

warrior 1 week ago
parent
commit
5bdadda2d9

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

@@ -101,10 +101,10 @@
     </div>
     }
   </div>
-  <div class="order" [style.background-image]="'url(img/用户榜底.png)'">
+  <div class="order" [style.background-image]="'url(img/用户榜底.png)'" (click)="toUrl('user/ranking')">
     <div class="title">
       <div class="link">排行榜</div>
-      <div class="link" (click)="toUrl('user/ranking')">更多</div>
+      <!-- <div class="link" (click)="toUrl('user/ranking')">更多</div> -->
     </div>
     <div class="ladder">
       <div class="top-block">
@@ -160,17 +160,17 @@
         </div>
       </div>
     </div>
-    @for (item of orderList.slice(2,4); track $index) {
+    @for (item of orderList.slice(3,4); track $index) {
     <div class="row">
       <div class="row-left">
         <span class="row-index">4</span>
         <img [src]="item.avatar" alt="" class="row-avatar" />
-        <div class="row-name">{{ item?.nickname }}</div>
+        <div class="row-name">{{ item?.nickname }} <span style="color: #ff7d0a;">{{item.credit}}</span> </div>
       </div>
       <div class="row-right">
         <div class="row-tpis">距离第一名</div>
         <div class="row-tpis-num">
-          {{ item.credit - orderList[0].credit }}<span></span>
+          {{ orderList[0].credit  - item.credit}}
         </div>
       </div>
     </div>

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

@@ -214,7 +214,7 @@
             color: white;
           }
           .num {
-            color: #ffb63f;
+            color: #fefcc9;
           }
           .user-block {
             font-size: 2.5641vw;

+ 2 - 2
projects/live-app/src/modules/user/profile/profile.component.html

@@ -218,7 +218,7 @@
         }
       </div>
     </div>
-    }@else {
+    }} @else {
     <div class="data-row">
       <div class="title-text">个人相册</div>
       <div class="album">
@@ -227,7 +227,7 @@
         }
       </div>
     </div>
-    } } @if (uid !== currentUser?.id &&
+    } @if (uid !== currentUser?.id &&
     !accServ.userVip?.rights?.['view-profile']) {
     <div class="view-auth">
       <ion-icon name="lock-closed"></ion-icon>

+ 10 - 2
projects/live-app/src/modules/user/profile/profile.component.ts

@@ -249,7 +249,11 @@ export class ProfileComponent implements OnInit {
   // 根据点击查看记录半小时内是否有此浏览记录
   async judgeIsBrowse() {
     let ProfileRadar = new Parse.Query('ProfileRadar');
-    ProfileRadar.equalTo('company', this.aiChatServ.company);
+    ProfileRadar.equalTo('company', {
+      __type: 'Pointer',
+      className: 'Company',
+      objectId: this.aiChatServ.company,
+    });
     ProfileRadar.equalTo('fromUser', Parse.User.current()?.id!);
     ProfileRadar.equalTo('toUser', this.user?.id,);
     ProfileRadar.greaterThanOrEqualTo(
@@ -327,7 +331,11 @@ export class ProfileComponent implements OnInit {
       this.friends = new obj();
       this.friends?.set('user', this.currentUser?.toPointer());
       this.friends?.set('friend', this.user?.toPointer());
-      this.friends?.set('company', this.aiChatServ.company);
+      this.friends?.set('company', {
+        __type: 'Pointer',
+        className: 'Company',
+        objectId: this.aiChatServ.company,
+      });
       this.friends?.set('channel', this.user?.id + '-' + this.currentUser?.id);
       await this.friends?.save();
       const toast = await this.toastController.create({

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

@@ -50,7 +50,7 @@
         </div>
       </div>
     </div>
-    @for (item of orderList.slice(2,4); track $index) {
+    @for (item of orderList.slice(3,4); track $index) {
     <div class="row">
       <div class="row-left">
         <span class="row-index">4</span>
@@ -60,7 +60,7 @@
       <div class="row-right">
         <div class="row-tpis">距离第一名</div>
         <div class="row-tpis-num">
-          {{ item.credit - orderList[0].credit }}<span></span>
+          {{ orderList[0].credit  - item.credit}}
         </div>
       </div>
     </div>

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

@@ -41,7 +41,7 @@
             color: white;
           }
           .num {
-            color: #ffb63f;
+            color: #fefcc9
           }
           .user-block {
             font-size: 2.5641vw;

+ 2 - 0
projects/live-app/src/services/aichart.service.ts

@@ -418,11 +418,13 @@ export class AiChatService {
     (SELECT COUNT(*) FROM "DramaPostLog" 
       WHERE "DramaPostLog"."dramaPost" = "DramaPost"."objectId" 
       AND "DramaPostLog"."isDeleted" IS NOT TRUE
+      LIMIT 1
     ) AS "postCount",
     (SELECT "objectId" FROM "UserVip" 
       WHERE "UserVip"."user" = "DramaPost"."user" 
       AND "UserVip"."isDeleted" IS NOT TRUE
       AND DATE("UserVip"."expiredAt") >= now()
+      LIMIT 1
     ) AS "isVip"
     --(CASE WHEN DATE("DramaPost"."createdAt") >= now() THEN true ELSE false END)
     FROM "DramaPost"