Commit c52571d9 authored by 郭志伟's avatar 郭志伟

fix: 分享调试

parent 512508bf
......@@ -2,7 +2,7 @@
* @Description: weixin-js-sdk
* @LastEditors: gzw
* @Date: 20120-08-30 18:40:11
* @LastEditTime: 2020-08-31 17:40:33
* @LastEditTime: 2020-09-01 12:49:34
*/
import cfg from "@/config/index";
import { getwxAuth } from "@/api/user";
......@@ -21,11 +21,16 @@ export default async function({ title = "", desc = "", link = window.location.hr
timestamp, // 必填,生成签名的时间戳,刚才接口拿到的数据
nonceStr, // 必填,生成签名的随机串
signature, // 必填,签名,见附录1
jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage"]
jsApiList: [
"onMenuShareTimeline",
"onMenuShareAppMessage",
"updateAppMessageShareData",
"updateTimelineShareData"
]
});
wx.ready(function() {
//分享到朋友圈
wx.onMenuShareTimeline({
wx.updateTimelineShareData({
title, // 分享时的标题
link, // 分享时的链接
imgUrl, // 分享时的图标
......@@ -37,7 +42,7 @@ export default async function({ title = "", desc = "", link = window.location.hr
}
});
//分享给朋友
wx.onMenuShareAppMessage({
wx.updateAppMessageShareData({
title,
desc,
link,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment