加密和url替换
This commit is contained in:
parent
e22a52e002
commit
834fce7065
app/src/main/java/com/navinfo/outdoor
adapter
api
base
fragment
CapacityEvaluationFragment2.javaChargingStationFragment.javaEventPrefectureFragment.javaFilterFragment.javaGatherGetFragment.javaIssueFragment.javaMessageFragment.javaMineFragment.javaOtherFragment.javaPoiFragment.javaPoiTaskFragment.javaPoiVideoFragment.javaRoadFragment.javaTaskExplainFragment.javaTaskExplainFragment2.javaTaskPrefectureFragment.javaTreasureFragment.javaWithdrawFragment.java
http
util
@ -19,16 +19,12 @@ import java.util.List;
|
||||
|
||||
public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHolder> {
|
||||
private Context context;
|
||||
private List<HasSubmitBean.BodyBean.ListBean> listBeans = new ArrayList<>();
|
||||
private List<HasSubmitBean.BodyBean.ListBean> listBeans ;
|
||||
|
||||
public PoiTaskAdapter(Context context) {
|
||||
|
||||
public PoiTaskAdapter(Context context, List<HasSubmitBean.BodyBean.ListBean> listBeans) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
public void setListBeans(List<HasSubmitBean.BodyBean.ListBean> listBeans) {
|
||||
this.listBeans.addAll(listBeans);
|
||||
notifyDataSetChanged();
|
||||
this.listBeans = listBeans;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -79,11 +79,11 @@ public class UserApplication extends Application {
|
||||
//builder.cookieJar(new CookieJarImpl(new MemoryCookieStore()));
|
||||
//超时时间设置,默认60秒
|
||||
//全局的读取超时时间
|
||||
builder.readTimeout(5000, TimeUnit.MILLISECONDS);
|
||||
builder.readTimeout(50000, TimeUnit.MILLISECONDS);
|
||||
//全局的写入超时时间
|
||||
builder.writeTimeout(5000, TimeUnit.MILLISECONDS);
|
||||
builder.writeTimeout(50000, TimeUnit.MILLISECONDS);
|
||||
//全局的连接超时时间
|
||||
builder.connectTimeout(5000, TimeUnit.MILLISECONDS);
|
||||
builder.connectTimeout(50000, TimeUnit.MILLISECONDS);
|
||||
OkGo.getInstance().init(this)
|
||||
.setOkHttpClient(builder.build())
|
||||
//全局统一缓存模式,默认不使用缓存,可以不传
|
||||
|
@ -32,6 +32,7 @@ public abstract class BaseFragment extends Fragment implements FragmentBackHandl
|
||||
|
||||
private AlertDialog alertDialog;
|
||||
public View mView;
|
||||
protected FragmentManager supportFragmentManager;
|
||||
|
||||
|
||||
@Nullable
|
||||
|
@ -9,6 +9,7 @@ import android.widget.Toast;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.adapter.CapacityItemAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
@ -90,6 +91,7 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
|
@ -608,6 +608,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
.url(HttpInterface.GET_PHONES)
|
||||
.params(new HttpParams("geo", encode))
|
||||
.cls(GetPhoneBean.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<GetPhoneBean>() {
|
||||
@Override
|
||||
@ -823,9 +824,12 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
|
||||
try {
|
||||
HttpParams httpParams=new HttpParams();
|
||||
httpParams.put("auditId",chargingPileEntity.getBodyId());
|
||||
Response execute = OkGoBuilder.getInstance().url(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.fileList(chargingPileFileList).postFileSynchronization((int) chargingPileEntity.getBodyId());
|
||||
.fileList(chargingPileFileList).postFileSynchronization();
|
||||
String pileUpLoadResultStr = execute.body().string();
|
||||
PoiUploadBean uploadBeanResult = new Gson().fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
||||
if (uploadBeanResult != null) {
|
||||
@ -1011,14 +1015,16 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
HttpParams httpParams=new HttpParams();
|
||||
httpParams.put("auditId",poiEntity.getBodyId());
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.C_TASK_UP_LOAD_PIC)
|
||||
.fileList(chargingStationList)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.cls(PoiUploadBean.class)
|
||||
.postFileAsynchronous(poiEntity.getBodyId(), new Callback<PoiUploadBean>() {
|
||||
.postFileAsynchronous( new Callback<PoiUploadBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiUploadBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
|
@ -68,7 +68,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
httpParams.put("pageSize", "10");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.listEvent)
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
|
@ -32,13 +32,15 @@ import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 筛选的Fragment
|
||||
* */
|
||||
*/
|
||||
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
private Button btnFilter;
|
||||
private XRecyclerView recyclerFilter;
|
||||
@ -144,7 +146,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
poiEntities = new ArrayList<>();
|
||||
|
||||
/* JobSearchBean jobSearchBean = (JobSearchBean) getArguments().getSerializable("body");//服务数据
|
||||
ArrayList<PoiEntity> showAllPoi = (ArrayList<PoiEntity>) getArguments().getSerializable("showAllPoi");//本地数据
|
||||
if (jobSearchBean != null) {
|
||||
@ -178,11 +180,12 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
public void onEvent(@NotNull Message data) {
|
||||
poiEntities = new ArrayList<>();
|
||||
poiEntities.clear();
|
||||
if (data.what == Constant.JOB_SEARCH_POI_WORD) {
|
||||
allPoi = (List<PoiEntity>) data.obj;
|
||||
} else if (data.what == Constant.JOB_SEARCH_WORD) {
|
||||
poiEntities.clear();
|
||||
JobSearchBean jobSearchBean = (JobSearchBean) data.obj;
|
||||
if (jobSearchBean != null) {
|
||||
List<JobSearchBean.BodyBean.ListBean> list = jobSearchBean.getBody().getList();
|
||||
@ -217,7 +220,6 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
poiEntities.addAll(allPoi);
|
||||
}
|
||||
filterAdapter.setAllPoi(poiEntities);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,7 +266,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
tvType = findViewById(R.id.tv_type);
|
||||
if (Constant.TASK_STASTUS == -1) {//"未领取", "已领取", "未保存", "已保存"
|
||||
tvType.setText("全部");
|
||||
}else if(Constant.TASK_STASTUS==0){
|
||||
} else if (Constant.TASK_STASTUS == 0) {
|
||||
tvType.setText("未领取");
|
||||
} else if (Constant.TASK_STASTUS == 1) {
|
||||
tvType.setText("已领取");
|
||||
|
@ -302,6 +302,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
.url(url + "/" + taskId)
|
||||
.cls(ReceivedBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.getRequest(new Callback<ReceivedBean>() {
|
||||
@Override
|
||||
public void onSuccess(ReceivedBean response, int id) {
|
||||
@ -417,6 +418,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
.url(url + "/" + taskId)
|
||||
.cls(PolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.getRequest(new Callback<PolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(PolygonTaskBean response, int id) {
|
||||
@ -494,6 +496,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
.url(url + "/" + taskId)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
@ -544,6 +547,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
.url(url + "/" + taskId)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
@ -640,6 +644,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
.Builder(getActivity())
|
||||
.url(url + "/" + taskId)
|
||||
.cls(ReceivedPoiBean.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<ReceivedPoiBean>() {
|
||||
@Override
|
||||
@ -749,6 +754,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
.Builder(getActivity())
|
||||
.url(url + "/" + taskId)
|
||||
.cls(TaskByNetBean.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskByNetBean>() {
|
||||
@Override
|
||||
|
@ -64,7 +64,7 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
httpParams.put("pageSize", "10");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.listTaskExplain)
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
|
@ -92,7 +92,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
httpParams.put("pageSize", "10");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.listTask)
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
|
@ -14,6 +14,7 @@ import android.widget.Toast;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.activity.UserActivity;
|
||||
@ -106,14 +107,19 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_PRICE)
|
||||
.cls(GetPriceBean.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<GetPriceBean>() {
|
||||
@Override
|
||||
public void onSuccess(GetPriceBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
// Toast.makeText(getContext(), "获取成功", Toast.LENGTH_SHORT).show();
|
||||
Double userPrice = response.getBody().getUserPrice();
|
||||
tvMoney.setText(userPrice + "");
|
||||
GetPriceBean.BodyBean body = response.getBody();
|
||||
if (body!=null){
|
||||
Double userPrice =body.getUserPrice();
|
||||
tvMoney.setText(userPrice + "");
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + response.toString() + "tttttttt");
|
||||
}
|
||||
|
||||
|
@ -469,13 +469,16 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
return;
|
||||
}
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams=new HttpParams();
|
||||
httpParams.put("auditId",body);
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.OTHER_TASK_UPLOAD_PIC)
|
||||
.fileList(otherUploadList)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.cls(PoiUploadBean.class)
|
||||
.postFileAsynchronous(body, new Callback<PoiUploadBean>() {
|
||||
.postFileAsynchronous( new Callback<PoiUploadBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiUploadBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
|
@ -450,6 +450,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
.url(HttpInterface.GET_PHONES)
|
||||
.params(new HttpParams("geo", encode))
|
||||
.cls(GetPhoneBean.class)
|
||||
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<GetPhoneBean>() {
|
||||
@Override
|
||||
@ -740,12 +741,15 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
return;
|
||||
}
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams=new HttpParams();
|
||||
httpParams.put("auditId",body);
|
||||
OkGoBuilder.getInstance()
|
||||
.url(HttpInterface.POI_TASK_UPLOAD_PIC)
|
||||
.cls(OtherUploadPicBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.fileList(poiPicList)
|
||||
.postFileAsynchronous(body, new Callback<OtherUploadPicBean>() {
|
||||
.params(httpParams)
|
||||
.postFileAsynchronous(new Callback<OtherUploadPicBean>() {
|
||||
@Override
|
||||
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
|
@ -26,6 +26,7 @@ import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.umeng.commonsdk.debug.D;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -37,6 +38,8 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
private int type;
|
||||
private PoiTaskAdapter poiTaskAdapter;
|
||||
private TextView tvTaskTitle;
|
||||
private int page=1;
|
||||
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
||||
|
||||
public static PoiTaskFragment newInstance(Bundle bundle) {
|
||||
PoiTaskFragment fragment = new PoiTaskFragment();
|
||||
@ -73,43 +76,40 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
ivPoiTaskFinish = (ImageView) findViewById(R.id.iv_poiTask_finish);
|
||||
ivPoiTaskFinish.setOnClickListener(this::onClick);
|
||||
poiTaskXrv = (XRecyclerView) findViewById(R.id.poiTask_xrv);
|
||||
poiTaskXrv.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
poiTaskXrv.addItemDecoration(new DividerItemDecoration(getContext(),DividerItemDecoration.VERTICAL));
|
||||
poiTaskXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
poiTaskXrv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
poiTaskXrv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//取消上拉加载,刷新功能。
|
||||
poiTaskXrv.setPullRefreshEnabled(false);
|
||||
poiTaskXrv.setLoadingMoreEnabled(false);
|
||||
poiTaskAdapter = new PoiTaskAdapter(getContext());
|
||||
poiTaskXrv.setAdapter(poiTaskAdapter);
|
||||
|
||||
poiTaskXrv.getDefaultFootView().setNoMoreHint("加载完毕");
|
||||
poiTaskXrv.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
|
||||
page = 1;
|
||||
initWork(type,true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
|
||||
initWork(type,false);
|
||||
}
|
||||
});
|
||||
poiTaskAdapter = new PoiTaskAdapter(getContext(), listBeans);
|
||||
poiTaskXrv.setAdapter(poiTaskAdapter);
|
||||
poiTaskXrv.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
type = getArguments().getInt("type", 0);
|
||||
initWork(type);
|
||||
listBeans = new ArrayList<>();
|
||||
initWork(type,true);
|
||||
}
|
||||
|
||||
private void initWork(int type) {
|
||||
private void initWork(int type, boolean aBoolean) {
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("type", type);
|
||||
httpParams.put("pageSize", "10");
|
||||
httpParams.put("pageNum", "2");
|
||||
httpParams.put("pageNum", page);
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_COMMIT_LIST)
|
||||
@ -120,11 +120,9 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
List<HasSubmitBean.BodyBean.ListBean> list = hasSubmitBean.getBody().getList();
|
||||
if (list!=null){
|
||||
poiTaskAdapter.setListBeans(list);
|
||||
if (hasSubmitBean.getBody()!=null){
|
||||
initHasSubmitBean(hasSubmitBean,aBoolean);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -137,6 +135,41 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
dismissDialog();
|
||||
}
|
||||
|
||||
private void initHasSubmitBean(HasSubmitBean hasSubmitBean, boolean aBoolean) {
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
if (aBoolean) {
|
||||
if (listBeans.size() > 0) {
|
||||
listBeans.clear();
|
||||
}
|
||||
if (hasSubmitBean.getBody().getList()== null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
listBeans.addAll(hasSubmitBean.getBody().getList());
|
||||
page++;
|
||||
}
|
||||
poiTaskAdapter.notifyDataSetChanged();
|
||||
poiTaskXrv.refreshComplete();
|
||||
} else {
|
||||
if (hasSubmitBean.getBody().getList() == null) {
|
||||
poiTaskXrv.setNoMore(true);
|
||||
} else {
|
||||
listBeans.addAll(hasSubmitBean.getBody().getList());
|
||||
poiTaskAdapter.notifyDataSetChanged();
|
||||
poiTaskXrv.loadMoreComplete();
|
||||
page++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "" + hasSubmitBean.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
|
@ -443,6 +443,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("auditId", poiVideoBody);
|
||||
long time=System.currentTimeMillis();
|
||||
httpParams.put("datetime",time);
|
||||
httpParams.put("file", fileZip);
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
|
@ -423,6 +423,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("auditId", body);
|
||||
long time=System.currentTimeMillis();
|
||||
httpParams.put("datetime",time);
|
||||
httpParams.put("file", fileZip);
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
|
@ -103,7 +103,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
httpParams.put("pageSize", "10");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.listTaskExplain)
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
|
@ -10,6 +10,7 @@ import android.widget.Toast;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
|
||||
import com.navinfo.outdoor.activity.WebActivity;
|
||||
@ -97,8 +98,9 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.listTaskExplain)
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskExplainInfo.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskExplainInfo>() {
|
||||
@Override
|
||||
|
@ -104,7 +104,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
httpParams.put("pageSize", "2");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.listTask)
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -92,6 +92,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
.url(HttpInterface.GET_PRICE)
|
||||
.cls(GetPriceBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.getRequest(new Callback<GetPriceBean>() {
|
||||
@Override
|
||||
public void onSuccess(GetPriceBean response, int id) {
|
||||
|
@ -1,126 +1,307 @@
|
||||
package com.navinfo.outdoor.http;
|
||||
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
|
||||
public class HttpInterface {
|
||||
|
||||
//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
|
||||
/**
|
||||
* - Path=/m4/user/**
|
||||
* - Path=/m4/msgList/**
|
||||
* - Path=/m4/userlogin/**
|
||||
* - Path=/m4/price/**
|
||||
* - Path=/m4/task/**
|
||||
*/
|
||||
|
||||
public static final String IP="http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||
/**
|
||||
* 用户
|
||||
*
|
||||
*/
|
||||
|
||||
//发现:测试接口
|
||||
public static final String USER_PATH="/user/";//我的
|
||||
public static final String MSG_LIST_PATH="/msgList/";//发现
|
||||
public static final String USER_LOGIN_PATH="/userlogin/";//登录
|
||||
public static final String PRICE_PATH="/price/";//提现
|
||||
public static final String TASK_PATH="/task/";//任务
|
||||
public static final String USERID= Constant.USERID;
|
||||
/**
|
||||
* 我的
|
||||
* Path=/m4/user/*
|
||||
*/
|
||||
public static final String MSG_CONTENT = IP +USER_PATH+ "user/m4"+USERID+"/msg_content";//发现 -富文本详情页请求
|
||||
//172.23.139.4:8001/m4/user/update
|
||||
public static final String USER_UPDATE =IP +USER_PATH+ "user/m4/user/update";//用户资料
|
||||
//172.23.139.4:8001/m4/userBankcard/update
|
||||
public static final String USER_BANKCARD_UP_DATA =IP +USER_PATH+ "user/m4/userBankcard/update"; //绑定银行卡
|
||||
//172.23.139.4:8001/m4/userAuth/add
|
||||
public static final String USER_AUTH_ADD = IP+USER_PATH+ "userAuth/add"; //实名认证
|
||||
/**
|
||||
* 发现
|
||||
* 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";//任务说明
|
||||
//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";//发现查询接口
|
||||
//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";//发现 -能力测评获取试题接口
|
||||
//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
|
||||
/**
|
||||
* 登录
|
||||
* Path=/m4/userlogin/**
|
||||
*/
|
||||
//http://172.23.139.4:9999/m4/userlogin/oauth/token
|
||||
public static final String USER_LOGIN_OAUTH_TOKEN = IP +USER_LOGIN_PATH+ "oauth/token"; //登录接口
|
||||
/**
|
||||
* 提现 金额
|
||||
* Path=/m4/userlogin/**
|
||||
* Path=/m4/price/**
|
||||
*/
|
||||
//http://172.23.139.4:8004/userPrice/1/getPrice
|
||||
public static final String GET_PRICE = IP +PRICE_PATH+ "userPrice/"+USERID+"/getPrice";//我的-总资产
|
||||
//http://172.23.139.4:8004/userPrice/1/userPriceExchange?exchangeMoney=10&payType=1
|
||||
public static final String USER_PRICE_EXCHANGE =IP +PRICE_PATH+ "userPrice/"+USERID+"/userPriceExchange";//我的-财务信息-提现
|
||||
/**
|
||||
* 任务 -
|
||||
* 任务
|
||||
*Path=/m4/task/**
|
||||
*/
|
||||
|
||||
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
|
||||
// dtxbmaps.navinfo.com/dtxb/m4/price/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
|
||||
// dtxbmaps.navinfo.com/dtxb/m4/task/m4/task/1/getList
|
||||
public static final String TASK_LIST = IPm6 + "m4/task/1/getList"; //任务搜索
|
||||
public static final String TASK_LIST = IP+TASK_PATH + "m4/task/"+USERID+"/getList"; //任务搜索
|
||||
//172.23.139.4:8003/othertask/1/receivedOthertask
|
||||
public static final String RECEIVED_OTHER_TASK = IPm6 + "othertask/1/receivedOthertask";//其他-领取任务
|
||||
public static final String RECEIVED_OTHER_TASK = IP+TASK_PATH + "othertask/"+USERID+"/receivedOthertask";//其他-领取任务
|
||||
//172.23.139.4:8003/poitask/1/receivedPoitask/1
|
||||
public static final String RECEIVED_POI_TASK = IPm6 + "poitask/1/receivedPoitask";//poi-领取任务
|
||||
public static final String RECEIVED_POI_TASK = IP+TASK_PATH + "poitask/"+USERID+"/receivedPoitask";//poi-领取任务
|
||||
//172.23.139.4:8003/poitask/1/submitPoitask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注...33.
|
||||
public static final String SUBMIT_POI_TASK = IPm6 + "poitask/1/submitPoitask";//poi-保存本地
|
||||
public static final String SUBMIT_POI_TASK = IP+TASK_PATH + "poitask/"+USERID+"/submitPoitask";//poi-保存本地
|
||||
//172.23.139.4:8003/othertask/1/submitOhtertask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注
|
||||
public static final String SUBMIT_OTHER_TASK = IPm6 + "othertask/1/submitOthertask";//其他-保存本地
|
||||
public static final String SUBMIT_OTHER_TASK = IP+TASK_PATH + "othertask/"+USERID+"/submitOthertask";//其他-保存本地
|
||||
//172.23.139.4:8003/othertask/1/uploadpic
|
||||
public static final String OTHER_TASK_UPLOAD_PIC = IPm6 + "othertask/1/uploadpic";//其他-上传
|
||||
public static final String OTHER_TASK_UPLOAD_PIC = IP+TASK_PATH + "othertask/"+USERID+"/uploadpic";//其他-上传
|
||||
//172.23.139.4:8003/ctask/1/receivedCtask/8608
|
||||
public static final String RECEIVED_CTASK = IPm6 + "ctask/1/receivedCtask";//充电站-领取任务
|
||||
public static final String RECEIVED_CTASK = IP+TASK_PATH + "ctask/"+USERID+"/receivedCtask";//充电站-领取任务
|
||||
//172.23.139.4:8003/ctask/1/submitCtask?id=8608&name=充电站&address=地址&telephone=18812345678|14712345678&geo=1rn7exd5uhxy&memo=测试备注&sptype=1
|
||||
public static final String SUBMIT_CTASK = IPm6 + "ctask/1/submitCtask";//充电站-保存本地
|
||||
public static final String SUBMIT_CTASK = IP+TASK_PATH + "ctask/"+USERID+"/submitCtask";//充电站-保存本地
|
||||
//172.23.139.4:8003/cstask/1/submitCstask?taskId=0&name=充电站&geo=1rn7exd5uhxy&memo=测试备注&sptype=1&ffid=104&existence=1&detail={"cp_openType":"1,2","cp_floor":1,"cp_availableState":0,"sign_exist":0}
|
||||
public static final String SUBMIT_CSTASK = IPm6 + "cstask/1/submitCstask";//充电桩保存
|
||||
public static final String SUBMIT_CSTASK = IP+TASK_PATH + "cstask/"+USERID+"/submitCstask";//充电桩保存
|
||||
//172.23.139.4:8003/poitask/1/uploadpic
|
||||
public static final String POI_TASK_UPLOAD_PIC = IPm6 + "poitask/1/uploadpic";//poi-上传
|
||||
public static final String POI_TASK_UPLOAD_PIC = IP+TASK_PATH + "poitask/"+USERID+"/uploadpic";//poi-上传
|
||||
//172.23.139.4:8003/roadtask/1/receivedRoadtask/8569
|
||||
public static final String RECEIVED_ROAD_TASK = IPm6 + "roadtask/1/receivedRoadtask";//道路任务获取
|
||||
public static final String RECEIVED_ROAD_TASK = IP+TASK_PATH + "roadtask/"+USERID+"/receivedRoadtask";//道路任务获取
|
||||
//172.23.139.4:8003/poivideotask/1/receivedPoivideotask/8569
|
||||
public static final String RECEIVED_POI_VIDEO_TASK = IPm6 + "poivideotask/1/receivedPoivideotask";//poi录像任务获取
|
||||
public static final String RECEIVED_POI_VIDEO_TASK = IP+TASK_PATH + "poivideotask/"+USERID+"/receivedPoivideotask";//poi录像任务获取
|
||||
// 172.23.139.4:8003/poivideotask/1/submitPoivideotask
|
||||
public static final String INSIDE_API_LIST = IPm6 + "poivideotask/1/submitPoivideotask";//poi录像 保存
|
||||
public static final String INSIDE_API_LIST = IP+TASK_PATH + "poivideotask/"+USERID+"/submitPoivideotask";//poi录像 保存
|
||||
//172.23.139.4:8003/poivideotask/1/uploadpic
|
||||
public static final String POI_VIDEO_UPLOAD_PIC = IPm6 + "poivideotask/1/uploadpic";//poi录像-上传
|
||||
public static final String POI_VIDEO_UPLOAD_PIC = IP+TASK_PATH + "poivideotask/"+USERID+"/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";//道路录像-保存本地
|
||||
public static final String ROAD_TASK_SUBMIT = IP+TASK_PATH +"roadtask/"+USERID+"/submitRoadtask";//道路录像-保存本地
|
||||
//172.23.139.4:8003/roadtask/1/uploadpic
|
||||
public static final String ROAD_TASK_UPLOAD_PIC=IPm6+"roadtask/1/uploadpic";//道路录像—上传
|
||||
public static final String ROAD_TASK_UPLOAD_PIC= IP+TASK_PATH +"roadtask/"+USERID+"/uploadpic";//道路录像—上传
|
||||
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
||||
public static final String GET_PHONES = IPm6 + "m4/task/1/getPhone";//电话区号和电话位数
|
||||
public static final String GET_PHONES = IP+TASK_PATH + "m4/task/"+USERID+"/getPhone";//电话区号和电话位数
|
||||
//172.23.139.4:8003/cstask/1/uploadpic
|
||||
public static final String CS_TASK_UP_LOAD_PIC = IPm6 + "cstask/1/uploadpic";//充电桩-上传
|
||||
public static final String CS_TASK_UP_LOAD_PIC = IP+TASK_PATH + "cstask/"+USERID+"/uploadpic";//充电桩-上传
|
||||
//172.23.139.4:8003/ctask/1/uploadpic
|
||||
public static final String C_TASK_UP_LOAD_PIC= IPm6+"ctask/1/uploadpic";//充电站-上传
|
||||
public static final String C_TASK_UP_LOAD_PIC= IP+TASK_PATH +"ctask/"+USERID+"/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-查重
|
||||
public static final String TASK_NAME = IP+TASK_PATH +"m4/task/"+USERID+"/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 GET_COMMIT_LIST = IP+TASK_PATH +"m4/task/"+USERID+"/getCommitList";
|
||||
public static final String RECEIVED_POLYGON_TASK = IP+TASK_PATH + "polygonTask/"+USERID+"/receivedPolygontask"; //面状任务任务领取
|
||||
//172.23.139.4:8003/m4/task/1/unReceivedTask?taskIds=&auditIds=214,278 取消领取的接口
|
||||
public static final String UNRECEIVED_POLYGON_TASK = IP+TASK_PATH + "m4/task/"+USERID+"/unReceivedTask";//面状任务结束领取
|
||||
public static final String COMPLETE = IP+TASK_PATH + "polygonTask/"+USERID+"/complete";//面状任务任务采集
|
||||
public static final String SUBMIT_POLYGON_TASK = IP+TASK_PATH + "polygonTask/"+USERID+"/submitPolygontask";//面状任务结束采集
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
//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"; //任务搜索
|
||||
//172.23.139.4:8003/othertask/1/receivedOthertask
|
||||
public static final String RECEIVED_OTHER_TASK = IPm6 + "othertask/1/receivedOthertask";//其他-领取任务
|
||||
//172.23.139.4:8003/poitask/1/receivedPoitask/1
|
||||
public static final String RECEIVED_POI_TASK = IPm6 + "poitask/1/receivedPoitask";//poi-领取任务
|
||||
//172.23.139.4:8003/poitask/1/submitPoitask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注
|
||||
public static final String SUBMIT_POI_TASK = IPm6 + "poitask/1/submitPoitask";//poi-保存本地
|
||||
//172.23.139.4:8003/othertask/1/submitOhtertask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注
|
||||
public static final String SUBMIT_OTHER_TASK = IPm6 + "othertask/1/submitOthertask";//其他-保存本地
|
||||
//172.23.139.4:8003/othertask/1/uploadpic
|
||||
public static final String OTHER_TASK_UPLOAD_PIC = IPm6 + "othertask/1/uploadpic";//其他-上传
|
||||
//172.23.139.4:8003/ctask/1/receivedCtask/8608
|
||||
public static final String RECEIVED_CTASK = IPm6 + "ctask/1/receivedCtask";//充电站-领取任务
|
||||
//172.23.139.4:8003/ctask/1/submitCtask?id=8608&name=充电站&address=地址&telephone=18812345678|14712345678&geo=1rn7exd5uhxy&memo=测试备注&sptype=1
|
||||
public static final String SUBMIT_CTASK = IPm6 + "ctask/1/submitCtask";//充电站-保存本地
|
||||
//172.23.139.4:8003/cstask/1/submitCstask?taskId=0&name=充电站&geo=1rn7exd5uhxy&memo=测试备注&sptype=1&ffid=104&existence=1&detail={"cp_openType":"1,2","cp_floor":1,"cp_availableState":0,"sign_exist":0}
|
||||
public static final String SUBMIT_CSTASK = IPm6 + "cstask/1/submitCstask";//充电桩保存
|
||||
//172.23.139.4:8003/poitask/1/uploadpic
|
||||
public static final String POI_TASK_UPLOAD_PIC = IPm6 + "poitask/1/uploadpic";//poi-上传
|
||||
//172.23.139.4:8003/roadtask/1/receivedRoadtask/8569
|
||||
public static final String RECEIVED_ROAD_TASK = IPm6 + "roadtask/1/receivedRoadtask";//道路任务获取
|
||||
//172.23.139.4:8003/poivideotask/1/receivedPoivideotask/8569
|
||||
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
|
||||
public static final String GET_PHONES = IPm6 + "m4/task/1/getPhone";//电话区号和电话位数
|
||||
//172.23.139.4:8003/cstask/1/uploadpic
|
||||
public static final String CS_TASK_UP_LOAD_PIC = IPm6 + "cstask/1/uploadpic";//充电桩-上传
|
||||
//172.23.139.4:8003/ctask/1/uploadpic
|
||||
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"; //任务搜索
|
||||
//172.23.139.4:8003/othertask/1/receivedOthertask
|
||||
public static final String RECEIVED_OTHER_TASK = IPm6 + "othertask/1/receivedOthertask";//其他-领取任务
|
||||
//172.23.139.4:8003/poitask/1/receivedPoitask/1
|
||||
public static final String RECEIVED_POI_TASK = IPm6 + "poitask/1/receivedPoitask";//poi-领取任务
|
||||
//172.23.139.4:8003/poitask/1/submitPoitask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注
|
||||
public static final String SUBMIT_POI_TASK = IPm6 + "poitask/1/submitPoitask";//poi-保存本地
|
||||
//172.23.139.4:8003/othertask/1/submitOhtertask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注
|
||||
public static final String SUBMIT_OTHER_TASK = IPm6 + "othertask/1/submitOthertask";//其他-保存本地
|
||||
//172.23.139.4:8003/othertask/1/uploadpic
|
||||
public static final String OTHER_TASK_UPLOAD_PIC = IPm6 + "othertask/1/uploadpic";//其他-上传
|
||||
//172.23.139.4:8003/ctask/1/receivedCtask/8608
|
||||
public static final String RECEIVED_CTASK = IPm6 + "ctask/1/receivedCtask";//充电站-领取任务
|
||||
//172.23.139.4:8003/ctask/1/submitCtask?id=8608&name=充电站&address=地址&telephone=18812345678|14712345678&geo=1rn7exd5uhxy&memo=测试备注&sptype=1
|
||||
public static final String SUBMIT_CTASK = IPm6 + "ctask/1/submitCtask";//充电站-保存本地
|
||||
//172.23.139.4:8003/cstask/1/submitCstask?taskId=0&name=充电站&geo=1rn7exd5uhxy&memo=测试备注&sptype=1&ffid=104&existence=1&detail={"cp_openType":"1,2","cp_floor":1,"cp_availableState":0,"sign_exist":0}
|
||||
public static final String SUBMIT_CSTASK = IPm6 + "cstask/1/submitCstask";//充电桩保存
|
||||
//172.23.139.4:8003/poitask/1/uploadpic
|
||||
public static final String POI_TASK_UPLOAD_PIC = IPm6 + "poitask/1/uploadpic";//poi-上传
|
||||
//172.23.139.4:8003/roadtask/1/receivedRoadtask/8569
|
||||
public static final String RECEIVED_ROAD_TASK = IPm6 + "roadtask/1/receivedRoadtask";//道路任务获取
|
||||
//172.23.139.4:8003/poivideotask/1/receivedPoivideotask/8569
|
||||
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
|
||||
public static final String GET_PHONES = IPm6 + "m4/task/1/getPhone";//电话区号和电话位数
|
||||
//172.23.139.4:8003/cstask/1/uploadpic
|
||||
public static final String CS_TASK_UP_LOAD_PIC = IPm6 + "cstask/1/uploadpic";//充电桩-上传
|
||||
//172.23.139.4:8003/ctask/1/uploadpic
|
||||
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";//结束领取
|
||||
public static final String COMPLETE = IPm6 + "polygonTask/1/complete";//任务采集
|
||||
public static final String SUBMIT_POLYGON_TASK = IPm6 + "polygonTask/1/submitPolygontask";//结束采集
|
||||
public static final String RECEIVED_POLYGON_TASK = IPm6 + "polygonTask/1/receivedPolygontask"; //任务领取
|
||||
public static final String UNRECEIVED_POLYGON_TASK = IPm6 + "polygonTask/1/unReceivedPolygontask";//结束领取
|
||||
public static final String COMPLETE = IPm6 + "polygonTask/1/complete";//任务采集
|
||||
public static final String SUBMIT_POLYGON_TASK = IPm6 + "polygonTask/1/submitPolygontask";//结束采集
|
||||
|
||||
|
||||
* */
|
||||
}
|
||||
|
@ -120,40 +120,41 @@ public class OkGoBuilder<T> {
|
||||
* post异步请求
|
||||
*/
|
||||
public void postRequest(Callback<T> callback) {
|
||||
OkGo
|
||||
// 请求方式和请求url
|
||||
.<T>post(url)
|
||||
.isMultipart(true)
|
||||
.params(params)
|
||||
OkGo
|
||||
// 请求方式和请求url
|
||||
.<T>post(url)
|
||||
.isMultipart(true)
|
||||
.headers(getHeader())
|
||||
.params(params)
|
||||
// .upJson(json)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.tag(this)
|
||||
.headers(getHeader())
|
||||
// 设置当前请求的缓存key,建议每个不同功能的请求设置一个
|
||||
// .cacheKey("cacheKey")
|
||||
// 缓存模式,详细请看缓存介绍
|
||||
// .cacheMode(CacheMode.DEFAULT)
|
||||
.execute(new DialogCallback<T>(clazz) {
|
||||
@Override
|
||||
public void onSuccess(Response<T> response) {
|
||||
callback.onSuccess(response.body(), 1);
|
||||
}
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.tag(this)
|
||||
|
||||
@Override
|
||||
public void onError(Response<T> response) {
|
||||
super.onError(response);
|
||||
Throwable throwable = response.getException();
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
callback.onError(throwable, 2);
|
||||
/**
|
||||
* 友盟+
|
||||
* 使用自定义错误,查看时请在错误列表页面选择【自定义异常】
|
||||
*/
|
||||
UMCrash.generateCustomLog("网络请求报错-位置:OKGOBuilder" + throwable, "UmengException");
|
||||
}
|
||||
// 设置当前请求的缓存key,建议每个不同功能的请求设置一个
|
||||
// .cacheKey("cacheKey")
|
||||
// 缓存模式,详细请看缓存介绍
|
||||
// .cacheMode(CacheMode.DEFAULT)
|
||||
.execute(new DialogCallback<T>(clazz) {
|
||||
@Override
|
||||
public void onSuccess(Response<T> response) {
|
||||
callback.onSuccess(response.body(), 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<T> response) {
|
||||
super.onError(response);
|
||||
Throwable throwable = response.getException();
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
callback.onError(throwable, 2);
|
||||
/**
|
||||
* 友盟+
|
||||
* 使用自定义错误,查看时请在错误列表页面选择【自定义异常】
|
||||
*/
|
||||
UMCrash.generateCustomLog("网络请求报错-位置:OKGOBuilder" + throwable, "UmengException");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@ -163,7 +164,7 @@ public class OkGoBuilder<T> {
|
||||
if (token == null) {
|
||||
headers.put("Authorization", "Basic YXBwOmFwcHNlY3JldA==");
|
||||
} else {
|
||||
headers.put("Authorization", "bearer" + token);
|
||||
headers.put("Authorization", "bearer " + token);
|
||||
}
|
||||
String util = "";//k1=v1&k2=v2&k3=v3
|
||||
if (params != null && params.urlParamsMap != null) {
|
||||
@ -187,18 +188,21 @@ public class OkGoBuilder<T> {
|
||||
/**
|
||||
* post 文件 同步请求
|
||||
*
|
||||
* @param id
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public okhttp3.Response postFileSynchronization(int id) {
|
||||
public okhttp3.Response postFileSynchronization() {
|
||||
long time = System.currentTimeMillis();
|
||||
params.put("datetime", time);
|
||||
try {
|
||||
okhttp3.Response execute = OkGo
|
||||
// 请求方式和请求url
|
||||
.<PoiUploadBean>post(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.params("auditId", id)
|
||||
.addFileParams("file", files)
|
||||
.<PoiUploadBean>post(url)
|
||||
.headers(getHeader())
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.params(params)
|
||||
.addFileParams("file", files)
|
||||
|
||||
.tag(this)
|
||||
.execute();
|
||||
return execute;
|
||||
@ -212,18 +216,19 @@ public class OkGoBuilder<T> {
|
||||
/**
|
||||
* post 文件 异步请求
|
||||
*
|
||||
* @param id
|
||||
* @param
|
||||
* @param callback
|
||||
* @return
|
||||
*/
|
||||
public void postFileAsynchronous(int id, Callback callback) {
|
||||
|
||||
public void postFileAsynchronous(Callback callback) {
|
||||
long time = System.currentTimeMillis();
|
||||
params.put("datetime", time);
|
||||
OkGo
|
||||
// 请求方式和请求url
|
||||
.<T>post(url)
|
||||
.params("auditId", id)
|
||||
.addFileParams("file", files)
|
||||
.headers(getHeader())
|
||||
.params(params)
|
||||
.addFileParams("file", files)
|
||||
// .upJson(json)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.tag(this)
|
||||
@ -259,33 +264,35 @@ public class OkGoBuilder<T> {
|
||||
* get异步请求
|
||||
*/
|
||||
public void getRequest(Callback<T> callback) {
|
||||
OkGo
|
||||
// 请求方式和请求url
|
||||
.<T>get(url)
|
||||
.params(params)
|
||||
.headers(getHeader())
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.tag(this)
|
||||
// 设置当前请求的缓存key,建议每个不同功能的请求设置一个
|
||||
long time = System.currentTimeMillis();
|
||||
params.put("datetime", time);
|
||||
OkGo
|
||||
// 请求方式和请求url
|
||||
.<T>get(url)
|
||||
.headers(getHeader())
|
||||
.params(params)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.tag(this)
|
||||
// 设置当前请求的缓存key,建议每个不同功能的请求设置一个
|
||||
// .cacheKey("cacheKey")
|
||||
// 缓存模式,详细请看缓存介绍
|
||||
// 缓存模式,详细请看缓存介绍
|
||||
// .cacheMode(CacheMode.DEFAULT)
|
||||
.execute(new DialogCallback<T>(clazz) {
|
||||
@Override
|
||||
public void onSuccess(Response<T> response) {
|
||||
callback.onSuccess(response.body(), 1);
|
||||
}
|
||||
.execute(new DialogCallback<T>(clazz) {
|
||||
@Override
|
||||
public void onSuccess(Response<T> response) {
|
||||
callback.onSuccess(response.body(), 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<T> response) {
|
||||
super.onError(response);
|
||||
Throwable throwable = response.getException();
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
callback.onError(throwable, 2);
|
||||
}
|
||||
@Override
|
||||
public void onError(Response<T> response) {
|
||||
super.onError(response);
|
||||
Throwable throwable = response.getException();
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
callback.onError(throwable, 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@ -295,10 +302,12 @@ public class OkGoBuilder<T> {
|
||||
* @return
|
||||
*/
|
||||
public okhttp3.Response getSynchronization() {
|
||||
long time = System.currentTimeMillis();
|
||||
params.put("datetime", time);
|
||||
try {
|
||||
okhttp3.Response execute = OkGo.<String>get(HttpInterface.SUBMIT_CSTASK)
|
||||
.params(params)
|
||||
okhttp3.Response execute = OkGo.<String>get(url)
|
||||
.headers(getHeader())
|
||||
.params(params)
|
||||
.tag(this)
|
||||
.execute();
|
||||
return execute;
|
||||
|
@ -175,6 +175,7 @@ public class PoiSaveUtils {
|
||||
}
|
||||
try {
|
||||
Response execute = OkGoBuilder.getInstance().url(url)
|
||||
.Builder(mContext)
|
||||
.token(Constant.ACCESS_TOKEN).params(httpParams).getSynchronization();
|
||||
if (execute.code() != 200) {
|
||||
return execute.code();
|
||||
@ -266,9 +267,14 @@ public class PoiSaveUtils {
|
||||
url = HttpInterface.OTHER_TASK_UPLOAD_PIC;
|
||||
}
|
||||
try {
|
||||
Response execute = OkGoBuilder.getInstance().url(url)
|
||||
HttpParams httpParams=new HttpParams();
|
||||
httpParams.put("auditId",bodyId);
|
||||
Response execute = OkGoBuilder.getInstance()
|
||||
.Builder(mContext)
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.fileList(photoFile).postFileSynchronization(bodyId);
|
||||
.fileList(photoFile).postFileSynchronization();
|
||||
if (execute.code() != 200) {
|
||||
return;
|
||||
}
|
||||
@ -356,7 +362,9 @@ public class PoiSaveUtils {
|
||||
hashMap.put("sign_exist", chargingPileEntity.getSign_exist());
|
||||
httpParams.put("detail", String.valueOf(hashMap));
|
||||
try {
|
||||
Response execute = OkGoBuilder.getInstance().url(HttpInterface.SUBMIT_CSTASK)
|
||||
Response execute = OkGoBuilder.getInstance()
|
||||
.Builder(mContext)
|
||||
.url(HttpInterface.SUBMIT_CSTASK)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams).getSynchronization();
|
||||
if (execute.code() != 200) {
|
||||
@ -424,9 +432,14 @@ public class PoiSaveUtils {
|
||||
}
|
||||
|
||||
try {
|
||||
Response execute = OkGoBuilder.getInstance().url(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
||||
HttpParams httpParams=new HttpParams();
|
||||
httpParams.put("auditId",chargingPileEntity.getBodyId());
|
||||
Response execute = OkGoBuilder.getInstance()
|
||||
.Builder(mContext)
|
||||
.url(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.fileList(chargingPileFileList).postFileSynchronization((int) chargingPileEntity.getBodyId());
|
||||
.params(httpParams)
|
||||
.fileList(chargingPileFileList).postFileSynchronization();
|
||||
if (execute.code() != 200) {
|
||||
return execute.code();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user