failAction method

void failAction(
  1. String tag,
  2. BaseInfo baseInfo, {
  3. dynamic isShowToast = true,
})

token dept身份验证过期处理

Implementation

void failAction(String tag,BaseInfo baseInfo,{isShowToast = true}) {
  if (baseInfo.code == HTTP_NEED_LOGIN_AGAIN) {
    //todo Global.clearAllInfo();
  }

  if (isShowToast && baseInfo.msg != null) {
    ToastUtil.show(baseInfo.msg!);
  }
  debugPrint('$tag api接口请求失败 ${baseInfo.toJson()}');
}