|
@@ -50,7 +50,7 @@ export class NoticeComponent implements OnInit {
|
|
|
},
|
|
|
},
|
|
|
];
|
|
|
- friends: Array<any> = [];
|
|
|
+ // friends: Array<any> = [];
|
|
|
times: number = 0;
|
|
|
timer: any;
|
|
|
showModal: boolean = false; //是否长按弹窗
|
|
@@ -62,8 +62,8 @@ export class NoticeComponent implements OnInit {
|
|
|
|
|
|
constructor(
|
|
|
private router: Router,
|
|
|
- private aiSer: AiChatService,
|
|
|
- public accServ: AccountService,
|
|
|
+ public aiSer: AiChatService,
|
|
|
+ private accServ: AccountService,
|
|
|
public msgServe: MessageService,
|
|
|
private toastController: ToastController,
|
|
|
public deviceSer: DeviceService
|
|
@@ -74,12 +74,8 @@ export class NoticeComponent implements OnInit {
|
|
|
}
|
|
|
async refresh() {
|
|
|
let uid: any = Parse.User.current()?.id;
|
|
|
- let resultFriends = await this.aiSer.getFriends(uid);
|
|
|
- this.friends = resultFriends['data'];
|
|
|
- console.log(this.friends);
|
|
|
- // resChat?.data && this.noticeList.push(...resChat.data);
|
|
|
+ await this.aiSer.getFriends(uid);
|
|
|
this.getSetting();
|
|
|
- // this.getSysNotice()
|
|
|
}
|
|
|
async getSetting() {
|
|
|
let query = new Parse.Query('SiteConfig');
|
|
@@ -97,6 +93,8 @@ export class NoticeComponent implements OnInit {
|
|
|
segmentChanged(e: any) {
|
|
|
let { value } = e.detail;
|
|
|
this.active = value;
|
|
|
+ this.value = ''
|
|
|
+ this.aiSer.getFriends(Parse.User.current()?.id);
|
|
|
}
|
|
|
/* 手指按下 */
|
|
|
startPress(item: any) {
|
|
@@ -183,10 +181,10 @@ export class NoticeComponent implements OnInit {
|
|
|
|
|
|
value: string = '';
|
|
|
async toSearch() {
|
|
|
- this.friends = []
|
|
|
+ // this.friends = []
|
|
|
let uid: any = Parse.User.current()?.id;
|
|
|
- let resultFriends = await this.aiSer.getFriends(uid,this.value);
|
|
|
- console.log(resultFriends);
|
|
|
- this.friends = resultFriends['data'];
|
|
|
+ this.aiSer.getFriends(uid,this.value);
|
|
|
+ // console.log(resultFriends);
|
|
|
+ // this.aiSer.friends = resultFriends['data'];
|
|
|
}
|
|
|
}
|