在app.json中加入 "networkTimeout": { "request": 20000 } 即设置20s为超时时间,如果服务器在20秒内没有响应,那么wx.request将进入fail函数。