首页设备列表
This commit is contained in:
@@ -1,114 +1,114 @@
|
||||
package com.ckkj.water.plate;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ckkj.water.AppConfig;
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseFragment;
|
||||
import com.ckkj.water.databinding.PlateFragmentBinding;
|
||||
import com.ckkj.water.login.LoginActivity;
|
||||
import com.ckkj.water.network.BaseBean;
|
||||
import com.ckkj.water.plate.adapter.ViewPagerAdapter;
|
||||
import com.ckkj.water.plate.entity.BaziResultBean;
|
||||
import com.ckkj.water.plate.entity.BaziSaveSuccessEntity;
|
||||
import com.ckkj.water.plate.entity.PaipanHistoryEntity;
|
||||
import com.ckkj.water.plate.mvp.PlateContract;
|
||||
import com.ckkj.water.plate.mvp.PlateImpl;
|
||||
import com.ckkj.water.plate.mvp.PlatePresenter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author fengxiaoyang
|
||||
* @date 2025/7/30
|
||||
* @description TODO: 排盘页面
|
||||
*/
|
||||
|
||||
public class PlateFragment extends BaseFragment<PlateFragmentBinding, PlatePresenter>
|
||||
implements PlateContract.PlateView {
|
||||
private List<Fragment> mFragmentList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public PlatePresenter createPresenter() {
|
||||
return new PlatePresenter(new PlateImpl());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle state) {
|
||||
viewBinding.includedTitle.imgBack.setVisibility(View.GONE);
|
||||
viewBinding.includedTitle.tvTitle.setText("信息录入");
|
||||
ViewPagerAdapter adapter = new ViewPagerAdapter(this, mFragmentList);
|
||||
viewBinding.viewpage.setAdapter(adapter);
|
||||
viewBinding.tvPaipan.setSelected(true);
|
||||
viewBinding.viewpage.setCurrentItem(0);
|
||||
//viewpage2 特有的 api,禁止滑动
|
||||
viewBinding.viewpage.setUserInputEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onNetChange(int netModel) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getPaipanResult(BaziResultBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveBaziResultSuccess(BaziSaveSuccessEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getHistorySuccess(PaipanHistoryEntity entity) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePaipanHistorySuccess(int pos) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStreamMessageReceived(String messageChunk) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStreamComplete(String complateMsg) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commitReportSuccess(BaseBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionsGranted(int requestCode, @NonNull List<String> perms) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
|
||||
|
||||
}
|
||||
}
|
||||
//package com.ckkj.water.plate;
|
||||
//
|
||||
//import android.os.Bundle;
|
||||
//import android.view.View;
|
||||
//
|
||||
//import androidx.annotation.NonNull;
|
||||
//import androidx.fragment.app.Fragment;
|
||||
//
|
||||
//import com.ckkj.water.AppConfig;
|
||||
//import com.ckkj.water.R;
|
||||
//import com.ckkj.water.base.BaseFragment;
|
||||
//import com.ckkj.water.databinding.PlateFragmentBinding;
|
||||
//import com.ckkj.water.login.LoginActivity;
|
||||
//import com.ckkj.water.network.BaseBean;
|
||||
//import com.ckkj.water.plate.adapter.ViewPagerAdapter;
|
||||
//import com.ckkj.water.plate.entity.BaziResultBean;
|
||||
//import com.ckkj.water.plate.entity.BaziSaveSuccessEntity;
|
||||
//import com.ckkj.water.plate.entity.PaipanHistoryEntity;
|
||||
//import com.ckkj.water.plate.mvp.PlateContract;
|
||||
//import com.ckkj.water.plate.mvp.PlateImpl;
|
||||
//import com.ckkj.water.plate.mvp.PlatePresenter;
|
||||
//
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @author fengxiaoyang
|
||||
// * @date 2025/7/30
|
||||
// * @description TODO: 排盘页面
|
||||
// */
|
||||
//
|
||||
//public class PlateFragment extends BaseFragment<PlateFragmentBinding, PlatePresenter>
|
||||
// implements PlateContract.PlateView {
|
||||
// private List<Fragment> mFragmentList = new ArrayList<>();
|
||||
//
|
||||
// @Override
|
||||
// public PlatePresenter createPresenter() {
|
||||
// return new PlatePresenter(new PlateImpl());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void initData(Bundle state) {
|
||||
// viewBinding.includedTitle.imgBack.setVisibility(View.GONE);
|
||||
// viewBinding.includedTitle.tvTitle.setText("信息录入");
|
||||
// ViewPagerAdapter adapter = new ViewPagerAdapter(this, mFragmentList);
|
||||
// viewBinding.viewpage.setAdapter(adapter);
|
||||
// viewBinding.tvPaipan.setSelected(true);
|
||||
// viewBinding.viewpage.setCurrentItem(0);
|
||||
// //viewpage2 特有的 api,禁止滑动
|
||||
// viewBinding.viewpage.setUserInputEnabled(false);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public void onNetChange(int netModel) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void showError(String message) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void logOut(BaseBean bean) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void getPaipanResult(BaziResultBean bean) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void saveBaziResultSuccess(BaziSaveSuccessEntity bean) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void getHistorySuccess(PaipanHistoryEntity entity) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void deletePaipanHistorySuccess(int pos) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onStreamMessageReceived(String messageChunk) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onStreamComplete(String complateMsg) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void commitReportSuccess(BaseBean bean) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onPermissionsGranted(int requestCode, @NonNull List<String> perms) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -1,228 +1,225 @@
|
||||
package com.ckkj.water.plate.mvp;
|
||||
|
||||
import com.ckkj.water.base.BasePresenter;
|
||||
import com.ckkj.water.chat.mvp.IndexContract;
|
||||
import com.ckkj.water.chat.mvp.IndexImpl;
|
||||
import com.ckkj.water.fate.entity.CityDataEntity;
|
||||
import com.ckkj.water.network.BaseBean;
|
||||
import com.ckkj.water.plate.entity.BaziResultBean;
|
||||
import com.ckkj.water.plate.entity.BaziSaveSuccessEntity;
|
||||
import com.ckkj.water.plate.entity.PaipanHistoryEntity;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author fengxiaoyang
|
||||
* @date 2025/7/30
|
||||
* @description TODO: 描述该类的作用
|
||||
*/
|
||||
|
||||
public class PlatePresenter extends BasePresenter<PlateContract.PlateView> {
|
||||
private PlateImpl impl;
|
||||
|
||||
public PlatePresenter(PlateImpl impl) {
|
||||
this.impl = impl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排盘,直接调用缘份居 Api
|
||||
* @param map
|
||||
*/
|
||||
public void startPaiPan(Map<String, Object> map) {
|
||||
impl.startPaiPanByYfjApi(map, new PlateContract.CallBack<BaziResultBean>() {
|
||||
@Override
|
||||
public void success(BaziResultBean entity) {
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
PlatePresenter.this.getView().getPaipanResult(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fail(String msg) {
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
PlatePresenter.this.getView().showError(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传八字结果
|
||||
*
|
||||
* @param result
|
||||
* @param cityData
|
||||
* @param timeType
|
||||
*/
|
||||
public void uploadBaziResult(BaziResultBean result, CityDataEntity cityData, int timeType) {
|
||||
try {
|
||||
BaziResultBean.BaseInfoDTO baseInfoDTO = result.getBaseInfo();
|
||||
BaziResultBean.DetailInfoDTO.SizhuInfoDTO sizhuInfoDTO = result.getDetailInfo().getSizhuInfo();
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("name",baseInfoDTO.getName());
|
||||
json.put("gender",baseInfoDTO.getSex().equals("乾造")? "0" : "1");
|
||||
json.put("birthType",timeType == 2001 ? "1":"0");
|
||||
json.put("yangLiBirthTime",baseInfoDTO.getGongli());
|
||||
json.put("yinLiBirthTime",baseInfoDTO.getNongli());
|
||||
json.put("birthPlace",cityData == null ? "北京市": cityData.getCityName());
|
||||
json.put("province",cityData == null ? "北京市": cityData.getProvinceName());
|
||||
json.put("city",cityData == null ? "北京": cityData.getCityName());
|
||||
json.put("openSolarTime","2");
|
||||
json.put("nianZhu",sizhuInfoDTO.getYear().getTg() + "," + sizhuInfoDTO.getYear().getDz());
|
||||
json.put("yueZhu",sizhuInfoDTO.getMonth().getTg() + "," + sizhuInfoDTO.getMonth().getDz());
|
||||
json.put("riZhu",sizhuInfoDTO.getDay().getTg() + "," + sizhuInfoDTO.getDay().getDz());
|
||||
json.put("shiZhu",sizhuInfoDTO.getHour().getTg() + "," + sizhuInfoDTO.getHour().getDz());
|
||||
impl.saveUserBirthInfo(json, new PlateContract.CallBack<BaziSaveSuccessEntity>() {
|
||||
@Override
|
||||
public void success(BaziSaveSuccessEntity bean) {
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
PlatePresenter.this.getView().saveBaziResultSuccess(bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fail(String msg) {
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
PlatePresenter.this.getView().showError(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取历史运势
|
||||
* @param page
|
||||
*/
|
||||
public void getHistoryDatas(int page) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("pageNum", page);
|
||||
map.put("pageSize", 10);
|
||||
impl.getPaipanHistoryList(map, new PlateContract.CallBack<PaipanHistoryEntity>() {
|
||||
|
||||
@Override
|
||||
public void success(PaipanHistoryEntity entity) {
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
PlatePresenter.this.getView().getHistorySuccess(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fail(String msg) {
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
PlatePresenter.this.getView().showError(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
* @param id
|
||||
*/
|
||||
public void deleteRecordByID(String id,int pos) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("recordId", id);
|
||||
impl.deleteRecordByID(map, new PlateContract.CallBack<BaseBean>() {
|
||||
@Override
|
||||
public void success(BaseBean bean) {
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
PlatePresenter.this.getView().deletePaipanHistorySuccess(pos);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fail(String msg) {
|
||||
if(PlatePresenter.this.getView() != null){
|
||||
PlatePresenter.this.getView().showError(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ai 分析八字
|
||||
* @param mSaveEntity
|
||||
*/
|
||||
public void AiParseBaziResult(BaziSaveSuccessEntity mSaveEntity) {
|
||||
try {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("resultId", mSaveEntity.getRecordId());
|
||||
impl.sendMsgToAi(json, new PlateContract.AiStreamCallback() {
|
||||
@Override
|
||||
public void onMessage(String messageChunk) {
|
||||
if (PlatePresenter.this.getView() != null) {
|
||||
PlatePresenter.this.getView().onStreamMessageReceived(messageChunk);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if (PlatePresenter.this.getView() != null) {
|
||||
PlatePresenter.this.getView().showError(error);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete(String complateContent) {
|
||||
if (PlatePresenter.this.getView() != null) {
|
||||
PlatePresenter.this.getView().onStreamComplete(complateContent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSessionReceived(String sessionId) {
|
||||
// 这个回调在当前场景下可能不需要,但保留接口一致性
|
||||
// Log.d("PlatePresenter", "Session received: " + sessionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loginLost() {
|
||||
if (PlatePresenter.this.getView() != null) {
|
||||
// 处理登录失效的情况
|
||||
// 这里可以根据需要跳转到登录页面
|
||||
// Log.w("PlatePresenter", "Login lost");
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 举报
|
||||
* @param reason
|
||||
*/
|
||||
public void commitReport(String reason) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("content", reason);
|
||||
new IndexImpl().commitReport(map, new IndexContract.CallBack<BaseBean>() {
|
||||
@Override
|
||||
public void success(BaseBean bean) {
|
||||
if (PlatePresenter.this.getView() != null) {
|
||||
PlatePresenter.this.getView().commitReportSuccess(bean);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fail(String msg) {
|
||||
if (PlatePresenter.this.getView() != null) {
|
||||
PlatePresenter.this.getView().showError(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//package com.ckkj.water.plate.mvp;
|
||||
//
|
||||
//import com.ckkj.water.base.BasePresenter;
|
||||
//import com.ckkj.water.network.BaseBean;
|
||||
//import com.ckkj.water.plate.entity.BaziResultBean;
|
||||
//import com.ckkj.water.plate.entity.BaziSaveSuccessEntity;
|
||||
//import com.ckkj.water.plate.entity.PaipanHistoryEntity;
|
||||
//
|
||||
//import org.json.JSONException;
|
||||
//import org.json.JSONObject;
|
||||
//
|
||||
//import java.util.HashMap;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * @author fengxiaoyang
|
||||
// * @date 2025/7/30
|
||||
// * @description TODO: 描述该类的作用
|
||||
// */
|
||||
//
|
||||
//public class PlatePresenter extends BasePresenter<PlateContract.PlateView> {
|
||||
// private PlateImpl impl;
|
||||
//
|
||||
// public PlatePresenter(PlateImpl impl) {
|
||||
// this.impl = impl;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 排盘,直接调用缘份居 Api
|
||||
// * @param map
|
||||
// */
|
||||
// public void startPaiPan(Map<String, Object> map) {
|
||||
// impl.startPaiPanByYfjApi(map, new PlateContract.CallBack<BaziResultBean>() {
|
||||
// @Override
|
||||
// public void success(BaziResultBean entity) {
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// PlatePresenter.this.getView().getPaipanResult(entity);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void fail(String msg) {
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// PlatePresenter.this.getView().showError(msg);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 上传八字结果
|
||||
// *
|
||||
// * @param result
|
||||
// * @param cityData
|
||||
// * @param timeType
|
||||
// */
|
||||
// public void uploadBaziResult(BaziResultBean result, CityDataEntity cityData, int timeType) {
|
||||
// try {
|
||||
// BaziResultBean.BaseInfoDTO baseInfoDTO = result.getBaseInfo();
|
||||
// BaziResultBean.DetailInfoDTO.SizhuInfoDTO sizhuInfoDTO = result.getDetailInfo().getSizhuInfo();
|
||||
// JSONObject json = new JSONObject();
|
||||
// json.put("name",baseInfoDTO.getName());
|
||||
// json.put("gender",baseInfoDTO.getSex().equals("乾造")? "0" : "1");
|
||||
// json.put("birthType",timeType == 2001 ? "1":"0");
|
||||
// json.put("yangLiBirthTime",baseInfoDTO.getGongli());
|
||||
// json.put("yinLiBirthTime",baseInfoDTO.getNongli());
|
||||
// json.put("birthPlace",cityData == null ? "北京市": cityData.getCityName());
|
||||
// json.put("province",cityData == null ? "北京市": cityData.getProvinceName());
|
||||
// json.put("city",cityData == null ? "北京": cityData.getCityName());
|
||||
// json.put("openSolarTime","2");
|
||||
// json.put("nianZhu",sizhuInfoDTO.getYear().getTg() + "," + sizhuInfoDTO.getYear().getDz());
|
||||
// json.put("yueZhu",sizhuInfoDTO.getMonth().getTg() + "," + sizhuInfoDTO.getMonth().getDz());
|
||||
// json.put("riZhu",sizhuInfoDTO.getDay().getTg() + "," + sizhuInfoDTO.getDay().getDz());
|
||||
// json.put("shiZhu",sizhuInfoDTO.getHour().getTg() + "," + sizhuInfoDTO.getHour().getDz());
|
||||
// impl.saveUserBirthInfo(json, new PlateContract.CallBack<BaziSaveSuccessEntity>() {
|
||||
// @Override
|
||||
// public void success(BaziSaveSuccessEntity bean) {
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// PlatePresenter.this.getView().saveBaziResultSuccess(bean);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void fail(String msg) {
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// PlatePresenter.this.getView().showError(msg);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// } catch (JSONException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取历史运势
|
||||
// * @param page
|
||||
// */
|
||||
// public void getHistoryDatas(int page) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("pageNum", page);
|
||||
// map.put("pageSize", 10);
|
||||
// impl.getPaipanHistoryList(map, new PlateContract.CallBack<PaipanHistoryEntity>() {
|
||||
//
|
||||
// @Override
|
||||
// public void success(PaipanHistoryEntity entity) {
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// PlatePresenter.this.getView().getHistorySuccess(entity);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void fail(String msg) {
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// PlatePresenter.this.getView().showError(msg);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除记录
|
||||
// * @param id
|
||||
// */
|
||||
// public void deleteRecordByID(String id,int pos) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("recordId", id);
|
||||
// impl.deleteRecordByID(map, new PlateContract.CallBack<BaseBean>() {
|
||||
// @Override
|
||||
// public void success(BaseBean bean) {
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// PlatePresenter.this.getView().deletePaipanHistorySuccess(pos);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void fail(String msg) {
|
||||
// if(PlatePresenter.this.getView() != null){
|
||||
// PlatePresenter.this.getView().showError(msg);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * ai 分析八字
|
||||
// * @param mSaveEntity
|
||||
// */
|
||||
// public void AiParseBaziResult(BaziSaveSuccessEntity mSaveEntity) {
|
||||
// try {
|
||||
// JSONObject json = new JSONObject();
|
||||
// json.put("resultId", mSaveEntity.getRecordId());
|
||||
// impl.sendMsgToAi(json, new PlateContract.AiStreamCallback() {
|
||||
// @Override
|
||||
// public void onMessage(String messageChunk) {
|
||||
// if (PlatePresenter.this.getView() != null) {
|
||||
// PlatePresenter.this.getView().onStreamMessageReceived(messageChunk);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(String error) {
|
||||
// if (PlatePresenter.this.getView() != null) {
|
||||
// PlatePresenter.this.getView().showError(error);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete(String complateContent) {
|
||||
// if (PlatePresenter.this.getView() != null) {
|
||||
// PlatePresenter.this.getView().onStreamComplete(complateContent);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSessionReceived(String sessionId) {
|
||||
// // 这个回调在当前场景下可能不需要,但保留接口一致性
|
||||
// // Log.d("PlatePresenter", "Session received: " + sessionId);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void loginLost() {
|
||||
// if (PlatePresenter.this.getView() != null) {
|
||||
// // 处理登录失效的情况
|
||||
// // 这里可以根据需要跳转到登录页面
|
||||
// // Log.w("PlatePresenter", "Login lost");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// } catch (JSONException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 举报
|
||||
// * @param reason
|
||||
// */
|
||||
// public void commitReport(String reason) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("content", reason);
|
||||
// new IndexImpl().commitReport(map, new IndexContract.CallBack<BaseBean>() {
|
||||
// @Override
|
||||
// public void success(BaseBean bean) {
|
||||
// if (PlatePresenter.this.getView() != null) {
|
||||
// PlatePresenter.this.getView().commitReportSuccess(bean);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void fail(String msg) {
|
||||
// if (PlatePresenter.this.getView() != null) {
|
||||
// PlatePresenter.this.getView().showError(msg);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user