微信小程序自定義分享圖片


自定義分享圖片

  1. onShareAppMessage: (res) => {
  2. if (res.from === 'button') {
  3. console.log("來自頁面內轉發按鈕");
  4. console.log(res.target);
  5. }
  6. else {
  7. console.log("來自右上角轉發菜單")
  8. }
  9. return {
  10. title: '21天攻克考研長難句',
  11. path: '/pages/index/index?id=123',
  12. imageUrl: "/images/1.jpg",
  13. success: (res) => {
  14. console.log("轉發成功", res);
  15. },
  16. fail: (res) => {
  17. console.log("轉發失敗", res);
  18. }
  19. }

     

    在轉發中,將縮略圖改為自定義圖片。

     

    歡迎關注,有問題一起學習歡迎留言、評論。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM