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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM