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

小程序 文章 2022-01-06 10:00 441 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


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
A小程序跳转到B小程序,B小程序在App里的onShow方法里获取不到参数?
unionid的产生机制说改就改了啊?
2021-12-27号以后获取用户基本信息不再返回用户昵称的话,如果要获取用户的昵称的话该怎么操作
如何解决web-view跳公众号文章页,有的手机能打开,有的手机打不开提示小程序没有关联公众号?
微信内部浏览器IP访问时,多了个%20a,昨天还好好的
随便看看
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7472
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6793
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 6128
如何解决渲染层网络错误Failed to load media? 17394