收藏
回答

wx.request超时

network状态显示:


祭上代码:

wx.request({
 
    url: url,
 
    data: new Uint8Array(wx.getFileSystemManager().readFileSync(path)),
 
    method: 'PUT',
 
    dataType: 'json',
 
    header: {
 
        'content-type': ''
 
    },
 
    success: (res) => {
 
        console.log('success', JSON.stringify(res));
 
    },
 
    fail: (res) => {
 
        console.log('fail', JSON.stringify(res));
 
    },
 
    complete: (res) => {
 
        console.log('complete', JSON.stringify(res));
 
    }
 
});


console打印如下:

fail {"errMsg":"request:fail timeout"}

complete {"errMsg":"request:fail timeout"}

回答关注问题邀请回答
收藏
登录 后发表内容