首页 > 移动平台 > 详细

uni.app 微博图文分享 网络图片临时存储本地

时间:2020-05-28 17:54:18      阅读:226      评论:0      收藏:0      [点我收藏+]
          uni.downloadFile({
                    url: ‘https://ehcumh.oss-cn-hongkong.aliyuncs.com/met/logo2.png‘,
                    success: (res) => {
                        console.log(‘练市图片路径‘)
                        console.log(res.tempFilePath)
                        if (res.statusCode === 200) {
                            uni.share({
                                "provider": "sinaweibo",
                                // "scene": "WXSceneSession",
                                "type": 0,
                                "summary": "这个是分享到微博图文的标题",
                                "imageUrl":res.tempFilePath,
                                // "title": "欢迎体验uniapp",
                                "href": "https://uniapp.dcloud.io",
                                success: function (res) {
                                        console.log("success:" + JSON.stringify(res));
                                    },
                                    fail: function (err) {
                                        console.log("fail:" + JSON.stringify(err));
                                    }
                            })
                        }
                    }
                });

 

uni.app 微博图文分享 网络图片临时存储本地

原文:https://www.cnblogs.com/lymconch/p/12981452.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!