WDShare.ets 837 Bytes
import { ContentDetailDTO, ContentDTO, PageInfoDTO } from 'wdBean/Index';
import { ShareScene, ShareType, WDShareBase } from 'wdShareBase/Index';
import { ShareContentType } from 'wdShareBase/src/main/ets/Constant';

export class WDShare {

  static shareContent(content: ContentDetailDTO, pageName: string ="", pageId: string = "") {

    //TODO: 处理分享弹框交互和 海报逻辑

    WDShareBase.getInstance().share({
      to: ShareType.System,
      scene: ShareScene.System,
      type: ShareContentType.Link,
      obj: {
        title: content.shareInfo.shareTitle,
        desc: content.shareInfo.shareSummary,
        link: content.shareInfo.shareUrl,
      }
    })
  }

  static shareProgram(program: ContentDTO, pageName: string ="", pageId: string = "") {

  }

  static shareSubject(subject: PageInfoDTO) {


  }

}