|
@@ -55,7 +55,8 @@ Component({
|
|
|
navheight
|
|
|
});
|
|
|
// console.log('123', contentHeight);
|
|
|
- this.iddepe()
|
|
|
+ // this.iddepe()
|
|
|
+ this.getcircle()
|
|
|
},
|
|
|
|
|
|
},
|
|
@@ -67,30 +68,31 @@ Component({
|
|
|
|
|
|
//查全部朋友圈
|
|
|
async getcircle() {
|
|
|
- const currentUser = Parse.User.current();
|
|
|
- let Profilequery2 = new Parse.Query('Profile');
|
|
|
- Profilequery2.equalTo('company', company);
|
|
|
- Profilequery2.equalTo('user', currentUser.id);
|
|
|
- Profilequery2.equalTo('isCheck', true);
|
|
|
- Profilequery2.notEqualTo('isDeleted', true)
|
|
|
- let P2 = await Profilequery2.find();
|
|
|
- let profile1List2 = P2.map(item => item.toJSON());
|
|
|
- // console.log(profile1List2);
|
|
|
- const department = profile1List2[0].department.objectId
|
|
|
- // console.log(department);
|
|
|
- let queryWhere = {
|
|
|
- where: {
|
|
|
- profile: {
|
|
|
- $inQuery: {
|
|
|
- where: {
|
|
|
- department: department
|
|
|
- },
|
|
|
- className: 'Profile',
|
|
|
- },
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- let Profilequery = Parse.Query.fromJSON('AIMoment', queryWhere);
|
|
|
+ // const currentUser = Parse.User.current();
|
|
|
+ // let Profilequery2 = new Parse.Query('Profile');
|
|
|
+ // Profilequery2.equalTo('company', company);
|
|
|
+ // Profilequery2.equalTo('user', currentUser.id);
|
|
|
+ // Profilequery2.equalTo('isCheck', true);
|
|
|
+ // Profilequery2.notEqualTo('isDeleted', true)
|
|
|
+ // let P2 = await Profilequery2.find();
|
|
|
+ // let profile1List2 = P2.map(item => item.toJSON());
|
|
|
+ // // console.log(profile1List2);
|
|
|
+ // const department = profile1List2[0].department.objectId
|
|
|
+ // // console.log(department);
|
|
|
+ // let queryWhere = {
|
|
|
+ // where: {
|
|
|
+ // profile: {
|
|
|
+ // $inQuery: {
|
|
|
+ // where: {
|
|
|
+ // department: department
|
|
|
+ // },
|
|
|
+ // className: 'Profile',
|
|
|
+ // },
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // let Profilequery = Parse.Query.fromJSON('AIMoment', queryWhere);
|
|
|
+ let Profilequery = new Parse.Query('AIMoment');
|
|
|
Profilequery.equalTo('company', company);
|
|
|
Profilequery.equalTo('isVisible', true);
|
|
|
Profilequery.notEqualTo('isDeleted', true)
|
|
@@ -140,22 +142,22 @@ Component({
|
|
|
});
|
|
|
},
|
|
|
//判断是否有部门
|
|
|
- async iddepe(){
|
|
|
- const currentUser = Parse.User.current();
|
|
|
- let Profilequery2 = new Parse.Query('Profile');
|
|
|
- Profilequery2.equalTo('company', company);
|
|
|
- Profilequery2.equalTo('user', currentUser.id);
|
|
|
- Profilequery2.equalTo('isCheck', true);
|
|
|
- Profilequery2.notEqualTo('isDeleted', true)
|
|
|
- let P2 = await Profilequery2.first();
|
|
|
- if(P2){
|
|
|
- this.getcircle()
|
|
|
- }else{
|
|
|
- wx.navigateTo({
|
|
|
- url: '../../pages/my/my-profile/index?type='+'资料认证'// 目标页面的路径
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ // async iddepe(){
|
|
|
+ // const currentUser = Parse.User.current();
|
|
|
+ // let Profilequery2 = new Parse.Query('Profile');
|
|
|
+ // Profilequery2.equalTo('company', company);
|
|
|
+ // Profilequery2.equalTo('user', currentUser.id);
|
|
|
+ // Profilequery2.equalTo('isCheck', true);
|
|
|
+ // Profilequery2.notEqualTo('isDeleted', true)
|
|
|
+ // let P2 = await Profilequery2.first();
|
|
|
+ // if(P2){
|
|
|
+ // this.getcircle()
|
|
|
+ // }else{
|
|
|
+ // wx.navigateTo({
|
|
|
+ // url: '../../pages/my/my-profile/index?type='+'资料认证'// 目标页面的路径
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
}
|