其他分享
首页 > 其他分享> > uniapp - 右上角分享

uniapp - 右上角分享

作者:互联网

onLoad同级,有图片就用图片,没图片就直接用屏幕截图

    onShareAppMessage() {
        let that = this;
        let pages = getCurrentPages();
        let route = pages[pages.length - 1].$page.fullPath;
        let imageUrl = that.shareUrl || '';
        if (imageUrl != '') {
            return {
                title: 'XXX',
                path: route,
                imageUrl: imageUrl,
            };
        } else {
            return {
                title: 'XXX',
                path: route,
            };
        }
    },

标签:uniapp,title,右上角,route,imageUrl,XXX,let,分享,pages
来源: https://www.cnblogs.com/gggggggxin/p/14776806.html