|
@@ -22,14 +22,14 @@ export class MeComponent {
|
|
|
}
|
|
|
|
|
|
async ngOnInit() {
|
|
|
- this.myRoleList = await this.gteAttentionData()
|
|
|
- this.myFoodList = await this.getScienceData()
|
|
|
- this.myViewList = await this.getViewDate()
|
|
|
+ this.myAttentionList = await this.gteAttentionData()
|
|
|
+ this.myScienceList = await this.getScienceData()
|
|
|
+ this.myRecommendList = await this.getRecommendDate()
|
|
|
}
|
|
|
|
|
|
cate: string = "关注"
|
|
|
- myViewList: Array<Parse.Object> = []
|
|
|
- async getViewDate() {
|
|
|
+ myRecommendList: Array<Parse.Object> = []
|
|
|
+ async getRecommendDate() {
|
|
|
let query = new Parse.Query("PetRecommend");
|
|
|
query.equalTo("user", Parse.User.current()?.toPointer())
|
|
|
query.include("user")
|
|
@@ -37,7 +37,7 @@ export class MeComponent {
|
|
|
return list
|
|
|
}
|
|
|
|
|
|
- myRoleList: Array<Parse.Object> = []
|
|
|
+ myAttentionList: Array<Parse.Object> = []
|
|
|
async gteAttentionData() {
|
|
|
let query = new Parse.Query("PetAttention");
|
|
|
query.equalTo("user", Parse.User.current()?.toPointer())
|
|
@@ -45,7 +45,7 @@ export class MeComponent {
|
|
|
let list = await query.find();
|
|
|
return list
|
|
|
}
|
|
|
- myFoodList: Array<Parse.Object> = []
|
|
|
+ myScienceList: Array<Parse.Object> = []
|
|
|
async getScienceData() {
|
|
|
let query = new Parse.Query("PetScience");
|
|
|
query.equalTo("user", Parse.User.current()?.toPointer())
|
|
@@ -53,9 +53,6 @@ export class MeComponent {
|
|
|
let list = await query.find();
|
|
|
return list
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
async logout() {
|
|
|
await Parse.User.logOut()
|
|
|
this.currentUser = undefined
|