VUE开发的webApp调用自定义分享成功,但是分享出去还是原链接?

小程序 文章 2022-01-06 10:00 341 0 全屏看文

AI助手支持GPT4.0

VUE开发的webApp调用自定义分享成功,但是分享出去还是原链接?The webApp developed by VUE successfully invoked the custom sharing, but the original link is still shared?

VUE开发的webApp调用自定义分享成功,但是分享出去还是原链接?

复现链接:http://saas-test.leadmea.com/dist/details?id=42

  let url = window.location.href;  shareData.link = url;  alert("分享链接:" + url);  this.api.SEND_SHARE({ url }).then((res) => {    window.wx.config({      debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。      appId: res.appId, // 必填,公众号的唯一标识      timestamp: res.timestamp, // 必填,生成签名的时间戳      nonceStr: res.nonceStr, // 必填,生成签名的随机串      signature: res.signature, // 必填,签名      jsApiList: ["updateAppMessageShareData", "updateTimelineShareData"], // 必填,需要使用的JS接口列表    });    window.wx.ready(() => {      alert(JSON.stringify(shareData));      // 分享好友      window.wx.updateAppMessageShareData({        ...shareData,        success: () => {          alert("好友分享设置成功");        },      });      // 分享朋友圈      window.wx.updateTimelineShareData({        ...shareData,        success: () => {          alert("朋友圈分享设置成功");        },      });    });  });


调用

{   title: this.details.title,   imgUrl: "http://saas-test.leadmea.com/dist/img/logo.1813e0ea.png",   desc: this.details.desc,   // link 在上面的方法里统一设置了}

效果

Duplicate link: http://saas-test.leadmea.com/dist/details?id=42   let url = window. location. href;   shareData. link = url; Alert ("share link:" + URL);   this. api. SEND_ SHARE({ url }). then((res) => {    window.wx.config( {debug: true / / / / debug mode, the return value of all API will be displayed at the client alert. If you want to see the incoming parameters, you can open it at the PC end, and the parameter information will be typed through log, only when it is at the PC end. AppId: res.appId / / must be filled, the only identification of official account is timestamp: res.timestamp / / required, when the signature is generated. Timestamp} noncestr: res.noncestr, / / required, generate random signature string} signature: res.signature, / / required, signature} jsapilist: ["updateappmessagesharedata", "updatetimelinsharedata"], / / required, list of JS interfaces to be used});     window. wx. Ready (() = > {alert (JSON. Stringify (sharedata)); / / share with friends window.wx.updateappmessagesharedata ({... Sharedata, success: () = > {alert ("friend sharing settings succeeded");         },      }); / / share a circle of friends} window wx. Updatetimelinesharedata ({... Sharedata, success: () = > {alert ("circle of friends sharing set successfully");         },      });     });   }); Call {Title: this.details.title, imgurl:“ http://saas-test.leadmea.com/dist/img/logo.1813e0ea.png ", desc: this. Details. DESC, / / link uniformly set the} effect in the above method

回答:

千柔👑:

高效办公:

分秒帧:http://tjbhll.org/

PPT超级市场:http://tkyhw.com/

壁纸插画:

Pixivic : http://tlgpsb.com/

极简壁纸:http://toptaofree.com/

创作工具:

创客贴:http://towngoo.com/

抠图网:http://tsaletsy.com/

音乐下载:

Mymusicmp3 :http://ttwonder.com/

ℳ结局꧔ꦿ:干就完了
五迷三道:

楼主解决踢我一下,我也遇到这个问题

-EOF-

AI助手支持GPT4.0