d
This commit is contained in:
@@ -8,7 +8,8 @@ import android.widget.TextView;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.main.kehu.Bean.CustomerListBean;
|
||||
import com.fenghoo.seven.main.find.entity.privateListBean;
|
||||
import com.fenghoo.seven.utils.AbStrUtil;
|
||||
import com.fenghoo.seven.utils.GlideTools;
|
||||
import com.fenghoo.seven.utils.WidgetTools;
|
||||
import com.fenghoo.seven.widget.CircleImageView;
|
||||
@@ -16,7 +17,7 @@ import com.fenghoo.seven.widget.CircleImageView;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class PrivateletAdapter extends BaseQuickAdapter<CustomerListBean.ResultBean.DataBean, BaseViewHolder> {
|
||||
public class PrivateletAdapter extends BaseQuickAdapter<privateListBean.ResultBean.DataBean, BaseViewHolder> {
|
||||
Context mcontext;
|
||||
OnViewClickListener onViewClickListener;
|
||||
|
||||
@@ -26,12 +27,23 @@ public class PrivateletAdapter extends BaseQuickAdapter<CustomerListBean.ResultB
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(final BaseViewHolder helper, final CustomerListBean.ResultBean.DataBean item) {
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.private_tv_name), "", item.getName());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.private_tv_content), "", item.getPhone());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.private_tv_time), "", item.getWechat());
|
||||
protected void convert(final BaseViewHolder helper, final privateListBean.ResultBean.DataBean item) {
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.private_tv_name), "", item.getNick_name());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.private_tv_content), "", item.getContent());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.private_tv_time), "", item.getConnect_time());
|
||||
CircleImageView private_iv_dea_avatar = helper.getView(R.id.private_iv_dea_avatar);
|
||||
GlideTools.init(mContext).displaypic(private_iv_dea_avatar, "", R.mipmap.icon_default_head);
|
||||
TextView left_tvtwo = helper.getView(R.id.left_tvtwo);
|
||||
String read_num = item.getRead_num();
|
||||
if(AbStrUtil.isEmpty(read_num)){
|
||||
left_tvtwo.setVisibility(View.INVISIBLE);
|
||||
}else {
|
||||
if(read_num.equals("0")){
|
||||
left_tvtwo.setVisibility(View.INVISIBLE);
|
||||
}else {
|
||||
left_tvtwo.setVisibility(View.VISIBLE);
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.left_tvtwo), "", item.getRead_num());}
|
||||
}
|
||||
GlideTools.init(mContext).displaypic(private_iv_dea_avatar, item.getNick_img(), R.mipmap.icon_default_head);
|
||||
RelativeLayout yichengjhiao_rv = (RelativeLayout)helper.getView(R.id.yichengjhiao_rv);
|
||||
yichengjhiao_rv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -46,7 +58,7 @@ public class PrivateletAdapter extends BaseQuickAdapter<CustomerListBean.ResultB
|
||||
}
|
||||
|
||||
public interface OnViewClickListener{
|
||||
void enterCusDetail(CustomerListBean.ResultBean.DataBean item);
|
||||
void enterCusDetail(privateListBean.ResultBean.DataBean item);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.fenghoo.seven.main.find.entity;
|
||||
|
||||
import com.fenghoo.seven.test.BaseModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Time: 2020/8/31
|
||||
* Author: jianbo
|
||||
* Description:
|
||||
*/
|
||||
public class privateListBean extends BaseModel {
|
||||
|
||||
/**
|
||||
* result : {"msg":"成功","data":[{"read_num":"0","nick_name":"私信昵称","connect_time":"10:48","nick_img":"","private_id":"1","short_id":"私信id","content":""}],"success":0}
|
||||
* status : 0
|
||||
*/
|
||||
|
||||
private ResultBean result;
|
||||
private int status;
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
/**
|
||||
* msg : 成功
|
||||
* data : [{"read_num":"0","nick_name":"私信昵称","connect_time":"10:48","nick_img":"","private_id":"1","short_id":"私信id","content":""}]
|
||||
* success : 0
|
||||
*/
|
||||
|
||||
private String msg;
|
||||
private int success;
|
||||
private List<DataBean> data;
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(int success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public List<DataBean> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<DataBean> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static class DataBean {
|
||||
/**
|
||||
* read_num : 0
|
||||
* nick_name : 私信昵称
|
||||
* connect_time : 10:48
|
||||
* nick_img :
|
||||
* private_id : 1
|
||||
* short_id : 私信id
|
||||
* content :
|
||||
*/
|
||||
|
||||
private String read_num;
|
||||
private String nick_name;
|
||||
private String connect_time;
|
||||
private String nick_img;
|
||||
private String private_id;
|
||||
private String short_id;
|
||||
private String content;
|
||||
|
||||
public String getRead_num() {
|
||||
return read_num;
|
||||
}
|
||||
|
||||
public void setRead_num(String read_num) {
|
||||
this.read_num = read_num;
|
||||
}
|
||||
|
||||
public String getNick_name() {
|
||||
return nick_name;
|
||||
}
|
||||
|
||||
public void setNick_name(String nick_name) {
|
||||
this.nick_name = nick_name;
|
||||
}
|
||||
|
||||
public String getConnect_time() {
|
||||
return connect_time;
|
||||
}
|
||||
|
||||
public void setConnect_time(String connect_time) {
|
||||
this.connect_time = connect_time;
|
||||
}
|
||||
|
||||
public String getNick_img() {
|
||||
return nick_img;
|
||||
}
|
||||
|
||||
public void setNick_img(String nick_img) {
|
||||
this.nick_img = nick_img;
|
||||
}
|
||||
|
||||
public String getPrivate_id() {
|
||||
return private_id;
|
||||
}
|
||||
|
||||
public void setPrivate_id(String private_id) {
|
||||
this.private_id = private_id;
|
||||
}
|
||||
|
||||
public String getShort_id() {
|
||||
return short_id;
|
||||
}
|
||||
|
||||
public void setShort_id(String short_id) {
|
||||
this.short_id = short_id;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,11 @@ import com.fenghoo.seven.main.kehu.Bean.CustomerListBean;
|
||||
import com.fenghoo.seven.main.kehu.Dialog.RreplyDialog;
|
||||
import com.fenghoo.seven.main.kehu.fragment.MobanFragment;
|
||||
import com.fenghoo.seven.main.kehu.activity.ShowAty;
|
||||
import com.fenghoo.seven.okgonet.HttpConstants;
|
||||
import com.fenghoo.seven.okgonet.NetApi;
|
||||
import com.fenghoo.seven.okgonet.Observer;
|
||||
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.List;
|
||||
@@ -53,7 +55,10 @@ public class CommentFragment extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
new NetApi().customerList(ProfileSpUtils.getInstance().getUserProfie().getData().getUuid(),"").subscribe(new Observer<Response>() {
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("search", "");
|
||||
new NetApi().getPostData(paramsPost, HttpConstants.URi_device_AppCustomer_fpList).subscribe(new Observer<Response>() {
|
||||
@Override
|
||||
public void onNext(Response response) {
|
||||
String body = (String) response.body();
|
||||
|
||||
@@ -2,12 +2,15 @@ package com.fenghoo.seven.main.find.ui;
|
||||
|
||||
import com.fenghoo.seven.JsonUtils;
|
||||
import com.fenghoo.seven.main.find.adapter.PrivateletAdapter;
|
||||
import com.fenghoo.seven.main.find.entity.privateListBean;
|
||||
import com.fenghoo.seven.main.kehu.Bean.CustomerListBean;
|
||||
import com.fenghoo.seven.main.kehu.fragment.MobanFragment;
|
||||
import com.fenghoo.seven.main.kehu.activity.ShowAty;
|
||||
import com.fenghoo.seven.okgonet.HttpConstants;
|
||||
import com.fenghoo.seven.okgonet.NetApi;
|
||||
import com.fenghoo.seven.okgonet.Observer;
|
||||
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.List;
|
||||
@@ -33,7 +36,7 @@ public class FindFragmenttwo extends MobanFragment {
|
||||
mMarkingFragmentRecyclerView.setAdapter(privateletAdapter);
|
||||
privateletAdapter.operationListenner(new PrivateletAdapter.OnViewClickListener() {
|
||||
@Override
|
||||
public void enterCusDetail(CustomerListBean.ResultBean.DataBean item) {
|
||||
public void enterCusDetail(privateListBean.ResultBean.DataBean item) {
|
||||
//进入会话页
|
||||
ShowAty.ConversationActivity(getActivity());
|
||||
}
|
||||
@@ -42,20 +45,22 @@ public class FindFragmenttwo extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
new NetApi().customerList(ProfileSpUtils.getInstance().getUserProfie().getData().getUuid(),"").subscribe(new Observer<Response>() {
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("page", mNextRequestPage);
|
||||
new NetApi().getPostData(paramsPost, HttpConstants.URi_device_AppDouyin_privateList).subscribe(new Observer<Response>() {
|
||||
@Override
|
||||
public void onNext(Response response) {
|
||||
String body = (String) response.body();
|
||||
CustomerListBean.ResultBean result = JsonUtils.fromJson(body, CustomerListBean.class).getResult();
|
||||
privateListBean.ResultBean result = JsonUtils.fromJson(body, privateListBean.class).getResult();
|
||||
mSwl.setRefreshing(false);
|
||||
if (result != null && String.valueOf(result.getSuccess()).equals("0")) {
|
||||
|
||||
List<CustomerListBean.ResultBean.DataBean> data = result.getData();
|
||||
if (data.size() == 0) {
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
List<privateListBean.ResultBean.DataBean> data = result.getData();
|
||||
if (mNextRequestPage == 1) {
|
||||
if (data.size() == 0) {
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
setData(true, data);
|
||||
} else {
|
||||
setData(false, data);
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.fenghoo.seven.main.kehu.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -11,6 +12,7 @@ import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.main.entity.XikeInfoBean;
|
||||
import com.fenghoo.seven.main.kehu.Bean.CustomerListBean;
|
||||
import com.fenghoo.seven.main.kehu.Bean.orderListBean;
|
||||
import com.fenghoo.seven.utils.GlideTools;
|
||||
import com.fenghoo.seven.utils.WidgetTools;
|
||||
|
||||
import java.util.List;
|
||||
@@ -25,9 +27,12 @@ public class DeaListAdapter extends BaseQuickAdapter<orderListBean.ResultBean.Da
|
||||
}
|
||||
@Override
|
||||
protected void convert(final BaseViewHolder helper, final orderListBean.ResultBean.DataBean item) {
|
||||
// WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getXike_remark());
|
||||
// WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_phone), "", item.getTime());
|
||||
// WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_watch), "", item.getXike_num());
|
||||
ImageView image = (ImageView)helper.getView(R.id.iv_dea_avatar);
|
||||
GlideTools.init(mContext).displaypic(image, item.getHeadimg(), R.mipmap.icon_default_head);
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getName());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_phone), "", item.getPhone());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_watch), "", item.getWechat());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_cjnum), "", "已成交"+item.getOrder_num()+"次");
|
||||
RelativeLayout yichengjhiao_rv = (RelativeLayout)helper.getView(R.id.yichengjhiao_rv);
|
||||
yichengjhiao_rv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -34,10 +34,9 @@ public class DisListAdapter extends BaseQuickAdapter<FpListBean.ResultBean.DataB
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_name), "", item.getName());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_phone), "", item.getPhone());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_dea_watch), "", item.getWechat());
|
||||
WidgetTools.setTextfive((TextView) helper.getView(R.id.tv_fpnum), "", "已分配"+item.getFp_num()+"次");
|
||||
RecyclerView recy_dis = (RecyclerView)helper.getView(R.id.recy_dis);
|
||||
|
||||
LinearLayoutManager manager = new LinearLayoutManager(mcontext);
|
||||
manager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
recy_dis.setLayoutManager(manager);
|
||||
recy_dis.setAdapter(new BaseQuickAdapter<FpListBean.ResultBean.DataBean.IndustryBean, BaseViewHolder>(R.layout.item_recy_dislist, item.getIndustry()) {
|
||||
@Override
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.fenghoo.seven.main.kehu.fragment;
|
||||
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.fenghoo.seven.JsonUtils;
|
||||
import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.base.BaseBean;
|
||||
import com.fenghoo.seven.dialog.BaseTipsDialog;
|
||||
import com.fenghoo.seven.main.kehu.Bean.CustomerListBean;
|
||||
import com.fenghoo.seven.main.kehu.Dialog.CusOperationDialog;
|
||||
@@ -12,6 +11,7 @@ import com.fenghoo.seven.main.kehu.adapter.CusListAdapter;
|
||||
import com.fenghoo.seven.okgonet.HttpConstants;
|
||||
import com.fenghoo.seven.okgonet.NetApi;
|
||||
import com.fenghoo.seven.okgonet.Observer;
|
||||
import com.fenghoo.seven.utils.ToastUtils;
|
||||
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
@@ -56,7 +56,8 @@ public class CustomerFragment extends MobanFragment {
|
||||
new BaseTipsDialog().showDownloadDialog(getActivity(), "确认删除该客户吗?", "确定", new BaseTipsDialog.ClickListener() {
|
||||
@Override
|
||||
public void confirm() {
|
||||
Toast.makeText(getActivity(), "还没调接口", Toast.LENGTH_SHORT).show();
|
||||
//Toast.makeText(getActivity(), "还没调接口", Toast.LENGTH_SHORT).show();
|
||||
deleteCus(item.getCustomer_id());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,10 +89,9 @@ public class CustomerFragment extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("search", "");
|
||||
// paramsPost.put("page", mNextRequestPage);
|
||||
new NetApi().getPostData(paramsPost, HttpConstants.URi_device_AppCustomer_customerList).subscribe(new Observer<Response>() {
|
||||
@Override
|
||||
public void onNext(Response response) {
|
||||
@@ -99,7 +99,6 @@ public class CustomerFragment extends MobanFragment {
|
||||
CustomerListBean.ResultBean result = JsonUtils.fromJson(body, CustomerListBean.class).getResult();
|
||||
mSwl.setRefreshing(false);
|
||||
if (result != null && String.valueOf(result.getSuccess()).equals("0")) {
|
||||
|
||||
List<CustomerListBean.ResultBean.DataBean> data = result.getData();
|
||||
if (mNextRequestPage == 1) {
|
||||
if (data.size() == 0) {
|
||||
@@ -130,4 +129,33 @@ public class CustomerFragment extends MobanFragment {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 删除客户
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
private void deleteCus(String customer_id){
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("customer_id", customer_id);
|
||||
new NetApi().getPostData(paramsPost, HttpConstants.URi_device_AppCustomer_deleteCus).subscribe(new Observer<Response>() {
|
||||
@Override
|
||||
public void onNext(Response response) {
|
||||
String body = (String) response.body();
|
||||
BaseBean.ResultBean result = JsonUtils.fromJson(body, BaseBean.class).getResult();
|
||||
if(result.getSuccess()==0){
|
||||
requestData();
|
||||
ToastUtils.showToast(getActivity(),"执行了刷新方法");
|
||||
}else {
|
||||
ToastUtils.showToast(getActivity(),result.getMsg());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onError(Exception e) {
|
||||
e.printStackTrace();
|
||||
markingtwoAdapter.setEmptyView(errorView);
|
||||
mSwl.setRefreshing(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ import com.fenghoo.seven.JsonUtils;
|
||||
import com.fenghoo.seven.main.kehu.Bean.orderListBean;
|
||||
import com.fenghoo.seven.main.kehu.activity.ShowAty;
|
||||
import com.fenghoo.seven.main.kehu.adapter.DeaListAdapter;
|
||||
import com.fenghoo.seven.okgonet.HttpConstants;
|
||||
import com.fenghoo.seven.okgonet.NetApi;
|
||||
import com.fenghoo.seven.okgonet.Observer;
|
||||
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.List;
|
||||
@@ -50,21 +52,22 @@ public class DealFragment extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
new NetApi().orderList(ProfileSpUtils.getInstance().getUserProfie().getData().getUuid(),"").subscribe(new Observer<Response>() {
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("search", "");
|
||||
new NetApi().getPostData(paramsPost, HttpConstants.URi_device_AppCustomer_orderList).subscribe(new Observer<Response>() {
|
||||
@Override
|
||||
public void onNext(Response response) {
|
||||
String body = (String) response.body();
|
||||
orderListBean.ResultBean result = JsonUtils.fromJson(body, orderListBean.class).getResult();
|
||||
mSwl.setRefreshing(false);
|
||||
if (result != null && String.valueOf(result.getSuccess()).equals("0")) {
|
||||
|
||||
List<orderListBean.ResultBean.DataBean> data = result.getData();
|
||||
|
||||
if (data.size() == 0) {
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
List<orderListBean.ResultBean.DataBean> data = result.getData();
|
||||
if (mNextRequestPage == 1) {
|
||||
if (data.size() == 0) {
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
setData(true, data);
|
||||
} else {
|
||||
setData(false, data);
|
||||
|
||||
@@ -4,9 +4,11 @@ import com.fenghoo.seven.JsonUtils;
|
||||
import com.fenghoo.seven.main.kehu.Bean.FpListBean;
|
||||
import com.fenghoo.seven.main.kehu.activity.ShowAty;
|
||||
import com.fenghoo.seven.main.kehu.adapter.DisListAdapter;
|
||||
import com.fenghoo.seven.okgonet.HttpConstants;
|
||||
import com.fenghoo.seven.okgonet.NetApi;
|
||||
import com.fenghoo.seven.okgonet.Observer;
|
||||
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.List;
|
||||
@@ -49,7 +51,10 @@ public class DistriFragment extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
new NetApi().fpList(ProfileSpUtils.getInstance().getUserProfie().getData().getUuid(),"").subscribe(new Observer<Response>() {
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("search", "");
|
||||
new NetApi().getPostData(paramsPost, HttpConstants.URi_device_AppCustomer_fpList).subscribe(new Observer<Response>() {
|
||||
@Override
|
||||
public void onNext(Response response) {
|
||||
String body = (String) response.body();
|
||||
@@ -57,11 +62,11 @@ public class DistriFragment extends MobanFragment {
|
||||
mSwl.setRefreshing(false);
|
||||
if (result != null && String.valueOf(result.getSuccess()).equals("0")) {
|
||||
List<FpListBean.ResultBean.DataBean> data = result.getData();
|
||||
if (data.size() == 0) {
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
if (mNextRequestPage == 1) {
|
||||
if (data.size() == 0) {
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
setData(true, data);
|
||||
} else {
|
||||
setData(false, data);
|
||||
|
||||
@@ -30,7 +30,6 @@ public class HttpConstants {
|
||||
*/
|
||||
public static String URi_device_AppCustomer_fpList = URiBase + "/device/AppCustomer/fpList";
|
||||
|
||||
|
||||
/**
|
||||
* 客户列表
|
||||
*/
|
||||
@@ -80,6 +79,16 @@ public class HttpConstants {
|
||||
*/
|
||||
public static String URi_device_AppDouyin_aweme = URiBase + "/device/AppDouyin/aweme";
|
||||
|
||||
/**
|
||||
* 私信列表
|
||||
*/
|
||||
public static String URi_device_AppDouyin_privateList = URiBase + "/device/AppDouyin/privateList";
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
*/
|
||||
public static String URi_device_AppCustomer_deleteCus = URiBase + "/device/AppCustomer/deleteCus";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -105,51 +105,6 @@ public class NetApi {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分配列表
|
||||
*/
|
||||
public Observable<Response> fpList(final String uid, final String search) {
|
||||
|
||||
return new Observable<Response>() {
|
||||
@Override
|
||||
public void subscribe(final Observer<Response> observer) {
|
||||
|
||||
OkGo.<String>post(HttpConstants.URi_device_AppCustomer_fpList)//
|
||||
.params("uid", uid)
|
||||
.params("search", search)
|
||||
.converter(new StringConvert())//
|
||||
.cacheMode(CacheMode.NO_CACHE) //无缓存模式 CacheMode.NO_CACHE
|
||||
.adapt(new ObservableResponse<String>())//
|
||||
.subscribeOn(Schedulers.io())//
|
||||
.observeOn(AndroidSchedulers.mainThread())//
|
||||
.subscribe(new io.reactivex.Observer<Response<String>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
// addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull Response<String> response) {
|
||||
observer.onNext(response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户列表
|
||||
*/
|
||||
@@ -195,52 +150,6 @@ public class NetApi {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 成交列表
|
||||
*/
|
||||
public Observable<Response> orderList(final String uid, final String search) {
|
||||
|
||||
return new Observable<Response>() {
|
||||
@Override
|
||||
public void subscribe(final Observer<Response> observer) {
|
||||
|
||||
OkGo.<String>post(HttpConstants.URi_device_AppCustomer_orderList)//
|
||||
.params("uid", uid)
|
||||
.params("search", search)
|
||||
.converter(new StringConvert())//
|
||||
.cacheMode(CacheMode.NO_CACHE) //无缓存模式 CacheMode.NO_CACHE
|
||||
.adapt(new ObservableResponse<String>())//
|
||||
.subscribeOn(Schedulers.io())//
|
||||
.observeOn(AndroidSchedulers.mainThread())//
|
||||
.subscribe(new io.reactivex.Observer<Response<String>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
// addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull Response<String> response) {
|
||||
observer.onNext(response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户分配
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
android:background="@color/colorWhite">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cjnum"
|
||||
android:layout_width="59.5dp"
|
||||
android:layout_height="21.5dp"
|
||||
android:layout_alignParentRight="true"
|
||||
@@ -30,7 +31,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dea_name"
|
||||
android:layout_width="59dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginLeft="13.5dp"
|
||||
android:layout_marginTop="19.5dp"
|
||||
@@ -39,12 +40,20 @@
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="15sp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_toRightOf="@+id/tv_dea_name"
|
||||
android:text=" • "
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_dea_phone"
|
||||
android:layout_width="67dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginTop="19.5dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_toRightOf="@+id/tv_dea_name"
|
||||
android:text="18971614151"
|
||||
android:textColor="#ff333333"
|
||||
@@ -71,7 +80,7 @@
|
||||
android:layout_below="@+id/tv_dea_name"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="12sp"
|
||||
android:text="--"
|
||||
android:text=""
|
||||
/>
|
||||
|
||||
<View
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
android:background="@color/colorWhite">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fpnum"
|
||||
android:layout_width="59.5dp"
|
||||
android:layout_height="21.5dp"
|
||||
android:layout_alignParentRight="true"
|
||||
@@ -30,7 +31,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dea_name"
|
||||
android:layout_width="59dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginLeft="13.5dp"
|
||||
android:layout_marginTop="19.5dp"
|
||||
@@ -39,12 +40,20 @@
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="15sp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_toRightOf="@+id/tv_dea_name"
|
||||
android:text=" • "
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_dea_phone"
|
||||
android:layout_width="67dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginTop="19.5dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_toRightOf="@+id/tv_dea_name"
|
||||
android:text="18971614151"
|
||||
android:textColor="#ff333333"
|
||||
@@ -63,7 +72,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dea_watch"
|
||||
android:layout_width="67dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="16dp"
|
||||
android:layout_toRightOf="@+id/ima_dea_watch"
|
||||
android:layout_marginLeft="13.5dp"
|
||||
@@ -80,7 +89,8 @@
|
||||
android:layout_below="@+id/ima_dea_watch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="13.5dp"
|
||||
android:layout_marginTop="8.5dp"
|
||||
android:layout_marginBottom="13.5dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
/>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<LinearLayout android:id="@+id/view_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<TextView
|
||||
|
||||
@@ -21,6 +21,26 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_default_head"
|
||||
app:border_color="#70ffffff" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/message_num_rltwo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_toRightOf="@id/private_iv_dea_avatar">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/left_tvtwo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@mipmap/message_remind"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -51,7 +71,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/private_tv_time"
|
||||
android:layout_width="27dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:text="12:00"
|
||||
android:layout_marginRight="12dp"
|
||||
|
||||
Reference in New Issue
Block a user