Commit 44cd3450 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/mpjsApi' into 'master'

修复概率无法配置微信jsapi问题

See merge request !57
parents 979ec2de 0d6f0292
......@@ -38,15 +38,17 @@ export default class App {
};
}
async setWxConfig() {
setWxConfig() {
if (!isWechat) { return; }
const wx = require('weixin-js-sdk');
const [res] = await api.getWxConfig();
wx.config({
debug: false,
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'], // 必填,需要使用的JS接口列表
openTagList: ['wx-open-launch-weapp', 'wx-open-launch-app'],
...res
api.getWxConfig().then(data => {
const [res] = data;
const wx = require('weixin-js-sdk');
wx.config({
debug: false,
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'], // 必填,需要使用的JS接口列表
openTagList: ['wx-open-launch-weapp', 'wx-open-launch-app'],
...res
});
});
}
......
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