This commit is contained in:
2019-12-19 14:50:06 +08:00
parent 918a827280
commit 084fb4386b
3 changed files with 5 additions and 3 deletions

View File

@@ -7,7 +7,8 @@ let request = function (obj){
header,
dataType,
responseType,
complete
complete,
name
} = obj
url="http://daigou.sdbairui.com/index.php/WXAPI/" + url
if(method == "POST" || method == "post"){
@@ -19,7 +20,7 @@ let request = function (obj){
if(data == undefined){
data = {}
}
data.openid = wx.getStorageSync("openid")
data[name || 'openid'] = wx.getStorageSync("openid")
return new Promise((res,rej)=>{
wx.request({
url,