|
@@ -1,4 +1,6 @@
|
|
|
// nova-tourism/components/my/index.js
|
|
|
+let Parse = getApp().Parse;
|
|
|
+const company = getApp().globalData.company
|
|
|
Component({
|
|
|
/**
|
|
|
* 组件的属性列表
|
|
@@ -16,6 +18,8 @@ Component({
|
|
|
customHeight: 0,
|
|
|
bottomNavHeight: 0,
|
|
|
contentHeight: 0,
|
|
|
+
|
|
|
+ User1List:[],
|
|
|
},
|
|
|
lifetimes: {
|
|
|
detached: function () {},
|
|
@@ -35,6 +39,7 @@ Component({
|
|
|
bottomNavHeight,
|
|
|
contentHeight
|
|
|
});
|
|
|
+ this.getname()
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -48,5 +53,19 @@ Component({
|
|
|
url: `${url}`,
|
|
|
});
|
|
|
},
|
|
|
+ //获取头像名称
|
|
|
+ async getname(){
|
|
|
+ const currentUser = Parse.User.current();
|
|
|
+ let Userquery = new Parse.Query('_User');
|
|
|
+ Userquery.equalTo('company', company);
|
|
|
+ Userquery.equalTo('objectId', currentUser.id);
|
|
|
+ Userquery.notEqualTo('isDeleted', true)
|
|
|
+ let P2 = await Userquery.find();
|
|
|
+ let User1List = P2.map(item => item.toJSON());
|
|
|
+ this.setData({
|
|
|
+ User1List
|
|
|
+ })
|
|
|
+ console.log(this.data.User1List);
|
|
|
+ },
|
|
|
}
|
|
|
})
|