提交 14a5a790 authored 作者: lgd's avatar lgd

1.消息

2.//TODO erp用户激活测试,忘记/重置密码测试,审核规则,领用申请列表/退件列表/参数,坩埚下单页面,组装下单,产品下单还差附件测试,mes,消息,刷新token
上级 23d384e7
...@@ -968,6 +968,15 @@ ...@@ -968,6 +968,15 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.MsgDetailActivity"
android:configChanges="keyboardHidden|orientation"
android:label="消息详情"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider" android:authorities="com.wd.workoffice.fileprovider"
......
package com.wd.workoffice.bean;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MsgBean {
/**
* records : [{"createdBy":675,"createdByName":null,"createdTime":"2020-04-06 17:42:27","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":850,"messageId":432,"recordType":null,"recordTypeName":null,"orderType":null,"orderTypeName":null,"originatorId":null,"approverId":null,"userId":null,"targetId":null,"processCode":null,"recordId":null,"status":"1","userNickName":null,"noticeType":"notice","title":"销售订单开票审核通知","content":null},{"createdBy":675,"createdByName":null,"createdTime":"2020-04-01 13:42:17","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":833,"messageId":415,"recordType":null,"recordTypeName":null,"orderType":null,"orderTypeName":null,"originatorId":null,"approverId":null,"userId":null,"targetId":"SO10628","processCode":null,"recordId":null,"status":"1","userNickName":null,"noticeType":"notice","title":"销售订单(SO10628)入库审核通知","content":null},{"createdBy":675,"createdByName":null,"createdTime":"2020-03-28 10:58:11","updatedBy":null,"updatedByName":null,"updatedTime":null,"id":806,"messageId":388,"recordType":null,"recordTypeName":null,"orderType":null,"orderTypeName":null,"originatorId":null,"approverId":null,"userId":null,"targetId":"SO10743","processCode":null,"recordId":null,"status":"1","userNickName":null,"noticeType":"notice","title":"销售订单(SO10743)领用审核通知","content":null}]
* total : 3
* size : 10
* current : 1
* orders : []
* searchCount : true
* pages : 1
*/
private int total;
private int size;
private int current;
private boolean searchCount;
private int pages;
private List<RecordsBean> records;
private List<?> orders;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public int getCurrent() {
return current;
}
public void setCurrent(int current) {
this.current = current;
}
public boolean isSearchCount() {
return searchCount;
}
public void setSearchCount(boolean searchCount) {
this.searchCount = searchCount;
}
public int getPages() {
return pages;
}
public void setPages(int pages) {
this.pages = pages;
}
public List<RecordsBean> getRecords() {
return records;
}
public void setRecords(List<RecordsBean> records) {
this.records = records;
}
public List<?> getOrders() {
return orders;
}
public void setOrders(List<?> orders) {
this.orders = orders;
}
public static class RecordsBean {
/**
* createdBy : 675
* createdByName : null
* createdTime : 2020-04-06 17:42:27
* updatedBy : null
* updatedByName : null
* updatedTime : null
* id : 850
* messageId : 432
* recordType : null
* recordTypeName : null
* orderType : null
* orderTypeName : null
* originatorId : null
* approverId : null
* userId : null
* targetId : null
* processCode : null
* recordId : null
* status : 1
* userNickName : null
* noticeType : notice
* title : 销售订单开票审核通知
* content : null
*/
private int createdBy;
private Object createdByName;
private String createdTime;
private Object updatedBy;
private Object updatedByName;
private Object updatedTime;
private int id;
private int messageId;
private Object recordType;
private Object recordTypeName;
private Object orderType;
private Object orderTypeName;
private Object originatorId;
private Object approverId;
private Object userId;
private Object targetId;
private Object processCode;
private Object recordId;
private String status;
private Object userNickName;
private String noticeType;
private String title;
private Object content;
public int getCreatedBy() {
return createdBy;
}
public void setCreatedBy(int createdBy) {
this.createdBy = createdBy;
}
public Object getCreatedByName() {
return createdByName;
}
public void setCreatedByName(Object createdByName) {
this.createdByName = createdByName;
}
public String getCreatedTime() {
return createdTime;
}
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
public Object getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Object updatedBy) {
this.updatedBy = updatedBy;
}
public Object getUpdatedByName() {
return updatedByName;
}
public void setUpdatedByName(Object updatedByName) {
this.updatedByName = updatedByName;
}
public Object getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(Object updatedTime) {
this.updatedTime = updatedTime;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getMessageId() {
return messageId;
}
public void setMessageId(int messageId) {
this.messageId = messageId;
}
public Object getRecordType() {
return recordType;
}
public void setRecordType(Object recordType) {
this.recordType = recordType;
}
public Object getRecordTypeName() {
return recordTypeName;
}
public void setRecordTypeName(Object recordTypeName) {
this.recordTypeName = recordTypeName;
}
public Object getOrderType() {
return orderType;
}
public void setOrderType(Object orderType) {
this.orderType = orderType;
}
public Object getOrderTypeName() {
return orderTypeName;
}
public void setOrderTypeName(Object orderTypeName) {
this.orderTypeName = orderTypeName;
}
public Object getOriginatorId() {
return originatorId;
}
public void setOriginatorId(Object originatorId) {
this.originatorId = originatorId;
}
public Object getApproverId() {
return approverId;
}
public void setApproverId(Object approverId) {
this.approverId = approverId;
}
public Object getUserId() {
return userId;
}
public void setUserId(Object userId) {
this.userId = userId;
}
public Object getTargetId() {
return targetId;
}
public void setTargetId(Object targetId) {
this.targetId = targetId;
}
public Object getProcessCode() {
return processCode;
}
public void setProcessCode(Object processCode) {
this.processCode = processCode;
}
public Object getRecordId() {
return recordId;
}
public void setRecordId(Object recordId) {
this.recordId = recordId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Object getUserNickName() {
return userNickName;
}
public void setUserNickName(Object userNickName) {
this.userNickName = userNickName;
}
public String getNoticeType() {
return noticeType;
}
public void setNoticeType(String noticeType) {
this.noticeType = noticeType;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Object getContent() {
return content;
}
public void setContent(Object content) {
this.content = content;
}
}
}
...@@ -1243,4 +1243,27 @@ public interface ApiService { ...@@ -1243,4 +1243,27 @@ public interface ApiService {
@PUT("/saleOrder/audit/{orderId}") @PUT("/saleOrder/audit/{orderId}")
Observable<BaseBean> saleOrderCheck(@Path("orderId") String orderId,@Body RequestBody requestBody); Observable<BaseBean> saleOrderCheck(@Path("orderId") String orderId,@Body RequestBody requestBody);
/**
* *获取当前用户某类消息
*
* @return
*/
@GET("/notice-message-item/page/init")
Observable<BaseBean> msg(@QueryMap Map<String, Object> param);
/**
* *把未读标记为已读
*
* @return
*/
@POST("/notice-message-item/has_read")
Observable<BaseBean> msgRead(@Body RequestBody requestBody);
/**
* *把未读标记为已读
*
* @return
*/
@GET("/notice-message-item/content")
Observable<BaseBean> msgContent(@Query("id") String id);
} }
...@@ -18,6 +18,7 @@ import com.wd.workoffice.app.WorkBaseActivity; ...@@ -18,6 +18,7 @@ import com.wd.workoffice.app.WorkBaseActivity;
import com.wd.workoffice.ui.activity.login.LoginActivity; import com.wd.workoffice.ui.activity.login.LoginActivity;
import com.wd.workoffice.ui.adapter.VpMainAdapter; import com.wd.workoffice.ui.adapter.VpMainAdapter;
import com.wd.workoffice.ui.fg.MainFragment; import com.wd.workoffice.ui.fg.MainFragment;
import com.wd.workoffice.ui.fg.MsgFragment;
import com.wd.workoffice.ui.fg.MyFragment; import com.wd.workoffice.ui.fg.MyFragment;
import com.wd.workoffice.util.UserKeeper; import com.wd.workoffice.util.UserKeeper;
...@@ -127,7 +128,7 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa ...@@ -127,7 +128,7 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa
//// mainFragment.setArguments(bundle); //// mainFragment.setArguments(bundle);
fragments.add(new MainFragment()); fragments.add(new MainFragment());
fragments.add(new MainFragment()); fragments.add(new MainFragment());
fragments.add(new MainFragment()); fragments.add(new MsgFragment());
fragments.add(new MyFragment()); fragments.add(new MyFragment());
return fragments; return fragments;
} }
......
package com.wd.workoffice.ui.activity;
import android.os.Bundle;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.util.WorkUtils;
import java.util.Map;
import butterknife.BindView;
import butterknife.ButterKnife;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import flexible.xd.android_base.utils.AppUtil;
import io.reactivex.disposables.Disposable;
/**
* 消息详情
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MsgDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_title)
TextView tvTitle;
@BindView(R.id.tv_time)
TextView tvTime;
@BindView(R.id.tv_content)
TextView tvContent;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
msgContent();
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_msg_content;
}
private void msgContent() {
RtfUtils.getRtf().msgContent(getIntent().getStringExtra("id")).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
return;
}
JSONObject info = JSON.parseObject(data.getData().toString());
tvTime.setText(info.getString("createdTime"));
tvTitle.setText(info.getString("title"));
tvContent.setText(info.getString("content"));
}
});
}
}
package com.wd.workoffice.ui.activity.bat.order.sale; package com.wd.workoffice.ui.activity.bat.order.sale;
import android.os.Bundle;
import android.text.Editable; import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher; import android.text.TextWatcher;
...@@ -18,7 +17,6 @@ import com.wd.workoffice.app.BaseBean; ...@@ -18,7 +17,6 @@ import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.OrderDetail; import com.wd.workoffice.bean.OrderDetail;
import com.wd.workoffice.bean.event.CheckOrderEvent; import com.wd.workoffice.bean.event.CheckOrderEvent;
import com.wd.workoffice.bean.event.CheckTicketEvent;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.bat.order.AddStockApplyActivity; import com.wd.workoffice.ui.activity.bat.order.AddStockApplyActivity;
...@@ -27,7 +25,6 @@ import com.wd.workoffice.ui.activity.bat.order.ProFlowActivity; ...@@ -27,7 +25,6 @@ import com.wd.workoffice.ui.activity.bat.order.ProFlowActivity;
import com.wd.workoffice.ui.activity.bat.order.ReturnApplyActivity; import com.wd.workoffice.ui.activity.bat.order.ReturnApplyActivity;
import com.wd.workoffice.ui.activity.bat.order.SendApplyActivity; import com.wd.workoffice.ui.activity.bat.order.SendApplyActivity;
import com.wd.workoffice.ui.activity.bat.order.UseApplyActivity; import com.wd.workoffice.ui.activity.bat.order.UseApplyActivity;
import com.wd.workoffice.ui.activity.bat.order.UseApplyAddActivity;
import com.wd.workoffice.ui.adapter.OrderDetailProductAdapter; import com.wd.workoffice.ui.adapter.OrderDetailProductAdapter;
import com.wd.workoffice.ui.adapter.OrderProcessAdapter; import com.wd.workoffice.ui.adapter.OrderProcessAdapter;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -45,7 +42,6 @@ import butterknife.BindView; ...@@ -45,7 +42,6 @@ import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer; import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.Observable;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
/** /**
......
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.AddStockBean;
import com.wd.workoffice.bean.MsgBean;
import com.wd.workoffice.util.WorkUtils;
import java.util.List;
import androidx.annotation.Nullable;
/**
* Created by flexible on 2018/8/13.
*/
public class MsgAdapter extends BaseQuickAdapter<MsgBean.RecordsBean, BaseViewHolder> {
public MsgAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, MsgBean.RecordsBean item) {
helper.setText(R.id.tv_time, item.getCreatedTime());
helper.setText(R.id.tv_title, item.getTitle());
}
}
package com.wd.workoffice.ui.fg;
import android.os.Bundle;
import com.google.android.material.tabs.TabLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.ui.adapter.VpDataAdapter;
import java.util.ArrayList;
import java.util.List;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 销售 - 供应订单
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MsgDetailFragment extends WorkBaseFg {
@BindView(R.id.tl_tab)
TabLayout tlTab;
@BindView(R.id.vp_data)
ViewPager vpData;
private String tab[] = {
"未读", "已读"};
private String order[] = {
"unRead", "readed"};
private String identity;
@Override
protected void initView() {
ButterKnife.bind(this, getContentView());
tlTab.setupWithViewPager(vpData);
tlTab.setTabMode(TabLayout.MODE_FIXED);
}
@Override
protected void initData() {
FragmentManager sfm = getChildFragmentManager();
List<Fragment> data = new ArrayList<>();
for (int i = 0; i < tab.length; i++) {
MsgListFragment saleFragment = new MsgListFragment();
Bundle bundle = new Bundle();
bundle.putString("type", order[i]);
bundle.putString("identity", identity);
saleFragment.setArguments(bundle);
data.add(saleFragment);
}
VpDataAdapter vpFgAdapter = new VpDataAdapter(sfm, data);
vpData.setAdapter(vpFgAdapter);
for (int i = 0; i < tab.length; i++) {
tlTab.getTabAt(i).setText(tab[i]);
}
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle arguments = getArguments();
if (arguments != null) {
identity = arguments.getString("identity");
}
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_order;
}
}
package com.wd.workoffice.ui.fg;
import android.os.Bundle;
import com.google.android.material.tabs.TabLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.ui.adapter.VpDataAdapter;
import java.util.ArrayList;
import java.util.List;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 消息
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MsgFragment extends WorkBaseFg {
@BindView(R.id.tl_tab)
TabLayout tlTab;
@BindView(R.id.vp_data)
ViewPager vpData;
private String tab[] = {
"BAT消息", "MES消息"};
private String order[] = {
"0", "1", "2"};
private String identity;
@Override
protected void initView() {
ButterKnife.bind(this, getContentView());
tlTab.setupWithViewPager(vpData);
tlTab.setTabMode(TabLayout.MODE_FIXED);
}
@Override
protected void initData() {
FragmentManager sfm = getChildFragmentManager();
List<Fragment> data = new ArrayList<>();
for (int i = 0; i < tab.length; i++) {
MsgDetailFragment saleFragment = new MsgDetailFragment();
Bundle bundle = new Bundle();
bundle.putString("state", order[i]);
bundle.putString("identity", identity);
saleFragment.setArguments(bundle);
data.add(saleFragment);
}
VpDataAdapter vpFgAdapter = new VpDataAdapter(sfm, data);
vpData.setAdapter(vpFgAdapter);
for (int i = 0; i < tab.length; i++) {
tlTab.getTabAt(i).setText(tab[i]);
}
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle arguments = getArguments();
if (arguments != null) {
identity = arguments.getString("identity");
}
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_order;
}
}
package com.wd.workoffice.ui.fg;
import android.os.Bundle;
import android.view.View;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.MsgBean;
import com.wd.workoffice.bean.OrderBean;
import com.wd.workoffice.bean.event.CheckOrderEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.MsgDetailActivity;
import com.wd.workoffice.ui.activity.bat.work.WorkLogisticsDetailActivity;
import com.wd.workoffice.ui.adapter.MsgAdapter;
import com.wd.workoffice.ui.adapter.SaleProductApplyAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
import retrofit2.http.PUT;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MsgListFragment extends WorkBaseFg {
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.srl_refresh)
SmartRefreshLayout srlRefresh;
private int page = 1;
private Map<String, Object> param;
private MsgAdapter dataAdapter;
private List<MsgBean.RecordsBean> dataList;
private String type;
@Override
protected void initView() {
ButterKnife.bind(this, getContentView());
rvData.setLayoutManager(new LinearLayoutManager(getActivity(), RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
param = WorkUtils.pageKey();
page = 1;
param.put("current", page);
param.put("type", type);
dataList = new ArrayList<>();
dataAdapter = new MsgAdapter(R.layout.item_msg, dataList);
dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
getData();
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle arguments = getArguments();
if (arguments != null) {
type = arguments.getString("type");
}
}
private void getData() {
RtfUtils.getRtf().msg(param).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
return;
}
List<MsgBean.RecordsBean> getList = JSON.parseArray(JSON.parseObject(data.getData().toString()).getString("records"), MsgBean.RecordsBean.class);
if (page == 1) {
srlRefresh.finishRefresh();
dataList.clear();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
dataAdapter.loadMoreComplete();
} else {
dataAdapter.loadMoreComplete();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
dataAdapter.loadMoreEnd();
} else {
page++;
}
}
});
}
@Override
protected void initEvent() {
srlRefresh.setOnRefreshListener(refreshLayout -> {
page = 1;
param.put("current", page);
getData();
});
dataAdapter.setOnLoadMoreListener(() -> {
param.put("current", page);
getData();
}, rvData);
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
msgRead(dataList.get(position).getId());
startActivity(MsgDetailActivity.class, "id", dataList.get(position).getId()+"");
}
});
}
private void msgRead(int id) {
Map<String, Object> readParam = WorkUtils.pageKey();
readParam.put("id",id);
RtfUtils.getRtf().msgRead(WorkUtils.convertMapToBody(readParam)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
// toast(data.getMessage());
return;
}
}
});
}
@Override
protected int layoutId() {
return R.layout.fg_work_contacts;
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckOrderEvent event) {
page = 1;
param.put("current", page);
getData();
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="20mm"
android:background="@color/white"
android:orientation="vertical">
<TextView
android:layout_marginTop="20mm"
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_time"
android:layout_marginTop="10mm"
android:textColor="@color/flexible_text_sup"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_content"
android:layout_marginTop="10mm"
android:textColor="@color/flexible_text_gray"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="zzz" />
<TextView
android:id="@+id/tv_time"
android:textColor="@color/flexible_text_sup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="zzz" />
</RelativeLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论