Commit 304350f1 by 罗翻

android v1.91

parents cb68e146 3038dee3
Showing with 605 additions and 206 deletions
...@@ -91,22 +91,36 @@ public class ConUtil { ...@@ -91,22 +91,36 @@ public class ConUtil {
// File mediaStorageDir = mContext.getExternalFilesDir(Constant.cacheImage); // File mediaStorageDir = mContext.getExternalFilesDir(Constant.cacheImage);
String jpgFileName = System.currentTimeMillis() + "" + new Random().nextInt(1000000) + "_" + key + ".jpg"; String jpgFileName = System.currentTimeMillis() + "" + new Random().nextInt(1000000) + "_" + key + ".jpg";
File file = new File(Environment.getExternalStorageDirectory() + "/dayu/", jpgFileName);
// if (!mediaStorageDir.exists()) { // if (!mediaStorageDir.exists()) {
// if (!mediaStorageDir.mkdirs()) { // if (!mediaStorageDir.mkdirs()) {
// return null; // return null;
// } // }
// } // }
boolean sdCardExist = Environment.getExternalStorageState()
.equals(android.os.Environment.MEDIA_MOUNTED); //判断sd卡是否存在
File file;
if (sdCardExist) {
file = new File(Environment.getExternalStorageDirectory() + "/dayu/");
if (!file.exists()) {
file.mkdirs();
}
file = new File(file, jpgFileName);
} else {
file = new File(mContext.getCacheDir() + "/dayu/");
if (!file.exists()) {
file.mkdirs();
}
file = new File(file, jpgFileName);
}
BufferedOutputStream bos = null; BufferedOutputStream bos = null;
FileOutputStream fos = null; FileOutputStream fos = null;
try { try {
fos = new FileOutputStream(file.getAbsolutePath()); fos = new FileOutputStream(file.getAbsolutePath());
bos = new BufferedOutputStream(fos); bos = new BufferedOutputStream(fos);
bos.write(data); bos.write(data);
return file; return file;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
......
...@@ -106,6 +106,9 @@ ...@@ -106,6 +106,9 @@
android:name="com.hyphenate.chat.EMJobService" android:name="com.hyphenate.chat.EMJobService"
android:exported="true" android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" /> android:permission="android.permission.BIND_JOB_SERVICE" />
<service android:name=".ui.service.LocationService"
android:exported="true"
/>
<!-- 声明SDK所需的receiver --> <!-- 声明SDK所需的receiver -->
<receiver android:name="com.hyphenate.chat.EMMonitorReceiver"> <receiver android:name="com.hyphenate.chat.EMMonitorReceiver">
<intent-filter> <intent-filter>
......
...@@ -42,7 +42,8 @@ public class InitializeActivity extends DataBindingActivity<ActivityInitializeMa ...@@ -42,7 +42,8 @@ public class InitializeActivity extends DataBindingActivity<ActivityInitializeMa
public void initView() { public void initView() {
MobclickAgent.openActivityDurationTrack(false); MobclickAgent.openActivityDurationTrack(false);
mActivity = this; mActivity = this;
String[] mPerArr = new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.WRITE_EXTERNAL_STORAGE}; String[] mPerArr = new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.WRITE_EXTERNAL_STORAGE
, Manifest.permission.CAMERA};
MPermissionUtils.requestPermissionsResult(mActivity, SDK_PERMISSION_REQUEST, mPerArr, new MPermissionUtils.OnPermissionListener() { MPermissionUtils.requestPermissionsResult(mActivity, SDK_PERMISSION_REQUEST, mPerArr, new MPermissionUtils.OnPermissionListener() {
@Override @Override
......
package com.dayu.bigfish; package com.dayu.bigfish;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
...@@ -8,6 +9,7 @@ import android.net.ConnectivityManager; ...@@ -8,6 +9,7 @@ import android.net.ConnectivityManager;
import android.net.wifi.WifiManager; import android.net.wifi.WifiManager;
import android.os.Handler; import android.os.Handler;
import com.dayu.bigfish.ui.service.LocationService;
import com.dayu.bigfish.utils.HxManager; import com.dayu.bigfish.utils.HxManager;
import com.dayu.common.BaseApplication; import com.dayu.common.BaseApplication;
import com.dayu.common.Constants; import com.dayu.common.Constants;
...@@ -80,7 +82,15 @@ public class MyApplication extends BaseApplication { ...@@ -80,7 +82,15 @@ public class MyApplication extends BaseApplication {
res.updateConfiguration(config, res.getDisplayMetrics()); res.updateConfiguration(config, res.getDisplayMetrics());
} }
@Override
public void runBackGround() {
startService(new Intent(mContext, LocationService.class));
}
@Override
public void runFrontGround() {
startService(new Intent(mContext, LocationService.class));
}
public static MyApplication getAppContext() { public static MyApplication getAppContext() {
return myApplication; return myApplication;
......
...@@ -63,5 +63,14 @@ public interface APIService { ...@@ -63,5 +63,14 @@ public interface APIService {
*/ */
@GET(Constants.MESSAGE_NUM) @GET(Constants.MESSAGE_NUM)
Observable<BaseResponse<Integer>> getHxNum(@Path("hxAccount") String hxAccount); Observable<BaseResponse<Integer>> getHxNum(@Path("hxAccount") String hxAccount);
/**
* 上传地理位置.
* @param body
* @return
*/
@POST(Constants.COMMITE_LOCAITON)
Observable<BaseResponse<Boolean>> commiteLocation(@Body RequestBody body);
} }
...@@ -34,4 +34,8 @@ public class ApiFactory { ...@@ -34,4 +34,8 @@ public class ApiFactory {
return Api.getService(APIService.class).getHxNum(hxAccount).compose(Api.applySchedulers()); return Api.getService(APIService.class).getHxNum(hxAccount).compose(Api.applySchedulers());
} }
public static Observable<Boolean> commiteLocation(RequestBody requestBody) {
return Api.getService(APIService.class).commiteLocation(requestBody).compose(Api.applySchedulers());
}
} }
...@@ -27,6 +27,8 @@ public interface MainContract { ...@@ -27,6 +27,8 @@ public interface MainContract {
void showUpdateDialog(VersionInfo info); void showUpdateDialog(VersionInfo info);
void initNotification(); void initNotification();
void startLocaitonService();
} }
abstract class Presenter extends BasePresenter<View> { abstract class Presenter extends BasePresenter<View> {
......
...@@ -27,8 +27,10 @@ import com.dayu.bigfish.databinding.ActivityMainBinding; ...@@ -27,8 +27,10 @@ import com.dayu.bigfish.databinding.ActivityMainBinding;
import com.dayu.bigfish.presenter.main.MainContract; import com.dayu.bigfish.presenter.main.MainContract;
import com.dayu.bigfish.presenter.main.MainPresenter; import com.dayu.bigfish.presenter.main.MainPresenter;
import com.dayu.bigfish.ui.fragment.HomeFirstTabFragment; import com.dayu.bigfish.ui.fragment.HomeFirstTabFragment;
import com.dayu.bigfish.ui.service.LocationService;
import com.dayu.common.Constants; import com.dayu.common.Constants;
import com.dayu.event.DownloadBean; import com.dayu.event.DownloadBean;
import com.dayu.event.UserInfo;
import com.dayu.location.base.LocationUtils; import com.dayu.location.base.LocationUtils;
import com.dayu.message.ui.fragment.HomeMessageFragment; import com.dayu.message.ui.fragment.HomeMessageFragment;
import com.dayu.order.ui.activity.ReceivingActivity; import com.dayu.order.ui.activity.ReceivingActivity;
...@@ -37,6 +39,7 @@ import com.dayu.provider.event.RefreshReceivingNum; ...@@ -37,6 +39,7 @@ import com.dayu.provider.event.RefreshReceivingNum;
import com.dayu.provider.event.SwtichFragment; import com.dayu.provider.event.SwtichFragment;
import com.dayu.provider.router.RouterPath; import com.dayu.provider.router.RouterPath;
import com.dayu.usercenter.ui.fragment.HomePersonFragment; import com.dayu.usercenter.ui.fragment.HomePersonFragment;
import com.dayu.utils.UserManager;
import com.dayu.utils.badgeNumberManger.BadgeNumberManager; import com.dayu.utils.badgeNumberManger.BadgeNumberManager;
import com.dayu.widgets.CustomDialog; import com.dayu.widgets.CustomDialog;
import com.dayu.widgets.listener.onDownloadListener; import com.dayu.widgets.listener.onDownloadListener;
...@@ -84,6 +87,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -84,6 +87,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
addFragment(); addFragment();
initListener(); initListener();
doAction(getIntent()); doAction(getIntent());
startLocaitonService();
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
} }
...@@ -109,8 +113,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -109,8 +113,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
mFragmentManger = getSupportFragmentManager(); mFragmentManger = getSupportFragmentManager();
FragmentTransaction transaction = mFragmentManger.beginTransaction() FragmentTransaction transaction = mFragmentManger.beginTransaction()
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
for (int i = 0; i < mFragments.length; i++) { for (Fragment fragment : mFragments) {
Fragment fragment = mFragments[i];
transaction.add(R.id.fl_container, fragment); transaction.add(R.id.fl_container, fragment);
transaction.hide(fragment); transaction.hide(fragment);
} }
...@@ -141,8 +144,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -141,8 +144,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
* @param position * @param position
*/ */
public void resetSelected(int position) { public void resetSelected(int position) {
for (int i = 0; i < mTabs.length; i++) { for (TextView mTab : mTabs) {
mTabs[i].setSelected(false); mTab.setSelected(false);
} }
mTabs[position].setSelected(true); mTabs[position].setSelected(true);
mPosition = position; mPosition = position;
...@@ -230,6 +233,15 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -230,6 +233,15 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
notificationManager.notify(0, builder.build()); notificationManager.notify(0, builder.build());
} }
@Override
public void startLocaitonService() {
UserInfo userInfo = UserManager.getInstance().getUser();
Intent intent = new Intent(mActivity, LocationService.class);
intent.putExtra(Constants.ACCOUNT_ID, userInfo.getAccountId());
intent.putExtra(Constants.ID, userInfo.getSiteId());
mActivity.startService(intent);
}
/** /**
* 处理intent传来的信息. * 处理intent传来的信息.
* *
...@@ -319,7 +331,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin ...@@ -319,7 +331,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onDownloadEvent(DownloadBean event) { public void onDownloadEvent(DownloadBean event) {
int progress = (int) Math.round(event.getBytesReaded() / (double) event.getTotal() * 100); int progress = (int) Math.round(event.getBytesReaded() / (double) event.getTotal() * 100);
if (builder==null){ if (builder == null) {
return; return;
} }
builder.setContentInfo(String.valueOf(progress) + "%").setProgress(100, progress, false); builder.setContentInfo(String.valueOf(progress) + "%").setProgress(100, progress, false);
......
package com.dayu.bigfish.ui.service;
import android.annotation.SuppressLint;
import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.support.annotation.Nullable;
import com.dayu.bigfish.api.ApiFactory;
import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Timer;
import java.util.TimerTask;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
* Created by luofan
* on 2018/7/17.
*/
public class LocationService extends Service {
private final Timer mTimer = new Timer();
private TimerTask mTask;
private Handler mHandler;
private int mAccountId;
private int mSiteId;
@SuppressLint("HandlerLeak")
@Override
public void onCreate() {
super.onCreate();
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
if (mAccountId == 0 || mSiteId == 0) {
return;
}
mHandler.post(() -> LocationUtils.getCurrentLocation(location -> {
if (location != null) {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("accountId", mAccountId);
jsonObject.put("siteId", mSiteId);
jsonObject.put("longitude", location.getLongitude());
jsonObject.put("latitude", location.getLatitude());
} catch (JSONException e) {
e.printStackTrace();
}
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString());
ApiFactory.commiteLocation(requestBody).subscribe(aBoolean -> {
}, throwable -> {
});
}
}));
super.handleMessage(msg);
}
};
mTask = new TimerTask() {
@Override
public void run() {
sendMessage();
}
};
mTimer.schedule(mTask, 2000, 600000);
}
public void sendMessage() {
Message message = new Message();
message.what = 1;
mHandler.sendMessage(message);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (intent != null) {
String accounid = intent.getStringExtra(Constants.ACCOUNT_ID);
String siteID = intent.getStringExtra(Constants.ID);
if (accounid != null) {
mAccountId = Integer.parseInt(accounid);
}
if (siteID != null) {
mSiteId = Integer.parseInt(siteID);
}
}
sendMessage();
return super.onStartCommand(intent, flags, startId);
}
@Nullable
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onDestroy() {
super.onDestroy();
mTimer.cancel();
mHandler = null;
}
}
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
android:hint="@{presenter.mHint}" android:hint="@{presenter.mHint}"
android:paddingLeft="@dimen/dp_13" android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_17" android:paddingTop="@dimen/dp_17"
android:maxLength="200"
android:text="@={presenter.mComment}" android:text="@={presenter.mComment}"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui" android:textColorHint="@color/cl_selector_hui"
......
...@@ -16,7 +16,6 @@ import java.io.IOException; ...@@ -16,7 +16,6 @@ import java.io.IOException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import io.reactivex.Observable; import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.ObservableTransformer; import io.reactivex.ObservableTransformer;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
...@@ -123,18 +122,20 @@ public class Api { ...@@ -123,18 +122,20 @@ public class Api {
public static <T> ObservableTransformer<BaseResponse<T>, T> applySchedulers() { public static <T> ObservableTransformer<BaseResponse<T>, T> applySchedulers() {
return (ObservableTransformer<BaseResponse<T>, T>) transformer; return upstream -> upstream.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.flatMap(Api::flatResponse);
} }
final static ObservableTransformer transformer = new ObservableTransformer() { // final static ObservableTransformer transformer = new ObservableTransformer() {
@Override // @Override
public ObservableSource apply(Observable upstream) { // public ObservableSource apply(Observable upstream) {
return upstream.subscribeOn(Schedulers.io()) // return upstream.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) // .observeOn(AndroidSchedulers.mainThread())
.flatMap((response) -> flatResponse((BaseResponse<Object>) response)); // .flatMap((response) -> flatResponse((BaseResponse<Object>) response));
} // }
}; // };
/** /**
...@@ -144,7 +145,7 @@ public class Api { ...@@ -144,7 +145,7 @@ public class Api {
* @param <T> * @param <T>
* @return * @return
*/ */
public static <T> Observable<T> flatResponse(final BaseResponse<T> response) { private static <T> Observable<T> flatResponse(final BaseResponse<T> response) {
return Observable.create(e -> { return Observable.create(e -> {
if (response.isSuccess()) { if (response.isSuccess()) {
if (!e.isDisposed()) { if (!e.isDisposed()) {
......
...@@ -43,14 +43,18 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> { ...@@ -43,14 +43,18 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
protected OnChildClickListener mOnChildClickListener; protected OnChildClickListener mOnChildClickListener;
private List<M> mOldDatas = new ArrayList<>(); private List<M> mOldDatas = new ArrayList<>();
private boolean isNeedFoot = false; private boolean isNeedFoot = false;
private View mFootView;
private int mFootViewType;
@Override @Override
public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
this.mContext = parent.getContext(); this.mContext = parent.getContext();
if (mFootViewType == viewType) {
return new BaseViewHolder(DataBindingUtil.bind(mFootView));
}
return new BaseViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), viewType, parent, false)); return new BaseViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), viewType, parent, false));
} }
public CoreAdapter(boolean needFoot) { public CoreAdapter(boolean needFoot) {
isNeedFoot = needFoot; isNeedFoot = needFoot;
if (needFoot) { if (needFoot) {
...@@ -100,6 +104,16 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> { ...@@ -100,6 +104,16 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
mHeadTypeDatas.add(new Item(i, data)); mHeadTypeDatas.add(new Item(i, data));
} }
/**
* 目前只支持添加一个脚布局.
* @param view
* @param type
*/
public void addFootViwe(View view, int type) {
mFootView = view;
mFootViewType = type;
}
public void addFooterViewType(@LayoutRes int i, Object data) { public void addFooterViewType(@LayoutRes int i, Object data) {
for (Item a : mFootTypeDatas) { for (Item a : mFootTypeDatas) {
if (a.type == i) { if (a.type == i) {
......
...@@ -41,6 +41,7 @@ public class BaseApplication extends MultiDexApplication { ...@@ -41,6 +41,7 @@ public class BaseApplication extends MultiDexApplication {
} }
private class SwitchBackgroundCallbacks implements Application.ActivityLifecycleCallbacks { private class SwitchBackgroundCallbacks implements Application.ActivityLifecycleCallbacks {
int count = 0;
@Override @Override
public void onActivityCreated(Activity activity, Bundle bundle) { public void onActivityCreated(Activity activity, Bundle bundle) {
...@@ -49,7 +50,10 @@ public class BaseApplication extends MultiDexApplication { ...@@ -49,7 +50,10 @@ public class BaseApplication extends MultiDexApplication {
@Override @Override
public void onActivityStarted(Activity activity) { public void onActivityStarted(Activity activity) {
if (count == 0) {
runFrontGround();
}
count++;
} }
@Override @Override
...@@ -64,7 +68,10 @@ public class BaseApplication extends MultiDexApplication { ...@@ -64,7 +68,10 @@ public class BaseApplication extends MultiDexApplication {
@Override @Override
public void onActivityStopped(Activity activity) { public void onActivityStopped(Activity activity) {
count--;
if (count == 0) {
runBackGround();
}
} }
@Override @Override
...@@ -77,4 +84,17 @@ public class BaseApplication extends MultiDexApplication { ...@@ -77,4 +84,17 @@ public class BaseApplication extends MultiDexApplication {
AppManager.getInstance().remove(activity); AppManager.getInstance().remove(activity);
} }
} }
/**
* app切换到后台时回调.
*/
public void runBackGround() {
}
/**
* app切换到前台时回调.
*/
public void runFrontGround() {
}
} }
...@@ -12,16 +12,16 @@ public class Constants { ...@@ -12,16 +12,16 @@ public class Constants {
/** /**
* 测试环境配置. * 测试环境配置.
*/ */
// public static final int LOG_LEVEL = LogUtils.LEVEL_ALL; public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static final String ENVIROMENT = "debug"; public static final String ENVIROMENT = "debug";
// public static final String BASE_URL = "http://47.94.101.239:3112"; public static final String BASE_URL = "http://47.94.101.239:3112";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"; public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
// public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop"; public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult"; public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
// public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop"; public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
// public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail"; public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
// public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail"; public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
// public static final boolean IS_DEBUG = true; public static final boolean IS_DEBUG = true;
/** /**
* uat环境配置. * uat环境配置.
...@@ -40,16 +40,16 @@ public class Constants { ...@@ -40,16 +40,16 @@ public class Constants {
/** /**
* 正式环境. * 正式环境.
*/ */
public static final String ENVIROMENT = "release"; // public static final String ENVIROMENT = "release";
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL; // public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
public static final String BASE_URL = "https://mobile.kf.ai"; // public static final String BASE_URL = "https://mobile.kf.ai";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"; // public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "https://sop.kf.ai/#/sop"; // public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail"; // public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail"; // public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult"; // public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop"; // public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
public static final boolean IS_DEBUG = false; // public static final boolean IS_DEBUG = false;
/** /**
* 演示环境 * 演示环境
...@@ -94,6 +94,11 @@ public class Constants { ...@@ -94,6 +94,11 @@ public class Constants {
*/ */
public final static String MESSAGE_NUM = " /api-message/" + "hXMessage/count/hxAccount/{hxAccount}"; public final static String MESSAGE_NUM = " /api-message/" + "hXMessage/count/hxAccount/{hxAccount}";
/**
* 上传地理位置.
*/
public final static String COMMITE_LOCAITON = " /api-user/" + "/engineerPathParticle";
/***********************其他配置**********************************/ /***********************其他配置**********************************/
public final static int PAGESIZE = 20; public final static int PAGESIZE = 20;
......
...@@ -61,6 +61,9 @@ public class UtilsUserAccountMatcher { ...@@ -61,6 +61,9 @@ public class UtilsUserAccountMatcher {
} }
public static boolean isPassword(String str) { public static boolean isPassword(String str) {
if (str == null) {
return false;
}
Matcher m = isPwd.matcher(str); Matcher m = isPwd.matcher(str);
if (m.find()) { if (m.find()) {
return true; return true;
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
<string name="receive_time_out">接单超时</string> <string name="receive_time_out">接单超时</string>
<string name="appointment_time_out">预约超时</string> <string name="appointment_time_out">预约超时</string>
<string name="delivery_time_out">验收超时</string> <string name="delivery_time_out">验收超时</string>
<string name="server_time_out">服务超时</string> <string name="server_time_out">上门超时</string>
<string name="need_again_door">需要再次上门</string> <string name="need_again_door">需要再次上门</string>
<string name="waite_appointemnt">待预约</string> <string name="waite_appointemnt">待预约</string>
<string name="waite_server">待服务</string> <string name="waite_server">待服务</string>
...@@ -289,20 +289,23 @@ ...@@ -289,20 +289,23 @@
<string name="order_num">工单编号</string> <string name="order_num">工单编号</string>
<string name="order_state">工单状态</string> <string name="order_state">工单状态</string>
<string name="server_name">服务名称</string> <string name="server_name">服务名称</string>
<string name="prodcut">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="prodcut">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="prodcut_type">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="prodcut_type">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="door_time">上门时间</string> <string name="door_time">上门时间</string>
<string name="order_remark">工单备注</string> <string name="order_remark">工单备注</string>
<string name="order_attachment">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="server_content">服务内容</string>
<string name="order_attachment">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="customer_info">客户信息</string> <string name="customer_info">客户信息</string>
<string name="customer_type">客户类型</string> <string name="customer_type">客户类型</string>
<string name="customer_name">客户姓名</string> <string name="customer_name">客户姓名</string>
<string name="check_signature">查看签名</string>
<string name="lookforword_time">期望时间</string> <string name="lookforword_time">期望时间</string>
<string name="money_info">费用信息</string>
<string name="prodcut_info">产品信息</string> <string name="prodcut_info">产品信息</string>
<string name="prodcut_brand">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="prodcut_brand">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="prodcut_num">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="prodcut_num">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="quality_assurance_info">质保信息</string> <string name="quality_assurance_info">质保信息</string>
<string name="sn_num">SN&#160;&#160;&#160;&#160;</string> <string name="sn_num">SN&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="charge_record">收费记录</string> <string name="charge_record">收费记录</string>
<string name="total_money">总金额数</string> <string name="total_money">总金额数</string>
<string name="total_price">总金额</string> <string name="total_price">总金额</string>
...@@ -357,6 +360,7 @@ ...@@ -357,6 +360,7 @@
<string name="process_order_success">提交验收成功</string> <string name="process_order_success">提交验收成功</string>
<string name="signature_name">请先签名!</string> <string name="signature_name">请先签名!</string>
<string name="click_and_signature">点击此处让客户去签名</string> <string name="click_and_signature">点击此处让客户去签名</string>
<string name="download_gaode_notice">您还未安装高德地图~</string>
<!--消息--> <!--消息-->
<string name="message_system">系统通知</string> <string name="message_system">系统通知</string>
...@@ -379,6 +383,7 @@ ...@@ -379,6 +383,7 @@
<string name="input_content">请输入内容</string> <string name="input_content">请输入内容</string>
<string name="commite_success">提交成功</string> <string name="commite_success">提交成功</string>
<string name="on_download">正在下载中,请稍后…</string> <string name="on_download">正在下载中,请稍后…</string>
<string name="go_download">去安装</string>
<string name="download_faile">下载失败</string> <string name="download_faile">下载失败</string>
<string name="have_new_version">有新版本</string> <string name="have_new_version">有新版本</string>
<string name="next_again">下次再说</string> <string name="next_again">下次再说</string>
...@@ -446,7 +451,7 @@ ...@@ -446,7 +451,7 @@
<string name="certification_error">联网授权失败!请检查网络或找服务商</string> <string name="certification_error">联网授权失败!请检查网络或找服务商</string>
<string name="certification_getphoto_error">获取相机权限失败</string> <string name="certification_getphoto_error">获取相机权限失败</string>
<string name="next_step">下一步</string> <string name="next_step">下一步</string>
<string name="accredit_error">授权失败</string> <string name="accredit_error">人脸识别授权失败</string>
<string name="certification_success">认证成功</string> <string name="certification_success">认证成功</string>
<string name="certification_fail">认证失败</string> <string name="certification_fail">认证失败</string>
<string name="certification_again">重新认证</string> <string name="certification_again">重新认证</string>
...@@ -526,7 +531,7 @@ ...@@ -526,7 +531,7 @@
<string name="global0101">验证码错误</string> <string name="global0101">验证码错误</string>
<string name="global0102">未知错误GLOBAL0102</string> <string name="global0102">未知错误GLOBAL0102</string>
<string name="global0103">验证码错误</string> <string name="global0103">验证码错误</string>
<string name="global0104">用户名密码错误</string> <string name="global0104">用户名密码错误</string>
<string name="global0400">未知错误GLOBAL0400</string> <string name="global0400">未知错误GLOBAL0400</string>
<string name="global0406">未知错误GLOBAL0406</string> <string name="global0406">未知错误GLOBAL0406</string>
<string name="global0405">未知错误GLOBAL0405</string> <string name="global0405">未知错误GLOBAL0405</string>
......
...@@ -5,8 +5,8 @@ buildscript { ...@@ -5,8 +5,8 @@ buildscript {
ext.build_tools_version = "27.0.2" ext.build_tools_version = "27.0.2"
ext.min_sdk_version = 16 ext.min_sdk_version = 16
ext.target_sdk_version = 23 ext.target_sdk_version = 23
ext.version_code = 13 ext.version_code = 14
ext.verson_name = "1.9.0" ext.verson_name = "1.9.1"
ext.gradle_version = '3.0.1' ext.gradle_version = '3.0.1'
ext.isReleaseMinify = true ext.isReleaseMinify = true
ext.isDebugMinify = true ext.isDebugMinify = true
......
android.useDeprecatedNdk=true
##模块化开关,单独调试时 false,作为模块 true ##模块化开关,单独调试时 false,作为模块 true
##用户模块 ##用户模块
isUserModule=true isUserModule=true
...@@ -9,3 +8,5 @@ isOrderModule=true ...@@ -9,3 +8,5 @@ isOrderModule=true
##maven依赖 ##maven依赖
mavenMode=false mavenMode=false
BASE_URL=http://47.94.101.239:3112 BASE_URL=http://47.94.101.239:3112
Android.useDeprecatedNdk=true
\ No newline at end of file
...@@ -27,7 +27,7 @@ android { ...@@ -27,7 +27,7 @@ android {
dependencies { dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs') compile fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/Amap_2DMap_V5.2.0_20170627.jar') implementation files('libs/Amap_2DMap_V5.2.0_20170627.jar')
} }
...@@ -5,13 +5,11 @@ import android.content.Context; ...@@ -5,13 +5,11 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Handler; import android.os.Handler;
import android.widget.Toast;
import com.amap.api.location.AMapLocation; import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient; import com.amap.api.location.AMapLocationClient;
import com.amap.api.location.AMapLocationClientOption; import com.amap.api.location.AMapLocationClientOption;
import com.amap.api.location.AMapLocationListener; import com.amap.api.location.AMapLocationListener;
import com.dayu.location.R;
import java.io.File; import java.io.File;
...@@ -27,6 +25,7 @@ public class LocationUtils { ...@@ -27,6 +25,7 @@ public class LocationUtils {
private static boolean flag = true; private static boolean flag = true;
private static MyLocationListener mListener; private static MyLocationListener mListener;
private static Handler mHandler; private static Handler mHandler;
private static OpenMarketListener marketListener;
/** /**
* @param context * @param context
...@@ -137,7 +136,7 @@ public class LocationUtils { ...@@ -137,7 +136,7 @@ public class LocationUtils {
return new File("/data/data/" + "com.autonavi.minimap").exists(); return new File("/data/data/" + "com.autonavi.minimap").exists();
} }
public static void openMap(Context mContext, String address) { public static void openMap(Context mContext, String address, OpenMarketListener listener) {
if (isInstallPackage()) { if (isInstallPackage()) {
Intent intent = new Intent("android.intent.action.VIEW" Intent intent = new Intent("android.intent.action.VIEW"
, android.net.Uri.parse("androidamap://poi?sourceApplication=softname&keywords=" + address)); , android.net.Uri.parse("androidamap://poi?sourceApplication=softname&keywords=" + address));
...@@ -145,19 +144,21 @@ public class LocationUtils { ...@@ -145,19 +144,21 @@ public class LocationUtils {
intent.addCategory("android.intent.category.DEFAULT"); intent.addCategory("android.intent.category.DEFAULT");
mContext.startActivity(intent); mContext.startActivity(intent);
} else { } else {
Toast.makeText(mContext, R.string.install_gd_map, Toast.LENGTH_SHORT).show(); listener.openMarket();
goToMarket(mContext, "com.autonavi.minimap");
} }
} }
private static void goToMarket(Context context, String packageName) { public static void goToMarket(Context context) {
Uri uri = Uri.parse("market://details?id=" + packageName); Uri uri = Uri.parse("market://details?id=" + "com.autonavi.minimap");
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri); Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
try { try {
context.startActivity(goToMarket); context.startActivity(goToMarket);
} catch (ActivityNotFoundException e) { } catch (ActivityNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} }
}
public interface OpenMarketListener {
void openMarket();
} }
} }
...@@ -56,6 +56,7 @@ public class Order implements Serializable{ ...@@ -56,6 +56,7 @@ public class Order implements Serializable{
private Integer kaCompanyId; private Integer kaCompanyId;
private Integer faceSwitch ;//0:关闭;1:打开 private Integer faceSwitch ;//0:关闭;1:打开
public Integer getFaceSwitch() { public Integer getFaceSwitch() {
return faceSwitch; return faceSwitch;
} }
......
...@@ -783,7 +783,7 @@ public class OrderDetail implements Serializable { ...@@ -783,7 +783,7 @@ public class OrderDetail implements Serializable {
} }
} }
public class accessories implements Serializable { public static class accessories implements Serializable {
private int id; private int id;
private String name; private String name;
private int orderId; private int orderId;
......
...@@ -2,6 +2,8 @@ package com.dayu.order.presenter.orderdoing; ...@@ -2,6 +2,8 @@ package com.dayu.order.presenter.orderdoing;
import android.databinding.ObservableField; import android.databinding.ObservableField;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import com.dayu.common.BaseApplication; import com.dayu.common.BaseApplication;
import com.dayu.common.Constants; import com.dayu.common.Constants;
...@@ -15,8 +17,12 @@ import com.dayu.order.ui.activity.OrderLivenessActivity; ...@@ -15,8 +17,12 @@ import com.dayu.order.ui.activity.OrderLivenessActivity;
import com.dayu.order.ui.fragment.OrderThreeTabFragment; import com.dayu.order.ui.fragment.OrderThreeTabFragment;
import com.dayu.provider.event.RefreshTab; import com.dayu.provider.event.RefreshTab;
import com.dayu.utils.AppManager; import com.dayu.utils.AppManager;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UserManager; import com.dayu.utils.UserManager;
import com.dayu.widgets.CustomDialog; import com.dayu.widgets.CustomDialog;
import com.megvii.idcardlib.util.ConUtil;
import com.megvii.licensemanager.Manager;
import com.megvii.livenessdetection.LivenessLicenseManager;
import com.umeng.analytics.MobclickAgent; import com.umeng.analytics.MobclickAgent;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
...@@ -36,11 +42,11 @@ import static com.dayu.utils.UIUtils.getString; ...@@ -36,11 +42,11 @@ import static com.dayu.utils.UIUtils.getString;
*/ */
public class OrderDoingPresenter extends orderDoingContract.Presenter { public class OrderDoingPresenter extends orderDoingContract.Presenter {
private ObservableField<Object> datas = new ObservableField<>(); private ObservableField<Object> datas = new ObservableField<>();
private static final int PAGE_INTO_LIVENESS = 100;
private int mUserId; private int mUserId;
private int mSiteId; private int mSiteId;
private int mState; private int mState;
private int mPage; private int mPage;
private Handler mHandler;
@Override @Override
public void onAttached() { public void onAttached() {
...@@ -117,9 +123,7 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter { ...@@ -117,9 +123,7 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter {
CustomDialog customDialog = new CustomDialog(AppManager.getInstance().currentActivity(), R.style.CustomDialog, "为了保证您的账号安全和用户安全,请您本人进行人脸识别操作", CustomDialog customDialog = new CustomDialog(AppManager.getInstance().currentActivity(), R.style.CustomDialog, "为了保证您的账号安全和用户安全,请您本人进行人脸识别操作",
(dialog, confirm) -> { (dialog, confirm) -> {
if (confirm) { if (confirm) {
Bundle bundle = new Bundle(); checkCachedLicense(order);
bundle.putSerializable(OrderConstant.ORDERS,order);
mView.startActivity(OrderLivenessActivity.class, bundle);
} }
}); });
customDialog.setTitle("人脸识别") customDialog.setTitle("人脸识别")
...@@ -136,4 +140,28 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter { ...@@ -136,4 +140,28 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter {
mView.startActivity(OrderDetailsActivity.class, bundle); mView.startActivity(OrderDetailsActivity.class, bundle);
MobclickAgent.onEvent(BaseApplication.getContext(), "check_order_detail"); MobclickAgent.onEvent(BaseApplication.getContext(), "check_order_detail");
} }
public void checkCachedLicense(Order order) {
String uuid = ConUtil.getUUIDString(BaseApplication.getContext());
new Thread(() -> {
Manager manager = new Manager(BaseApplication.getContext());
LivenessLicenseManager licenseManager = new LivenessLicenseManager(BaseApplication.getContext());
manager.registerLicenseManager(licenseManager);
manager.takeLicenseFromNetwork(uuid);
if (licenseManager.checkCachedLicense() < 0) {
mHandler = new Handler(Looper.getMainLooper());
mHandler.post(() -> ToastUtils.showShortToast(getString(com.dayu.order.R.string.accredit_error)));
} else {
Bundle bundle = new Bundle();
bundle.putSerializable(OrderConstant.ORDERS, order);
mView.startActivity(OrderLivenessActivity.class, bundle);
}
}).start();
}
@Override
public void onDetached() {
super.onDetached();
mHandler = null;
}
} }
...@@ -54,6 +54,8 @@ public interface ProcessOrderContract { ...@@ -54,6 +54,8 @@ public interface ProcessOrderContract {
void showSelectPayerDialog(OnCloseListener listener); void showSelectPayerDialog(OnCloseListener listener);
ArrayList<String> getSnImages(); ArrayList<String> getSnImages();
String getTotalMoney();
} }
abstract class Presenter extends BasePresenter<View> { abstract class Presenter extends BasePresenter<View> {
......
...@@ -161,7 +161,6 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter { ...@@ -161,7 +161,6 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
params.put("doorPriceComment", doorPriceComment); params.put("doorPriceComment", doorPriceComment);
params.put("engineerId", engineerId); params.put("engineerId", engineerId);
params.put("id", orderId); params.put("id", orderId);
params.put("isPay", isPay);
params.put("materialCost", materialCost); params.put("materialCost", materialCost);
params.put("materialCostComment", ""); params.put("materialCostComment", "");
params.put("otherPrice", otherPrice); params.put("otherPrice", otherPrice);
...@@ -205,6 +204,11 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter { ...@@ -205,6 +204,11 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
params.put("picsCost", null); params.put("picsCost", null);
} }
String totalMoney = mView.getTotalMoney();
if (!TextUtils.isEmpty(totalMoney) && Double.parseDouble(totalMoney) == 0.00 || TextUtils.isEmpty(totalMoney)) {
isPay = 1;
}
params.put("isPay", isPay);
JSONObject jsonObject = new JSONObject(params); JSONObject jsonObject = new JSONObject(params);
RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString()); RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString());
OrderApiFactory.commitOrder(body).subscribe(baseObserver(integer -> { OrderApiFactory.commitOrder(body).subscribe(baseObserver(integer -> {
......
...@@ -55,6 +55,7 @@ public class ReceivingPresenter extends ReceivingContract.Presenter { ...@@ -55,6 +55,7 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
@Override @Override
public void receiveOrder(int orders, int engineer) { public void receiveOrder(int orders, int engineer) {
mView.showDialog();
OrderApiFactory.receiveOrder(orders, engineer).subscribe(baseObserver( OrderApiFactory.receiveOrder(orders, engineer).subscribe(baseObserver(
aBoolean -> receiveOrderSuccess(), responeThrowable -> { aBoolean -> receiveOrderSuccess(), responeThrowable -> {
if ("ORDER0002".equals(responeThrowable.subCode) || "ORDER0003".equals(responeThrowable.subCode)) { if ("ORDER0002".equals(responeThrowable.subCode) || "ORDER0003".equals(responeThrowable.subCode)) {
......
...@@ -61,7 +61,6 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent ...@@ -61,7 +61,6 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
private LinearLayout mLPayer; private LinearLayout mLPayer;
private ArrayList<String> mPayerImages = new ArrayList<>(); private ArrayList<String> mPayerImages = new ArrayList<>();
private List<LocalMedia> mSelectList; private List<LocalMedia> mSelectList;
private boolean mFlag = true;
private ImageView mArrow; private ImageView mArrow;
private LinearLayout mPayerNotice; private LinearLayout mPayerNotice;
private RelativeLayout mAllSignature; private RelativeLayout mAllSignature;
...@@ -88,28 +87,15 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent ...@@ -88,28 +87,15 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
mBind.tvTitle.setText(getString(R.string.submit_order)); mBind.tvTitle.setText(getString(R.string.submit_order));
mIvWeight = (UtilsScreen.getScreenWidth(mActivity) - UtilsScreen.dip2px(mActivity, 20)) / 5; mIvWeight = (UtilsScreen.getScreenWidth(mActivity) - UtilsScreen.dip2px(mActivity, 20)) / 5;
mBind.recyclerView.mCoreAdapter.addFooterViewType(R.layout.item_multi_process_foot, null); mBind.recyclerView.mCoreAdapter.addFooterViewType(R.layout.item_multi_process_foot, null);
mBind.recyclerView.postDelayed(() -> { View view = LayoutInflater.from(mActivity).inflate(R.layout.item_multi_process_foot, null);
if (mFlag) { mBind.recyclerView.mCoreAdapter.addFootViwe(view, R.layout.item_multi_process_foot);
initFootView(); initFootView(view);
}
}, 500);
mBind.recyclerView.setOnEndListener(() -> {
if (mFlag) {
initFootView();
}
});
} }
public void initFootView() { public void initFootView(View view) {
View view = mBind.recyclerView.getChildAt(0);
swtich = view.findViewById(R.id.iv_switch); swtich = view.findViewById(R.id.iv_switch);
RelativeLayout rlPay = view.findViewById(R.id.rl_pay); RelativeLayout rlPay = view.findViewById(R.id.rl_pay);
LinearLayout signature = view.findViewById(R.id.rl_signature); mSignature = view.findViewById(R.id.rl_signature);
if (signature == null) {
return;
}
mFlag = false;
mSignature = signature;
mDoorPrice = view.findViewById(R.id.et_door_price); mDoorPrice = view.findViewById(R.id.et_door_price);
mServerPrice = view.findViewById(R.id.et_serve_price); mServerPrice = view.findViewById(R.id.et_serve_price);
mMaterialsPrice = view.findViewById(R.id.et_materials_price); mMaterialsPrice = view.findViewById(R.id.et_materials_price);
...@@ -234,6 +220,10 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent ...@@ -234,6 +220,10 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
} else { } else {
repairType = 2; repairType = 2;
} }
String totalMoney = mTotalMoney.getText().toString().trim();
if (!TextUtils.isEmpty(totalMoney) && Double.parseDouble(totalMoney) == 0.00 || TextUtils.isEmpty(totalMoney)) {
isPay = 1;
}
params.put("repairType", repairType); params.put("repairType", repairType);
params.put("isPay", isPay); params.put("isPay", isPay);
return params; return params;
......
...@@ -66,9 +66,12 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act ...@@ -66,9 +66,12 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act
mFragments.add(orderDatailsServeFragment); mFragments.add(orderDatailsServeFragment);
mFragments.add(mOrderPartFragment); mFragments.add(mOrderPartFragment);
mBind.titleBack.setOnClickListener(v -> dumpBack()); mBind.titleBack.setOnClickListener(v -> dumpBack());
mBind.btnDetail.setVisibility(View.VISIBLE);
mBind.btnServer.setVisibility(View.VISIBLE);
if (detail.getCreatedSource() ==1) { if (detail.getCreatedSource() ==1) {
mBind.btnPart.setVisibility(View.GONE);
mBind.btnServer.setBackgroundResource(R.drawable.detail_end_selector); mBind.btnServer.setBackgroundResource(R.drawable.detail_end_selector);
}else {
mBind.btnPart.setVisibility(View.VISIBLE);
} }
initBtn(); initBtn();
addFragment(); addFragment();
......
...@@ -32,7 +32,6 @@ import com.megvii.idcardlib.util.IMediaPlayer; ...@@ -32,7 +32,6 @@ import com.megvii.idcardlib.util.IMediaPlayer;
import com.megvii.idcardlib.util.Screen; import com.megvii.idcardlib.util.Screen;
import com.megvii.idcardlib.util.SensorUtil; import com.megvii.idcardlib.util.SensorUtil;
import com.megvii.idcardlib.view.CircleProgressBar; import com.megvii.idcardlib.view.CircleProgressBar;
import com.megvii.licensemanager.Manager;
import com.megvii.livenessdetection.DetectionConfig; import com.megvii.livenessdetection.DetectionConfig;
import com.megvii.livenessdetection.DetectionFrame; import com.megvii.livenessdetection.DetectionFrame;
import com.megvii.livenessdetection.Detector; import com.megvii.livenessdetection.Detector;
...@@ -41,7 +40,6 @@ import com.megvii.livenessdetection.Detector.DetectionListener; ...@@ -41,7 +40,6 @@ import com.megvii.livenessdetection.Detector.DetectionListener;
import com.megvii.livenessdetection.Detector.DetectionType; import com.megvii.livenessdetection.Detector.DetectionType;
import com.megvii.livenessdetection.FaceQualityManager; import com.megvii.livenessdetection.FaceQualityManager;
import com.megvii.livenessdetection.FaceQualityManager.FaceQualityErrorType; import com.megvii.livenessdetection.FaceQualityManager.FaceQualityErrorType;
import com.megvii.livenessdetection.LivenessLicenseManager;
import com.megvii.livenessdetection.bean.FaceIDDataStruct; import com.megvii.livenessdetection.bean.FaceIDDataStruct;
import com.megvii.livenessdetection.bean.FaceInfo; import com.megvii.livenessdetection.bean.FaceInfo;
...@@ -76,7 +74,6 @@ public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter, ...@@ -76,7 +74,6 @@ public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter,
private boolean isHandleStart;// 是否开始检测 private boolean isHandleStart;// 是否开始检测
private FaceQualityManager mFaceQualityManager; private FaceQualityManager mFaceQualityManager;
private SensorUtil sensorUtil; private SensorUtil sensorUtil;
private String uuid;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -85,19 +82,8 @@ public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter, ...@@ -85,19 +82,8 @@ public class OrderLivenessActivity extends BaseActivity<OrderLivenessPresenter,
@Override @Override
public void initView() { public void initView() {
uuid = ConUtil.getUUIDString(this);
new Thread(() -> {
Manager manager = new Manager(OrderLivenessActivity.this);
LivenessLicenseManager licenseManager = new LivenessLicenseManager(OrderLivenessActivity.this);
manager.registerLicenseManager(licenseManager);
manager.takeLicenseFromNetwork(uuid);
if (licenseManager.checkCachedLicense() < 0) {
runOnUiThread(() -> ToastUtils.showShortToast(getString(R.string.accredit_error)));
} else {
initData();
}
}).start();
init(); init();
initData();
} }
@Override @Override
......
...@@ -274,9 +274,6 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac ...@@ -274,9 +274,6 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac
@Override @Override
public void setFoucesable() { public void setFoucesable() {
mBind.tvBrand.setFocusable(false);
mBind.etVersion.setFocusable(false);
mBind.etSerialNum.setFocusable(false);
mBind.ivPayer.setVisibility(View.GONE); mBind.ivPayer.setVisibility(View.GONE);
mBind.tvPayer.setClickable(false); mBind.tvPayer.setClickable(false);
mBind.rlPalyerProve.setVisibility(View.GONE); mBind.rlPalyerProve.setVisibility(View.GONE);
...@@ -309,6 +306,11 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac ...@@ -309,6 +306,11 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac
} }
@Override @Override
public String getTotalMoney() {
return mBind.tvTotalMoney.getText().toString().trim();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) { if (resultCode == RESULT_OK) {
......
...@@ -8,6 +8,8 @@ import android.view.View; ...@@ -8,6 +8,8 @@ import android.view.View;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
import com.amap.api.location.AMapLocation; import com.amap.api.location.AMapLocation;
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
import com.bigkoo.pickerview.view.OptionsPickerView;
import com.dayu.base.ui.adapter.CoreAdapter; import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.common.Constants; import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils; import com.dayu.location.base.LocationUtils;
...@@ -35,7 +37,9 @@ import com.umeng.analytics.MobclickAgent; ...@@ -35,7 +37,9 @@ import com.umeng.analytics.MobclickAgent;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
...@@ -81,7 +85,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi ...@@ -81,7 +85,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder.orderLineOne.setVisibility(View.VISIBLE); holder.orderLineOne.setVisibility(View.VISIBLE);
holder.orderLineTwo.setVisibility(View.VISIBLE); holder.orderLineTwo.setVisibility(View.VISIBLE);
holder.tvItemProcess.setVisibility(View.VISIBLE); holder.tvItemProcess.setVisibility(View.VISIBLE);
// holder.itemTextDizhi.setOnClickListener(v -> LocationUtils.openMap(mContext, address)); holder.navigation.setOnClickListener(v -> LocationUtils.openMap(mContext, address, this::showOpenMarketDialog));
final int id = item.getId(); final int id = item.getId();
if (item.getAnyContacts() == 0) { if (item.getAnyContacts() == 0) {
...@@ -210,15 +214,19 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi ...@@ -210,15 +214,19 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
int errorState = item.getExcptionCode(); int errorState = item.getExcptionCode();
if (errorState == 1) { if (errorState == 1) {
holder.tvErrorState.setText(mContext.getString(R.string.receive_time_out)); holder.tvErrorState.setText(mContext.getString(R.string.receive_time_out));
holder.tvErrorState.setTextColor(mContext.getResources().getColor(R.color.cl_tab_read));
holder.tvErrorState.setVisibility(View.VISIBLE); holder.tvErrorState.setVisibility(View.VISIBLE);
} else if (errorState == 2) { } else if (errorState == 2) {
holder.tvErrorState.setText(mContext.getString(R.string.appointment_time_out)); holder.tvErrorState.setText(mContext.getString(R.string.appointment_time_out));
holder.tvErrorState.setTextColor(mContext.getResources().getColor(R.color.cl_tab_read));
holder.tvErrorState.setVisibility(View.VISIBLE); holder.tvErrorState.setVisibility(View.VISIBLE);
} else if (errorState == 3) { } else if (errorState == 3) {
holder.tvErrorState.setText(mContext.getString(R.string.server_time_out)); holder.tvErrorState.setText(mContext.getString(R.string.server_time_out));
holder.tvErrorState.setTextColor(mContext.getResources().getColor(R.color.cl_tab_read));
holder.tvErrorState.setVisibility(View.VISIBLE); holder.tvErrorState.setVisibility(View.VISIBLE);
} else if (errorState == 4) { } else if (errorState == 4) {
holder.tvErrorState.setText(mContext.getString(R.string.delivery_time_out)); holder.tvErrorState.setText(mContext.getString(R.string.delivery_time_out));
holder.tvErrorState.setTextColor(mContext.getResources().getColor(R.color.cl_tab_read));
holder.tvErrorState.setVisibility(View.VISIBLE); holder.tvErrorState.setVisibility(View.VISIBLE);
} }
...@@ -238,9 +246,11 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi ...@@ -238,9 +246,11 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
}); });
if (item.getStatus() != 1) { if (item.getStatus() != 1) {
holder.itemTextPhone.setOnClickListener(v -> { holder.itemTextPhone.setOnClickListener(v -> {
Intent intent = new Intent(Intent.ACTION_DIAL); if (!TextUtils.isEmpty(item.getCustomerTelphome())) {
intent.setData(Uri.parse("tel:" + item.getCustomerMobile())); showMoblieDialog(item.getCustomerMobile(), item.getCustomerTelphome());
mContext.startActivity(intent); } else {
takePhone(item.getCustomerMobile());
}
Map<String, String> map_ekv = new HashMap<>(); Map<String, String> map_ekv = new HashMap<>();
if (item.getStatus() == 2) { if (item.getStatus() == 2) {
map_ekv.put("type", mContext.getString(R.string.receive_list)); map_ekv.put("type", mContext.getString(R.string.receive_list));
...@@ -420,6 +430,39 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi ...@@ -420,6 +430,39 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
customDialog.show(); customDialog.show();
} }
private void showOpenMarketDialog() {
CustomDialog customDialog = new CustomDialog(mContext, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket(mContext);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
private void showMoblieDialog(String mobile, String tel) {
List<String> list = new ArrayList<>();
list.add(mobile);
list.add(tel);
OptionsPickerView pvOptions = new OptionsPickerBuilder(mContext,
(options1, options2, options3, v) -> takePhone(list.get(options1)))
.setContentTextSize(20)
.setLineSpacingMultiplier(2.0f)
.setContentTextSize(20)
.build();
pvOptions.setPicker(list);
pvOptions.show();
}
private void takePhone(String phone) {
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:" + phone));
mContext.startActivity(intent);
}
public void initPresenter(OrderDoingPresenter presenter) { public void initPresenter(OrderDoingPresenter presenter) {
mPresenter = presenter; mPresenter = presenter;
} }
......
...@@ -4,12 +4,14 @@ import android.text.TextUtils; ...@@ -4,12 +4,14 @@ import android.text.TextUtils;
import android.view.View; import android.view.View;
import com.dayu.base.ui.adapter.CoreAdapter; import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.location.base.LocationUtils;
import com.dayu.order.R; import com.dayu.order.R;
import com.dayu.order.api.protocol.ErrorOrder; import com.dayu.order.api.protocol.ErrorOrder;
import com.dayu.order.api.protocol.Spu; import com.dayu.order.api.protocol.Spu;
import com.dayu.order.databinding.FragmentOrderErrorItemBinding; import com.dayu.order.databinding.FragmentOrderErrorItemBinding;
import com.dayu.utils.UIUtils; import com.dayu.utils.UIUtils;
import com.dayu.utils.UtilsDate; import com.dayu.utils.UtilsDate;
import com.dayu.widgets.CustomDialog;
import static com.dayu.utils.UtilsDate.FORMAT_ONE; import static com.dayu.utils.UtilsDate.FORMAT_ONE;
import static com.dayu.utils.UtilsDate.LONG_TIME_FORMAT_TWO; import static com.dayu.utils.UtilsDate.LONG_TIME_FORMAT_TWO;
...@@ -54,9 +56,10 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE ...@@ -54,9 +56,10 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
} }
helper.itemTextWeixiu.setText(item.getProviderName()); helper.itemTextWeixiu.setText(item.getProviderName());
helper.itemTextWeixiuLeixing.setText(item.getCategoryName()); helper.itemTextWeixiuLeixing.setText(item.getCategoryName());
helper.itemTextDizhi.setText(item.getProvinceName() + item.getCityName() + String address = item.getProvinceName() + item.getCityName() +
item.getDistrictName() + item.getAddress()); item.getDistrictName() + item.getAddress();
helper.itemTextDizhi.setText(address);
helper.navigation.setOnClickListener(v -> LocationUtils.openMap(mContext, address, this::showOpenMarketDialog));
int errorState = item.getExcptionCode(); int errorState = item.getExcptionCode();
if (errorState == 1) { if (errorState == 1) {
helper.errorState.setText(mContext.getString(R.string.receive_time_out)); helper.errorState.setText(mContext.getString(R.string.receive_time_out));
...@@ -92,4 +95,17 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE ...@@ -92,4 +95,17 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
} }
} }
private void showOpenMarketDialog() {
CustomDialog customDialog = new CustomDialog(mContext, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket(mContext);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
} }
...@@ -11,6 +11,7 @@ import android.widget.ImageView; ...@@ -11,6 +11,7 @@ import android.widget.ImageView;
import com.dayu.base.ui.adapter.CoreAdapter; import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.base.ui.fragment.DataBindingFragment; import com.dayu.base.ui.fragment.DataBindingFragment;
import com.dayu.common.Constants; import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils;
import com.dayu.order.R; import com.dayu.order.R;
import com.dayu.order.api.protocol.OrderDetail; import com.dayu.order.api.protocol.OrderDetail;
import com.dayu.order.api.protocol.Spu; import com.dayu.order.api.protocol.Spu;
...@@ -24,6 +25,8 @@ import com.dayu.order.ui.activity.QrCodeActivity; ...@@ -24,6 +25,8 @@ import com.dayu.order.ui.activity.QrCodeActivity;
import com.dayu.order.ui.activity.ServerInstructionActivity; import com.dayu.order.ui.activity.ServerInstructionActivity;
import com.dayu.utils.GlideImageLoader; import com.dayu.utils.GlideImageLoader;
import com.dayu.utils.ToastUtils; import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils;
import com.dayu.widgets.CustomDialog;
import com.dayu.widgets.listener.OnItemClickListener; import com.dayu.widgets.listener.OnItemClickListener;
import com.umeng.analytics.MobclickAgent; import com.umeng.analytics.MobclickAgent;
...@@ -56,6 +59,8 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD ...@@ -56,6 +59,8 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD
mServerAdapter.setViewType(R.layout.item_detail_server_info); mServerAdapter.setViewType(R.layout.item_detail_server_info);
mBind.rlServerContent.setAdapter(mServerAdapter); mBind.rlServerContent.setAdapter(mServerAdapter);
mServerAdapter.setData(detail.getSpus()); mServerAdapter.setData(detail.getSpus());
mBind.navigation.setOnClickListener(v -> LocationUtils.openMap(mActivity, detail.getProvinceName()
+ detail.getCityName() + detail.getDistrictName() + detail.getAddress(), this::showOpenMarketDialog));
mServerAdapter.setOnItemClickListener(new OnItemClickListener<Spu, ItemDetailServerInfoBinding>() { mServerAdapter.setOnItemClickListener(new OnItemClickListener<Spu, ItemDetailServerInfoBinding>() {
@Override @Override
public void OnItemClick(Spu item, ItemDetailServerInfoBinding bind) { public void OnItemClick(Spu item, ItemDetailServerInfoBinding bind) {
...@@ -103,6 +108,19 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD ...@@ -103,6 +108,19 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD
mBind.customerSignature.setOnClickListener(v -> imgMax(detail.getEsignatureImg())); mBind.customerSignature.setOnClickListener(v -> imgMax(detail.getEsignatureImg()));
} }
private void showOpenMarketDialog() {
CustomDialog customDialog = new CustomDialog(mActivity, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket(mActivity);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
public String getStaus(int staus) { public String getStaus(int staus) {
if (staus == 1) { if (staus == 1) {
return mActivity.getString(R.string.not_receive_order); return mActivity.getString(R.string.not_receive_order);
......
...@@ -8,6 +8,7 @@ import android.view.View; ...@@ -8,6 +8,7 @@ import android.view.View;
import com.dayu.base.ui.adapter.CoreAdapter; import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.base.ui.fragment.DataBindingFragment; import com.dayu.base.ui.fragment.DataBindingFragment;
import com.dayu.common.Constants; import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils;
import com.dayu.order.R; import com.dayu.order.R;
import com.dayu.order.api.protocol.OrderDetail; import com.dayu.order.api.protocol.OrderDetail;
import com.dayu.order.common.OrderConstant; import com.dayu.order.common.OrderConstant;
...@@ -18,6 +19,7 @@ import com.dayu.order.ui.activity.QrCodeActivity; ...@@ -18,6 +19,7 @@ import com.dayu.order.ui.activity.QrCodeActivity;
import com.dayu.order.ui.activity.ServerInstructionActivity; import com.dayu.order.ui.activity.ServerInstructionActivity;
import com.dayu.utils.ToastUtils; import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils; import com.dayu.utils.UIUtils;
import com.dayu.widgets.CustomDialog;
import com.dayu.widgets.listener.OnItemClickListener; import com.dayu.widgets.listener.OnItemClickListener;
import com.umeng.analytics.MobclickAgent; import com.umeng.analytics.MobclickAgent;
...@@ -78,6 +80,8 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData ...@@ -78,6 +80,8 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData
mBind.tvLookMore.setVisibility(View.GONE); mBind.tvLookMore.setVisibility(View.GONE);
} }
}); });
mBind.navigation.setOnClickListener(v -> LocationUtils.openMap(mActivity, dataBean.getProvinceName()
+ dataBean.getCityName() + dataBean.getDistrictName() + dataBean.getAddress(), this::showOpenMarketDialog));
if (dataBean.getIsPay() == null || dataBean.getIsPay() == 1) { if (dataBean.getIsPay() == null || dataBean.getIsPay() == 1) {
mBind.rlNoCharge.setVisibility(View.VISIBLE); mBind.rlNoCharge.setVisibility(View.VISIBLE);
mBind.rlHaveCharge.setVisibility(View.GONE); mBind.rlHaveCharge.setVisibility(View.GONE);
...@@ -153,6 +157,19 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData ...@@ -153,6 +157,19 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData
} }
} }
private void showOpenMarketDialog() {
CustomDialog customDialog = new CustomDialog(mActivity, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket(mActivity);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
public void dumpToServerInstruction() { public void dumpToServerInstruction() {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt(Constants.ID, mDetail.getSpuId()); bundle.putInt(Constants.ID, mDetail.getSpuId());
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activity.MultiProcessOrderActivity" android:name=".ui.activity.MultiProcessOrderActivity"
android:windowSoftInputMode="stateVisible|adjustResize" android:windowSoftInputMode="stateHidden|adjustResize"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activity.SignatureActivity" android:name=".ui.activity.SignatureActivity"
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toEndOf="@+id/text_one_text" android:layout_toEndOf="@+id/text_one_text"
android:layout_toRightOf="@+id/text_one_text" android:layout_toRightOf="@+id/text_one_text"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
android:layout_toRightOf="@id/text_two_text" android:layout_toRightOf="@id/text_two_text"
android:background="@null" android:background="@null"
android:hint="@string/order_brand_name" android:hint="@string/order_brand_name"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
android:layout_toRightOf="@id/tv_version" android:layout_toRightOf="@id/tv_version"
android:background="@null" android:background="@null"
android:hint="@string/order_product_model_hint" android:hint="@string/order_product_model_hint"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
android:layout_toRightOf="@id/tv_serial_num" android:layout_toRightOf="@id/tv_serial_num"
android:background="@null" android:background="@null"
android:hint="@string/order_serail_hint" android:hint="@string/order_serail_hint"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
android:layout_marginLeft="45dp" android:layout_marginLeft="45dp"
android:layout_toRightOf="@id/tv_player" android:layout_toRightOf="@id/tv_player"
android:background="@null" android:background="@null"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
android:paddingLeft="@dimen/dp_13" android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui" android:textColorHint="@color/default_text_color"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
</RelativeLayout> </RelativeLayout>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<import type="android.view.View" /> <import type="android.view.View" />
<import type="android.text.TextUtils"/>
<variable <variable
name="presenter" name="presenter"
...@@ -108,9 +109,8 @@ ...@@ -108,9 +109,8 @@
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toEndOf="@+id/text_one_text" android:layout_toEndOf="@+id/text_one_text"
android:layout_toRightOf="@+id/text_one_text" android:layout_toRightOf="@+id/text_one_text"
android:hint="@string/input_product_name" android:text="@{!TextUtils.isEmpty(presenter.mDetail.categoryThreeName)?presenter.mDetail.categoryThreeName:@string/no_data}"
android:text="@{presenter.mDetail.categoryThreeName??@string/now_no}" android:textColor="@color/default_text_color"
android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -144,9 +144,10 @@ ...@@ -144,9 +144,10 @@
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/text_two_text" android:layout_toRightOf="@id/text_two_text"
android:background="@null" android:background="@null"
android:maxLength="50"
android:hint="@string/order_brand_name" android:hint="@string/order_brand_name"
android:text="@={presenter.mBrandName}" android:text="@={presenter.mBrandName}"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -180,9 +181,8 @@ ...@@ -180,9 +181,8 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/tv_version" android:layout_toRightOf="@id/tv_version"
android:hint="@string/order_product_model_hint" android:text="@{!TextUtils.isEmpty(presenter.mDetail.productModel)?presenter.mDetail.productModel:@string/no_data}"
android:text="@{presenter.mDetail.productModel??@string/now_no}" android:textColor="@color/default_text_color"
android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -226,9 +226,10 @@ ...@@ -226,9 +226,10 @@
android:layout_marginLeft="75dp" android:layout_marginLeft="75dp"
android:layout_toRightOf="@id/tv_serial_num" android:layout_toRightOf="@id/tv_serial_num"
android:background="@null" android:background="@null"
android:maxLength="50"
android:hint="@string/order_serail_hint" android:hint="@string/order_serail_hint"
android:text="@={presenter.mSn}" android:text="@={presenter.mSn}"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -307,6 +308,7 @@ ...@@ -307,6 +308,7 @@
android:hint="@string/order_hint" android:hint="@string/order_hint"
android:paddingLeft="@dimen/dp_13" android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
android:maxLength="200"
android:text="@={presenter.mInfo}" android:text="@={presenter.mInfo}"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui" android:textColorHint="@color/cl_selector_hui"
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
<ImageView <ImageView
android:id="@+id/title_back" android:id="@+id/title_back"
android:layout_width="11dp" android:layout_width="wrap_content"
android:layout_height="22dp" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="15dp" android:paddingLeft="15dp"
android:layout_marginRight="25dp" android:paddingRight="25dp"
android:src="@drawable/back_btn_normal" /> android:src="@drawable/back_btn_normal" />
<LinearLayout <LinearLayout
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
android:layout_height="28dp" android:layout_height="28dp"
android:background="@drawable/detail_first_selector" android:background="@drawable/detail_first_selector"
android:gravity="center" android:gravity="center"
android:visibility="invisible"
android:text="@string/order_detail" /> android:text="@string/order_detail" />
<Button <Button
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
android:layout_height="28dp" android:layout_height="28dp"
android:background="@drawable/detail_center_selector" android:background="@drawable/detail_center_selector"
android:gravity="center" android:gravity="center"
android:visibility="invisible"
android:text="@string/server_record" /> android:text="@string/server_record" />
<Button <Button
...@@ -49,6 +51,7 @@ ...@@ -49,6 +51,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="28dp" android:layout_height="28dp"
android:layout_weight="1" android:layout_weight="1"
android:visibility="gone"
android:background="@drawable/detail_end_selector" android:background="@drawable/detail_end_selector"
android:gravity="center" android:gravity="center"
android:text="@string/order_part" /> android:text="@string/order_part" />
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
<import type="android.view.View" /> <import type="android.view.View" />
<import type="android.text.TextUtils" />
<variable <variable
name="presenter" name="presenter"
type="com.dayu.order.presenter.processorder.ProcessOrderPresenter" /> type="com.dayu.order.presenter.processorder.ProcessOrderPresenter" />
...@@ -107,8 +109,8 @@ ...@@ -107,8 +109,8 @@
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toEndOf="@+id/text_one_text" android:layout_toEndOf="@+id/text_one_text"
android:layout_toRightOf="@+id/text_one_text" android:layout_toRightOf="@+id/text_one_text"
android:text="@{presenter.mDetail.categoryName??@string/now_no}" android:text="@{!TextUtils.isEmpty(presenter.mDetail.categoryName)?presenter.mDetail.categoryName:@string/now_no}"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -134,7 +136,7 @@ ...@@ -134,7 +136,7 @@
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
<EditText <TextView
android:id="@+id/tv_brand" android:id="@+id/tv_brand"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -142,9 +144,9 @@ ...@@ -142,9 +144,9 @@
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/text_two_text" android:layout_toRightOf="@id/text_two_text"
android:background="@null" android:background="@null"
android:hint="@string/order_brand_name" android:maxLength="50"
android:text="@={presenter.mBrandName}" android:text='@{!TextUtils.isEmpty(presenter.mDetail.brandName)?presenter.mDetail.brandName:@string/no_data}'
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -171,7 +173,7 @@ ...@@ -171,7 +173,7 @@
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
<EditText <TextView
android:id="@+id/et_version" android:id="@+id/et_version"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -179,9 +181,8 @@ ...@@ -179,9 +181,8 @@
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/tv_version" android:layout_toRightOf="@id/tv_version"
android:background="@null" android:background="@null"
android:hint="@string/order_product_model_hint" android:text='@{!TextUtils.isEmpty(presenter.mDetail.productModel)?presenter.mDetail.productModel:@string/no_data}'
android:text="@={presenter.mProductModel}" android:textColor="@color/default_text_color"
android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -217,7 +218,7 @@ ...@@ -217,7 +218,7 @@
android:textSize="@dimen/sp_15" android:textSize="@dimen/sp_15"
android:visibility="gone" /> android:visibility="gone" />
<EditText <TextView
android:id="@+id/et_serial_num" android:id="@+id/et_serial_num"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -225,9 +226,9 @@ ...@@ -225,9 +226,9 @@
android:layout_marginLeft="75dp" android:layout_marginLeft="75dp"
android:layout_toRightOf="@id/tv_serial_num" android:layout_toRightOf="@id/tv_serial_num"
android:background="@null" android:background="@null"
android:hint="@string/order_serail_hint" android:maxLength="50"
android:text="@={presenter.mSN}" android:text="@{!TextUtils.isEmpty(presenter.mDetail.sn)?presenter.mDetail.sn:@string/no_data}"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
</RelativeLayout> </RelativeLayout>
...@@ -300,6 +301,7 @@ ...@@ -300,6 +301,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toRightOf="@id/tv_player" android:layout_toRightOf="@id/tv_player"
android:text="*" android:text="*"
android:visibility="gone"
android:textColor="#F74848" android:textColor="#F74848"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
...@@ -314,7 +316,7 @@ ...@@ -314,7 +316,7 @@
android:hint="@string/order_select_payer" android:hint="@string/order_select_payer"
android:onClick="@{()->presenter.showPayerDialog()}" android:onClick="@{()->presenter.showPayerDialog()}"
android:text="@{presenter.mPayer}" android:text="@{presenter.mPayer}"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
<ImageView <ImageView
...@@ -341,6 +343,7 @@ ...@@ -341,6 +343,7 @@
android:layout_marginLeft="@dimen/dp_15" android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15" android:layout_marginRight="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
android:visibility="gone"
android:text="@string/order_select_payer_notice" android:text="@string/order_select_payer_notice"
android:textColor="#F74848" /> android:textColor="#F74848" />
...@@ -422,9 +425,11 @@ ...@@ -422,9 +425,11 @@
android:layout_height="@dimen/dp_147" android:layout_height="@dimen/dp_147"
android:layout_marginLeft="@dimen/dp_8" android:layout_marginLeft="@dimen/dp_8"
android:layout_marginTop="@dimen/dp_17" android:layout_marginTop="@dimen/dp_17"
android:layout_marginRight="15dp"
android:layout_toRightOf="@id/time_subscribe_remark" android:layout_toRightOf="@id/time_subscribe_remark"
android:background="@drawable/subscribe_time_shape" android:background="@drawable/subscribe_time_shape"
android:gravity="top" android:gravity="top"
android:maxLength="200"
android:hint="@string/order_hint" android:hint="@string/order_hint"
android:paddingLeft="@dimen/dp_13" android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
...@@ -745,6 +750,7 @@ ...@@ -745,6 +750,7 @@
android:layout_marginTop="@dimen/dp_17" android:layout_marginTop="@dimen/dp_17"
android:background="@drawable/subscribe_time_shape" android:background="@drawable/subscribe_time_shape"
android:gravity="top" android:gravity="top"
android:maxLength="100"
android:hint="@string/tv_order_other" android:hint="@string/tv_order_other"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
android:text="@{presenter.mOrderField.otherInfo}" android:text="@{presenter.mOrderField.otherInfo}"
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="76dp" android:layout_height="38dp"
android:background="@color/cl_white" android:background="@color/cl_white"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="@dimen/dp_15" android:paddingLeft="@dimen/dp_15"
android:paddingRight="43dp" android:paddingRight="43dp"
android:paddingTop="@dimen/dp_20"
android:text="@string/ka_beizhu" android:text="@string/ka_beizhu"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="15sp" /> android:textSize="15sp" />
...@@ -62,8 +61,7 @@ ...@@ -62,8 +61,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="@dimen/dp_15" android:paddingRight="@dimen/dp_15"
android:paddingTop="@dimen/dp_20" android:maxLines="2"
android:maxLines="5"
android:ellipsize="end" android:ellipsize="end"
android:text="@{TextUtils.isEmpty(presenter.kaComent)?@string/no_data:presenter.kaComent}" android:text="@{TextUtils.isEmpty(presenter.kaComent)?@string/no_data:presenter.kaComent}"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
...@@ -103,6 +101,7 @@ ...@@ -103,6 +101,7 @@
android:hint="请说明寄回内容,数量和寄回原因" android:hint="请说明寄回内容,数量和寄回原因"
android:paddingRight="@dimen/dp_15" android:paddingRight="@dimen/dp_15"
android:text="@={presenter.spComent}" android:text="@={presenter.spComent}"
android:maxEms="500"
android:textColor="@color/default_editext_color" android:textColor="@color/default_editext_color"
android:textSize="15sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
......
...@@ -234,9 +234,9 @@ ...@@ -234,9 +234,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/rl_info_detail" android:layout_below="@id/rl_info_detail"
android:layout_marginBottom="5dp"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:layout_marginBottom="5dp"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
...@@ -349,29 +349,59 @@ ...@@ -349,29 +349,59 @@
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
<TextView <TextView
android:id="@+id/tv_contact_tel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_contact_mode"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_four"
android:text='@{item.customerTelphome}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
android:visibility="@{TextUtils.isEmpty(item.customerTelphome)?View.GONE:View.VISIBLE}" />
<TextView
android:id="@+id/two_text_five" android:id="@+id/two_text_five"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/two_text_four" android:layout_below="@id/tv_contact_tel"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:text="@string/tv_two_text_foure" android:text="@string/tv_two_text_foure"
android:textColor="@color/cl_order_text_one" android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" /> android:textSize="@dimen/sp_13.3" />
<TextView <LinearLayout
android:id="@+id/tv_customer_address" android:id="@+id/navigation"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/tv_contact_mode" android:layout_below="@id/tv_contact_tel"
android:layout_marginLeft="@dimen/dp_10" android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_five" android:layout_toRightOf="@id/two_text_five"
android:ellipsize="end" android:orientation="horizontal">
android:maxLines="2"
android:text='@{item.provinceName+item.cityName+item.districtName+item.address}' <TextView
android:textColor="@color/cl_home_title_text_color" android:id="@+id/tv_customer_address"
android:textSize="@dimen/sp_13.3" /> android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="2"
android:text='@{item.provinceName+item.cityName+item.districtName+item.address}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:paddingBottom="5dp"
android:src="@drawable/icon_navigation" />
</LinearLayout>
<TextView <TextView
android:id="@+id/tv_forward_time" android:id="@+id/tv_forward_time"
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<LinearLayout <LinearLayout
android:id="@+id/ll_left" android:id="@+id/ll_left"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_centerVertical="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
...@@ -135,21 +135,35 @@ ...@@ -135,21 +135,35 @@
android:visibility="visible" /> android:visibility="visible" />
</LinearLayout> </LinearLayout>
<TextView <LinearLayout
android:id="@+id/item_text_dizhi" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/ll_right"
android:layout_marginBottom="13.3dp"
android:layout_marginLeft="@dimen/size_order_item_tool_ml" android:layout_marginLeft="@dimen/size_order_item_tool_ml"
android:layout_marginRight="40dp" android:orientation="horizontal">
android:layout_marginTop="10dp"
android:layout_toRightOf="@id/item_line" <TextView
android:ellipsize="end" android:id="@+id/item_text_dizhi"
android:maxLines="2" android:layout_width="0dp"
android:text="@string/tv_order_item_gps_text" android:layout_height="wrap_content"
android:textColor="@color/cl_home_title_text_color" android:layout_marginBottom="13.3dp"
android:textSize="@dimen/size_login_hint_text" /> android:layout_marginTop="15dp"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/tv_order_item_gps_text"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/size_login_hint_text" />
<ImageView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingBottom="5dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:src="@drawable/icon_navigation" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
......
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
android:id="@+id/tv_error_state" android:id="@+id/tv_error_state"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="3dp" android:layout_marginTop="3dp"
android:textColor="@color/cl_tab_read" android:textColor="@color/cl_tab_read"
android:textSize="@dimen/size_login_hint_text" android:textSize="@dimen/size_login_hint_text"
android:layout_gravity="right"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
...@@ -189,18 +189,34 @@ ...@@ -189,18 +189,34 @@
</LinearLayout> </LinearLayout>
<TextView <LinearLayout
android:id="@+id/item_text_dizhi" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_order_item_tool_ml" android:orientation="horizontal">
android:layout_marginRight="40dp"
android:layout_marginTop="5dp" <TextView
android:ellipsize="end" android:id="@+id/item_text_dizhi"
android:maxLines="2" android:layout_width="0dp"
android:text="@string/tv_order_item_gps_text" android:layout_height="wrap_content"
android:textColor="@color/cl_home_title_text_color" android:layout_marginLeft="@dimen/size_order_item_tool_ml"
android:textSize="@dimen/size_login_hint_text" /> android:layout_marginTop="5dp"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/tv_order_item_gps_text"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/size_login_hint_text" />
<ImageView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingBottom="5dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:src="@drawable/icon_navigation" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
android:layout_toRightOf="@id/tv_player" android:layout_toRightOf="@id/tv_player"
android:background="@null" android:background="@null"
android:hint="@string/order_select_payer" android:hint="@string/order_select_payer"
android:textColor="@color/cl_selector_hui" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
<ImageView <ImageView
...@@ -390,6 +390,7 @@ ...@@ -390,6 +390,7 @@
android:background="@drawable/subscribe_time_shape" android:background="@drawable/subscribe_time_shape"
android:gravity="top" android:gravity="top"
android:hint="@string/tv_order_other" android:hint="@string/tv_order_other"
android:maxLength="100"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui" android:textColorHint="@color/cl_selector_hui"
......
package com.dayu.provider.event; package com.dayu.provider.event;
/** /**
* 刷新待预约列表. * 人脸认证后刷新我的页面的数据.
* on 2017/10/11. * on 2017/10/11.
*/ */
public class CertificationEvent { public class CertificationEvent {
......
...@@ -11,8 +11,6 @@ import com.dayu.utils.ToastUtils; ...@@ -11,8 +11,6 @@ import com.dayu.utils.ToastUtils;
import com.dayu.utils.UserManager; import com.dayu.utils.UserManager;
import com.dayu.utils.UtilsUserAccountMatcher; import com.dayu.utils.UtilsUserAccountMatcher;
import io.reactivex.functions.Consumer;
/** /**
* Created by luofan * Created by luofan
* on 2017/11/8. * on 2017/11/8.
...@@ -47,11 +45,8 @@ public class ModifyPwdPresenter extends ModifyPwdContract.Presenter { ...@@ -47,11 +45,8 @@ public class ModifyPwdPresenter extends ModifyPwdContract.Presenter {
return; return;
} }
mView.showDialog(); mView.showDialog();
UserApiFactory.modifyPwd(mAccountId, MD5Util.encrypt(oldCode.get()), MD5Util.encrypt(newCode.get()), MD5Util.encrypt(againCode.get())).subscribe(baseObserver(new Consumer<String>() { UserApiFactory.modifyPwd(mAccountId, MD5Util.encrypt(oldCode.get()), MD5Util.encrypt(newCode.get())
@Override , MD5Util.encrypt(againCode.get()))
public void accept(String s) throws Exception { .subscribe(baseObserver(s -> mView.dumpToLogin(mPhone)));
mView.dumpToLogin(mPhone);
}
}));
} }
} }
...@@ -17,6 +17,7 @@ import com.dayu.utils.MD5Util; ...@@ -17,6 +17,7 @@ import com.dayu.utils.MD5Util;
import com.dayu.utils.ToastUtils; import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils; import com.dayu.utils.UIUtils;
import com.dayu.utils.UserManager; import com.dayu.utils.UserManager;
import com.dayu.utils.UtilsUserAccountMatcher;
import com.hyphenate.EMCallBack; import com.hyphenate.EMCallBack;
import com.hyphenate.chat.EMClient; import com.hyphenate.chat.EMClient;
...@@ -38,6 +39,10 @@ public class PwLoginPresenter extends PwLoginContract.Presenter { ...@@ -38,6 +39,10 @@ public class PwLoginPresenter extends PwLoginContract.Presenter {
@Override @Override
public void login() { public void login() {
if (!UtilsUserAccountMatcher.isPhoneNum(phoneNume.get())) {
ToastUtils.showShortToast(R.string.alipay_phone_error);
return;
}
mView.showDialog(); mView.showDialog();
UserApiFactory.login(phoneNume.get(), MD5Util.encrypt(code.get()), "usernameLogin").subscribe(baseObserver(userInfo -> { UserApiFactory.login(phoneNume.get(), MD5Util.encrypt(code.get()), "usernameLogin").subscribe(baseObserver(userInfo -> {
if (userInfo.getDetectStatus() == 1) { if (userInfo.getDetectStatus() == 1) {
......
...@@ -86,7 +86,7 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme ...@@ -86,7 +86,7 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme
super.lazyLoad(); super.lazyLoad();
ProgressUtil.startLoad(mActivity); ProgressUtil.startLoad(mActivity);
mPresenter.getAllData(userId, siteId); mPresenter.getAllData(userId, siteId);
mPresenter.getAlipayAccount(userId); // mPresenter.getAlipayAccount(userId);
} }
@Override @Override
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="55dp" android:layout_marginLeft="55dp"
android:background="@null" android:background="@null"
android:hint="@string/input_old_pwd" android:hint="@string/pwd_tip"
android:inputType="textPassword" android:inputType="textPassword"
android:text="@={presenter.oldCode}" android:text="@={presenter.oldCode}"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="55dp" android:layout_marginLeft="55dp"
android:background="@null" android:background="@null"
android:hint="@string/input_new_pwd" android:hint="@string/pwd_tip"
android:inputType="textPassword" android:inputType="textPassword"
android:text="@={presenter.newCode}" android:text="@={presenter.newCode}"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
android:layout_marginLeft="40dp" android:layout_marginLeft="40dp"
android:background="@null" android:background="@null"
android:inputType="textPassword" android:inputType="textPassword"
android:hint="@string/input_new_pwd_again" android:hint="@string/pwd_tip"
android:text="@={presenter.againCode}" android:text="@={presenter.againCode}"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="15sp" /> android:textSize="15sp" />
......
...@@ -214,8 +214,7 @@ ...@@ -214,8 +214,7 @@
android:layout_width="160dp" android:layout_width="160dp"
android:layout_height="100dp" android:layout_height="100dp"
android:layout_marginLeft="@dimen/dp_13.3" android:layout_marginLeft="@dimen/dp_13.3"
android:background="@drawable/personal_center_selector" android:background="@drawable/personal_center_selector">
android:onClick="@{()->presenter.dumpToAccount()}">
<TextView <TextView
android:id="@+id/text_today_jiedan" android:id="@+id/text_today_jiedan"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment