修改故障求助marker显示实现方式
修改自车图标设置实现
This commit is contained in:
@@ -31,12 +31,14 @@ import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.statusmanager.IMogoMsgCenter;
|
||||
import com.mogo.service.statusmanager.IMogoMsgCenterListener;
|
||||
import com.mogo.utils.DeviceIdUtils;
|
||||
import com.mogo.utils.digest.DigestUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
@@ -240,14 +242,17 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
}
|
||||
|
||||
private void requestCarModelList() {
|
||||
Map<String, String> params = new HashMap<>(8);
|
||||
params.put("sn", Utils.getSn());
|
||||
mNetWork.create(UserInfoNetApiServices.class, DztHttpConstant.getBaseUrl()).
|
||||
requestCarModelList().
|
||||
requestCarModelList(params).
|
||||
subscribeOn(Schedulers.io()).
|
||||
observeOn(Schedulers.io()).
|
||||
subscribe(new SubscribeImpl<CarModelListResponse>(RequestOptions.create(context)) {
|
||||
@Override
|
||||
public void onSuccess(CarModelListResponse o) {
|
||||
super.onSuccess(o);
|
||||
Logger.d(TAG, "请求车模列表成功: " + o);
|
||||
// todo 保存到sp中
|
||||
SharedPrefsMgr.getInstance(context).putString("CAR_MODEL_LIST",
|
||||
GsonUtil.jsonFromObject(o.getResult()));
|
||||
@@ -265,6 +270,7 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
|
||||
Logger.e(TAG, "请求自车模型失败: " + message);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,5 +25,5 @@ public interface UserInfoNetApiServices {
|
||||
Single<UserInfoResponse> requestUserInfo(@QueryMap Map<String, String> params);
|
||||
|
||||
@GET("carlife/carMachine/getAccountInfo")
|
||||
Observable<CarModelListResponse> requestCarModelList();
|
||||
Observable<CarModelListResponse> requestCarModelList(@QueryMap Map<String, String> params);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.mogo.module.extensions.userinfo;
|
||||
|
||||
import com.mogo.module.common.entity.OwnCarModelEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CarModelListInfo {
|
||||
private String sn;
|
||||
/**
|
||||
* 热心指数 eg: 1 1.5 2 2.5
|
||||
*/
|
||||
private float enthusiasmIndex;
|
||||
private List<OwnCarModelEntity> imageData;
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public float getEnthusiasmIndex() {
|
||||
return enthusiasmIndex;
|
||||
}
|
||||
|
||||
public void setEnthusiasmIndex(float enthusiasmIndex) {
|
||||
this.enthusiasmIndex = enthusiasmIndex;
|
||||
}
|
||||
|
||||
public List<OwnCarModelEntity> getImageData() {
|
||||
return imageData;
|
||||
}
|
||||
|
||||
public void setImageData(List<OwnCarModelEntity> imageData) {
|
||||
this.imageData = imageData;
|
||||
}
|
||||
}
|
||||
@@ -11,13 +11,13 @@ import java.util.List;
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class CarModelListResponse extends BaseData {
|
||||
private List<OwnCarModelEntity> result;
|
||||
private CarModelListInfo result;
|
||||
|
||||
public List<OwnCarModelEntity> getResult() {
|
||||
public CarModelListInfo getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(List<OwnCarModelEntity> result) {
|
||||
public void setResult(CarModelListInfo result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user