登录
This commit is contained in:
11
utils/bin.js
11
utils/bin.js
@@ -2,15 +2,24 @@
|
||||
let request = function (obj){
|
||||
let {
|
||||
url,
|
||||
data,
|
||||
method,
|
||||
header,
|
||||
dataType,
|
||||
responseType,
|
||||
complete
|
||||
} = obj
|
||||
url="http://daigou.sdbairui.com/index.php/WXAPI/" + url
|
||||
if(method == "POST" || method == "post"){
|
||||
if(header == undefined){
|
||||
header ={}
|
||||
}
|
||||
header['content-type'] = "application/x-www-form-urlencoded"
|
||||
}
|
||||
return new Promise((res,rej)=>{
|
||||
Wx.request({
|
||||
wx.request({
|
||||
url,
|
||||
data,
|
||||
method,
|
||||
header,
|
||||
dataType,
|
||||
|
||||
Reference in New Issue
Block a user