This commit is contained in:
2019-12-18 18:10:15 +08:00
parent ed38614c2c
commit 3166463ac4
16 changed files with 166 additions and 21 deletions

View File

@@ -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,