Browse Source

主播端首页

warrior 2 months ago
parent
commit
25006055a2

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

@@ -24,7 +24,7 @@
                 src="https://file-cloud.fmode.cn/Qje9D4bqol/20241109/pctmvt110807052.png"
                 alt=""
               />
-              23
+              {{profile?.get('birthdate') || "未知"}}
             </div>
             <div class="id">ID:{{ user.id }}</div>
           </div>

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

@@ -26,6 +26,7 @@
           font-size: 12px;
           .tags {
             display: flex;
+            align-items: center;
             .sex {
               border-radius: 50%;
               width: 20px;
@@ -56,9 +57,9 @@
             }
             .id {
               background: linear-gradient(to right, #d76f12, #ffffff9c);
-              padding: 0 8px;
+              padding: 2px 8px;
               border-radius: 20px;
-              height: 20px;
+              // height: 20px;
             }
           }
           .btn {

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

@@ -100,7 +100,7 @@ export class MyComponent implements OnInit {
     let query = new Parse.Query('Profile');
     query.equalTo('user', user?.id);
     query.notEqualTo('isDeleted', true);
-    query.select('isCheck', 'isCross');
+    query.select('isCheck', 'isCross','birthdate');
     this.profile = await query.first();
   }
   getAgreement() {

+ 21 - 10
projects/live-app/src/modules/tabs/space/space.component.html

@@ -62,7 +62,12 @@
             <div class="tag">主播</div>
             }
           </div>
-          <div class="time">{{ item.formatted_date }}</div>
+          <div class="time">
+            {{ item.formatted_date }}
+            @if (!item.isVerify) {
+            <span>审核中</span>
+            }
+          </div>
         </div>
       </div>
       <div class="post-dateil">
@@ -85,20 +90,26 @@
           {{ item.postCount }}
         </div>
         @if (item.uid == user.id) {
-          <div class="tool-item" style="color: #1a65eb;" (click)="delPost(item.objectId,$index)">
-            <ion-icon name="remove-circle"></ion-icon>
-          </div>
+        <div
+          class="tool-item"
+          style="color: #1a65eb"
+          (click)="delPost(item.objectId, $index)"
+        >
+          <ion-icon name="remove-circle"></ion-icon>
+        </div>
         }@else {
-          <div class="tool-item" (click)="onReport()">
-            <ion-icon name="warning"></ion-icon>
-          </div>
+        <div class="tool-item" (click)="onReport()">
+          <ion-icon name="warning"></ion-icon>
+        </div>
         }
       </div>
     </div>
     }
-    <ion-infinite-scroll (ionInfinite)="onIonInfinite($event)">
-      <ion-infinite-scroll-content></ion-infinite-scroll-content>
-    </ion-infinite-scroll>
   </div>
+  @if (disbable) {
+  <ion-infinite-scroll (ionInfinite)="onIonInfinite($event)">
+    <ion-infinite-scroll-content></ion-infinite-scroll-content>
+  </ion-infinite-scroll>
+  }
 </ion-content>
 <app-image-preview [image]="currenImg" #preview></app-image-preview>

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

@@ -81,7 +81,7 @@
               font-size: 12px;
               color: #a3a3a3;
             }
-            img{
+            img {
               width: 30px;
               margin-left: 6px;
             }
@@ -89,6 +89,12 @@
           .time {
             font-size: 12px;
             color: #c5c5c5;
+            display: flex;
+            flex-direction: column;
+            align-items: flex-end;
+            span{
+              color: #ffa922;
+            }
           }
         }
       }

+ 5 - 1
projects/live-app/src/modules/tabs/space/space.component.ts

@@ -26,6 +26,8 @@ export class SpaceComponent implements OnInit {
   currenImg: string = '';
   @ViewChild('preview') preview!: ImagePreviewComponent;
   user:Parse.Object = Parse.User.current()!;
+  disbable:boolean = true
+
   constructor(
     private activateRoute: ActivatedRoute,
     private router: Router,
@@ -61,6 +63,7 @@ export class SpaceComponent implements OnInit {
     let { value } = e.detail;
     this.active = value;
     this.list = [];
+    this.disbable = true;
     this.getList();
   }
   onShowImg(url: string) {
@@ -105,7 +108,8 @@ export class SpaceComponent implements OnInit {
   }
   async onIonInfinite(ev: any) {
     let result = await this.getList();
-    if (this.active == 'all' && result.length == 0) {
+    if (result.length == 0) {
+      this.disbable = false;
       (ev as InfiniteScrollCustomEvent).target.disabled = true;
     }
     setTimeout(() => {

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

@@ -372,7 +372,7 @@ export class AiChatService {
   }
 
   async getPost(limit?: number, skip?: number, uid?: string): Promise<any> {
-    let sql = `SELECT "DramaPost"."objectId", "DramaPost".content,"DramaPost".images,
+    let sql = `SELECT "DramaPost"."objectId", "DramaPost".content,"DramaPost".images,"DramaPost"."isVerify",
     us."objectId" uid, us.avatar,us.nickname,"Profile"."identyType",TO_CHAR("DramaPost"."createdAt", 'YYYY-MM-DD HH24:MI') AS formatted_date,
     (SELECT "isVerify" FROM "DramaPostLog" 
       WHERE "DramaPostLog"."dramaPost" = "DramaPost"."objectId" 
@@ -398,6 +398,7 @@ export class AiChatService {
     WHERE "DramaPost"."company" = '${this.company}'
     AND "DramaPost"."isDeleted" IS NOT TRUE
     ${uid ? `AND "DramaPost"."user" = '${uid}'` : ''}
+    ${uid ? `` : `AND "DramaPost"."isVerify" IS TRUE`}
     ORDER BY "DramaPost"."createdAt" DESC
     OFFSET ${skip ?? 0} LIMIT ${limit ?? 10}`;
     let res: any = await this.http.customSQL(sql);