d
This commit is contained in:
97
app/src/main/assets/customerList.json
Normal file
97
app/src/main/assets/customerList.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"address": "",
|
||||
"budget": "",
|
||||
"customer_id": "49fc031a8b374e5c69b1640c2f77b5f4",
|
||||
"decoration": "1",
|
||||
"headimg": "http://192.168.1.3/upload/2020090409422893432.jpg",
|
||||
"name": "狗子",
|
||||
"phone": "13255558866",
|
||||
"source": "1",
|
||||
"source_name": "添加客户",
|
||||
"style_id": "",
|
||||
"style_name": "",
|
||||
"type": "new",
|
||||
"wechat": "— —"
|
||||
},
|
||||
{
|
||||
"address": "住址",
|
||||
"budget": "15万-20万",
|
||||
"customer_id": "4db0ac2253cb643bfb0ddeb6375a27b3",
|
||||
"decoration": "1",
|
||||
"headimg": "",
|
||||
"name": "阿爸。",
|
||||
"phone": "13458966692",
|
||||
"source": "1",
|
||||
"source_name": "添加客户",
|
||||
"style_id": "5",
|
||||
"style_name": "现代简约",
|
||||
"type": "old",
|
||||
"wechat": "call"
|
||||
},
|
||||
{
|
||||
"address": "一次是真的",
|
||||
"budget": "5万-10万",
|
||||
"customer_id": "5619a67e02a85290ad485d2e2b48b788",
|
||||
"decoration": "2",
|
||||
"headimg": "http://192.168.1.3/upload/2020090315102014899.jpg",
|
||||
"name": "在乎",
|
||||
"phone": "13278787787",
|
||||
"source": "1",
|
||||
"source_name": "添加客户",
|
||||
"style_id": "7",
|
||||
"style_name": "地中海",
|
||||
"type": "old",
|
||||
"wechat": "一次"
|
||||
},
|
||||
{
|
||||
"address": "",
|
||||
"budget": "",
|
||||
"customer_id": "638de5977746a9337b08d9caaee11393",
|
||||
"decoration": "2",
|
||||
"headimg": "http://192.168.1.3/upload/2020090409345081526.jpg",
|
||||
"name": "1212121",
|
||||
"phone": "21212121qwq",
|
||||
"source": "1",
|
||||
"source_name": "添加客户",
|
||||
"style_id": "",
|
||||
"style_name": "",
|
||||
"type": "new",
|
||||
"wechat": ""
|
||||
},
|
||||
{
|
||||
"address": "等,你,你",
|
||||
"budget": "20万以上",
|
||||
"customer_id": "7b4df32da7c8c08b55903117bb7cc8d9",
|
||||
"decoration": "1",
|
||||
"headimg": "http://192.168.1.3/upload/2020090409233368106.jpg",
|
||||
"name": "你在,他",
|
||||
"phone": "13826942573",
|
||||
"source": "1",
|
||||
"source_name": "添加客户",
|
||||
"style_id": "6",
|
||||
"style_name": "东南亚",
|
||||
"type": "new",
|
||||
"wechat": ""
|
||||
},
|
||||
{
|
||||
"address": "",
|
||||
"budget": "",
|
||||
"customer_id": "af8b2b183071a36cf216211c48890ce9",
|
||||
"decoration": "1",
|
||||
"headimg": "http://192.168.1.3/upload/2020090409364521615.jpg",
|
||||
"name": "二哈",
|
||||
"phone": "13245725369",
|
||||
"source": "0",
|
||||
"source_name": "",
|
||||
"style_id": "",
|
||||
"style_name": "",
|
||||
"type": "new",
|
||||
"wechat": "微信"
|
||||
}
|
||||
],
|
||||
"msg": "获取成功",
|
||||
"success": 0,
|
||||
"total": 4
|
||||
}
|
||||
21
app/src/main/assets/fpList.json
Normal file
21
app/src/main/assets/fpList.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"customer_id": "ae0c5199fdf564f90796aec09482b85d",
|
||||
"fp_num": "2",
|
||||
"headimg": "localhost/upload/2020081115530962805.jpg",
|
||||
"industry": [
|
||||
{
|
||||
"customer_id": "ae0c5199fdf564f90796aec09482b85d",
|
||||
"industry": "家具",
|
||||
"type": "0"
|
||||
}
|
||||
],
|
||||
"name": "demo",
|
||||
"phone": "18831913290",
|
||||
"wechat": "wangyuxin283425757"
|
||||
}
|
||||
],
|
||||
"msg": "获取成功",
|
||||
"success": 0
|
||||
}
|
||||
34
app/src/main/assets/fpOrderInfo.json
Normal file
34
app/src/main/assets/fpOrderInfo.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"budget": "",
|
||||
"decoration": "1",
|
||||
"enter_state": "0",
|
||||
"fp_time": "1970-01-01 08:00",
|
||||
"id": "1",
|
||||
"industry": "家具",
|
||||
"order": [
|
||||
{
|
||||
"fh_id": "1",
|
||||
"order_name": "qqq",
|
||||
"recudesum": "1.00",
|
||||
"time": "2020-09-08 10:14"
|
||||
}
|
||||
],
|
||||
"order_state": "0",
|
||||
"rob_time": "1970-01-01 08:00",
|
||||
"travel": "1",
|
||||
"type": "0",
|
||||
"type_time": "1970-01-01 08:00",
|
||||
"ygd_brand_name": "",
|
||||
"ygd_brand_type": "",
|
||||
"ygd_enter": "0",
|
||||
"ygd_order": "0",
|
||||
"ygd_rob_name": "",
|
||||
"ygd_state": "0",
|
||||
"ygd_store_name": ""
|
||||
}
|
||||
],
|
||||
"msg": "成功",
|
||||
"success": 0
|
||||
}
|
||||
16
app/src/main/assets/logingpwd.json
Normal file
16
app/src/main/assets/logingpwd.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"data":
|
||||
{
|
||||
"industry_name": "家具",
|
||||
"phone_number": "14729066305",
|
||||
"status": "0",
|
||||
"store_id": "1",
|
||||
"user_head": "",
|
||||
"user_name": "admin",
|
||||
"user_type": "2",
|
||||
"uuid": "3"
|
||||
}
|
||||
,
|
||||
"msg": "登陆成功",
|
||||
"success": 0
|
||||
}
|
||||
14
app/src/main/assets/orderList.json
Normal file
14
app/src/main/assets/orderList.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"customer_id": "ae0c5199fdf564f90796aec09482b85d",
|
||||
"headimg": "localhost/upload/2020081115530962805.jpg",
|
||||
"name": "demo",
|
||||
"order_num": "1",
|
||||
"phone": "18831913290",
|
||||
"wechat": "wangyuxin283425757"
|
||||
}
|
||||
],
|
||||
"msg": "获取成功",
|
||||
"success": 0
|
||||
}
|
||||
15
app/src/main/assets/privateList.json
Normal file
15
app/src/main/assets/privateList.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"connect_time": "10:48",
|
||||
"content": "",
|
||||
"nick_img": "",
|
||||
"nick_name": "私信昵称",
|
||||
"private_id": "1",
|
||||
"read_num": "0",
|
||||
"short_id": "私信id"
|
||||
}
|
||||
],
|
||||
"msg": "成功",
|
||||
"success": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.fenghoo.seven.main.activity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.Html;
|
||||
import android.view.View;
|
||||
@@ -138,6 +139,11 @@ public class LoginPasswordActivity extends BaseTreeActivity<LoginPasswordContrac
|
||||
login_tv_code.setText("验证码登录");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context getContext() {
|
||||
return LoginPasswordActivity.this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMobile() {
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.fenghoo.seven.main.activity.mvp.contract;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.fenghoo.seven.base.BaseTreeView;
|
||||
import com.fenghoo.seven.main.my.entity.loginInfoBean;
|
||||
import com.fenghoo.seven.network.ApiCallBack;
|
||||
@@ -15,6 +17,12 @@ import com.fenghoo.seven.network.ApiCallBack;
|
||||
public class LoginPasswordContract {
|
||||
public interface View extends BaseTreeView {
|
||||
|
||||
/**
|
||||
* 获取tContext
|
||||
*
|
||||
*/
|
||||
Context getContext();
|
||||
|
||||
/**
|
||||
* 获取手机号
|
||||
*
|
||||
|
||||
@@ -2,18 +2,26 @@ package com.fenghoo.seven.main.activity.mvp.presenterImpl;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.fenghoo.seven.main.activity.MainActivity;
|
||||
import com.fenghoo.seven.main.activity.mvp.contract.LoginPasswordContract;
|
||||
import com.fenghoo.seven.main.activity.mvp.model.LoginPasswordModelImpl;
|
||||
import com.fenghoo.seven.main.kehu.Bean.orderListBean;
|
||||
import com.fenghoo.seven.main.my.entity.loginInfoBean;
|
||||
import com.fenghoo.seven.network.ApiCallBack;
|
||||
import com.fenghoo.seven.okgonet.HttpConstants;
|
||||
import com.fenghoo.seven.utils.GetJsonDataUtil;
|
||||
import com.fenghoo.seven.utils.JsonUtils;
|
||||
import com.fenghoo.seven.utils.PhonenNumUtil;
|
||||
import com.fenghoo.seven.utils.StringUtils;
|
||||
import com.fenghoo.seven.utils.ToastUtils;
|
||||
import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
|
||||
import com.hannesdorfmann.mosby3.mvp.MvpPresenter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Time: 2020/8/10
|
||||
* Author: jianbo
|
||||
@@ -68,6 +76,31 @@ public class LoginPasswordPresenterImpl extends MvpBasePresenter<LoginPasswordCo
|
||||
}
|
||||
|
||||
getView().showProgressDialog("登录中...");
|
||||
|
||||
|
||||
if(HttpConstants.Dataflag==false){
|
||||
String JsonData = new GetJsonDataUtil().getJson(getView().getContext(), "logingpwd.json");//获取assets目录下的json文件数据
|
||||
loginInfoBean data = JsonUtils.fromJson(JsonData, loginInfoBean.class);
|
||||
getView().dismissProgressDialog();
|
||||
if(data.getSuccess()==0){
|
||||
mModel.setLogin(true);
|
||||
mModel.saveUserInfo(data);
|
||||
Log.d("LoginPresenterImpl: ", data.toString());
|
||||
//记住密码
|
||||
// boolean savePassword = getView().isSavePassword();
|
||||
// mModel.savePassword(savePassword ? mobile : null, savePassword ? passWord : null);
|
||||
getView().startActivity(MainActivity.class);
|
||||
}else {
|
||||
getView().toast(data.getMsg());
|
||||
getView().showphoneright();
|
||||
getView().showpasswordright();
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
mModel.login(mobile, passWord, new ApiCallBack<loginInfoBean>() {
|
||||
@Override
|
||||
protected void onSuccess(loginInfoBean data, String message) {
|
||||
@@ -87,6 +120,7 @@ public class LoginPasswordPresenterImpl extends MvpBasePresenter<LoginPasswordCo
|
||||
getView().toast(data.getMsg());
|
||||
getView().showphoneright();
|
||||
getView().showpasswordright();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.fenghoo.seven.main.find.ui;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.fenghoo.seven.utils.GetJsonDataUtil;
|
||||
import com.fenghoo.seven.utils.JsonUtils;
|
||||
import com.fenghoo.seven.main.find.ConversationActivity;
|
||||
import com.fenghoo.seven.main.find.adapter.PrivateletAdapter;
|
||||
@@ -54,6 +55,30 @@ public class FindFragmenttwo extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
if(HttpConstants.Dataflag==false){
|
||||
String JsonData = new GetJsonDataUtil().getJson(getActivity(), "privateList.json");//获取assets目录下的json文件数据
|
||||
privateListBean.ResultBean result = JsonUtils.fromJson(JsonData, privateListBean.ResultBean.class);
|
||||
mSwl.setRefreshing(false);
|
||||
if (result != null && String.valueOf(result.getSuccess()).equals("0")) {
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
mSwl.setRefreshing(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("page", mNextRequestPage);
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.fenghoo.seven.main.kehu.Dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.utils.GlideTools;
|
||||
import com.fenghoo.seven.utils.WidgetTools;
|
||||
import com.fenghoo.seven.widget.CircleImageView;
|
||||
|
||||
public class CusInfoDialog extends Dialog implements View.OnClickListener {
|
||||
|
||||
private Context mContext;
|
||||
private OnCloseListener listener;
|
||||
private RelativeLayout rl_cus_03;
|
||||
private RelativeLayout rl_cus_04;
|
||||
private RelativeLayout rl_cus_05;
|
||||
private CircleImageView iv_dea_avatar;
|
||||
private TextView tv_cus_02,tv_cus_05,tv_cus_06;
|
||||
private String str1,str2,str3,str4;
|
||||
|
||||
public CusInfoDialog(Context context) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
public CusInfoDialog(Context context,String str1,String str2,String str3,String str4, int themeResId, OnCloseListener listener) {
|
||||
super(context, themeResId);
|
||||
this.mContext = context;
|
||||
this.listener = listener;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.cusinfo_dialog);
|
||||
setCanceledOnTouchOutside(false);
|
||||
Window window = getWindow();
|
||||
window.getDecorView().setPadding(0, 0, 0, 0);
|
||||
WindowManager.LayoutParams layoutParams = window.getAttributes();
|
||||
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
layoutParams.horizontalMargin = 0;
|
||||
window.setAttributes(layoutParams);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
rl_cus_03 = (RelativeLayout) findViewById(R.id.rl_cus_03);
|
||||
rl_cus_03.setOnClickListener(this);
|
||||
rl_cus_04 = (RelativeLayout) findViewById(R.id.rl_cus_04);
|
||||
rl_cus_04.setOnClickListener(this);
|
||||
rl_cus_05 = (RelativeLayout) findViewById(R.id.rl_cus_05);
|
||||
rl_cus_05.setOnClickListener(this);
|
||||
iv_dea_avatar = (CircleImageView) findViewById(R.id.iv_dea_avatar);
|
||||
tv_cus_02 = (TextView) findViewById(R.id.tv_cus_02);
|
||||
tv_cus_05 = (TextView) findViewById(R.id.tv_cus_05);
|
||||
tv_cus_06 = (TextView) findViewById(R.id.tv_cus_06);
|
||||
GlideTools.init(mContext).displaypic(iv_dea_avatar, str1, R.mipmap.icon_default_head);
|
||||
WidgetTools.setTextfive(tv_cus_02, "抖音号:", str2);
|
||||
WidgetTools.setTextfive(tv_cus_05, "", str3);
|
||||
WidgetTools.setTextfive(tv_cus_06, "", str4);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.rl_cus_03://复制抖音号
|
||||
if (listener != null) {
|
||||
listener.copydouyin();
|
||||
}
|
||||
dismiss();
|
||||
break;
|
||||
case R.id.rl_cus_04://复制手机号
|
||||
if (listener != null) {
|
||||
listener.copyphone();
|
||||
}
|
||||
dismiss();
|
||||
break;
|
||||
case R.id.rl_cus_05://拨打电话
|
||||
if (listener != null) {
|
||||
listener.phoneClick();
|
||||
}
|
||||
dismiss();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnCloseListener {
|
||||
|
||||
void phoneClick();
|
||||
void copydouyin();
|
||||
void copyphone();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,12 @@ package com.fenghoo.seven.main.kehu.activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.fenghoo.seven.main.kehu.Bean.orderListBean;
|
||||
import com.fenghoo.seven.utils.GetJsonDataUtil;
|
||||
import com.fenghoo.seven.utils.JsonUtils;
|
||||
import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.base.BaseActivity;
|
||||
@@ -75,6 +79,18 @@ public class FpOrderInfoActivity extends BaseActivity implements View.OnClickLis
|
||||
* @return
|
||||
*/
|
||||
private void fpOrderInfo(String industry_id) {
|
||||
|
||||
if(HttpConstants.Dataflag==false){
|
||||
String JsonData = new GetJsonDataUtil().getJson(FpOrderInfoActivity.this, "fpOrderInfo.json");//获取assets目录下的json文件数据
|
||||
fpOrderInfoBean.ResultBean result = JsonUtils.fromJson(JsonData, fpOrderInfoBean.ResultBean.class);
|
||||
if (result != null && String.valueOf(result.getSuccess()).equals("0")) {
|
||||
List<fpOrderInfoBean.ResultBean.DataBean> data = result.getData();
|
||||
initRecyclerView(data);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("customer_id", customer_id);
|
||||
paramsPost.put("industry_id", industry_id);
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.fenghoo.seven.main.kehu.fragment;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.fenghoo.seven.main.kehu.Bean.FpListBean;
|
||||
import com.fenghoo.seven.main.kehu.Dialog.CusInfoDialog;
|
||||
import com.fenghoo.seven.utils.GetJsonDataUtil;
|
||||
import com.fenghoo.seven.utils.JsonUtils;
|
||||
import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.base.BaseBean;
|
||||
@@ -89,6 +95,36 @@ public class CustomerFragment extends MobanFragment {
|
||||
}
|
||||
|
||||
}).show();
|
||||
|
||||
// new CusInfoDialog(getActivity(),str1,str2,str3,str4, R.style.dialog, new CusInfoDialog.OnCloseListener() {
|
||||
// @Override
|
||||
// public void phoneClick() {//拨打电话
|
||||
// if (str3 != null) {
|
||||
// getPermissions(str3);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void copydouyin() {
|
||||
// if(!TextUtils.isEmpty(str2)){
|
||||
// ClipboardManager cm = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
// // 将文本内容放到系统剪贴板里。
|
||||
// cm.setText(item.getPhone());
|
||||
// ToastUtils.showToast(getActivity(),"复制成功");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void copyphone() {
|
||||
// if(!TextUtils.isEmpty(str3)){
|
||||
// ClipboardManager cm = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
// // 将文本内容放到系统剪贴板里。
|
||||
// cm.setText(item.getPhone());
|
||||
// ToastUtils.showToast(getActivity(),"复制成功");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -158,6 +194,36 @@ public class CustomerFragment extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
if(HttpConstants.Dataflag==false){
|
||||
String JsonData = new GetJsonDataUtil().getJson(getActivity(), "customerList.json");//获取assets目录下的json文件数据
|
||||
CustomerListBean.ResultBean result = JsonUtils.fromJson(JsonData, CustomerListBean.ResultBean.class);
|
||||
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) {
|
||||
ViewParent parent = notDataView.getParent();
|
||||
FrameLayout mFrameLayout = (FrameLayout) parent;
|
||||
if (mFrameLayout != null) {
|
||||
mFrameLayout.removeView(notDataView);
|
||||
}
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
setData(true, data);
|
||||
} else {
|
||||
setData(false, data);
|
||||
}
|
||||
} else {
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
mSwl.setRefreshing(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
String uuid = ProfileSpUtils.getInstance().getUserProfie().getData().getUuid();
|
||||
Log.e("uuid==", uuid);
|
||||
|
||||
@@ -5,6 +5,8 @@ import android.view.View;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.fenghoo.seven.main.kehu.Bean.CustomerListBean;
|
||||
import com.fenghoo.seven.utils.GetJsonDataUtil;
|
||||
import com.fenghoo.seven.utils.JsonUtils;
|
||||
import com.fenghoo.seven.main.find.entity.ThreeEvent;
|
||||
import com.fenghoo.seven.main.kehu.Bean.IndustryBeantwo;
|
||||
@@ -63,13 +65,24 @@ public class DealFragment extends MobanFragment {
|
||||
List<orderListBean.ResultBean.DataBean.IndustryBean> industry = item.getIndustry();
|
||||
IndustryBeantwo industryBean = new IndustryBeantwo();
|
||||
List<IndustryBeantwo.DataBean> dataBeans = new ArrayList<>();
|
||||
for (int i = 0; i < industry.size(); i++) {
|
||||
orderListBean.ResultBean.DataBean.IndustryBean industryBean1 = industry.get(i);
|
||||
IndustryBeantwo.DataBean dataBean = new IndustryBeantwo.DataBean();
|
||||
dataBean.setIndustry(industryBean1.getIndustry());
|
||||
dataBean.setIndustry_id(industryBean1.getIndustry_id());
|
||||
dataBeans.add(dataBean);
|
||||
if(HttpConstants.Dataflag==false){
|
||||
for (int i = 0; i < 3; i++) {
|
||||
IndustryBeantwo.DataBean dataBean = new IndustryBeantwo.DataBean();
|
||||
dataBean.setIndustry("家具");
|
||||
dataBean.setIndustry_id("123");
|
||||
dataBeans.add(dataBean);
|
||||
}
|
||||
|
||||
}else {
|
||||
for (int i = 0; i < industry.size(); i++) {
|
||||
orderListBean.ResultBean.DataBean.IndustryBean industryBean1 = industry.get(i);
|
||||
IndustryBeantwo.DataBean dataBean = new IndustryBeantwo.DataBean();
|
||||
dataBean.setIndustry(industryBean1.getIndustry());
|
||||
dataBean.setIndustry_id(industryBean1.getIndustry_id());
|
||||
dataBeans.add(dataBean);
|
||||
}
|
||||
}
|
||||
|
||||
industryBean.setData(dataBeans);
|
||||
ShowAty.FpOrderInfoActivity(getActivity(), item.getCustomer_id(), item.getName() + item.getPhone(), item.getHeadimg(), item.getWechat(), item.getAddress(), industryBean);
|
||||
}
|
||||
@@ -104,6 +117,37 @@ public class DealFragment extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
if(HttpConstants.Dataflag==false){
|
||||
String JsonData = new GetJsonDataUtil().getJson(getActivity(), "orderList.json");//获取assets目录下的json文件数据
|
||||
orderListBean.ResultBean result = JsonUtils.fromJson(JsonData, orderListBean.ResultBean.class);
|
||||
mSwl.setRefreshing(false);
|
||||
if (result != null && String.valueOf(result.getSuccess()).equals("0")) {
|
||||
List<orderListBean.ResultBean.DataBean> data = result.getData();
|
||||
if (mNextRequestPage == 1) {
|
||||
if (data.size() == 0) {
|
||||
ViewParent parent = notDataView.getParent();
|
||||
FrameLayout mFrameLayout = (FrameLayout) parent;
|
||||
if (mFrameLayout != null) {
|
||||
mFrameLayout.removeView(notDataView);
|
||||
}
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
setData(true, data);
|
||||
} else {
|
||||
setData(false, data);
|
||||
}
|
||||
} else {
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
mSwl.setRefreshing(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("search", search);
|
||||
|
||||
@@ -4,6 +4,8 @@ import android.util.Log;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.fenghoo.seven.main.find.entity.privateListBean;
|
||||
import com.fenghoo.seven.utils.GetJsonDataUtil;
|
||||
import com.fenghoo.seven.utils.JsonUtils;
|
||||
import com.fenghoo.seven.main.find.entity.ThreeEvent;
|
||||
import com.fenghoo.seven.main.kehu.Bean.FpListBean;
|
||||
@@ -97,6 +99,37 @@ public class DistriFragment extends MobanFragment {
|
||||
|
||||
@Override
|
||||
public void requestData() {
|
||||
if(HttpConstants.Dataflag==false){
|
||||
String JsonData = new GetJsonDataUtil().getJson(getActivity(), "fpList.json");//获取assets目录下的json文件数据
|
||||
FpListBean.ResultBean result = JsonUtils.fromJson(JsonData, FpListBean.ResultBean.class);
|
||||
mSwl.setRefreshing(false);
|
||||
if (result != null && String.valueOf(result.getSuccess()).equals("0")) {
|
||||
List<FpListBean.ResultBean.DataBean> data = result.getData();
|
||||
if (mNextRequestPage == 1) {
|
||||
if (data.size() == 0) {
|
||||
ViewParent parent = notDataView.getParent();
|
||||
FrameLayout mFrameLayout = (FrameLayout) parent;
|
||||
if (mFrameLayout != null) {
|
||||
mFrameLayout.removeView(notDataView);
|
||||
}
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
return;
|
||||
}
|
||||
setData(true, data);
|
||||
} else {
|
||||
setData(false, data);
|
||||
}
|
||||
} else {
|
||||
setData(true, null);
|
||||
markingtwoAdapter.setEmptyView(notDataView);
|
||||
mSwl.setRefreshing(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
final HttpParams paramsPost = new HttpParams();
|
||||
paramsPost.put("uid", ProfileSpUtils.getInstance().getUserProfie().getData().getUuid());
|
||||
paramsPost.put("search", search);
|
||||
|
||||
@@ -7,7 +7,7 @@ package com.fenghoo.seven.okgonet;
|
||||
* 创建日期:2017/2/6
|
||||
* 描 述:
|
||||
* 修订历史:
|
||||
* ================================================
|
||||
* =============================================JumpUtils.gotoActivity===
|
||||
*/
|
||||
public interface Func1<T, R> {
|
||||
//把一个结果转为我们需要的一个结果
|
||||
|
||||
@@ -12,7 +12,7 @@ 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 Boolean Dataflag = false;// 真假数据源
|
||||
/**
|
||||
* 七月七
|
||||
*/
|
||||
|
||||
197
app/src/main/res/layout/cusinfo_dialog.xml
Normal file
197
app/src/main/res/layout/cusinfo_dialog.xml
Normal file
@@ -0,0 +1,197 @@
|
||||
<?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="306dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/bg_drainting_phone"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.fenghoo.seven.widget.CircleImageView
|
||||
android:id="@+id/iv_dea_avatar"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="23dp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/tv_01"
|
||||
android:layout_width="65dp"
|
||||
android:layout_below="@+id/iv_dea_avatar"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@mipmap/icon_keneng"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_below="@+id/tv_01"
|
||||
android:layout_marginTop="13dp"
|
||||
android:id="@+id/rl_cus_01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorWhite"
|
||||
android:layout_centerHorizontal="true"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cus_02"
|
||||
android:layout_width="113dp"
|
||||
android:layout_height="19dp"
|
||||
android:text="抖音号:douyin_01"
|
||||
android:textColor="#ff4b4b4b"
|
||||
android:textSize="13sp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cus_05"
|
||||
android:layout_below="@+id/tv_cus_02"
|
||||
android:layout_width="83dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginTop="5.5dp"
|
||||
android:text="18934575694"
|
||||
android:textColor="#ff444444"
|
||||
android:textSize="13sp"
|
||||
/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
android:layout_marginTop="13dp"
|
||||
android:id="@+id/rl_cus_02"
|
||||
android:layout_below="@+id/rl_cus_01"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorWhite"
|
||||
android:layout_centerHorizontal="true"
|
||||
>
|
||||
<RelativeLayout
|
||||
|
||||
android:id="@+id/rl_cus_03"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="43dp"
|
||||
android:background="@color/colorWhite"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ima_cus_01"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="22.5dp"
|
||||
android:layout_height="22.5dp"
|
||||
android:src="@mipmap/icon_fuzhit"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_below="@+id/ima_cus_01"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
android:text="复制
|
||||
抖音号"
|
||||
android:textColor="#ff2680eb"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
android:id="@+id/rl_cus_04"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="43dp"
|
||||
android:layout_toRightOf="@+id/rl_cus_03"
|
||||
android:background="@color/colorWhite"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ima_cus_02"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="22.5dp"
|
||||
android:layout_height="22.5dp"
|
||||
android:src="@mipmap/icon_fuzhit"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_below="@+id/ima_cus_02"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="33dp"
|
||||
android:text="复制
|
||||
手机号"
|
||||
android:textColor="#ff2680eb"
|
||||
android:gravity="center"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
android:id="@+id/rl_cus_05"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/rl_cus_04"
|
||||
android:background="@color/colorWhite"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ima_cus_03"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_width="22.5dp"
|
||||
android:layout_height="22.5dp"
|
||||
android:src="@mipmap/icon_fuzhit"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_below="@+id/ima_cus_03"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="33dp"
|
||||
android:gravity="center"
|
||||
android:text="拨打
|
||||
电话"
|
||||
android:textColor="#ff2680eb"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_cus_06"
|
||||
android:layout_below="@+id/rl_cus_02"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="33dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/tv_cus_03"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="温馨提示:"
|
||||
android:textColor="#ffff375b"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cus_06"
|
||||
android:layout_below="@+id/tv_cus_03"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="建议以抖音视频评论为由来挖掘该客户的潜在需求"
|
||||
android:textColor="#ffff375b"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
BIN
app/src/main/res/mipmap-xxxhdpi/icon_fuzhit.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/icon_fuzhit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_keneng.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/icon_keneng.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
Reference in New Issue
Block a user