import { getWXObject, getSignature } from './base'

const shareApiList = ['updateAppMessageShareData','updateTimelineShareData','onMenuShareAppMessage', 'onMenuShareTimeline']

export default async function (data = {title: '',desc: '', link: '', imgUrl: ''}) {
    await getWXObject()
    await getSignature()

    wx.ready(function () {
        console.log('ready');
        shareApiList.forEach(item => {
            wx[item](data)
        })
    })
}