修改寻宝上一直加载
This commit is contained in:
parent
a94e410d61
commit
6267161ec6
@ -99,6 +99,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void initPermission() {
|
private void initPermission() {
|
||||||
XXPermissions.with(this)
|
XXPermissions.with(this)
|
||||||
// 申请安装包权限
|
// 申请安装包权限
|
||||||
@ -134,7 +135,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
Constant.initRootFolder(Constant.USHERED);
|
Constant.initRootFolder(Constant.USHERED);
|
||||||
HttpInterface.initHttpInter(Constant.USHERED);
|
HttpInterface.initHttpInter(Constant.USHERED);
|
||||||
initCheckVersion();
|
initCheckVersion();
|
||||||
} else {
|
}else {
|
||||||
initTime();
|
initTime();
|
||||||
}
|
}
|
||||||
//initTime();
|
//initTime();
|
||||||
@ -142,12 +143,11 @@ public class MainActivity extends BaseActivity {
|
|||||||
initPermission();
|
initPermission();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDenied(List<String> permissions, boolean never) {
|
public void onDenied(List<String> permissions, boolean never) {
|
||||||
if (never) {
|
if (never) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
DialogSettings.cancelable = false;
|
DialogSettings.cancelable=false;
|
||||||
MessageDialog.show(MainActivity.this, "提示", permissions.toString() + " 被永久拒绝授权请手动授权,", "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show(MainActivity.this, "提示", permissions.toString() + " 被永久拒绝授权请手动授权,", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@ -179,7 +179,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
int version = response.getBody().getVersion();
|
int version = response.getBody().getVersion();
|
||||||
if (versionCode < version) {//TODO 改成
|
if (versionCode <version) {//TODO 改成
|
||||||
//升级
|
//升级
|
||||||
ApkVersionBean.bodyBean body = response.getBody();
|
ApkVersionBean.bodyBean body = response.getBody();
|
||||||
showUpdateDialog(body);
|
showUpdateDialog(body);
|
||||||
@ -194,7 +194,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(MainActivity.this, e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, e.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
initTime();
|
initTime();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -208,7 +208,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
builder.setIcon(android.R.drawable.ic_dialog_info);
|
builder.setIcon(android.R.drawable.ic_dialog_info);
|
||||||
builder.setMessage("请升级APP版本至" + bodyBean.getVersion());
|
builder.setMessage("请升级APP版本至" + bodyBean.getVersion());
|
||||||
builder.setCancelable(false);
|
builder.setCancelable(false);
|
||||||
if (bodyBean.getUpdateState() == 0) {//非必须更新
|
if (bodyBean.getUpdateState()==0){//非必须更新
|
||||||
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
@ -226,7 +226,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
initTime();
|
initTime();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {//强制更新
|
}else{//强制更新
|
||||||
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
@ -243,18 +243,18 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void initTime() {
|
public void initTime() {
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED!=null){
|
||||||
HttpInterface.initAppPath(Constant.USHERED);
|
HttpInterface.initAppPath(Constant.USHERED);
|
||||||
Constant.initRootFolder(Constant.USHERED);
|
Constant.initRootFolder(Constant.USHERED);
|
||||||
HttpInterface.initHttpInter(Constant.USHERED);
|
HttpInterface.initHttpInter(Constant.USHERED);
|
||||||
if (Constant.ACCESS_TOKEN != null) {
|
if (Constant.ACCESS_TOKEN!=null){
|
||||||
initGetUserInfo();
|
initGetUserInfo();
|
||||||
} else {
|
}else {
|
||||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
} else {
|
}else {
|
||||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
@ -269,7 +269,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
}.start();
|
}.start();
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initGetUserInfo() {
|
private void initGetUserInfo() {
|
||||||
OkGoBuilder.getInstance().Builder(this)
|
OkGoBuilder.getInstance().Builder(this)
|
||||||
.url(HttpInterface.USER_DETAIL_BY_USER_ID)
|
.url(HttpInterface.USER_DETAIL_BY_USER_ID)
|
||||||
@ -337,7 +336,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -421,7 +419,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
con.connect();
|
con.connect();
|
||||||
if (con.getResponseCode() == 200) {
|
if (con.getResponseCode() == 200) {
|
||||||
File files = new File(Constant.NABISCO_APk);
|
File files = new File(Constant.NABISCO_APk);
|
||||||
if (!files.exists()) {
|
if (!files.exists()){
|
||||||
files.mkdir();
|
files.mkdir();
|
||||||
}
|
}
|
||||||
int length = con.getContentLength();// 获取文件大小
|
int length = con.getContentLength();// 获取文件大小
|
||||||
@ -430,7 +428,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
FileOutputStream fileOutputStream = null;
|
FileOutputStream fileOutputStream = null;
|
||||||
if (is != null) {
|
if (is != null) {
|
||||||
//对apk进行保存
|
//对apk进行保存
|
||||||
File file = new File(Constant.NABISCO_APk + "DTXB.apk");
|
File file = new File(Constant.NABISCO_APk +"DTXB.apk");
|
||||||
fileOutputStream = new FileOutputStream(file);
|
fileOutputStream = new FileOutputStream(file);
|
||||||
byte[] buf = new byte[1024];
|
byte[] buf = new byte[1024];
|
||||||
int ch;
|
int ch;
|
||||||
|
@ -221,6 +221,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
removables = new ArrayList<>();//存储轨迹的marker
|
removables = new ArrayList<>();//存储轨迹的marker
|
||||||
|
if (poiEntity!=null){
|
||||||
if (poiEntity.getId() != null) {
|
if (poiEntity.getId() != null) {
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
||||||
if (fileListByUUID != null) {
|
if (fileListByUUID != null) {
|
||||||
@ -237,6 +238,8 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//相机预览监听
|
//相机预览监听
|
||||||
camera.addCameraListener(new CameraListener() {
|
camera.addCameraListener(new CameraListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -379,6 +382,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
ivMap.setLayoutParams(layoutParamsMap);
|
ivMap.setLayoutParams(layoutParamsMap);
|
||||||
}
|
}
|
||||||
private void initLine() {
|
private void initLine() {
|
||||||
|
if (poiEntity!=null){
|
||||||
String geoWkt = poiEntity.getGeoWkt();
|
String geoWkt = poiEntity.getGeoWkt();
|
||||||
if (geoWkt != null) {
|
if (geoWkt != null) {
|
||||||
String geo = Geohash.getInstance().decode(geoWkt);
|
String geo = Geohash.getInstance().decode(geoWkt);
|
||||||
@ -409,6 +413,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 将秒转化成小时分钟秒
|
// 将秒转化成小时分钟秒
|
||||||
private String formatMiss(long miss) {
|
private String formatMiss(long miss) {
|
||||||
|
@ -46,7 +46,6 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
|
|||||||
holder.tvAuditStatus.setText("审核通过");
|
holder.tvAuditStatus.setText("审核通过");
|
||||||
}else if (listBean.getAuditStatus() == 1){
|
}else if (listBean.getAuditStatus() == 1){
|
||||||
holder.tvAuditStatus.setText("审核未通过");
|
holder.tvAuditStatus.setText("审核未通过");
|
||||||
holder.tvMassage.setText(listBean.getAuditMsg());
|
|
||||||
}else if (listBean.getAuditStatus() == -1){
|
}else if (listBean.getAuditStatus() == -1){
|
||||||
holder.tvAuditStatus.setText("待审核");
|
holder.tvAuditStatus.setText("待审核");
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ public class Constant {
|
|||||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||||
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
||||||
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
||||||
public static final String NAVIN_FO = "11.01";//版本日期
|
public static final String NAVIN_FO = "11.02";//版本日期
|
||||||
//marker
|
//marker
|
||||||
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
||||||
public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show);
|
public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show);
|
||||||
|
@ -132,6 +132,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
dismissLoadingDialog();
|
||||||
Collector.removeActivity(this);
|
Collector.removeActivity(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,6 +148,4 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -154,4 +154,10 @@ public abstract class BaseFragment extends Fragment implements FragmentBackHandl
|
|||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
dismissLoadingDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,12 +115,17 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void initRequest() {
|
public void initRequest() {
|
||||||
|
if (Constant.USHERED!=null){
|
||||||
|
if (HttpInterface.GET_COMMIT_LIST!=null){
|
||||||
initPoiSubMitWork();//poi
|
initPoiSubMitWork();//poi
|
||||||
initCaningSubMitWork();//充电站
|
initCaningSubMitWork();//充电站
|
||||||
initPoiVideoSubMitWork();//poi录像
|
initPoiVideoSubMitWork();//poi录像
|
||||||
initRoadSubMitWork();//道路录像
|
initRoadSubMitWork();//道路录像
|
||||||
initOtherSubMitWork();//其他
|
initOtherSubMitWork();//其他
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void initOtherSubMitWork() {
|
private void initOtherSubMitWork() {
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
@ -140,12 +145,19 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (hasSubmitBean.getCode() == 200) {
|
if (hasSubmitBean.getCode() == 200) {
|
||||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||||
if (hasSubmitBeanBody != null) {
|
if (hasSubmitBeanBody != null) {
|
||||||
|
if (getActivity()!=null){
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
otherAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
otherAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||||
otherAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
otherAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||||
otherAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
otherAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,12 +187,18 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (hasSubmitBean.getCode() == 200) {
|
if (hasSubmitBean.getCode() == 200) {
|
||||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||||
if (hasSubmitBeanBody != null) {
|
if (hasSubmitBeanBody != null) {
|
||||||
|
if (getActivity()!=null){
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
chargingAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
chargingAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||||
chargingAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
chargingAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||||
chargingAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
chargingAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -188,7 +206,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -211,19 +228,25 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (hasSubmitBean.getCode() == 200) {
|
if (hasSubmitBean.getCode() == 200) {
|
||||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||||
if (hasSubmitBeanBody != null) {
|
if (hasSubmitBeanBody != null) {
|
||||||
|
if (getActivity()!=null){
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
roadAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
roadAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||||
roadAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
roadAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||||
roadAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
roadAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), "请求失败", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -246,19 +269,25 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (hasSubmitBean.getCode() == 200) {
|
if (hasSubmitBean.getCode() == 200) {
|
||||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||||
if (hasSubmitBeanBody != null) {
|
if (hasSubmitBeanBody != null) {
|
||||||
|
if (getActivity()!=null){
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||||
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||||
poiVideoAuditProcessAbleNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
poiVideoAuditProcessAbleNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), "请求失败", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -281,19 +310,25 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (hasSubmitBean.getCode() == 200) {
|
if (hasSubmitBean.getCode() == 200) {
|
||||||
hasSubmitBeanBody = hasSubmitBean.getBody();
|
hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||||
if (hasSubmitBeanBody != null) {
|
if (hasSubmitBeanBody != null) {
|
||||||
|
if (getActivity()!=null){
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
auditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
auditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||||
auditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
auditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||||
auditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
auditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), "请求失败", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -325,7 +360,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
|
@ -109,18 +109,22 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
mainGrade.setText("LV." + Constant.LEVEL);
|
mainGrade.setText("LV." + Constant.LEVEL);
|
||||||
}
|
}
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
|
if (HttpInterface.GET_PRICE!=null){
|
||||||
initNetWork();
|
initNetWork();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onEvent(Message data) {
|
public void onEvent(Message data) {
|
||||||
if (data.what == Constant.HOME_MINE) {
|
if (data.what == Constant.HOME_MINE) {
|
||||||
if ((boolean) data.obj) {
|
if ((boolean) data.obj) {
|
||||||
|
if (HttpInterface.GET_PRICE!=null){
|
||||||
initNetWork();
|
initNetWork();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void initNetWork() {
|
private void initNetWork() {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
@ -138,11 +142,16 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
GetPriceBean.BodyBean body = response.getBody();
|
GetPriceBean.BodyBean body = response.getBody();
|
||||||
if (body != null) {
|
if (body != null) {
|
||||||
Double userPrice = body.getUserPrice();
|
Double userPrice = body.getUserPrice();
|
||||||
/*String format2 = DoubleUtil.format2(userPrice);*/
|
if (getActivity()!=null){
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
tvMoney.setText(userPrice+"");
|
tvMoney.setText(userPrice+"");
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.toString());
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
}
|
}
|
||||||
|
@ -159,15 +159,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
private StringBuilder treasureBuilder;
|
private StringBuilder treasureBuilder;
|
||||||
private Marker gatherMarker;
|
private Marker gatherMarker;
|
||||||
private boolean isHandler=false;
|
private boolean isHandler=false;
|
||||||
private Handler handler = new Handler(new Handler.Callback() {
|
private Handler handler=new Handler(new Handler.Callback() {
|
||||||
@Override
|
@Override
|
||||||
public boolean handleMessage(@NonNull Message msg) {
|
public boolean handleMessage(@NonNull Message msg) {
|
||||||
if (msg.what == 0x101) {
|
if (msg.what==0x101){
|
||||||
if (!isHandler){
|
if (!isHandler){
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
OkGo.getInstance().cancelAll();
|
OkGo.getInstance().cancelTag(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -162,8 +162,14 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
GetPriceBean.BodyBean body = response.getBody();
|
GetPriceBean.BodyBean body = response.getBody();
|
||||||
|
if (getActivity()!=null){
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
tvTotal.setText(body.getUserPrice() + "");
|
tvTotal.setText(body.getUserPrice() + "");
|
||||||
tvUnit.setText( body.getCanExchangePrice() + "");
|
canExchangePrice = body.getCanExchangePrice();
|
||||||
|
tvUnit.setText(canExchangePrice + "");
|
||||||
tvAlready.setText(body.getHaveExchangePrice()+"");
|
tvAlready.setText(body.getHaveExchangePrice()+"");
|
||||||
poiPushMoney.setText(body.getPoiPushPrice()+"元");
|
poiPushMoney.setText(body.getPoiPushPrice()+"元");
|
||||||
poiReportMoney.setText(body.getPoiNonepushPrice()+"元");
|
poiReportMoney.setText(body.getPoiNonepushPrice()+"元");
|
||||||
@ -175,8 +181,9 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
chargingReportMoney.setText(body.getCsNonepushPrice() + "元");
|
chargingReportMoney.setText(body.getCsNonepushPrice() + "元");
|
||||||
otherPushMoney.setText(body.getOtherPushPrice() + "元");
|
otherPushMoney.setText(body.getOtherPushPrice() + "元");
|
||||||
otherReportMoney.setText(body.getOtherNonepushPrice() + "元");
|
otherReportMoney.setText(body.getOtherNonepushPrice() + "元");
|
||||||
} else {
|
}
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + response.toString());
|
Log.d("TAG", "onSuccess: " + response.toString());
|
||||||
}
|
}
|
||||||
@ -184,7 +191,6 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getContext(), "获取失败" + e.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -237,7 +243,9 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case R.id.tv_all:
|
case R.id.tv_all:
|
||||||
withdrawBuilder.append("点击了全部 ,");
|
withdrawBuilder.append("点击了全部 ,");
|
||||||
|
if (canExchangePrice!=0){
|
||||||
etAllPrice.setText(canExchangePrice + "");
|
etAllPrice.setText(canExchangePrice + "");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -261,7 +269,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
DialogSettings.cancelable=false;
|
DialogSettings.cancelable=false;
|
||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "该提现申请已提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "该提现申请已提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
withdrawBuilder.append("提现了成功 ,");
|
withdrawBuilder.append("提现了成功 ,");
|
||||||
|
@ -3,9 +3,9 @@ package com.navinfo.outdoor.http;
|
|||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
|
|
||||||
public class HttpInterface {
|
public class HttpInterface {
|
||||||
public static final String IP= "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
public static final String IP_= "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||||
|
|
||||||
public static final String IP_= "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
public static final String IP= "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
||||||
|
|
||||||
public static final String USER_PATH ="/user/";//我的
|
public static final String USER_PATH ="/user/";//我的
|
||||||
public static final String MSG_LIST_PATH ="/msgList/";//发现
|
public static final String MSG_LIST_PATH ="/msgList/";//发现
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
android:id="@+id/tv_auditMsg"
|
android:id="@+id/tv_auditMsg"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
app:layout_constraintRight_toLeftOf="@+id/tv_auditStatus"
|
app:layout_constraintRight_toLeftOf="@+id/tv_auditStatus"
|
||||||
app:layout_constraintTop_toTopOf="@+id/tv_createTime" />
|
app:layout_constraintTop_toTopOf="@+id/tv_createTime" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user