d
This commit is contained in:
@@ -100,14 +100,6 @@
|
||||
android:name=".main.kehu.activity.DesignActivity"
|
||||
android:screenOrientation="portrait">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".main.find.CloundSolutionActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/DefaultCityPickerTheme" />
|
||||
<activity
|
||||
android:name=".main.find.MainActivitytwot"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/DefaultCityPickerTheme" />
|
||||
<activity
|
||||
android:name=".main.my.activity.PersonalProfileActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
package com.fenghoo.seven.main.find;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.amap.api.location.AMapLocation;
|
||||
import com.amap.api.location.AMapLocationClient;
|
||||
import com.amap.api.location.AMapLocationClientOption;
|
||||
import com.amap.api.location.AMapLocationListener;
|
||||
import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.base.BaseActivity;
|
||||
import com.zaaach.citypicker.CityPicker;
|
||||
import com.zaaach.citypicker.adapter.OnPickListener;
|
||||
import com.zaaach.citypicker.model.City;
|
||||
import com.zaaach.citypicker.model.HotCity;
|
||||
import com.zaaach.citypicker.model.LocateState;
|
||||
import com.zaaach.citypicker.model.LocatedCity;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class CloundSolutionActivity extends BaseActivity implements View.OnClickListener, AMapLocationListener {
|
||||
|
||||
private List<HotCity> hotCities;
|
||||
private int anim;
|
||||
private boolean enable;
|
||||
|
||||
|
||||
private TextView titleTv;
|
||||
private ImageView backIv;
|
||||
|
||||
/**
|
||||
* 西安
|
||||
*/
|
||||
private TextView mChengshi;
|
||||
|
||||
//声明AMapLocationClient类对象,定位发起端
|
||||
private AMapLocationClient mLocationClient = null;
|
||||
//声明mLocationOption对象,定位参数
|
||||
public AMapLocationClientOption mLocationOption = null;
|
||||
//标识,用于判断是否只显示一次定位信息和用户重新定位
|
||||
private boolean isFirstLoc = true;
|
||||
private String city;
|
||||
private String province;
|
||||
private String cityCode;
|
||||
private String adCode;
|
||||
private View view;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_clound_solution);
|
||||
initView();
|
||||
HotCity();
|
||||
//开始定位
|
||||
// location();
|
||||
}
|
||||
|
||||
private void HotCity() {
|
||||
hotCities = new ArrayList<>();
|
||||
hotCities.add(new HotCity("全国", "全国", ""));
|
||||
hotCities.add(new HotCity("北京", "北京", "101010100"));
|
||||
hotCities.add(new HotCity("上海", "上海", "101020100"));
|
||||
hotCities.add(new HotCity("广州", "广东", "101280101"));
|
||||
hotCities.add(new HotCity("深圳", "广东", "101280601"));
|
||||
hotCities.add(new HotCity("西安", "西安", "101280601"));
|
||||
hotCities.add(new HotCity("杭州", "浙江", "101210101"));
|
||||
hotCities.add(new HotCity("成都", "成都", "101210101"));
|
||||
hotCities.add(new HotCity("武汉", "武汉", "101210101"));
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mChengshi = (TextView) findViewById(R.id.chengshi);
|
||||
mChengshi.setOnClickListener(this);
|
||||
view = (View) findViewById(R.id.view);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.leftIv:
|
||||
finish();
|
||||
break;
|
||||
case R.id.chengshi:
|
||||
CityPicker.from(CloundSolutionActivity.this)
|
||||
.enableAnimation(enable)
|
||||
.setAnimationStyle(anim)
|
||||
.setLocatedCity(null)
|
||||
.setHotCities(hotCities)
|
||||
.setOnPickListener(new OnPickListener() {
|
||||
@Override
|
||||
public void onPick(int position, City data) {
|
||||
// mDangqianchengshi.setText(String.format("当前城市:%s,%s", data.getName(), data.getCode()));
|
||||
mChengshi.setText(String.format(data.getName()));
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
String.format("点击的数据:%s,%s", data.getName(), data.getCode()),
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
Toast.makeText(getApplicationContext(), "取消选择", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocate() {
|
||||
//开始定位,这里模拟一下定位
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CityPicker.from(CloundSolutionActivity.this).locateComplete(new LocatedCity(city, province, adCode), LocateState.SUCCESS);
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
.show();
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void location() {
|
||||
//初始化定位
|
||||
mLocationClient = new AMapLocationClient(getApplicationContext());
|
||||
//设置定位回调监听
|
||||
mLocationClient.setLocationListener(this);
|
||||
//初始化定位参数
|
||||
mLocationOption = new AMapLocationClientOption();
|
||||
//设置定位模式为Hight_Accuracy高精度模式,Battery_Saving为低功耗模式,Device_Sensors是仅设备模式
|
||||
mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
|
||||
//设置是否返回地址信息(默认返回地址信息)
|
||||
mLocationOption.setNeedAddress(true);
|
||||
//设置是否只定位一次,默认为false
|
||||
mLocationOption.setOnceLocation(false);
|
||||
//设置是否强制刷新WIFI,默认为强制刷新
|
||||
mLocationOption.setWifiActiveScan(true);
|
||||
//设置是否允许模拟位置,默认为false,不允许模拟位置
|
||||
mLocationOption.setMockEnable(false);
|
||||
//设置定位间隔,单位毫秒,默认为2000ms
|
||||
mLocationOption.setInterval(2000);
|
||||
//给定位客户端对象设置定位参数
|
||||
mLocationClient.setLocationOption(mLocationOption);
|
||||
//启动定位
|
||||
mLocationClient.startLocation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(AMapLocation aMapLocation) {
|
||||
if (aMapLocation != null) {
|
||||
if (aMapLocation.getErrorCode() == 0) {
|
||||
//定位成功回调信息,设置相关消息
|
||||
aMapLocation.getLocationType();//获取当前定位结果来源,如网络定位结果,详见官方定位类型表
|
||||
aMapLocation.getLatitude();//获取纬度
|
||||
aMapLocation.getLongitude();//获取经度
|
||||
aMapLocation.getAccuracy();//获取精度信息
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date date = new Date(aMapLocation.getTime());
|
||||
df.format(date);//定位时间
|
||||
aMapLocation.getAddress();//地址,如果option中设置isNeedAddress为false,则没有此结果,网络定位结果中会有地址信息,GPS定位不返回地址信息。
|
||||
aMapLocation.getCountry();//国家信息
|
||||
aMapLocation.getProvince();//省信息
|
||||
aMapLocation.getCity();//城市信息
|
||||
aMapLocation.getDistrict();//城区信息
|
||||
aMapLocation.getStreet();//街道信息
|
||||
aMapLocation.getStreetNum();//街道门牌号信息
|
||||
aMapLocation.getCityCode();//城市编码
|
||||
aMapLocation.getAdCode();//地区编码
|
||||
|
||||
// 如果不设置标志位,此时再拖动地图时,它会不断将地图移动到当前的位置
|
||||
if (isFirstLoc) {
|
||||
//获取定位信息
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(aMapLocation.getCountry() + ""
|
||||
+ aMapLocation.getProvince() + ""
|
||||
+ aMapLocation.getCity() + ""
|
||||
+ aMapLocation.getProvince() + ""
|
||||
+ aMapLocation.getDistrict() + ""
|
||||
+ aMapLocation.getStreet() + ""
|
||||
+ aMapLocation.getStreetNum());
|
||||
Toast.makeText(getApplicationContext(), buffer.toString(), Toast.LENGTH_LONG).show();
|
||||
|
||||
city = aMapLocation.getCity();
|
||||
mChengshi.setText(city);
|
||||
province = aMapLocation.getProvince();
|
||||
cityCode = aMapLocation.getCityCode();
|
||||
adCode = aMapLocation.getAdCode();
|
||||
isFirstLoc = false;
|
||||
mLocationClient.stopLocation();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
//显示错误信息ErrCode是错误码,errInfo是错误信息,详见错误码表。
|
||||
Log.e("AmapError", "location Error, ErrCode:"
|
||||
+ aMapLocation.getErrorCode() + ", errInfo:"
|
||||
+ aMapLocation.getErrorInfo());
|
||||
Toast.makeText(getApplicationContext(), "定位失败", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import com.fenghoo.seven.R;
|
||||
import com.fenghoo.seven.base.BaseActivity;
|
||||
import com.fenghoo.seven.dialog.BaseTipsDialog;
|
||||
import com.fenghoo.seven.main.find.entity.SixEvent;
|
||||
import com.fenghoo.seven.main.find.entity.privateListBean;
|
||||
import com.fenghoo.seven.main.kehu.Bean.IndustryBeantwo;
|
||||
import com.fenghoo.seven.widget.TitleBar;
|
||||
|
||||
import de.greenrobot.event.EventBus;
|
||||
@@ -19,6 +21,7 @@ import de.greenrobot.event.EventBus;
|
||||
public class ConversationActivity extends BaseActivity {
|
||||
private TitleBar mTitleBar;
|
||||
private String issuccess="1";
|
||||
private privateListBean.ResultBean.DataBean dataBean;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -27,9 +30,13 @@ public class ConversationActivity extends BaseActivity {
|
||||
mTitleBar = findViewById(R.id.title_bar);
|
||||
initNormalBack();
|
||||
EventBus.getDefault().register(this);
|
||||
String private_id = getIntent().getStringExtra("private_id");
|
||||
// String private_id = getIntent().getStringExtra("private_id");
|
||||
dataBean = (privateListBean.ResultBean.DataBean) getIntent().getSerializableExtra("dataBean");
|
||||
String private_id = dataBean.getPrivate_id();
|
||||
String dy_uid = dataBean.getDy_uid();
|
||||
|
||||
mTitleBar.setTitle("抖音昵称"+"**");
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.container,new QuestionsFragment(private_id)).commit();
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.container,new QuestionsFragment(private_id,dy_uid)).commit();
|
||||
}
|
||||
|
||||
public void onEvent(SixEvent event) {
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
package com.fenghoo.seven.main.find;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.fenghoo.seven.R;
|
||||
import com.zaaach.citypicker.CityPicker;
|
||||
import com.zaaach.citypicker.adapter.OnPickListener;
|
||||
import com.zaaach.citypicker.model.City;
|
||||
import com.zaaach.citypicker.model.HotCity;
|
||||
import com.zaaach.citypicker.model.LocateState;
|
||||
import com.zaaach.citypicker.model.LocatedCity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class MainActivitytwot extends AppCompatActivity implements CompoundButton.OnCheckedChangeListener {
|
||||
private TextView currentTV;
|
||||
private CheckBox hotCB;
|
||||
private CheckBox animCB;
|
||||
private CheckBox enableCB;
|
||||
private Button themeBtn;
|
||||
|
||||
private static final String KEY = "current_theme";
|
||||
|
||||
private List<HotCity> hotCities;
|
||||
private int anim;
|
||||
private int theme;
|
||||
private boolean enable;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
theme = savedInstanceState.getInt(KEY);
|
||||
setTheme(theme > 0 ? theme : R.style.DefaultCityPickerTheme);
|
||||
}
|
||||
|
||||
setContentView(R.layout.activity_mainsss);
|
||||
|
||||
currentTV = findViewById(R.id.tv_current);
|
||||
hotCB = findViewById(R.id.cb_hot);
|
||||
animCB = findViewById(R.id.cb_anim);
|
||||
enableCB = findViewById(R.id.cb_enable_anim);
|
||||
themeBtn = findViewById(R.id.btn_style);
|
||||
|
||||
if (theme == R.style.DefaultCityPickerTheme){
|
||||
themeBtn.setText("默认主题");
|
||||
}
|
||||
hotCB.setOnCheckedChangeListener(this);
|
||||
animCB.setOnCheckedChangeListener(this);
|
||||
enableCB.setOnCheckedChangeListener(this);
|
||||
|
||||
themeBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (themeBtn.getText().toString().startsWith("自定义")){
|
||||
themeBtn.setText("默认主题");
|
||||
theme = R.style.DefaultCityPickerTheme;
|
||||
}
|
||||
recreate();
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.btn_pick).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
CityPicker.from(MainActivitytwot.this)
|
||||
.enableAnimation(enable)
|
||||
.setAnimationStyle(anim)
|
||||
.setLocatedCity(null)
|
||||
.setHotCities(hotCities)
|
||||
.setOnPickListener(new OnPickListener() {
|
||||
@Override
|
||||
public void onPick(int position, City data) {
|
||||
currentTV.setText(String.format("当前城市:%s,%s", data.getName(), data.getCode()));
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
String.format("点击的数据:%s,%s", data.getName(), data.getCode()),
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
Toast.makeText(getApplicationContext(), "取消选择", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocate() {
|
||||
//开始定位,这里模拟一下定位
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CityPicker.from(MainActivitytwot.this).locateComplete(new LocatedCity("深圳", "广东", "101280601"), LocateState.SUCCESS);
|
||||
}
|
||||
}, 3000);
|
||||
}
|
||||
})
|
||||
.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
switch (buttonView.getId()){
|
||||
case R.id.cb_hot:
|
||||
if (isChecked){
|
||||
hotCities = new ArrayList<>();
|
||||
hotCities.add(new HotCity("北京", "北京", "101010100"));
|
||||
hotCities.add(new HotCity("上海", "上海", "101020100"));
|
||||
hotCities.add(new HotCity("广州", "广东", "101280101"));
|
||||
hotCities.add(new HotCity("深圳", "广东", "101280601"));
|
||||
hotCities.add(new HotCity("杭州", "浙江", "101210101"));
|
||||
}else {
|
||||
hotCities = null;
|
||||
}
|
||||
break;
|
||||
case R.id.cb_anim:
|
||||
|
||||
break;
|
||||
case R.id.cb_enable_anim:
|
||||
enable = isChecked;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putInt(KEY, theme);
|
||||
}
|
||||
}
|
||||
@@ -133,8 +133,6 @@ public class PriLetFragment extends BaseFragment {
|
||||
marking_fragment.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
// ShowAty.CloundSolutionActivity(getActivity());
|
||||
// ShowAty.MainActivitytwot(getActivity());
|
||||
CityPicker.from(getActivity())
|
||||
.enableAnimation(enable)
|
||||
.setAnimationStyle(anim)
|
||||
|
||||
@@ -61,9 +61,11 @@ public class QuestionsFragment extends BaseTreeFragment<QuestionsContract.View,
|
||||
private boolean flag=false;
|
||||
private List<commonWordsBean.ResultBean.DataBean> data;
|
||||
private String private_id;
|
||||
private String dy_uid;
|
||||
|
||||
public QuestionsFragment(String private_id){
|
||||
public QuestionsFragment(String private_id,String dy_uid){
|
||||
this.private_id=private_id;
|
||||
this.dy_uid=dy_uid;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,7 +86,7 @@ public class QuestionsFragment extends BaseTreeFragment<QuestionsContract.View,
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//进入添加客户和完善信息
|
||||
ShowAty.AddCustDialogActivity(getActivity(),"","","","");
|
||||
ShowAty.AddCustDialogActivity(getActivity(),"","","","",dy_uid);
|
||||
}
|
||||
});
|
||||
btnSend = (Button) view.findViewById(R.id.btn_send);
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.fenghoo.seven.main.find.entity;
|
||||
|
||||
import com.fenghoo.seven.test.BaseModel;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -70,7 +71,7 @@ public class privateListBean extends BaseModel {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static class DataBean {
|
||||
public static class DataBean implements Serializable {
|
||||
/**
|
||||
* read_num : 0
|
||||
* nick_name : 私信昵称
|
||||
@@ -89,6 +90,16 @@ public class privateListBean extends BaseModel {
|
||||
private String short_id;
|
||||
private String content;
|
||||
|
||||
public String getDy_uid() {
|
||||
return dy_uid;
|
||||
}
|
||||
|
||||
public void setDy_uid(String dy_uid) {
|
||||
this.dy_uid = dy_uid;
|
||||
}
|
||||
|
||||
private String dy_uid;
|
||||
|
||||
public String getRead_num() {
|
||||
return read_num;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package com.fenghoo.seven.main.find.ui;
|
||||
|
||||
import com.fenghoo.seven.JsonUtils;
|
||||
import com.fenghoo.seven.main.find.ConversationActivity;
|
||||
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.Bean.IndustryBeantwo;
|
||||
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.JumpUtils;
|
||||
import com.fenghoo.seven.utils.checkVersionsUtils.ProfileSpUtils;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
@@ -38,7 +41,8 @@ public class FindFragmenttwo extends MobanFragment {
|
||||
@Override
|
||||
public void enterCusDetail(privateListBean.ResultBean.DataBean item) {
|
||||
//进入会话页
|
||||
ShowAty.ConversationActivity(getActivity(),item.getPrivate_id());
|
||||
// ShowAty.ConversationActivity(getActivity(),item.getPrivate_id(),item.getDy_uid());
|
||||
JumpUtils.gotoActivity(getActivity(), ConversationActivity.class, false, "dataBean", item);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -24,6 +24,7 @@ public class AddCustDialogActivity extends BaseActivity {
|
||||
private String source="";
|
||||
private String search="";
|
||||
private String pagetype="";
|
||||
private String dy_uid="";
|
||||
|
||||
|
||||
@Override
|
||||
@@ -36,7 +37,8 @@ public class AddCustDialogActivity extends BaseActivity {
|
||||
source = getIntent().getStringExtra("source");
|
||||
search = getIntent().getStringExtra("search");
|
||||
pagetype = getIntent().getStringExtra("pagetype");
|
||||
addCusFragment = new AddCusFragment(customer_id,source,search,pagetype,null);
|
||||
dy_uid = getIntent().getStringExtra("dy_uid");
|
||||
addCusFragment = new AddCusFragment(customer_id,source,search,pagetype,dy_uid,null);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.containerrr,addCusFragment).commit();
|
||||
|
||||
findViewById(R.id.btn_comit).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class AddCustomerActivity extends BaseActivity {
|
||||
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,search,pagetype,"",dataBean);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.containerrr,addCusFragment).commit();
|
||||
findViewById(R.id.btn_comit).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -149,7 +149,6 @@ public class FpOrderInfoActivity extends BaseActivity implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 页面逻辑
|
||||
* travel:1:已分配,2:已被抢,3:已进店,4:已成交 4种类型的条目
|
||||
|
||||
@@ -8,12 +8,8 @@ import com.fenghoo.seven.db.DbRecordBeanData;
|
||||
import com.fenghoo.seven.main.activity.CodeLoginActivity;
|
||||
import com.fenghoo.seven.main.activity.ForgetPasActivity;
|
||||
import com.fenghoo.seven.main.activity.ModifyPasActivity;
|
||||
import com.fenghoo.seven.main.find.CloundSolutionActivity;
|
||||
import com.fenghoo.seven.main.find.CommentActivity;
|
||||
import com.fenghoo.seven.main.find.ConversationActivity;
|
||||
import com.fenghoo.seven.main.find.MainActivitytwot;
|
||||
import com.fenghoo.seven.main.kehu.Bean.CustomerListBean;
|
||||
import com.fenghoo.seven.main.kehu.Bean.IndustryBean;
|
||||
import com.fenghoo.seven.main.kehu.Bean.IndustryBeantwo;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -69,21 +65,12 @@ public class ShowAty {
|
||||
}
|
||||
|
||||
|
||||
public static void ConversationActivity(Context ctx,String private_id) {
|
||||
Intent i = new Intent(ctx, ConversationActivity.class);
|
||||
i.putExtra("private_id",private_id);
|
||||
ctx.startActivity(i);
|
||||
}
|
||||
// public static void ConversationActivity(Context ctx,String private_id) {
|
||||
// Intent i = new Intent(ctx, ConversationActivity.class);
|
||||
// i.putExtra("private_id",private_id);
|
||||
// ctx.startActivity(i);
|
||||
// }
|
||||
|
||||
|
||||
public static void CloundSolutionActivity(Context ctx) {
|
||||
Intent i = new Intent(ctx, CloundSolutionActivity.class);
|
||||
ctx.startActivity(i);
|
||||
}
|
||||
public static void MainActivitytwot(Context ctx) {
|
||||
Intent i = new Intent(ctx, MainActivitytwot.class);
|
||||
ctx.startActivity(i);
|
||||
}
|
||||
/**
|
||||
* @description
|
||||
* @param entertype 0为从登录页进入 1为从忘记密码
|
||||
@@ -146,12 +133,13 @@ public class ShowAty {
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public static void AddCustDialogActivity(Context ctx,String customer_id,String source,String search,String pagetype) {
|
||||
public static void AddCustDialogActivity(Context ctx,String customer_id,String source,String search,String pagetype,String dy_uid) {
|
||||
Intent i = new Intent(ctx, AddCustDialogActivity.class);
|
||||
i.putExtra("customer_id",customer_id);
|
||||
i.putExtra("source",source);
|
||||
i.putExtra("search",search);
|
||||
i.putExtra("pagetype",pagetype);
|
||||
i.putExtra("dy_uid",dy_uid);
|
||||
ctx.startActivity(i);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,15 +85,17 @@ public class AddCusFragment extends MobanFragment implements View.OnClickListene
|
||||
private String source;
|
||||
private String search;
|
||||
private String pagetype;
|
||||
private String dy_uid;
|
||||
private ArrayList<LabelBean> label=new ArrayList<>();
|
||||
CustomerListBean.ResultBean.DataBean dataBean;
|
||||
|
||||
public AddCusFragment(String customer_id, String source, String search, String pagetype, CustomerListBean.ResultBean.DataBean dataBean) {
|
||||
public AddCusFragment(String customer_id, String source, String search, String pagetype,String dy_uid, CustomerListBean.ResultBean.DataBean dataBean) {
|
||||
super();
|
||||
this.customer_id=customer_id;
|
||||
this.source=source;
|
||||
this.search=search;
|
||||
this.pagetype=pagetype;//pagetype为""说明是添加客户,否则是信息完善
|
||||
this.dy_uid=dy_uid;
|
||||
this.dataBean=dataBean;
|
||||
addCustomerBean = new addCustomerBean();
|
||||
EventBus.getDefault().register(this);
|
||||
@@ -212,25 +214,8 @@ public class AddCusFragment extends MobanFragment implements View.OnClickListene
|
||||
ToastUtils.showToast(mContext, "请输入正确的电话号码");
|
||||
return;
|
||||
}
|
||||
// if( AbStrUtil.isEmpty(addCustomerBean.getWechat())){
|
||||
// ToastUtils.showToast(mContext, "请输入客户微信");
|
||||
// return;
|
||||
// }
|
||||
// if( AbStrUtil.isEmpty(addCustomerBean.getAddress())){
|
||||
// ToastUtils.showToast(mContext, "请输入客户住址");
|
||||
// return;
|
||||
// }
|
||||
// if( AbStrUtil.isEmpty(addCustomerBean.getStyle_id())){
|
||||
// ToastUtils.showToast(mContext, "请选择装修风格");
|
||||
// return;
|
||||
// }
|
||||
// if( AbStrUtil.isEmpty(addCustomerBean.getBudget())){
|
||||
// ToastUtils.showToast(mContext, "请选择装修预算");
|
||||
// return;
|
||||
// }
|
||||
|
||||
//网络请求提交数据
|
||||
new NetApi().addCustomer(addCustomerBean.getUid(),addCustomerBean.getHeadimg(),addCustomerBean.getName(),addCustomerBean.getPhone(),addCustomerBean.getWechat(),addCustomerBean.getAddress(),addCustomerBean.getDecoration(),addCustomerBean.getStyle_id(),addCustomerBean.getBudget(),addCustomerBean.getSource(),addCustomerBean.getCustomer_id()).subscribe(new Observer<Response>() {
|
||||
new NetApi().addCustomer(addCustomerBean.getUid(),addCustomerBean.getHeadimg(),addCustomerBean.getName(),addCustomerBean.getPhone(),addCustomerBean.getWechat(),addCustomerBean.getAddress(),addCustomerBean.getDecoration(),addCustomerBean.getStyle_id(),addCustomerBean.getBudget(),addCustomerBean.getSource(),addCustomerBean.getCustomer_id(),dy_uid).subscribe(new Observer<Response>() {
|
||||
@Override
|
||||
public void onNext(Response response) {
|
||||
String body = (String) response.body();
|
||||
|
||||
@@ -160,7 +160,7 @@ public class TraceFragment extends BaseFragment implements View.OnClickListener
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//进入添加客户和完善信息
|
||||
ShowAty.AddCustDialogActivity(getActivity(),"","1","","");
|
||||
ShowAty.AddCustDialogActivity(getActivity(),"","1","","","");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class NetApi {
|
||||
};
|
||||
|
||||
}
|
||||
public Observable<Response> addCustomer(final String uid, final String headimg, final String name, final String phone, final String wechat, final String address, final String decoration, final String style_id, final String budget, final String source, final String customer_id) {
|
||||
public Observable<Response> addCustomer(final String uid, final String headimg, final String name, final String phone, final String wechat, final String address, final String decoration, final String style_id, final String budget, final String source, final String customer_id,final String dy_uid) {
|
||||
|
||||
return new Observable<Response>() {
|
||||
@Override
|
||||
@@ -74,6 +74,7 @@ public class NetApi {
|
||||
.params("budget", budget)
|
||||
.params("source", source)
|
||||
.params("customer_id", customer_id)
|
||||
.params("dy_uid", dy_uid)
|
||||
.converter(new StringConvert())//
|
||||
.cacheMode(CacheMode.NO_CACHE) //无缓存模式 CacheMode.NO_CACHE
|
||||
.adapt(new ObservableResponse<String>())//
|
||||
|
||||
Reference in New Issue
Block a user