Commit 23f25005b92bdebf07893da38b9d4191e2e3e080
Merge branch 'dev' into 'test'
json_post的公用函数 See merge request !232
Showing
1 changed file
with
2 additions
and
2 deletions
utils/request.js
| ... | ... | @@ -211,7 +211,7 @@ module.exports = { |
| 211 | 211 | setTimeout(function () { |
| 212 | 212 | if(req) req.abort(); |
| 213 | 213 | },time*1000) |
| 214 | - } | |
| 214 | + }, | |
| 215 | 215 | |
| 216 | 216 | /** |
| 217 | 217 | * @param {Object} url //url地址 |
| ... | ... | @@ -221,7 +221,7 @@ module.exports = { |
| 221 | 221 | */ |
| 222 | 222 | json_post:function(url,data,succ,fail){ |
| 223 | 223 | if(url.indexOf("http")==-1) url=getApp().globalData.setting.url +url; |
| 224 | - var str = JSON.stringify(pdata); | |
| 224 | + var str = JSON.stringify(data); | |
| 225 | 225 | wx.request({ |
| 226 | 226 | url: url, |
| 227 | 227 | data: str, | ... | ... |