We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import wx from 'weixin-js-sdk'; export default ({分享配置参数} = {}) => { if (weixin || qq) { getWxConfApi.then(() => { const wxApiData = { forFriend: 'updateAppMessageShareData', forGroup: 'updateTimelineShareData' }; const wxApi = Object.values(wxApiData); wx.config({ debug: process.env.NODE_ENV === 'development', appId, // 必填,公众号的唯一标识 timestamp, // 必填,生成签名的时间戳 nonceStr, // 必填,生成签名的随机串 signature, // 必填,签名 jsApiList: wxApi // 必填,需要使用的JS接口列表 }); wx.ready(() => { wx.checkJsApi({ jsApiList: wxApi, success: function (res) { for (let i = 0, len = wxApi.length; i < len; i++) { switch (api检查通过 && wxApi[i]) { case wxApiData.forFriend: // 调用分享给朋友wx api break; case wxApiData.forGroup: // 调用分享给朋友圈wx api break; default: console.log('部分功能不支持,请使用最新版微信'); break; } } } }); }); wx.error(res => { console.log("配置初始化错误"); }); }); } };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
微信分享本地测试方法
一些问题
The text was updated successfully, but these errors were encountered: