|
|
@@ -21,6 +21,7 @@ import com.common.data.JSONUtil;
|
|
|
import com.core.app.Constants;
|
|
|
import com.core.base.BaseActivity;
|
|
|
import com.core.base.EasyFragment;
|
|
|
+import com.core.net.utils.NetUtils;
|
|
|
import com.core.utils.IntentUtils;
|
|
|
import com.core.utils.ToastUtil;
|
|
|
import com.handmark.pulltorefresh.library.PullToRefreshBase;
|
|
|
@@ -122,6 +123,11 @@ public class CharitableListFragment extends EasyFragment implements OnPlayListen
|
|
|
}
|
|
|
|
|
|
public void loadIndexData() {
|
|
|
+ if (!NetUtils.isNetWorkConnected(ct)) {
|
|
|
+ ToastUtil.showToast(ct, R.string.networks_out);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ baseActivity.progressDialog.show();
|
|
|
LogUtil.i("loadIndexData");
|
|
|
httpClient.Api().send(new HttpClient.Builder()
|
|
|
.url("appIndex")
|
|
|
@@ -136,7 +142,7 @@ public class CharitableListFragment extends EasyFragment implements OnPlayListen
|
|
|
} catch (Exception e) {
|
|
|
if (e != null) {
|
|
|
LogUtil.i("e=" + e.getMessage());
|
|
|
- ToastUtil.showToast(e.getMessage());
|
|
|
+ ToastUtil.showToast(ct, e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
baseActivity.progressDialog.dismiss();
|
|
|
@@ -176,6 +182,11 @@ public class CharitableListFragment extends EasyFragment implements OnPlayListen
|
|
|
|
|
|
|
|
|
private void loadProjects(String area) {
|
|
|
+ if (!NetUtils.isNetWorkConnected(ct)) {
|
|
|
+ ToastUtil.showToast(ct, R.string.networks_out);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ baseActivity.progressDialog.show();
|
|
|
LogUtil.i("loadProjects=" + area);
|
|
|
httpClient.Api().send(new HttpClient.Builder()
|
|
|
.url("projects")
|
|
|
@@ -299,6 +310,11 @@ public class CharitableListFragment extends EasyFragment implements OnPlayListen
|
|
|
}
|
|
|
|
|
|
private void loadOrderInfo(Double amount, CharitModel model) {
|
|
|
+ if (!NetUtils.isNetWorkConnected(ct)) {
|
|
|
+ ToastUtil.showToast(ct, R.string.networks_out);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ baseActivity.progressDialog.show();
|
|
|
if (model == null) {
|
|
|
ToastUtil.showToast(ct, "内部错误");
|
|
|
return;
|