Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c6d184c4
authored
May 31, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
3718a94e
1c571eed
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
48 deletions
app/release/app-release.apk
baseSDK/src/main/java/com/dayu/common/Constants.java
locationComponent/src/main/java/com/dayu/location/base/LocationUtils.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity/IdentityCertificationActivity.java
app/release/app-release.apk
View file @
c6d184c4
No preview for this file type
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
c6d184c4
...
@@ -26,30 +26,30 @@ public class Constants {
...
@@ -26,30 +26,30 @@ public class Constants {
/**
/**
* uat环境配置.
* uat环境配置.
*/
*/
public
static
final
String
ENVIROMENT
=
"uat"
;
//
public static final String ENVIROMENT = "uat";
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
//
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
public
static
final
String
BASE_URL
=
"http://47.95.223.6:3112"
;
//
public static final String BASE_URL = "http://47.95.223.6: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.95.223.6:9004/#/sop"
;
//
public final static String WEB_SOP = "http://47.95.223.6:9004/#/sop";
public
final
static
String
WEB_SOP_DETAIL
=
"http://47.95.223.6:9004/#/sopdetail"
;
//
public final static String WEB_SOP_DETAIL = "http://47.95.223.6:9004/#/sopdetail";
public
final
static
String
WEB_ZHI_SHI
=
"http://47.95.223.6:9004/#/detail"
;
//
public final static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail";
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manyServiceResult"
;
//
public final static String CHECK_MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manyServiceResult";
public
final
static
String
MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manySop"
;
//
public final static String MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manySop";
public
static
final
boolean
IS_DEBUG
=
true
;
//
public static final boolean IS_DEBUG = true;
/**
/**
* 正式环境.
* 正式环境.
*/
*/
//
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
;
/**
/**
* 演示环境
* 演示环境
...
...
locationComponent/src/main/java/com/dayu/location/base/LocationUtils.java
View file @
c6d184c4
...
@@ -10,16 +10,14 @@ import com.amap.api.location.AMapLocationListener;
...
@@ -10,16 +10,14 @@ import com.amap.api.location.AMapLocationListener;
/**
/**
* Created by luofan on 2017/11/21.
* Created by luofan
* on 2017/11/21.
*/
*/
public
class
LocationUtils
{
public
class
LocationUtils
{
private
static
AMapLocationClient
mlocationClient
;
private
static
AMapLocationClient
mlocationClient
;
public
static
AMapLocationClientOption
mLocationOption
=
null
;
public
static
AMapLocation
sLocation
=
null
;
public
static
AMapLocation
sLocation
=
null
;
private
static
boolean
flag
=
true
;
private
static
boolean
flag
=
true
;
// private static Disposable mDisposable;
private
static
long
time
;
private
static
MyLocationListener
mListener
;
private
static
MyLocationListener
mListener
;
private
static
Handler
mHandler
;
private
static
Handler
mHandler
;
...
@@ -29,26 +27,28 @@ public class LocationUtils {
...
@@ -29,26 +27,28 @@ public class LocationUtils {
* @Description: 初始化地图导航,在Application onCreate中调用,只需调用一次
* @Description: 初始化地图导航,在Application onCreate中调用,只需调用一次
*/
*/
public
static
void
init
(
Context
context
)
{
public
static
void
init
(
Context
context
)
{
// 声明mLocationOption对象
mlocationClient
=
new
AMapLocationClient
(
context
);
mlocationClient
=
new
AMapLocationClient
(
context
);
// 初始化定位参数
AMapLocationClientOption
mOption
=
new
AMapLocationClientOption
();
mLocationOption
=
new
AMapLocationClientOption
();
mOption
.
setLocationMode
(
AMapLocationClientOption
.
AMapLocationMode
.
Hight_Accuracy
);
//可选,设置定位模式,可选的模式有高精度、仅设备、仅网络。默认为高精度模式
// 设置定位模式为高精度模式,Battery_Saving为低功耗模式,Device_Sensors是仅设备模式
mOption
.
setGpsFirst
(
false
);
//可选,设置是否gps优先,只在高精度模式下有效。默认关闭
mLocationOption
.
setLocationMode
(
AMapLocationClientOption
.
AMapLocationMode
.
Hight_Accuracy
);
mOption
.
setHttpTimeOut
(
30000
);
//可选,设置网络请求超时时间。默认为30秒。在仅设备模式下无效
// 设置定位间隔,单位毫秒,默认为2000ms
mOption
.
setInterval
(
2000
);
//可选,设置定位间隔。默认为2秒
// mLocationOption.setInterval(2000);
mOption
.
setNeedAddress
(
true
);
//可选,设置是否返回逆地理地址信息。默认是true
mLocationOption
.
setOnceLocation
(
true
);
mOption
.
setOnceLocation
(
false
);
//可选,设置是否单次定位。默认是false
mLocationOption
.
setOnceLocationLatest
(
true
);
mOption
.
setOnceLocationLatest
(
false
);
//可选,设置是否等待wifi刷新,默认为false.如果设置为true,会自动变为单次定位,持续定位时不要使用
mLocationOption
.
setHttpTimeOut
(
20000
);
AMapLocationClientOption
.
setLocationProtocol
(
AMapLocationClientOption
.
AMapLocationProtocol
.
HTTP
);
//可选, 设置网络请求的协议。可选HTTP或者HTTPS。默认为HTTP
// 设置定位参数、、
mOption
.
setSensorEnable
(
false
);
//可选,设置是否使用传感器。默认是false
mlocationClient
.
setLocationOption
(
mLocationOption
);
mOption
.
setWifiScan
(
true
);
//可选,设置是否开启wifi扫描。默认为true,如果设置为false会同时停止主动刷新,停止以后完全依赖于系统刷新,定位位置可能存在误差
mOption
.
setLocationCacheEnable
(
true
);
//可选,设置是否使用缓存定位,默认为true
mlocationClient
.
setLocationOption
(
mOption
);
}
}
/**
/**
* @Description: 定位结果回调
* @Description: 定位结果回调
*/
*/
public
interface
MyLocationListener
{
public
interface
MyLocationListener
{
public
void
result
(
AMapLocation
location
);
void
result
(
AMapLocation
location
);
}
}
/**
/**
...
@@ -81,29 +81,23 @@ public class LocationUtils {
...
@@ -81,29 +81,23 @@ public class LocationUtils {
@Override
@Override
public
void
run
()
{
public
void
run
()
{
if
(
flag
)
{
if
(
flag
)
{
mListener
.
result
(
null
);
mListener
.
result
(
sLocation
);
flag
=
false
;
flag
=
false
;
mlocationClient
.
stopLocation
();
mlocationClient
.
stopLocation
();
}
}
}
}
},
8000
);
},
8000
);
time
=
System
.
currentTimeMillis
();
mlocationClient
.
setLocationListener
(
new
AMapLocationListener
()
{
mlocationClient
.
setLocationListener
(
new
AMapLocationListener
()
{
@Override
@Override
public
void
onLocationChanged
(
AMapLocation
location
)
{
public
void
onLocationChanged
(
AMapLocation
location
)
{
mHandler
=
null
;
if
(
location
!=
null
&&
flag
)
{
if
(
location
!=
null
&&
flag
)
{
flag
=
false
;
flag
=
false
;
//定位成功,取消定位
mlocationClient
.
stopLocation
();
mlocationClient
.
stopLocation
();
sLocation
=
location
;
sLocation
=
location
;
mListener
.
result
(
location
);
mListener
.
result
(
location
);
}
else
if
((
location
==
null
&&
flag
))
{
mHandler
=
null
;
flag
=
false
;
mlocationClient
.
stopLocation
();
mListener
.
result
(
location
);
}
}
}
}
});
});
...
@@ -118,6 +112,7 @@ public class LocationUtils {
...
@@ -118,6 +112,7 @@ public class LocationUtils {
public
static
void
destroy
()
{
public
static
void
destroy
()
{
mHandler
=
null
;
mHandler
=
null
;
mlocationClient
.
onDestroy
();
mlocationClient
.
onDestroy
();
mListener
=
null
;
}
}
/**
/**
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity/IdentityCertificationActivity.java
View file @
c6d184c4
...
@@ -59,6 +59,7 @@ public class IdentityCertificationActivity extends BaseActivity<CertificaitonPre
...
@@ -59,6 +59,7 @@ public class IdentityCertificationActivity extends BaseActivity<CertificaitonPre
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
certification_title
));
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
certification_title
));
mBind
.
titleBack
.
setOnClickListener
(
v
->
finish
());
mBind
.
ivFront
.
setOnClickListener
(
v
->
{
mBind
.
ivFront
.
setOnClickListener
(
v
->
{
if
(
mFrontFlag
)
{
if
(
mFrontFlag
)
{
imgMax
(
mFrontBitmap
);
imgMax
(
mFrontBitmap
);
...
@@ -89,7 +90,7 @@ public class IdentityCertificationActivity extends BaseActivity<CertificaitonPre
...
@@ -89,7 +90,7 @@ public class IdentityCertificationActivity extends BaseActivity<CertificaitonPre
mBind
.
rlNext
.
setClickable
(
false
);
mBind
.
rlNext
.
setClickable
(
false
);
mBind
.
ivSideDelete
.
setVisibility
(
View
.
GONE
);
mBind
.
ivSideDelete
.
setVisibility
(
View
.
GONE
);
});
});
mBind
.
rlNext
.
setOnClickListener
(
v
->
mPresenter
.
commitePhoto
());
mBind
.
rlNext
.
setOnClickListener
(
v
->
mPresenter
.
commitePhoto
());
mBind
.
ivNext
.
setAlpha
(
0.5f
);
mBind
.
ivNext
.
setAlpha
(
0.5f
);
mBind
.
rlNext
.
setClickable
(
false
);
mBind
.
rlNext
.
setClickable
(
false
);
...
@@ -201,8 +202,8 @@ public class IdentityCertificationActivity extends BaseActivity<CertificaitonPre
...
@@ -201,8 +202,8 @@ public class IdentityCertificationActivity extends BaseActivity<CertificaitonPre
@Override
@Override
public
List
<
File
>
getFile
()
{
public
List
<
File
>
getFile
()
{
ArrayList
<
File
>
list
=
new
ArrayList
<>();
ArrayList
<
File
>
list
=
new
ArrayList
<>();
list
.
add
(
compressImage
(
mFrontBitmap
,
"front"
,
mActivity
));
list
.
add
(
compressImage
(
mFrontBitmap
,
"front"
,
mActivity
));
list
.
add
(
compressImage
(
mSideBitmap
,
"back"
,
mActivity
));
list
.
add
(
compressImage
(
mSideBitmap
,
"back"
,
mActivity
));
return
list
;
return
list
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment