| | |
| | | import com.android.app_base.http.ResultData; |
| | | import com.android.app_base.manager.AppManager; |
| | | import com.android.app_base.utils.RxUtils; |
| | | import com.android.app_base.utils.rxbus.MessageEvent; |
| | | import com.android.app_base.utils.rxbus.RxBus; |
| | | import com.application.zhangshi_app_android.bean.FamilyMemorabiliaBean; |
| | | import com.application.zhangshi_app_android.bean.TourismExperienceBean; |
| | |
| | | private MutableLiveData<Boolean> typeLiveData;//true 编辑状态 false 展示状态 |
| | | private final List<String> uploadFileList = new ArrayList<>();//需要上传的文件列表 |
| | | |
| | | private String cid; |
| | | public TourismExperienceDetailActivityViewModel(@NonNull Application application) { |
| | | super(application); |
| | | } |
| | |
| | | AppManager.getAppManager().finishCurrentActivity(); |
| | | RxBus.getInstance().post(beanLiveData.getValue()); |
| | | messageLiveData.postValue("添加成功"); |
| | | RxBus.getInstance().post(new MessageEvent(MessageEvent.EVENT_TOURISM_CONSUME_CHANGE,cid)); |
| | | } else { |
| | | messageLiveData.postValue(stringResultData.getMsg()); |
| | | } |
| | |
| | | AppManager.getAppManager().finishCurrentActivity(); |
| | | RxBus.getInstance().post(beanLiveData.getValue()); |
| | | messageLiveData.postValue("添加成功"); |
| | | RxBus.getInstance().post(new MessageEvent(MessageEvent.EVENT_TOURISM_CONSUME_CHANGE,cid)); |
| | | }else { |
| | | messageLiveData.postValue(stringResultData.getMsg()); |
| | | } |
| | |
| | | AppManager.getAppManager().finishCurrentActivity(); |
| | | RxBus.getInstance().post(beanLiveData.getValue()); |
| | | messageLiveData.postValue("删除成功"); |
| | | RxBus.getInstance().post(new MessageEvent(MessageEvent.EVENT_TOURISM_CONSUME_CHANGE,cid)); |
| | | }else { |
| | | messageLiveData.postValue(stringResultData.getMsg()); |
| | | } |
| | |
| | | AppManager.getAppManager().finishCurrentActivity(); |
| | | RxBus.getInstance().post(beanLiveData.getValue()); |
| | | messageLiveData.postValue("修改成功"); |
| | | RxBus.getInstance().post(new MessageEvent(MessageEvent.EVENT_TOURISM_CONSUME_CHANGE,cid)); |
| | | }else { |
| | | messageLiveData.postValue(stringResultData.getMsg()); |
| | | } |
| | |
| | | AppManager.getAppManager().finishCurrentActivity(); |
| | | RxBus.getInstance().post(beanLiveData.getValue()); |
| | | messageLiveData.postValue("修改成功"); |
| | | RxBus.getInstance().post(new MessageEvent(MessageEvent.EVENT_TOURISM_CONSUME_CHANGE,cid)); |
| | | }else { |
| | | messageLiveData.postValue(stringResultData.getMsg()); |
| | | } |
| | |
| | | public void addUploadFile(String url) { |
| | | uploadFileList.add(url); |
| | | } |
| | | |
| | | public String getCid() { |
| | | return cid; |
| | | } |
| | | |
| | | public void setCid(String cid) { |
| | | this.cid = cid; |
| | | } |
| | | } |