修改地图居中
This commit is contained in:
parent
c03b3cb597
commit
401a03b429
@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Message;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
@ -21,9 +22,13 @@ import com.navinfo.outdoor.bean.LoginOauthTokenBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.Base64;
|
||||
import com.navinfo.outdoor.util.Md5Util;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
/**
|
||||
* 登录页
|
||||
*/
|
||||
@ -36,6 +41,14 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
private SharedPreferences navInfo;
|
||||
private SharedPreferences.Editor navInfoEditor;
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.activity_login;
|
||||
@ -46,6 +59,15 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.REGISTER_WORD) {
|
||||
if ((boolean)data.obj){
|
||||
etLoginName.setText(Constant.user_name);
|
||||
etLoginPaw.setText(Constant.pass_word);
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
@ -150,4 +172,10 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,9 @@ public class Constant {
|
||||
public static String USERID=null;
|
||||
public static String USERNAME=null;
|
||||
|
||||
public static String user_name=null;
|
||||
public static String pass_word=null;
|
||||
|
||||
|
||||
|
||||
//message word 值
|
||||
@ -71,7 +74,7 @@ public class Constant {
|
||||
public static final int TREASURE_GATHER_GET_WORD = 7;//领取采集页面其他marker 的回传
|
||||
public static final int MAIN_BUTTON_VISIABLE = 8; // 控制主界面各个按钮显隐状态的what值
|
||||
public static final int MAIN_HEADER = 9; // 控制主界面各个header
|
||||
public static final int MAIN_REMOVE = 10; // 控制主界面各个header移除
|
||||
public static final int POI_DRAWER = 10; //设置每个页面显示屏幕的位置
|
||||
public static final int GATHER_GET_RETURN = 11;//参加领取的返回
|
||||
public static final int MAIN_CHARGING_STATION = 13;//充电站的Fragment 对地图页面marker 的一个展示 编辑
|
||||
public static final int MAIN_CHARGING_CHECKED_STATION = 43;//充电站的Fragment 对地图页面marker 的一个展示 确定
|
||||
@ -104,6 +107,8 @@ public class Constant {
|
||||
public static final int EVENT_WORK_HOME = 45; //切换到寻宝
|
||||
public static final int PICTURE_VIDEO_WORD = 48; //视频页面崩溃后发给poi录像和道路
|
||||
|
||||
public static final int REGISTER_WORD = 46; //注册的返回
|
||||
|
||||
public static int NUMBER = 200; //任务个数
|
||||
public static int LIMIT_TTPE = -1; //权限类型,普通任务-0,专属任务-1
|
||||
public static int TASK_TYPE = -1; // 任务类型
|
||||
|
@ -19,6 +19,7 @@ import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.FragmentBackHandler;
|
||||
import com.navinfo.outdoor.util.GPSUtils;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
@ -27,6 +28,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
*/
|
||||
public abstract class BaseDrawerFragment extends BaseFragment {
|
||||
public boolean isSliding = true; // fragment被销毁时,true-抽屉收回,false-抽屉状态不变
|
||||
protected PoiEntity showPoiEntity;
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
@ -66,9 +68,24 @@ public abstract class BaseDrawerFragment extends BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (showPoiEntity!=null){
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.POI_DRAWER;
|
||||
LatLng latLng = new LatLng();
|
||||
latLng.setLatitude(Double.valueOf(showPoiEntity.getY()));
|
||||
latLng.setLongitude(Double.valueOf(showPoiEntity.getX()));
|
||||
obtain.obj = latLng;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
showPoiEntity=null;
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) {
|
||||
isSliding = arguments.getBoolean("isSliding", true);
|
||||
|
@ -0,0 +1,32 @@
|
||||
package com.navinfo.outdoor.bean;
|
||||
|
||||
public class MessageCodeBean {
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
private String body;
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public void setBody(String body) {
|
||||
this.body = body;
|
||||
}
|
||||
}
|
@ -57,6 +57,7 @@ import com.navinfo.outdoor.util.PhotoUtils;
|
||||
import com.navinfo.outdoor.util.PictureUtil;
|
||||
import com.navinfo.outdoor.util.ToastUtil;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
import com.vividsolutions.jts.geom.impl.PackedCoordinateSequence;
|
||||
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@ -97,6 +98,9 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
private String pid;
|
||||
private String station;
|
||||
private LatLng latLng;
|
||||
private File file;
|
||||
|
||||
|
||||
private String takePhotoPath1;
|
||||
private String takePhotoPath2;
|
||||
private String takePhotoPath3;
|
||||
@ -109,10 +113,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
private String takePhotoPath10;
|
||||
private int taskId;
|
||||
private Integer chargingPileBody;
|
||||
|
||||
private ArrayList<File> phoneLists;
|
||||
private PoiEntity poiEntity;
|
||||
private File file;
|
||||
|
||||
public static ChargingPileFragment newInstance(Bundle bundle) {
|
||||
ChargingPileFragment fragment = new ChargingPileFragment();
|
||||
@ -556,12 +557,12 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
private void initShowPileSharePre() {
|
||||
station = getArguments().getString("station");
|
||||
if (station != null) {
|
||||
poiEntity = new Gson().fromJson(station, PoiEntity.class);
|
||||
pid = poiEntity.getId();
|
||||
taskId = poiEntity.getTaskId();
|
||||
showPoiEntity = new Gson().fromJson(station, PoiEntity.class);
|
||||
pid = showPoiEntity.getId();
|
||||
taskId = showPoiEntity.getTaskId();
|
||||
latLng = new LatLng();
|
||||
latLng.setLatitude(Constant.currentLocation.getLatitude());
|
||||
latLng.setLongitude(Constant.currentLocation.getLongitude());
|
||||
latLng.setLatitude(Double.valueOf(showPoiEntity.getY()));
|
||||
latLng.setLongitude(Double.valueOf(showPoiEntity.getX()));
|
||||
}
|
||||
// 添加信息:
|
||||
ChargingPileEntity chargingPileEntity = (ChargingPileEntity) getArguments().getSerializable("chargingPileEntity");
|
||||
|
@ -113,7 +113,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
private RecyclerView recyclerStation;
|
||||
private ChargingPileAdapter chargingPileAdapter;
|
||||
private int station_type = 0;
|
||||
private PoiEntity showPoiEntity; // 要显示的entity数据,从外部界面传入
|
||||
private ChargingPileDao chargingPileDao;
|
||||
private LatLng latLng;
|
||||
private RelativeLayout linearExist;
|
||||
@ -1333,10 +1332,13 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
if (showPoiEntity.getId()!=null){
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
@ -12,11 +13,14 @@ import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.MessageCodeBean;
|
||||
import com.navinfo.outdoor.bean.UserBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/**
|
||||
* 忘记密码页面
|
||||
*/
|
||||
@ -51,11 +55,8 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
forgetPawGetNote.setOnClickListener(this);
|
||||
btnForgetPaw = findViewById(R.id.btn_forgetPaw);
|
||||
btnForgetPaw.setOnClickListener(this::onClick);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
@ -121,6 +122,14 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode()==200){
|
||||
Constant.user_name = mobile;
|
||||
Constant.pass_word = password;
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what=Constant.REGISTER_WORD;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
@ -140,22 +149,22 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
Toast.makeText(getContext(), "请输入手机号", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
httpParams.put("telephone", mobile);
|
||||
httpParams.put("mobile", mobile);
|
||||
}
|
||||
httpParams.put("type", 2);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.USER_MESSAGE)
|
||||
.cls(UserBean.class)
|
||||
.cls(MessageCodeBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.getRequest(new Callback<UserBean>() {
|
||||
.getRequest(new Callback<MessageCodeBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
public void onSuccess(MessageCodeBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
sessionId = String.valueOf(response.getBody());
|
||||
sessionId = response.getBody();
|
||||
}
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
@ -91,7 +91,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
private Button btnOtherUploading;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private PoiEntity showPoiEntity;
|
||||
private LatLng latLng;
|
||||
private int station_type = 5;
|
||||
private ArrayList<File> otherUploadList;
|
||||
@ -592,10 +591,13 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity!=null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus()==5){
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
if (showPoiEntity.getId()!=null){
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
private PoiDao poiDao;
|
||||
private CheckBox checkBoxLife;
|
||||
private CheckBox checkBoxRight;
|
||||
private PoiEntity showPoiEntity;
|
||||
private LatLng latLng;
|
||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||
private int existence = 0;
|
||||
|
@ -108,7 +108,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("type", type);
|
||||
httpParams.put("pageSize", "10");
|
||||
httpParams.put("pageSize", "20");
|
||||
httpParams.put("pageNum", page);
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
|
@ -90,7 +90,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
private RadioGroup rgType;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private PoiEntity showPoiEntity;
|
||||
private Button btnPoiVideoUpload;
|
||||
private String videoPath;
|
||||
private File fileZip;
|
||||
@ -558,10 +557,13 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
if (showPoiEntity.getId()!=null){
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,33 +3,30 @@ package com.navinfo.outdoor.fragment;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Message;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.LoginActivity;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
|
||||
import com.navinfo.outdoor.bean.MessageCodeBean;
|
||||
import com.navinfo.outdoor.bean.UserBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
|
||||
import com.navinfo.outdoor.util.RegexUtil;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
|
||||
/**
|
||||
* 注册页面
|
||||
*/
|
||||
public class RegisterFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
|
||||
private EditText etRegisterPhone, etRegisterNote, etRegisterReferrer, etRegisterPaw, etRegisterConfirmPaw;
|
||||
private ImageView ivRegisterCheck, ivFinish;
|
||||
private TextView haveGoLogin, registerGetNote;
|
||||
@ -86,6 +83,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
break;
|
||||
case R.id.btn_register:
|
||||
initRegister();
|
||||
break;
|
||||
case R.id.register_get_note:
|
||||
registerNote();
|
||||
initGetNote();
|
||||
@ -100,24 +98,23 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
Toast.makeText(getContext(), "请输入手机号", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
httpParams.put("telephone", mobile);
|
||||
httpParams.put("mobile", mobile);
|
||||
}
|
||||
httpParams.put("type", 1);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.USER_MESSAGE)
|
||||
.cls(UserBean.class)
|
||||
.token(null)
|
||||
.cls(MessageCodeBean.class)
|
||||
.params(httpParams)
|
||||
.getRequest(new Callback<UserBean>() {
|
||||
.getRequest(new Callback<MessageCodeBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
public void onSuccess(MessageCodeBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
sessionId = String.valueOf(response.getBody());
|
||||
sessionId = response.getBody();
|
||||
}
|
||||
Toast.makeText(getActivity(), response.getMessage()+ "", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -159,14 +156,14 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
if (!conFirmPaw.equals(password)) {
|
||||
Toast.makeText(getContext(), "密码和确认密码请保持一致", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
if (sessionId == null||sessionId.equals("")) {
|
||||
if (sessionId == null || sessionId.equals("")) {
|
||||
Toast.makeText(getContext(), "请短信获取验证码", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
} else {
|
||||
httpParams.put("sessionId", sessionId);
|
||||
}
|
||||
long time=System.currentTimeMillis();
|
||||
httpParams.put("datetime",time);
|
||||
long time = System.currentTimeMillis();
|
||||
httpParams.put("datetime", time);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
@ -179,12 +176,16 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
Constant.user_name = mobile;
|
||||
Constant.pass_word = password;
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what=Constant.REGISTER_WORD;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
getActivity().finish();
|
||||
}
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -196,13 +197,12 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
private void registerNote() {
|
||||
if (timer!=null){
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
timer= null;
|
||||
timer = null;
|
||||
}
|
||||
registerGetNote.setEnabled(false);
|
||||
timer = new CountDownTimer(60 * 1000, 1000) {
|
||||
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
registerGetNote.setText(millisUntilFinished / 1000 + "秒后重新获取验证码");
|
||||
|
@ -92,7 +92,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
private RadioGroup rgType;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private PoiEntity showPoiEntity;
|
||||
private Button roadUpload;
|
||||
private File fileZip;
|
||||
private FrameLayout fmRoadPic;
|
||||
@ -599,10 +598,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity!=null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus()==5){
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
if (showPoiEntity.getId()!=null){
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,5 @@
|
||||
package com.navinfo.outdoor.http;
|
||||
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
|
||||
public class HttpInterface {
|
||||
public static final String IP="http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||
public static final String USER_PATH="/user/";//我的
|
||||
@ -10,7 +8,6 @@ public class HttpInterface {
|
||||
public static final String PRICE_PATH="/price/";//提现
|
||||
public static final String TASK_PATH="/task/";//任务
|
||||
public static final String USERID= Constant.USERID;
|
||||
|
||||
/**
|
||||
* 用户版本升级
|
||||
*/
|
||||
@ -32,21 +29,20 @@ public class HttpInterface {
|
||||
//172.23.139.4:9999/m4/user/userLocation/1/userLocation post 参数 geom:geohash加密
|
||||
public static final String geomIP="http://172.23.139.4:9999/m4";
|
||||
public static final String USER_LOCATION = IP+USER_PATH+ "userLocation/"+USERID+"/userLocation"; //上传用户坐标
|
||||
|
||||
/**
|
||||
* 发现
|
||||
* Path=/m4/msgList/**
|
||||
*/
|
||||
// public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/";
|
||||
public static final String listTask = IP +MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/msg_list";//任务专区
|
||||
public static final String listEvent = IP +MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/msg_list";//活动专区
|
||||
public static final String listTaskExplain = IP +MSG_LIST_PATH+"m4/findAndMessage/"+USERID+"/msg_list";//任务说明
|
||||
public static final String LIST_TASK =IP+MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/msg_list";//任务专区
|
||||
public static final String LIST_EVENT =IP+MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/msg_list";//活动专区
|
||||
public static final String LIST_TASK_EXPLAIN =IP+MSG_LIST_PATH+"m4/findAndMessage/"+USERID+"/msg_list";//任务说明
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/msg_list?fid=1&pageNum=1&pageSize=2
|
||||
public static final String MSG_LISt = IP +MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/msg_list";//发现查询接口
|
||||
public static final String MSG_LISt =IP+MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/msg_list";//发现查询接口
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/exam_content?id=11
|
||||
public static final String EXAM_CONTENT = IP +MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/exam_content";//发现 -能力测评获取试题接口
|
||||
public static final String EXAM_CONTENT =IP+MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/exam_content";//发现 -能力测评获取试题接口
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/submitExam
|
||||
public static final String EXAM_SUBMIT = IP +MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/submitExam";//发现 -能力测评提交试卷 post
|
||||
public static final String EXAM_SUBMIT =IP+MSG_LIST_PATH+ "m4/findAndMessage/"+USERID+"/submitExam";//发现 -能力测评提交试卷 post
|
||||
/**
|
||||
* 登录
|
||||
* Path=/m4/userlogin/**
|
||||
@ -56,12 +52,11 @@ public class HttpInterface {
|
||||
///m4/user/m4/user/register
|
||||
public static final String USER_REGISTER=IP+USER_PATH+"m4/user/register";//注册接口
|
||||
///m4/user/ phone/message
|
||||
public static final String USER_MESSAGE=IP+USER_PATH+"phone/message ";//获取验证码 type 1:注册获取 2:更新
|
||||
public static final String USER_MESSAGE=IP+USER_PATH+"phone/message";//获取验证码 type 1:注册获取 2:更新
|
||||
///m4/user/m4/user/forgetPassword
|
||||
public static final String USER_FORGET_PASSWORD=IP +USER_PATH+"m4/user/forgetPassword";//忘记密码
|
||||
//Flat.:
|
||||
//Flat
|
||||
//dtxbmaps.navinfo.com/dtxb/m4/user/phone/message?mobile=18811794839&type=2
|
||||
|
||||
/**
|
||||
* 提现 金额
|
||||
* Path=/m4/price/**
|
||||
@ -122,55 +117,35 @@ public class HttpInterface {
|
||||
public static final String COMPLETE = IP+TASK_PATH + "polygonTask/"+USERID+"/complete";//面状任务任务采集
|
||||
public static final String SUBMIT_POLYGON_TASK = IP+TASK_PATH + "polygonTask/"+USERID+"/submitPolygontask";//面状任务结束采集
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* public static final String IPm8 = "http://172.23.139.4:8003/m4/";
|
||||
//http://172.23.139.4:8003/m4/task/1/unReceivedTask?taskIds=&auditIds=214,278
|
||||
、、public static final String UN_RECEIVED_TASK = + "task/1/unReceivedTask";//所以类型的结束领取
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* public static final String IPm8 = "http://172.23.139.4:8003/m4/";
|
||||
* http://172.23.139.4:8003/m4/task/1/unReceivedTask?taskIds=&auditIds=214,278
|
||||
* public static final String UN_RECEIVED_TASK = + "task/1/unReceivedTask";//所以类型的结束领取
|
||||
//http://172.21.91.160:8000/api/user/list
|
||||
//发现接口
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/msg_list?fid=1&pageNum=1&pageSize=2
|
||||
//能力测评接口
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/exam_content?id=11
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/submitExam
|
||||
|
||||
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/m4/findAndMessage/1/";
|
||||
//发现:测试接口
|
||||
|
||||
public static final String listTask = IP1 + "msg_list";//任务专区
|
||||
public static final String listEvent = IP1 + "msg_list";//活动专区
|
||||
public static final String listTaskExplain = IP1 + "msg_list";//任务说明
|
||||
public static final String MSG_LISt = IP1 + "msg_list";//发现查询接口
|
||||
public static final String EXAM_CONTENT = IP1 + "exam_content";//发现 -能力测评获取试题接口
|
||||
public static final String EXAM_SUBMIT = IP1 + "submitExam";//发现 -能力测评提交试卷 post
|
||||
|
||||
|
||||
public static final String IPm4 = "http://dtxbmaps.navinfo.com/dtxb/user/m4";
|
||||
|
||||
public static final String MSG_CONTENT = IPm4 + "/1/msg_content";//发现 -富文本详情页请求
|
||||
|
||||
|
||||
//172.23.139.4:8001/m4/user/update
|
||||
public static final String USER_UPDATE = IPm4 + "/user/update";//用户资料
|
||||
//172.23.139.4:8001/m4/userBankcard/update
|
||||
public static final String USER_BANKCARD_UP_DATA = IPm4 + "/userBankcard/update"; //绑定银行卡
|
||||
|
||||
public static final String IPm5 = "http://dtxbmaps.navinfo.com/dtxb/price/";
|
||||
//http://172.23.139.4:8004/userPrice/1/getPrice
|
||||
public static final String GET_PRICE = IPm5 + "userPrice/1/getPrice";//我的-总资产
|
||||
//http://172.23.139.4:8004/userPrice/1/userPriceExchange?exchangeMoney=10&payType=1
|
||||
public static final String USER_PRICE_EXCHANGE = IPm5 + "userPrice/1/userPriceExchange";//我的-财务信息-提现
|
||||
|
||||
|
||||
public static final String IPm6 = "http://dtxbmaps.navinfo.com/dtxb/task/";
|
||||
//172.23.139.4:8003/m4/task/1/getList
|
||||
public static final String TASK_LIST = IPm6 + "m4/task/1/getList"; //任务搜索
|
||||
@ -198,16 +173,12 @@ public class HttpInterface {
|
||||
public static final String RECEIVED_POI_VIDEO_TASK = IPm6 + "poivideotask/1/receivedPoivideotask";//poi录像任务获取
|
||||
// 172.23.139.4:8003/poivideotask/1/submitPoivideotask
|
||||
public static final String INSIDE_API_LIST = IPm6 + "poivideotask/1/submitPoivideotask";//poi录像 保存
|
||||
|
||||
//172.23.139.4:8003/poivideotask/1/uploadpic
|
||||
public static final String POI_VIDEO_UPLOAD_PIC = IPm6 + "poivideotask/1/uploadpic";//poi录像-上传
|
||||
|
||||
//172.23.139.4:8003/roadtask/1/submitRoadtask?taskId=0&name=段哥&address=二娃&memo=1rn7exd5uhxy&workType=2
|
||||
public static final String ROAD_TASK_SUBMIT = IPm6+"roadtask/1/submitRoadtask";//道路录像-保存本地
|
||||
|
||||
//172.23.139.4:8003/roadtask/1/uploadpic
|
||||
public static final String ROAD_TASK_UPLOAD_PIC=IPm6+"roadtask/1/uploadpic";//道路录像—上传
|
||||
|
||||
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
||||
public static final String GET_PHONE = IPm6 + "m4/task/1/getPhone"; //任务搜索
|
||||
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
||||
@ -218,53 +189,39 @@ public class HttpInterface {
|
||||
public static final String C_TASK_UP_LOAD_PIC= IPm6+"ctask/1/uploadpic";//充电站-上传
|
||||
//172.23.139.4:8003/m4/task/1/taskName?geo=1rn7exd5uhxy&name=四维
|
||||
public static final String TASK_NAME = IPm6+"m4/task/1/taskName";//poi-查重
|
||||
|
||||
//172.23.139.4:8003/m4/task/1/getCommitList?type=2&pageSize=10&pageNum=1
|
||||
public static final String GET_COMMIT_LIST = IPm6+"m4/task/1/getCommitList";
|
||||
|
||||
public static final String IPm7 = "http://dtxbmaps.navinfo.com/dtxb/user";
|
||||
//172.23.139.4:8001/m4/userAuth/add
|
||||
public static final String USER_AUTH_ADD = IPm7 + "/userAuth/add"; //实名认证
|
||||
|
||||
public static final String IPm8 = "http://172.23.139.4:9999/m4/";
|
||||
//http://172.23.139.4:9999/m4/userlogin/oauth/token
|
||||
public static final String USER_LOGIN_OAUTH_TOKEN = IPm8 + "userlogin/oauth/token"; //登录
|
||||
|
||||
//http://172.21.91.160:8000/api/user/list
|
||||
//发现接口
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/msg_list?fid=1&pageNum=1&pageSize=2
|
||||
//能力测评接口
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/exam_content?id=11
|
||||
//http://172.23.139.4:8002/m4/findAndMessage/1/submitExam
|
||||
|
||||
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/m4/findAndMessage/1/";
|
||||
//发现:测试接口
|
||||
|
||||
public static final String listTask = IP1 + "msg_list";//任务专区
|
||||
public static final String listEvent = IP1 + "msg_list";//活动专区
|
||||
public static final String listTaskExplain = IP1 + "msg_list";//任务说明
|
||||
public static final String MSG_LISt = IP1 + "msg_list";//发现查询接口
|
||||
public static final String EXAM_CONTENT = IP1 + "exam_content";//发现 -能力测评获取试题接口
|
||||
public static final String EXAM_SUBMIT = IP1 + "submitExam";//发现 -能力测评提交试卷 post
|
||||
|
||||
|
||||
public static final String IPm4 = "http://dtxbmaps.navinfo.com/dtxb/user/m4";
|
||||
|
||||
public static final String MSG_CONTENT = IPm4 + "/1/msg_content";//发现 -富文本详情页请求
|
||||
|
||||
|
||||
//172.23.139.4:8001/m4/user/update
|
||||
public static final String USER_UPDATE = IPm4 + "/user/update";//用户资料
|
||||
//172.23.139.4:8001/m4/userBankcard/update
|
||||
public static final String USER_BANKCARD_UP_DATA = IPm4 + "/userBankcard/update"; //绑定银行卡
|
||||
|
||||
public static final String IPm5 = "http://dtxbmaps.navinfo.com/dtxb/price/";
|
||||
//http://172.23.139.4:8004/userPrice/1/getPrice
|
||||
public static final String GET_PRICE = IPm5 + "userPrice/1/getPrice";//我的-总资产
|
||||
//http://172.23.139.4:8004/userPrice/1/userPriceExchange?exchangeMoney=10&payType=1
|
||||
public static final String USER_PRICE_EXCHANGE = IPm5 + "userPrice/1/userPriceExchange";//我的-财务信息-提现
|
||||
|
||||
|
||||
public static final String IPm6 = "http://dtxbmaps.navinfo.com/dtxb/task/";
|
||||
//172.23.139.4:8003/m4/task/1/getList
|
||||
public static final String TASK_LIST = IPm6 + "m4/task/1/getList"; //任务搜索
|
||||
@ -292,16 +249,12 @@ public class HttpInterface {
|
||||
public static final String RECEIVED_POI_VIDEO_TASK = IPm6 + "poivideotask/1/receivedPoivideotask";//poi录像任务获取
|
||||
// 172.23.139.4:8003/poivideotask/1/submitPoivideotask
|
||||
public static final String INSIDE_API_LIST = IPm6 + "poivideotask/1/submitPoivideotask";//poi录像 保存
|
||||
|
||||
//172.23.139.4:8003/poivideotask/1/uploadpic
|
||||
public static final String POI_VIDEO_UPLOAD_PIC = IPm6 + "poivideotask/1/uploadpic";//poi录像-上传
|
||||
|
||||
//172.23.139.4:8003/roadtask/1/submitRoadtask?taskId=0&name=段哥&address=二娃&memo=1rn7exd5uhxy&workType=2
|
||||
public static final String ROAD_TASK_SUBMIT = IPm6+"roadtask/1/submitRoadtask";//道路录像-保存本地
|
||||
|
||||
//172.23.139.4:8003/roadtask/1/uploadpic
|
||||
public static final String ROAD_TASK_UPLOAD_PIC=IPm6+"roadtask/1/uploadpic";//道路录像—上传
|
||||
|
||||
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
||||
public static final String GET_PHONE = IPm6 + "m4/task/1/getPhone"; //任务搜索
|
||||
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
||||
@ -312,18 +265,14 @@ public class HttpInterface {
|
||||
public static final String C_TASK_UP_LOAD_PIC= IPm6+"ctask/1/uploadpic";//充电站-上传
|
||||
//172.23.139.4:8003/m4/task/1/taskName?geo=1rn7exd5uhxy&name=四维
|
||||
public static final String TASK_NAME = IPm6+"m4/task/1/taskName";//poi-查重
|
||||
|
||||
//172.23.139.4:8003/m4/task/1/getCommitList?type=2&pageSize=10&pageNum=1
|
||||
public static final String GET_COMMIT_LIST = IPm6+"m4/task/1/getCommitList";
|
||||
|
||||
public static final String IPm7 = "http://dtxbmaps.navinfo.com/dtxb/user";
|
||||
//172.23.139.4:8001/m4/userAuth/add
|
||||
public static final String USER_AUTH_ADD = IPm7 + "/userAuth/add"; //实名认证
|
||||
|
||||
public static final String IPm8 = "http://172.23.139.4:9999/m4/";
|
||||
//http://172.23.139.4:9999/m4/userlogin/oauth/token
|
||||
public static final String USER_LOGIN_OAUTH_TOKEN = IPm8 + "userlogin/oauth/token"; //登录
|
||||
|
||||
*面状任务
|
||||
public static final String RECEIVED_POLYGON_TASK = IPm6 + "polygonTask/1/receivedPolygontask"; //任务领取
|
||||
public static final String UNRECEIVED_POLYGON_TASK = IPm6 + "polygonTask/1/unReceivedPolygontask";//结束领取
|
||||
@ -332,8 +281,6 @@ public class HttpInterface {
|
||||
public static final String RECEIVED_POLYGON_TASK = IPm6 + "polygonTask/1/receivedPolygontask"; //任务领取
|
||||
public static final String COMPLETE = IPm6 + "polygonTask/1/complete";//任务采集
|
||||
public static final String SUBMIT_POLYGON_TASK = IPm6 + "polygonTask/1/submitPolygontask";//结束采集
|
||||
|
||||
|
||||
* */
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:background="@null"
|
||||
android:digits="1234567890"
|
||||
android:inputType="number"
|
||||
android:hint="11为手机号码"
|
||||
android:maxLength="11"
|
||||
android:paddingTop="10dp"
|
||||
@ -104,6 +104,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:hint="6为短信验证"
|
||||
android:inputType="number"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
|
@ -77,9 +77,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="11为手机号码"
|
||||
android:inputType="number"
|
||||
android:layout_marginLeft="35dp"
|
||||
style="@style/register_hint_style"
|
||||
android:digits="1234567890"
|
||||
android:maxLength="11"
|
||||
android:textColorHint="@color/colorTransparent"
|
||||
android:textCursorDrawable="@drawable/text_color"
|
||||
@ -110,6 +110,7 @@
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="6位短信验证"
|
||||
android:inputType="number"
|
||||
style="@style/register_hint_style"
|
||||
android:textColorHint="@color/colorTransparent"
|
||||
android:textCursorDrawable="@drawable/text_color"
|
||||
@ -183,6 +184,7 @@
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="6-20位密码"
|
||||
android:inputType="textPassword"
|
||||
style="@style/register_hint_style"
|
||||
android:maxLength="20"
|
||||
android:textColorHint="@color/colorTransparent"
|
||||
@ -215,6 +217,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请再次输入一遍密码"
|
||||
android:maxLength="20"
|
||||
android:inputType="textPassword"
|
||||
style="@style/register_hint_style"
|
||||
android:textColorHint="@color/colorTransparent"
|
||||
android:textCursorDrawable="@drawable/text_color"
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<external-files-path
|
||||
name="my_images"
|
||||
path="Android/data/com.navinfo.outdoor/files/Pictures" />
|
||||
</paths>
|
||||
<paths>
|
||||
<external-path path="Android/data/com.navinfo.outdoor/" name="files_root" />
|
||||
<external-path path="." name="external_storage_root" />
|
||||
</paths>
|
||||
|
Loading…
x
Reference in New Issue
Block a user