智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/e3/e37a383c736399e2f408096a4b2...

26 lines
758 B

//微信小程序适配器
module.exports=function(request, responseCallback) {
let con = {
method: request.method,
url: request.url,
dataType: request.dataType || undefined,
header: request.headers,
data: request.body||{},
responseType: request.responseType || 'text',
success(res) {
responseCallback({
statusCode: res.statusCode,
responseText: res.data,
headers: res.header,
statusMessage: res.errMsg
})
},
fail(res) {
responseCallback({
statusCode: res.statusCode||0,
statusMessage: res.errMsg
})
}
}
wx.request(con)
}