methods: {
getConfig() { 请求配置信息
this.ajax({
url: "api/wechat/auth",
method: "POST",
data: { url: window.location.href },
success: r => {
this.config = r.data;
this.wxConfig();
}
});
},
wxConfig() {
var that = this;
console.log(that.config.signature);
wx.config({ 配置相关
appId: that.config.appId,
timestamp: that.config.timestamp,
nonceStr: that.config.nonceStr,
signature: that.config.signature,
jsApiList: that.config.jsApiList
});
wx.error(function(res) {
alert("出错了:" + res.errMsg);
});
},
upload() { 点击事件 调用wx.chooseImage没反应 能打印111
var that = this;
console.log(111);
wx.chooseImage({
count: 1,
sizeType: ["original", "compressed"],
sourceType: ["album", "camera"],
success: function(res) {
console.log(res);
}})
我也是这个问题 请问楼主有解决吗?
有报错信息吗?