success返回值怎么给外部变量赋值
function Info(uid) {
var that = this;
var head;
wx.request({
url: ‘’,
data: {
},
header: {
‘content-type’: ‘application/json’
},
success(res) {
that.head = res.data.head;
console.log(that.head);
}
})
console.log(that.head)
return that.head;
}
module.exports.Info = Info;