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
1d42a5a6
authored
May 26, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9977f540
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
229 additions
and
35 deletions
app/src/main/AndroidManifest.xml
app/src/main/java/com/dayu/bigfish/ui/AboutUsActivity.java
baseSDK/src/main/java/com/dayu/common/Constants.java
baseSDK/src/main/java/com/dayu/utils/AppUtils.java
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
locationComponent/build.gradle
locationComponent/src/main/AndroidManifest.xml
locationComponent/src/main/java/com/dayu/location/base/InputtipsActivity.java
locationComponent/src/main/res/layout/activity_inputtip.xml
locationComponent/src/main/res/layout/item_layout.xml
orderCenter/src/main/res/layout/activity_subscribe_time.xml
userCenter/src/main/java/com/dayu/usercenter/api/UserService2.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/BusinessTypeActivity.java
app/src/main/AndroidManifest.xml
View file @
1d42a5a6
...
...
@@ -101,6 +101,10 @@
<meta-data
android:name=
"com.amap.protocol.v2.apikey"
android:value=
"05936ed54259770e56ffd1e67ac77958"
/>
<meta-data
android:name=
"com.amap.api.v2.apikey"
android:value=
"05936ed54259770e56ffd1e67ac77958"
/>
<service
android:name=
"com.amap.api.location.APSService"
/>
<!-- 设置环信应用的AppKey -->
...
...
app/src/main/java/com/dayu/bigfish/ui/AboutUsActivity.java
View file @
1d42a5a6
package
com
.
dayu
.
bigfish
.
ui
;
import
android.content.Intent
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.bigfish.AboutUsBinding
;
import
com.dayu.bigfish.R
;
import
com.dayu.common.Constants
;
import
com.dayu.location.base.InputtipsActivity
;
import
com.dayu.utils.AppUtils
;
/**
...
...
@@ -28,6 +31,8 @@ public class AboutUsActivity extends DataBindingActivity<AboutUsBinding> {
versionCode
=
(
String
.
format
(
getString
(
com
.
dayu
.
usercenter
.
R
.
string
.
enviroment_uat
),
versionCode
));
}
mBind
.
tvVersion
.
setText
(
getString
(
R
.
string
.
tv_now_version
)+
versionCode
);
// mBind.imageAbout.setOnClickListener(view -> startActivity(new Intent(this,InputtipsActivity.class)));
}
}
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
1d42a5a6
...
...
@@ -52,34 +52,34 @@ public class Constants {
/**
* uat测试环境配置.
*/
//
public static String ENVIROMENT = "uat";
//
public static int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static String BASE_URL = "http://47.95.223.6:3112";
//
public static String WEB_SOP = "http://47.95.223.6:9004/#/sop";
//
public static String WEB_SOP_DETAIL = "http://47.95.223.6:9004/#/sopdetail";
//
public static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail";
//
public static String CHECK_MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manyServiceResult";
//
public static String MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manySop";
//
public static final String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
//
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=test/video";
//
public static final boolean IS_DEBUG = true;
//
public static final boolean CAN_CHANGE_ENV = false; //是否显示切换开发环境菜单
public
static
String
ENVIROMENT
=
"uat"
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
String
BASE_URL
=
"http://47.95.223.6:3112"
;
public
static
String
WEB_SOP
=
"http://47.95.223.6:9004/#/sop"
;
public
static
String
WEB_SOP_DETAIL
=
"http://47.95.223.6:9004/#/sopdetail"
;
public
static
String
WEB_ZHI_SHI
=
"http://47.95.223.6:9004/#/detail"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manyServiceResult"
;
public
static
String
MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manySop"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=test/video"
;
public
static
final
boolean
IS_DEBUG
=
true
;
public
static
final
boolean
CAN_CHANGE_ENV
=
false
;
//是否显示切换开发环境菜单
/**
* 正式环境.
*/
public
static
String
ENVIROMENT
=
"release"
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_OFF
;
public
static
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
public
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
public
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult"
;
public
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=online/video"
;
public
static
final
boolean
IS_DEBUG
=
false
;
public
static
final
boolean
CAN_CHANGE_ENV
=
false
;
//是否显示切换开发环境菜单
//
public static String ENVIROMENT = "release";
//
public static int LOG_LEVEL = LogUtils.LEVEL_OFF;
//
public static String BASE_URL = "https://mobile.kf.ai";
//
public static String WEB_SOP = "https://sop.kf.ai/#/sop";
//
public static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
//
public static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
//
public static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
//
public static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
//
public static final String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
//
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=online/video";
//
public static final boolean IS_DEBUG = false;
//
public static final boolean CAN_CHANGE_ENV = false; //是否显示切换开发环境菜单
/**
* 统一配置.
...
...
baseSDK/src/main/java/com/dayu/utils/AppUtils.java
View file @
1d42a5a6
...
...
@@ -109,7 +109,7 @@ public class AppUtils {
EMClient
.
getInstance
().
logout
(
true
);
UserManager
.
getInstance
().
clearUserInfo
();
AppManager
.
getInstance
().
finishAllActivity
();
System
.
exit
(
0
);
//
System.exit(0);
}
/**
...
...
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
View file @
1d42a5a6
...
...
@@ -73,7 +73,7 @@ public class CommonUtils {
public
static
void
dialPhone
(
String
phoneNum
)
{
dialPhone
(
BaseApplication
.
getContext
(),
phoneNum
);
dialPhone
(
BaseApplication
.
getContext
(),
phoneNum
);
}
/**
...
...
@@ -145,6 +145,7 @@ public class CommonUtils {
return
""
;
}
}
/**
* 计算工单(预约/服务)时间差
*/
...
...
@@ -167,7 +168,7 @@ public class CommonUtils {
}
}
public
static
void
copyText
(
Context
context
,
String
text
)
{
public
static
void
copyText
(
Context
context
,
String
text
)
{
ClipboardManager
cm
=
(
ClipboardManager
)
context
.
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
ClipData
mClipData
=
ClipData
.
newPlainText
(
""
,
text
);
cm
.
setPrimaryClip
(
mClipData
);
...
...
@@ -250,8 +251,9 @@ public class CommonUtils {
/**
* 获取视频时长
*
* @param videoPath
* @return
毫秒
* @return 毫秒
*/
public
static
long
getVideoLength
(
String
videoPath
)
{
long
duration
;
...
...
@@ -266,11 +268,12 @@ public class CommonUtils {
}
return
duration
;
}
public
static
void
setVideoThumb
(
Context
context
,
JzvdStd
jzvdStd
,
String
url
)
{
// jzvdStd.thumbImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
// GlideImageLoader.loadFit(context, jzvdStd.thumbImageView,url, R.drawable.icon_video_default);
// url = url.replace("http:","https:")+"?x-oss-process=video/snapshot,t_0,f_jpg,ar_auto";
GlideImageLoader
.
load
(
context
,
jzvdStd
.
thumbImageView
,
url
,
R
.
drawable
.
icon_video_default
);
GlideImageLoader
.
load
(
context
,
jzvdStd
.
thumbImageView
,
url
,
R
.
drawable
.
icon_video_default
);
}
...
...
@@ -313,7 +316,8 @@ public class CommonUtils {
umMin
.
setUserName
(
"gh_0e5cd0cdbf46"
);
if
(
"uat"
.
equals
(
Constants
.
ENVIROMENT
))
Config
.
setMiniPreView
();
//设置预览版
// Config.setMiniTest(); //设置测试版
if
(
"debug"
.
equals
(
Constants
.
ENVIROMENT
))
Config
.
setMiniTest
();
//设置测试版
new
ShareAction
(
activity
)
.
withMedia
(
umMin
)
.
setPlatform
(
platform
)
...
...
@@ -325,9 +329,9 @@ public class CommonUtils {
* 获取年月日 格式日期
*/
public
static
String
getYearData
(
String
dataStr
)
{
if
(
TextUtils
.
isEmpty
(
dataStr
)){
if
(
TextUtils
.
isEmpty
(
dataStr
))
{
return
UIUtils
.
getString
(
R
.
string
.
unknown
);
}
else
{
}
else
{
SimpleDateFormat
df
=
null
;
Date
sDate
=
null
;
try
{
...
...
locationComponent/build.gradle
View file @
1d42a5a6
...
...
@@ -30,4 +30,5 @@ dependencies {
androidTestImplementation
'com.android.support.test:runner:1.0.2'
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.0.2'
api
files
(
'libs/Amap_2DMap_V5.2.0_20170627.jar'
)
api
files
(
'libs/AMap_Search_V7.3.0_20200331.jar'
)
}
locationComponent/src/main/AndroidManifest.xml
View file @
1d42a5a6
...
...
@@ -8,5 +8,8 @@
<activity
android:name=
".base.BaseMapActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".base.InputtipsActivity"
android:screenOrientation=
"portrait"
/>
</application>
</manifest>
locationComponent/src/main/java/com/dayu/location/base/InputtipsActivity.java
0 → 100644
View file @
1d42a5a6
package
com
.
dayu
.
location
.
base
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
import
android.widget.AutoCompleteTextView
;
import
android.widget.ListView
;
import
android.widget.SimpleAdapter
;
import
android.widget.Toast
;
import
com.amap.api.services.core.AMapException
;
import
com.amap.api.services.help.Inputtips
;
import
com.amap.api.services.help.Inputtips.InputtipsListener
;
import
com.amap.api.services.help.InputtipsQuery
;
import
com.amap.api.services.help.Tip
;
import
com.dayu.location.R
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
InputtipsActivity
extends
Activity
implements
TextWatcher
,
InputtipsListener
{
private
String
city
=
"北京"
;
private
AutoCompleteTextView
mKeywordText
;
private
ListView
minputlist
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_inputtip
);
minputlist
=
findViewById
(
R
.
id
.
inputlist
);
mKeywordText
=
findViewById
(
R
.
id
.
input_edittext
);
mKeywordText
.
addTextChangedListener
(
this
);
}
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
// TODO Auto-generated method stub
}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
String
newText
=
s
.
toString
().
trim
();
InputtipsQuery
inputquery
=
new
InputtipsQuery
(
newText
,
city
);
inputquery
.
setCityLimit
(
true
);
Inputtips
inputTips
=
new
Inputtips
(
InputtipsActivity
.
this
,
inputquery
);
inputTips
.
setInputtipsListener
(
this
);
inputTips
.
requestInputtipsAsyn
();
}
@Override
public
void
afterTextChanged
(
Editable
s
)
{
// TODO Auto-generated method stub
}
@Override
public
void
onGetInputtips
(
final
List
<
Tip
>
tipList
,
int
rCode
)
{
if
(
rCode
==
AMapException
.
CODE_AMAP_SUCCESS
)
{
List
<
HashMap
<
String
,
String
>>
listString
=
new
ArrayList
<
HashMap
<
String
,
String
>>();
for
(
int
i
=
0
;
i
<
tipList
.
size
();
i
++)
{
HashMap
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
tipList
.
get
(
i
).
getName
());
map
.
put
(
"address"
,
tipList
.
get
(
i
).
getDistrict
());
listString
.
add
(
map
);
}
SimpleAdapter
aAdapter
=
new
SimpleAdapter
(
getApplicationContext
(),
listString
,
R
.
layout
.
item_layout
,
new
String
[]
{
"name"
,
"address"
},
new
int
[]
{
R
.
id
.
poi_field_id
,
R
.
id
.
poi_value_id
});
minputlist
.
setAdapter
(
aAdapter
);
aAdapter
.
notifyDataSetChanged
();
}
else
{
Toast
.
makeText
(
this
,
"err: "
+
rCode
,
Toast
.
LENGTH_SHORT
).
show
();
}
}
}
locationComponent/src/main/res/layout/activity_inputtip.xml
0 → 100644
View file @
1d42a5a6
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/search_bar_layout"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/btn_search"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_alignParentEnd=
"true"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:clickable=
"true"
android:gravity=
"center_vertical"
android:paddingEnd=
"5dp"
android:paddingLeft=
"12dp"
android:paddingRight=
"5dp"
android:paddingStart=
"12dp"
android:text=
"搜索"
android:textSize=
"12dp"
android:visibility=
"gone"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_centerVertical=
"true"
android:layout_toLeftOf=
"@+id/btn_search"
android:layout_toStartOf=
"@+id/btn_search"
android:clickable=
"true"
android:gravity=
"center_vertical"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"8dp"
android:layout_marginStart=
"8dp"
/>
<AutoCompleteTextView
android:id=
"@+id/input_edittext"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"4dp"
android:layout_marginStart=
"4dp"
android:layout_gravity=
"center_vertical"
android:inputType=
"text|textAutoComplete"
android:background=
"#00000000"
android:singleLine=
"true"
android:hint=
"请输入关键字"
android:text=
""
android:textSize=
"14sp"
/>
</LinearLayout>
</RelativeLayout>
<ListView
android:id=
"@+id/inputlist"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/search_bar_layout"
>
</ListView>
</RelativeLayout>
locationComponent/src/main/res/layout/item_layout.xml
0 → 100644
View file @
1d42a5a6
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/poi_field_id"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"#666"
/>
<TextView
android:id=
"@+id/poi_value_id"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
/>
</LinearLayout>
\ No newline at end of file
orderCenter/src/main/res/layout/activity_subscribe_time.xml
View file @
1d42a5a6
...
...
@@ -130,7 +130,7 @@
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:hint=
"@string/tv_time_text_edit_text"
android:inputType=
"text"
android:inputType=
"text
MultiLine
"
android:maxLength=
"200"
android:paddingLeft=
"@dimen/dp_13"
android:paddingTop=
"@dimen/dp_11"
...
...
userCenter/src/main/java/com/dayu/usercenter/api/UserService2.java
View file @
1d42a5a6
...
...
@@ -108,11 +108,12 @@ public interface UserService2 {
/**
* 服务产品类型
* @param status 1启用 2禁用
*
* @return
*/
@GET
(
Constants
.
API_7300
+
"/label/list"
)
Observable
<
BaseResponse
<
List
<
ServiceTypeBean
>>>
getServiceType
();
Observable
<
BaseResponse
<
List
<
ServiceTypeBean
>>>
getServiceType
(
@Query
(
"status"
)
int
status
);
/**
* 服务产品类型
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/BusinessTypeActivity.java
View file @
1d42a5a6
...
...
@@ -80,7 +80,7 @@ public class BusinessTypeActivity extends BaseActivity<SImplePresenter, Activity
setTypeAdapter
();
}));
//服务类型数据
Api
.
getService
(
UserService2
.
class
).
getServiceType
().
compose
(
Api
.
applySchedulers
())
Api
.
getService
(
UserService2
.
class
).
getServiceType
(
1
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
datas
->
{
mBind
.
refreshLayout
.
finishRefresh
();
typeDatas
=
datas
;
...
...
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