hideLoading把toast关掉的BUG一直没修复
工具显示正常,客户端不正确,hideLoading把toast也关掉了
wx.showLoading({ title: '处理中...' , mask: true }); wx.request({ url: '' , method: 'POST' , header: { 'content-type' : 'application/x-www-form-urlencoded; charset=UTF-8' }, data: { xx: 'xx' }, success: function success(res) { wx.showToast({ title: 'xx' , icon: 'success' , duration: 2000, mask: true , complete: function complete(res){ setTimeout( function (){ wx.navigateBack({ delta:1 }) },2000); } }); }, fail: function fail(res){ wx.showToast({ title: 'xx' , duration:2000, icon: 'none' , mask: true }) }, complete: function complete(res){ wx.hideLoading(); } |