This commit is contained in:
2020-09-09 15:49:41 +08:00
parent f3caf4108d
commit 5a024a2927
16 changed files with 97 additions and 60 deletions

View File

@@ -13,6 +13,7 @@ import com.fenghoo.seven.main.my.MyFragment;
import com.fenghoo.seven.main.task.HomeFragment;
import com.fenghoo.seven.main.zhibo.LivebroFragment;
import com.fenghoo.seven.utils.StatusBarUtil;
import com.fenghoo.seven.utils.ToastUtils;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
@@ -111,6 +112,8 @@ public class MainActivity extends BaseActivity implements View.OnClickListener{
FragmentTransaction fragmentTransaction = fm.beginTransaction();
switch (v.getId()) {
case R.id.rl_home:
ToastUtils.showToast(this,"该功能暂未开放");
mTvHomeImg.setBackgroundResource(R.mipmap.icon_task);
mTvSendImg.setBackgroundResource(R.mipmap.icon_zhibohui);
mTvMapImg.setBackgroundResource(R.mipmap.icon_kehuhui);
@@ -138,6 +141,7 @@ public class MainActivity extends BaseActivity implements View.OnClickListener{
StatusBarUtil.setStatusBarColor(this,R.color.colorPrimary);
break;
case R.id.rl_send:
ToastUtils.showToast(this,"该功能暂未开放");
mTvHomeImg.setBackgroundResource(R.mipmap.icon_task_hui);
mTvSendImg.setBackgroundResource(R.mipmap.icon_zhibo);
mTvMapImg.setBackgroundResource(R.mipmap.icon_kehuhui);

View File

@@ -41,8 +41,8 @@ public class API {
* 配置域名信息
*/
public static class Config {
private static final String TEST_DOMAIN = "http://192.168.1.3/device/";
// private static final String TEST_DOMAIN = "http://106.53.92.2/device/";
// private static final String TEST_DOMAIN = "http://192.168.1.3/device/";
private static final String TEST_DOMAIN = "http://106.53.92.2/device/";
private static final String RElEASE_DOMAIN = "http://cloud.bmob.cn";
private static final String TEST_APP_ID = "e90928398db0130b0d6d21da7bde357e";
private static final String RELEASE_APP_ID = "e90928398db0130b0d6d21da7bde357e";

View File

@@ -29,10 +29,12 @@ public class AddCustomerActivity extends BaseActivity {
mTitleBar = (TitleBar) findViewById(R.id.title_bar);
mTitleBar.setTitle("信息完善");
initNormalBack();
search = getIntent().getStringExtra("search");
pagetype = getIntent().getStringExtra("pagetype");
CustomerListBean.ResultBean.DataBean dataBean = (CustomerListBean.ResultBean.DataBean) getIntent().getSerializableExtra("dataBean");
customer_id = dataBean.getCustomer_id();
source = dataBean.getSource();
addCusFragment = new AddCusFragment(this.customer_id, this.source,search,pagetype,"",dataBean);
addCusFragment = new AddCusFragment(this.customer_id, this.source, this.search,pagetype,"",dataBean);
getSupportFragmentManager().beginTransaction().replace(R.id.containerrr,addCusFragment).commit();
findViewById(R.id.btn_comit).setOnClickListener(new View.OnClickListener() {
@Override

View File

@@ -33,11 +33,6 @@ public class SearchAdapter extends BaseAdapter<String> {
public void onClick(View v) {
if(null!=mListener)
mListener.onItemEvent(mList.get(position), 0, position);
// if("0".equals(poFrom)) { //搜索商品
// JumpUtils.gotoActivity((Activity) mContext, MallListActivity.class, false, "mSearchStr", "开心");
// }else { //搜索帖子
// JumpUtils.gotoActivity((Activity) mContext, SearchResultActivity.class, false, "mSearchStr", "开心");
// }
}
});
return convertView;

View File

@@ -94,7 +94,7 @@ public class AddCusFragment extends MobanFragment implements View.OnClickListene
this.customer_id=customer_id;
this.source=source;
this.search=search;
this.pagetype=pagetype;//pagetype为""说明是添加客户,否则是信息完善
this.pagetype=pagetype;//pagetype为""说明是信息完善,否则是添加客户
this.dy_uid=dy_uid;
this.dataBean=dataBean;
addCustomerBean = new addCustomerBean();
@@ -151,7 +151,10 @@ public class AddCusFragment extends MobanFragment implements View.OnClickListene
textView8 = (EditText) view.findViewById(R.id.textView8);
textView12 = (TextView) view.findViewById(R.id.textView12);
textView14 = (TextView) view.findViewById(R.id.textView14);
if(!pagetype.equals("")){
if(pagetype.equals("0")||pagetype.equals("1")||pagetype.equals("2")){
//添加客户
label = addData("1","0","0");
}else {
//完善信息
WidgetTools.setTextfive(textView0, "", dataBean.getName());
WidgetTools.setTextfive(textView4, "", dataBean.getPhone());
@@ -175,9 +178,6 @@ public class AddCusFragment extends MobanFragment implements View.OnClickListene
addCustomerBean.setStyle_id(dataBean.getStyle_id());
WidgetTools.setTextfive(textView14, "", dataBean.getBudget());
addCustomerBean.setBudget(dataBean.getBudget());
}else {
//添加客户
label = addData("1","0","0");
}
setLabel(label);
ConstraintLayout constraintLayout7 = (ConstraintLayout) view.findViewById(R.id.constraintLayout7);
@@ -222,7 +222,7 @@ public class AddCusFragment extends MobanFragment implements View.OnClickListene
BaseBean.ResultBean result = JsonUtils.fromJson(body, BaseBean.class).getResult();
if(result.getSuccess()==0){
//通知客户列表刷新数据
EventBus.getDefault().post(new ThreeEvent(pagetype,search));
EventBus.getDefault().post(new ThreeEvent("0",search));
//通知会话页面添加客户是否成功
EventBus.getDefault().post(new SixEvent("0"));
getActivity().finish();

View File

@@ -12,13 +12,11 @@ import com.fenghoo.seven.dialog.BaseTipsDialog;
import com.fenghoo.seven.main.find.entity.ThreeEvent;
import com.fenghoo.seven.main.kehu.Bean.CustomerListBean;
import com.fenghoo.seven.main.kehu.Dialog.CusOperationDialog;
import com.fenghoo.seven.main.kehu.activity.AddCustomerActivity;
import com.fenghoo.seven.main.kehu.activity.ShowAty;
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.JumpUtils;
import com.fenghoo.seven.utils.ToastUtils;
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
import com.lzy.okgo.model.HttpParams;
@@ -28,6 +26,7 @@ import com.tbruyelle.rxpermissions2.RxPermissions;
import java.util.List;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import de.greenrobot.event.EventBus;
import io.reactivex.disposables.Disposable;
@@ -84,13 +83,7 @@ public class CustomerFragment extends MobanFragment {
@Override
public void uploadAvatar() {
//进入添加客户和完善信息
String customer_id = item.getCustomer_id();
String source = item.getSource();
// ShowAty.AddCustomerActivity(getActivity(),customer_id,source,search,"0");
ShowAty.AddCustomerActivity(getActivity(),item,search,"0");
// JumpUtils.gotoActivity(getActivity(), AddCustomerActivity.class, false, "dataBean", item);
ShowAty.AddCustomerActivity(getActivity(),item,search,"");
}
}).show();
@@ -133,6 +126,20 @@ public class CustomerFragment extends MobanFragment {
}
});
}
/**
* @description 重写下拉刷新方法,让刷新全部数据
* @param
* @return
*/
public void initRefreshLayout() {
mSwl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
search="";
refresh();
}
});
}
public void onEvent(ThreeEvent event) {
if (null != event ) {
@@ -141,8 +148,6 @@ public class CustomerFragment extends MobanFragment {
Log.d("客户调拨--","刷新列表页面");
if(pagetype.equals("0")){
search = event.getSearch();
// IS_LOADED=false;
// sendMessage();
newrefresh();
}
}

View File

@@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.List;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import de.greenrobot.event.EventBus;
/**
@@ -69,19 +70,29 @@ public class DealFragment extends MobanFragment {
}
industryBean.setData(dataBeans);
ShowAty.FpOrderInfoActivity(getActivity(),item.getCustomer_id(),item.getName()+item.getPhone(),item.getHeadimg(),item.getWechat(),item.getAddress(),industryBean);
// JumpUtils.gotoActivity(getActivity(), FpOrderInfoActivity.class, false, "dataBean", item);
}
});
}
/**
* @description 重写下拉刷新方法,让刷新全部数据
* @param
* @return
*/
public void initRefreshLayout() {
mSwl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
search="";
refresh();
}
});
}
public void onEvent(ThreeEvent event) {
if (null != event ) {
String pagetype = event.getPagetype();
Log.e("刷新页面==",pagetype);
if(pagetype.equals("2")){
search = event.getSearch();
// IS_LOADED=false;
// sendMessage();
newrefresh();
}
}

View File

@@ -7,7 +7,6 @@ import android.widget.FrameLayout;
import com.fenghoo.seven.JsonUtils;
import com.fenghoo.seven.main.find.entity.ThreeEvent;
import com.fenghoo.seven.main.kehu.Bean.FpListBean;
import com.fenghoo.seven.main.kehu.Bean.IndustryBean;
import com.fenghoo.seven.main.kehu.Bean.IndustryBeantwo;
import com.fenghoo.seven.main.kehu.activity.ShowAty;
import com.fenghoo.seven.main.kehu.adapter.DisListAdapter;
@@ -22,6 +21,7 @@ import java.util.ArrayList;
import java.util.List;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import de.greenrobot.event.EventBus;
/**
@@ -62,19 +62,29 @@ public class DistriFragment extends MobanFragment {
}
industryBean.setData(dataBeans);
ShowAty.FpOrderInfoActivity(getActivity(),item.getCustomer_id(),item.getName()+item.getPhone(),item.getHeadimg(),item.getWechat(),item.getAddress(),industryBean);
// JumpUtils.gotoActivity(getActivity(), FpOrderInfoActivity.class, false, "dataBean", item);
}
});
}
/**
* @description 重写下拉刷新方法,让刷新全部数据
* @param
* @return
*/
public void initRefreshLayout() {
mSwl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
search="";
refresh();
}
});
}
public void onEvent(ThreeEvent event) {
if (null != event ) {
String pagetype = event.getPagetype();
Log.e("刷新页面==",pagetype);
if(pagetype.equals("1")){
search = event.getSearch();
// IS_LOADED=false;
// sendMessage();
newrefresh();
}
}

View File

@@ -20,7 +20,6 @@ import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import de.greenrobot.event.EventBus;
public abstract class MobanFragment extends BaseFragment {
public static final String ARG_PAGE = "ARG_PAGE";
public boolean IS_LOADED = false;
@@ -113,7 +112,7 @@ public abstract class MobanFragment extends BaseFragment {
public abstract void initAdapter();
private void initRefreshLayout() {
public void initRefreshLayout() {
mSwl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
@@ -122,7 +121,7 @@ public abstract class MobanFragment extends BaseFragment {
});
}
private void refresh() {
public void refresh() {
mNextRequestPage = 1;
markingtwoAdapter.setEnableLoadMore(false);//这里的作用是防止下拉刷新的时候还可以上拉加载
requestData();

View File

@@ -159,8 +159,8 @@ public class TraceFragment extends BaseFragment implements View.OnClickListener
floatingActionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//进入添加客户和完善信息
ShowAty.AddCustDialogActivity(getActivity(),"","1","","","");
//进入添加客户
ShowAty.AddCustDialogActivity(getActivity(),"","1","",pagetype,"");
}
});
}

View File

@@ -16,6 +16,7 @@ import com.fenghoo.seven.main.activity.Main2Activity;
import com.fenghoo.seven.main.my.activity.PersonalProfileActivity;
import com.fenghoo.seven.main.my.entity.loginInfoBean;
import com.fenghoo.seven.utils.GlideTools;
import com.fenghoo.seven.utils.ToastUtils;
import com.fenghoo.seven.utils.ToolsUtils;
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
import com.fenghoo.seven.view.webview.XfiveWebActivity;
@@ -44,6 +45,8 @@ public class MyFragment
private ProfileSpUtils profileSpUtils;
private TextView tv_my_version;
private RelativeLayout my_rl_01;
private RelativeLayout my_rl_02;
private RelativeLayout my_rl_03;
private RelativeLayout my_rl_function;
private TextView my_tv_name;
private TextView my_tv_phone;
@@ -66,6 +69,8 @@ public class MyFragment
my_tv_dichan = (TextView) view.findViewById(R.id.my_tv_dichan);
tv_my_version = (TextView) view.findViewById(R.id.tv_my_version);
my_rl_01 = (RelativeLayout) view.findViewById(R.id.my_rl_01);
my_rl_02 = (RelativeLayout) view.findViewById(R.id.my_rl_02);
my_rl_03 = (RelativeLayout) view.findViewById(R.id.my_rl_03);
my_rl_function = (RelativeLayout) view.findViewById(R.id.my_rl_function);
ToolsUtils.setText(tv_my_version, ToolsUtils.getVersion(getActivity()));
}
@@ -81,6 +86,8 @@ public class MyFragment
view.findViewById(R.id.view_personal_profile).setOnClickListener(this);
((ItemView) view.findViewById(R.id.item_my_twitter)).setOnItemViewClickListener(this);
my_rl_01.setOnClickListener(this);
my_rl_02.setOnClickListener(this);
my_rl_03.setOnClickListener(this);
my_rl_function.setOnClickListener(this);
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
@@ -135,14 +142,16 @@ public class MyFragment
}
switch (v.getId()) {
case R.id.my_rl_01:
startActivity(Main2Activity.class);
break;
case R.id.my_rl_02:
ToastUtils.showToast(getActivity(),"该功能暂未开放");
break;
case R.id.my_rl_03:
ToastUtils.showToast(getActivity(),"该功能暂未开放");
break;
case R.id.my_rl_function:
startActivity(PersonalProfileActivity.class);
break;
}
}

View File

@@ -95,17 +95,17 @@ public class XikeInfoFragment extends MoFragment {
@Override
public void requestData() {
List<XikeInfoBean.ResultBean.DataBean> data = new ArrayList<XikeInfoBean.ResultBean.DataBean>();
for (int i = 0; i < 20; i++)
{
XikeInfoBean.ResultBean.DataBean dataBean = new XikeInfoBean.ResultBean.DataBean();
dataBean.setTime("2020-07-01 12:00:00");
dataBean.setXike_num("+89.00");
dataBean.setXike_remark("收益账户转入");
data.add(dataBean);
}
if (data.size() == 0) {
return;
}
// for (int i = 0; i < 20; i++)
// {
// XikeInfoBean.ResultBean.DataBean dataBean = new XikeInfoBean.ResultBean.DataBean();
// dataBean.setTime("2020-07-01 12:00:00");
// dataBean.setXike_num("+89.00");
// dataBean.setXike_remark("收益账户转入");
// data.add(dataBean);
// }
// if (data.size() == 0) {
// return;
// }
if (mNextRequestPage == 1) {
setData(true, data);
} else {

View File

@@ -23,8 +23,8 @@ import retrofit2.http.POST;
public class MyApi {
public static String URiBase = "http://192.168.1.3/device/";// 7月7
// public static String URiBase = "http://106.53.92.2/device/";// 7月7
// public static String URiBase = "http://192.168.1.3/device/";// 7月7
public static String URiBase = "http://106.53.92.2/device/";// 7月7
/**
* 网络接口前缀

View File

@@ -10,8 +10,8 @@ package com.fenghoo.seven.okgonet;
*/
public class HttpConstants {
public static String URiBase = "http://192.168.1.3";// 7月7
// public static String URiBase = "http://106.53.92.2";// 7月7
// public static String URiBase = "http://192.168.1.3";// 7月7
public static String URiBase = "http://106.53.92.2";// 7月7

View File

@@ -68,7 +68,7 @@
<TextView
android:id="@+id/my_tv_phone"
android:layout_width="85dp"
android:layout_width="wrap_content"
android:layout_height="18dp"
android:text="189****5421"
android:layout_toRightOf="@+id/riv_avatar"
@@ -118,6 +118,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/my_rl_02"
android:layout_width="match_parent"
android:layout_height="83dp"
android:layout_weight="1"
@@ -142,6 +143,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/my_rl_03"
android:layout_width="match_parent"
android:layout_height="83dp"
android:layout_weight="1"

View File

@@ -18,7 +18,7 @@
<TextView
android:layout_width="125dp"
android:layout_height="52dp"
android:text="128.56"
android:text="00.00"
android:textColor="#ffffffff"
android:layout_marginLeft="40.5dp"
android:layout_marginTop="70dp"