|
|
@@ -3,6 +3,7 @@ package com.uas.appworks.model;
|
|
|
import android.content.Context;
|
|
|
import android.content.res.Resources;
|
|
|
import android.support.annotation.NonNull;
|
|
|
+import android.text.TextUtils;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
@@ -57,6 +58,18 @@ public class WorkPlatModel implements IWorkPlatModel {
|
|
|
} else {
|
|
|
appBaseUrl = CommonUtil.getAppBaseUrl(BaseConfig.getContext());
|
|
|
}
|
|
|
+ if (TextUtils.isEmpty(appBaseUrl)) {
|
|
|
+ if (workCallback != null) {
|
|
|
+ try {
|
|
|
+ workCallback.onFail(what, context.getString(R.string.host_null_please_login_retry));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ToastUtil.showToast(context, R.string.host_null_please_login_retry);
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
HttpRequest.getInstance().sendRequest(appBaseUrl, httpParams, workCallback);
|
|
|
}
|
|
|
|