file author : 王佳欣
 *  email import { ShareInfo } from '../../../interface' ; import { loadScript } from '@utils/index' ; import Share from './share' ; declare global { interface Window { __mqq__ : any ; } } ; export default class QQ extends Share { private shareInfo : ShareInfo ; private qq : any ; constructor ( appId , shareInfo ) { super ( ) ; this . shareInfo = shareInfo ; this . loadQQ ( appId ) . then ( ( ) => { this . setShareInfo ( this . shareInfo ) ; } ) ; } private async loadQQ ( appId ) { await loadScript ( `//open.mobile.qq.com/sdk/qqapi.js?_bid=${ appId }` ) ; this . qq = window . __mqq__ ; } public setShareInfo ( shareInfo ) { let { title , desc , link , imgUrl } = shareInfo ; this . qq . data . setShareInfo ( { title , desc , share_url : link , image_url : imgUrl , } ) ; } callShare ( ) { this . qq . ui . showShareMenu ( ) ; } }