var accessTokenUrl = "";
axios.get(accessTokenUrl).then(function (res) {
console.log("token", res.data.access_token);
var data = {
scene: feedId,
width: 430
};
return axios.post('https://api.weixin.qq.com/wxa/getwxacodeunlimit', data, {
params : {
access_token: res.data.access_token
//dataType: 'JSON',
},
responseType: 'arraybuffer'
}
);
}).then(function (res) {
console.log("res data", res.data);
return new AV.File('file-qrcode', res.data).save();
}).then(function (imageFile) {
console.log("imageFile", imageFile.get("url"));
console.log("imagefile matadata", imageFile.metaData());
//gm(request(imageFile.get("url")))
response.success(imageFile.get("url"));
}).catch(error => {
console.log("error", error);
});