Commit f1d90264e16a987173ba18a54e4eadcc07e293d5

Authored by yvan.ni
1 parent 6470e352

json_post的公用函数

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