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