searchPhoto: function(imageBase64) {
let that = this;
//that.setData({ msg: imageBase64 });
wx.request({
url: 'https://cn1-crs.easyar.com:8443/search',
data: {
image: imageBase64
},
header: {
'Authorization': 'OFYvIMa6bqiyzAEYCzmu8T3EjUJpp8TEIAXVpWCSIm+CMG24gFN8gbPA73TMHiUZKyPRU5ocklzQ7gJ1E/Y70g==',
'content-type': 'application/json' // 默认值
},
method: 'POST',
success(res) {
that.setData({isReuqest: false});
if (res.data.statusCode == 0) {
that.listener.stop();
that.setData({ msg: '识别成功'});
setTimeout(() => {
console.info('go to webar');
wx.navigateTo({
url: '../index/index'
});
}, 500);
}
},
fail(err) {
console.log(err)
that.status = false;
that.setData({ msg: err , isReuqest: false});
}
})
},
望大神指点一下