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

          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));
                                    }
                            })
                        }
                    }
                });

猜你喜欢

转载自www.cnblogs.com/lymconch/p/12981452.html
今日推荐