|
@@ -145,6 +145,21 @@ export class BasicInComponent implements OnInit {
|
|
|
let obj = Parse.Object.extend('EduTextbook');
|
|
|
this.eduTextbook = new obj();
|
|
|
}
|
|
|
+ //设置推荐单位
|
|
|
+ if(!this.eduTextbook?.get('inviteUnit')){
|
|
|
+ let parentMap = await this.tbookSer.formatNode(
|
|
|
+ this.tbookSer?.profile?.user?.department?.objectId
|
|
|
+ );
|
|
|
+ let inviteUnit = parentMap[1]?.title; //推荐单位
|
|
|
+ if (parentMap[1]?.key) {
|
|
|
+ this.eduTextbook?.set('department', {
|
|
|
+ __type: 'Pointer',
|
|
|
+ className: 'Department',
|
|
|
+ objectId: parentMap[1]?.key,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.eduTextbook?.set('inviteUnit', inviteUnit);
|
|
|
+ }
|
|
|
|
|
|
this.eduTextbook?.set('user', Parse.User.current()?.toPointer());
|
|
|
this.eduTextbook?.set('company', {
|