1
0

2 Ревизии c49f6345e4 ... 29a0b91845

Автор SHA1 Съобщение Дата
  0225263 29a0b91845 Merge branch 'master' of http://git.fmode.cn:3000/0225273/APPmy преди 4 месеца
  0225263 d6c2693824 tab4 преди 4 месеца
променени са 2 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 2 0
      src/app/feedback/feedback.page.html
  2. 6 1
      src/app/feedback/feedback.page.ts

+ 2 - 0
src/app/feedback/feedback.page.html

@@ -37,6 +37,8 @@
 <ion-content class="chat-content">
   <ion-list lines="none">
     <ion-item *ngFor="let message of messageList" class="message-item">
+      1{{message?.get('sendUser')?.objectId}} - 2{{user?.id}}
+      3{{message?.get('receiveUser')?.objectId}} - 4{{targetId}}
       <ion-label class="message-container"
                  [class.sent-message-container]="message?.get('sendUser')?.id === user?.id"
                  [class.received-message-container]="message?.get('receiveUser')?.id === targetId">

+ 6 - 1
src/app/feedback/feedback.page.ts

@@ -79,7 +79,7 @@ export class FeedbackPage implements OnInit {
       return;
     }
     let sendUser = Parse.User?.current()?.toPointer()
-    let receiveUser = {__type:"Pointer",className:"_User",objectId:this.userid}
+    let receiveUser = {__type:"Pointer",className:"_User",objectId:this.targetId}
     let Message = Parse.Object.extend("Message");
     let message = new Message();
     message.set("sendUser",sendUser)
@@ -144,7 +144,12 @@ export class FeedbackPage implements OnInit {
       ]
     }})
 
+    query.addDescending("createdAt")
+    query.limit(5)
+    query.include("sendUser","receiveUser")
+
     let list = await query.find();
+    console.log(list)
     if(list?.length){
       this.messageList = list
     }