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
35dcd8a2
authored
Jun 05, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Plain Diff
merge2.5.5
parents
467dccfd
81caa6a4
Hide whitespace changes
Inline
Side-by-side
Showing
82 changed files
with
2063 additions
and
620 deletions
.idea/gradle.xml
.idea/modules.xml
app/src/main/AndroidManifest.xml
app/src/main/java/com/dayu/bigfish/InitializeActivity.java
app/src/main/java/com/dayu/bigfish/MyApplication.java
app/src/main/java/com/dayu/bigfish/api/APIService.java
app/src/main/java/com/dayu/bigfish/presenter/main/MainContract.java
app/src/main/java/com/dayu/bigfish/presenter/main/MainPresenter.java
app/src/main/java/com/dayu/bigfish/presenter/setting/SettingPresenter.java
app/src/main/java/com/dayu/bigfish/ui/AboutUsActivity.java
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
app/src/main/java/com/dayu/bigfish/ui/SettingActivity.java
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/activity_setting.xml
app/src/main/res/mipmap-hdpi/logo.jpg
app/src/main/res/mipmap-xhdpi/logo.jpg
app/src/main/res/mipmap-xxhdpi/logo.jpg
app/src/main/res/mipmap-xxhdpi/wechatimg.png
app/src/main/res/mipmap-xxxhdpi/logo.jpg
app/src/main/res/values/strings.xml
baseSDK/src/main/java/com/dayu/base/ui/activity/DataBindingActivity.java
baseSDK/src/main/java/com/dayu/base/ui/adapter/MediaChooseAdapter.java
baseSDK/src/main/java/com/dayu/base/ui/adapter/PhotoViewAdapter.java
baseSDK/src/main/java/com/dayu/common/Constants.java
baseSDK/src/main/java/com/dayu/event/UserInfo.java
baseSDK/src/main/java/com/dayu/utils/AppUtils.java
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
baseSDK/src/main/java/com/dayu/utils/MediaChooseUtils.java
baseSDK/src/main/java/com/dayu/utils/TimeCountUtil2.java
baseSDK/src/main/java/com/dayu/utils/UtilsUserAccountMatcher.java
baseSDK/src/main/java/com/dayu/widgets/ChangeEnvDialog.java
baseSDK/src/main/res/drawable-xhdpi/icon_dayu_logo.jpg
baseSDK/src/main/res/drawable-xxhdpi/icon_app_logo.png
baseSDK/src/main/res/drawable-xxhdpi/icon_dayu_logo.jpg
baseSDK/src/main/res/drawable-xxxhdpi/icon_dayu_logo.jpg
baseSDK/src/main/res/layout/activity_camera.xml
baseSDK/src/main/res/layout/dialog_change_env.xml
baseSDK/src/main/res/values/colors.xml
baseSDK/src/main/res/values/dimens.xml
baseSDK/src/main/res/values/strings.xml
baseSDK/src/main/res/values/styles.xml
build.gradle
learnCenter/src/main/java/com/dayu/learncenter/adapter/LearnAdapter.java
learnCenter/src/main/java/com/dayu/learncenter/ui/activity/CourseDetailActivity.java
learnCenter/src/main/java/com/dayu/learncenter/ui/activity/PubCourseActivity.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/java/com/dayu/order/presenter/receivingorder/ReceivingPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/subcribeTime/SubcribeTimePresenter.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/MultiOrderDetailFragment.java
orderCenter/src/main/res/layout/activity_subscribe_time.xml
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/ProductInstructionFragment.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleProductFragment.java
userCenter/src/main/java/com/dayu/usercenter/adapter/ServiceWechatAdapter.java
userCenter/src/main/java/com/dayu/usercenter/api/UserService2.java
userCenter/src/main/java/com/dayu/usercenter/model/bean/InviteRecordBean.java
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserContract.java
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserPresenter.java
userCenter/src/main/java/com/dayu/usercenter/presenter/pwlogin/PwLoginPresenter.java
userCenter/src/main/java/com/dayu/usercenter/presenter/smslogin/SmsLoginPresenter.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity/SmsLoginActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/BusinessTypeActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/CashRecordActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/InvateNewActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/InviteRecordActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/UserLicenceActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomeUserFragment.java
userCenter/src/main/release/AndroidManifest.xml
userCenter/src/main/res/drawable/btn_dark_red.xml
userCenter/src/main/res/layout/activity_invate_new.xml
userCenter/src/main/res/layout/activity_invite_record.xml
userCenter/src/main/res/layout/activity_pwlogin_layout.xml
userCenter/src/main/res/layout/activity_sms_login.xml
userCenter/src/main/res/layout/activity_user_info.xml
userCenter/src/main/res/layout/fragment_home_user.xml
userCenter/src/main/res/layout/item_invite_record.xml
userCenter/src/main/res/layout/item_service_wechat.xml
userCenter/src/main/res/values/strings.xml
userCenter/src/main/res/values/styles.xml
.idea/gradle.xml
View file @
35dcd8a2
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
<option
value=
"$PROJECT_DIR$/IDCardLib"
/>
<option
value=
"$PROJECT_DIR$/IDCardLib"
/>
<option
value=
"$PROJECT_DIR$/app"
/>
<option
value=
"$PROJECT_DIR$/app"
/>
<option
value=
"$PROJECT_DIR$/baseSDK"
/>
<option
value=
"$PROJECT_DIR$/baseSDK"
/>
<option
value=
"$PROJECT_DIR$/camera"
/>
<option
value=
"$PROJECT_DIR$/learnCenter"
/>
<option
value=
"$PROJECT_DIR$/locationComponent"
/>
<option
value=
"$PROJECT_DIR$/locationComponent"
/>
<option
value=
"$PROJECT_DIR$/managercenter"
/>
<option
value=
"$PROJECT_DIR$/managercenter"
/>
<option
value=
"$PROJECT_DIR$/messageCenter"
/>
<option
value=
"$PROJECT_DIR$/messageCenter"
/>
...
@@ -18,6 +20,7 @@
...
@@ -18,6 +20,7 @@
<option
value=
"$PROJECT_DIR$/pickerview"
/>
<option
value=
"$PROJECT_DIR$/pickerview"
/>
<option
value=
"$PROJECT_DIR$/provider"
/>
<option
value=
"$PROJECT_DIR$/provider"
/>
<option
value=
"$PROJECT_DIR$/saleCenter"
/>
<option
value=
"$PROJECT_DIR$/saleCenter"
/>
<option
value=
"$PROJECT_DIR$/umeng"
/>
<option
value=
"$PROJECT_DIR$/userCenter"
/>
<option
value=
"$PROJECT_DIR$/userCenter"
/>
<option
value=
"$PROJECT_DIR$/wheelview"
/>
<option
value=
"$PROJECT_DIR$/wheelview"
/>
</set>
</set>
...
...
.idea/modules.xml
View file @
35dcd8a2
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
<module
fileurl=
"file://$PROJECT_DIR$/IDCardLib/IDCardLib.iml"
filepath=
"$PROJECT_DIR$/IDCardLib/IDCardLib.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/IDCardLib/IDCardLib.iml"
filepath=
"$PROJECT_DIR$/IDCardLib/IDCardLib.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/app/app.iml"
filepath=
"$PROJECT_DIR$/app/app.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/app/app.iml"
filepath=
"$PROJECT_DIR$/app/app.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/baseSDK/baseSDK.iml"
filepath=
"$PROJECT_DIR$/baseSDK/baseSDK.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/baseSDK/baseSDK.iml"
filepath=
"$PROJECT_DIR$/baseSDK/baseSDK.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/camera/camera.iml"
filepath=
"$PROJECT_DIR$/camera/camera.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/dayu-saas-android.iml"
filepath=
"$PROJECT_DIR$/dayu-saas-android.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/dayu-saas-android.iml"
filepath=
"$PROJECT_DIR$/dayu-saas-android.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/learnCenter/learnCenter.iml"
filepath=
"$PROJECT_DIR$/learnCenter/learnCenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/locationComponent/locationComponent.iml"
filepath=
"$PROJECT_DIR$/locationComponent/locationComponent.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/locationComponent/locationComponent.iml"
filepath=
"$PROJECT_DIR$/locationComponent/locationComponent.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/managercenter/managercenter.iml"
filepath=
"$PROJECT_DIR$/managercenter/managercenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/managercenter/managercenter.iml"
filepath=
"$PROJECT_DIR$/managercenter/managercenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/messageCenter/messageCenter.iml"
filepath=
"$PROJECT_DIR$/messageCenter/messageCenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/messageCenter/messageCenter.iml"
filepath=
"$PROJECT_DIR$/messageCenter/messageCenter.iml"
/>
...
@@ -13,6 +15,7 @@
...
@@ -13,6 +15,7 @@
<module
fileurl=
"file://$PROJECT_DIR$/pickerview/pickerview.iml"
filepath=
"$PROJECT_DIR$/pickerview/pickerview.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/pickerview/pickerview.iml"
filepath=
"$PROJECT_DIR$/pickerview/pickerview.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/provider/provider.iml"
filepath=
"$PROJECT_DIR$/provider/provider.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/provider/provider.iml"
filepath=
"$PROJECT_DIR$/provider/provider.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/saleCenter/saleCenter.iml"
filepath=
"$PROJECT_DIR$/saleCenter/saleCenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/saleCenter/saleCenter.iml"
filepath=
"$PROJECT_DIR$/saleCenter/saleCenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/umeng/umeng.iml"
filepath=
"$PROJECT_DIR$/umeng/umeng.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/userCenter/userCenter.iml"
filepath=
"$PROJECT_DIR$/userCenter/userCenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/userCenter/userCenter.iml"
filepath=
"$PROJECT_DIR$/userCenter/userCenter.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/wheelview/wheelview.iml"
filepath=
"$PROJECT_DIR$/wheelview/wheelview.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/wheelview/wheelview.iml"
filepath=
"$PROJECT_DIR$/wheelview/wheelview.iml"
/>
</modules>
</modules>
...
...
app/src/main/AndroidManifest.xml
View file @
35dcd8a2
...
@@ -101,6 +101,10 @@
...
@@ -101,6 +101,10 @@
<meta-data
<meta-data
android:name=
"com.amap.protocol.v2.apikey"
android:name=
"com.amap.protocol.v2.apikey"
android:value=
"05936ed54259770e56ffd1e67ac77958"
/>
android:value=
"05936ed54259770e56ffd1e67ac77958"
/>
<meta-data
android:name=
"com.amap.api.v2.apikey"
android:value=
"05936ed54259770e56ffd1e67ac77958"
/>
<service
android:name=
"com.amap.api.location.APSService"
/>
<service
android:name=
"com.amap.api.location.APSService"
/>
<!-- 设置环信应用的AppKey -->
<!-- 设置环信应用的AppKey -->
...
...
app/src/main/java/com/dayu/bigfish/InitializeActivity.java
View file @
35dcd8a2
...
@@ -17,16 +17,20 @@ import com.dayu.bigfish.ui.MainActivity;
...
@@ -17,16 +17,20 @@ import com.dayu.bigfish.ui.MainActivity;
import
com.dayu.bigfish.ui.ManagerActivity
;
import
com.dayu.bigfish.ui.ManagerActivity
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.event.UserInfo
;
import
com.dayu.managercenter.data.Spu
;
import
com.dayu.managercenter.ui.activity.ServiceStationActivity
;
import
com.dayu.managercenter.ui.activity.ServiceStationActivity
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.usercenter.ui.activity.SmsLoginActivity
;
import
com.dayu.usercenter.ui.activity.SmsLoginActivity
;
import
com.dayu.utils.AppUtils
;
import
com.dayu.utils.LogUtils
;
import
com.dayu.utils.LogUtils
;
import
com.dayu.utils.MPermissionUtils
;
import
com.dayu.utils.MPermissionUtils
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.StationManager
;
import
com.dayu.utils.StationManager
;
import
com.dayu.utils.UserManager
;
import
com.dayu.utils.UserManager
;
import
com.dayu.widgets.CustomDialog
;
import
com.dayu.widgets.CustomDialog
;
import
com.hyphenate.EMCallBack
;
import
com.hyphenate.EMCallBack
;
import
com.hyphenate.chat.EMClient
;
import
com.hyphenate.chat.EMClient
;
import
com.megvii.idcardlib.util.Constant
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.analytics.MobclickAgent
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -46,6 +50,12 @@ public class InitializeActivity extends DataBindingActivity<ActivityInitializeMa
...
@@ -46,6 +50,12 @@ public class InitializeActivity extends DataBindingActivity<ActivityInitializeMa
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
if
(
Constants
.
IS_DEBUG
){
AppUtils
.
initEnv
();
}
else
{
SPUtils
.
put
(
"env"
,
""
);
}
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
...
...
app/src/main/java/com/dayu/bigfish/MyApplication.java
View file @
35dcd8a2
...
@@ -90,7 +90,6 @@ public class MyApplication extends BaseApplication {
...
@@ -90,7 +90,6 @@ public class MyApplication extends BaseApplication {
initUM
();
initUM
();
//初始化环信
//初始化环信
HxManager
.
getInstance
().
init
(
mContext
);
HxManager
.
getInstance
().
init
(
mContext
);
initTextSize
();
}
}
...
@@ -183,11 +182,15 @@ public class MyApplication extends BaseApplication {
...
@@ -183,11 +182,15 @@ public class MyApplication extends BaseApplication {
/**
/**
* 使其系统更改字体大小无效
* 使其系统更改字体大小无效
*/
*/
private
void
initTextSize
()
{
@Override
Resources
res
=
getResources
();
public
Resources
getResources
()
{
Configuration
config
=
new
Configuration
();
Resources
res
=
super
.
getResources
();
config
.
setToDefaults
();
Configuration
configuration
=
res
.
getConfiguration
();
res
.
updateConfiguration
(
config
,
res
.
getDisplayMetrics
());
if
(
configuration
.
fontScale
!=
1.0f
)
{
configuration
.
fontScale
=
1.0f
;
res
.
updateConfiguration
(
configuration
,
res
.
getDisplayMetrics
());
}
return
res
;
}
}
@Override
@Override
...
...
app/src/main/java/com/dayu/bigfish/api/APIService.java
View file @
35dcd8a2
...
@@ -80,5 +80,12 @@ public interface APIService {
...
@@ -80,5 +80,12 @@ public interface APIService {
@POST
(
Constants
.
API_7400
+
"/umMessage/umengAccount"
)
@POST
(
Constants
.
API_7400
+
"/umMessage/umengAccount"
)
Observable
<
BaseResponse
<
Boolean
>>
bindUmeng
(
@Body
BindUmengData
data
);
Observable
<
BaseResponse
<
Boolean
>>
bindUmeng
(
@Body
BindUmengData
data
);
/**
* 设置邀请码
*/
@GET
(
Constants
.
API_7100
+
"/inviters/inviterEngineer"
)
Observable
<
BaseResponse
<
Boolean
>>
setInvateCode
(
@Query
(
"engineerId"
)
int
engineerId
,
@Query
(
"inviterCode"
)
String
inviterCode
);
}
}
app/src/main/java/com/dayu/bigfish/presenter/main/MainContract.java
View file @
35dcd8a2
...
@@ -29,6 +29,15 @@ public interface MainContract {
...
@@ -29,6 +29,15 @@ public interface MainContract {
* 跳转到服务场景设置页面
* 跳转到服务场景设置页面
*/
*/
void
toServiceSence
();
void
toServiceSence
();
/**
* 显示邀请码框
*/
void
showInvateCodeView
();
/**
* 隐藏邀请码框
*/
void
hideInvateCodeView
();
}
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
...
...
app/src/main/java/com/dayu/bigfish/presenter/main/MainPresenter.java
View file @
35dcd8a2
package
com
.
dayu
.
bigfish
.
presenter
.
main
;
package
com
.
dayu
.
bigfish
.
presenter
.
main
;
import
android.databinding.ObservableField
;
import
android.databinding.ObservableField
;
import
android.text.TextUtils
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.api.Api
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.api.APIService
;
import
com.dayu.bigfish.api.ApiFactory
;
import
com.dayu.bigfish.api.ApiFactory
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.event.UserInfo
;
...
@@ -12,6 +14,7 @@ import com.dayu.usercenter.api.UserApiFactory;
...
@@ -12,6 +14,7 @@ import com.dayu.usercenter.api.UserApiFactory;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.utils.AppUtils
;
import
com.dayu.utils.AppUtils
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
com.dayu.utils.UserManager
;
import
org.json.JSONException
;
import
org.json.JSONException
;
...
@@ -29,6 +32,7 @@ public class MainPresenter extends MainContract.Presenter {
...
@@ -29,6 +32,7 @@ public class MainPresenter extends MainContract.Presenter {
* 待接单数目.
* 待接单数目.
*/
*/
public
ObservableField
<
String
>
tabRecive
=
new
ObservableField
<>(
"0"
);
public
ObservableField
<
String
>
tabRecive
=
new
ObservableField
<>(
"0"
);
public
ObservableField
<
String
>
invateCode
=
new
ObservableField
<>();
private
UserInfo
mUser
;
private
UserInfo
mUser
;
private
int
mAccountId
;
private
int
mAccountId
;
private
int
mSiteId
;
private
int
mSiteId
;
...
@@ -38,6 +42,10 @@ public class MainPresenter extends MainContract.Presenter {
...
@@ -38,6 +42,10 @@ public class MainPresenter extends MainContract.Presenter {
mUser
=
UserManager
.
getInstance
().
getUser
();
mUser
=
UserManager
.
getInstance
().
getUser
();
mAccountId
=
Integer
.
parseInt
(
mUser
.
getAccountId
());
mAccountId
=
Integer
.
parseInt
(
mUser
.
getAccountId
());
mSiteId
=
mUser
.
getSiteId
();
mSiteId
=
mUser
.
getSiteId
();
if
(!
TextUtils
.
isEmpty
(
mUser
.
getNewAccount
())){
mView
.
showInvateCodeView
();
}
request
();
request
();
}
}
...
@@ -148,4 +156,27 @@ public class MainPresenter extends MainContract.Presenter {
...
@@ -148,4 +156,27 @@ public class MainPresenter extends MainContract.Presenter {
}));
}));
}
}
//设置验证码
public
void
saveInvateCode
()
{
if
(
invateCode
.
get
()
==
null
||
TextUtils
.
isEmpty
(
invateCode
.
get
())){
mView
.
showToast
(
"请填写邀请码"
);
}
else
{
mView
.
showDialog
();
Api
.
getService
(
APIService
.
class
).
setInvateCode
(
mAccountId
,
invateCode
.
get
()).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
success
->{
if
(
success
){
mView
.
hideInvateCodeView
();
}
ToastUtils
.
showShortToast
(
success
?
"设置成功"
:
"设置失败"
);
}));
}
}
//跳过验证码
public
void
jumpInvateCode
()
{
Api
.
getService
(
APIService
.
class
).
setInvateCode
(
mAccountId
,
""
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
success
->{
}));
}
}
}
app/src/main/java/com/dayu/bigfish/presenter/setting/SettingPresenter.java
View file @
35dcd8a2
...
@@ -182,4 +182,5 @@ public class SettingPresenter extends SettingContract.Presenter {
...
@@ -182,4 +182,5 @@ public class SettingPresenter extends SettingContract.Presenter {
mView
.
startActivity
(
FeedBackActivity
.
class
,
bundle
);
mView
.
startActivity
(
FeedBackActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"feed_back"
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"feed_back"
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/ui/AboutUsActivity.java
View file @
35dcd8a2
package
com
.
dayu
.
bigfish
.
ui
;
package
com
.
dayu
.
bigfish
.
ui
;
import
android.content.Intent
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.bigfish.AboutUsBinding
;
import
com.dayu.bigfish.AboutUsBinding
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.common.Constants
;
import
com.dayu.location.base.InputtipsActivity
;
import
com.dayu.utils.AppUtils
;
import
com.dayu.utils.AppUtils
;
/**
/**
...
@@ -21,7 +25,14 @@ public class AboutUsActivity extends DataBindingActivity<AboutUsBinding> {
...
@@ -21,7 +25,14 @@ public class AboutUsActivity extends DataBindingActivity<AboutUsBinding> {
public
void
initView
()
{
public
void
initView
()
{
mBind
.
ivBack
.
setOnClickListener
(
o
->
finish
());
mBind
.
ivBack
.
setOnClickListener
(
o
->
finish
());
String
versionCode
=
AppUtils
.
getPackageNum
();
String
versionCode
=
AppUtils
.
getPackageNum
();
if
(
Constants
.
ENVIROMENT
.
equals
(
"debug"
))
{
versionCode
=
(
String
.
format
(
getString
(
com
.
dayu
.
usercenter
.
R
.
string
.
enviroment_debug
),
versionCode
));
}
else
if
(
Constants
.
ENVIROMENT
.
equals
(
"uat"
))
{
versionCode
=
(
String
.
format
(
getString
(
com
.
dayu
.
usercenter
.
R
.
string
.
enviroment_uat
),
versionCode
));
}
mBind
.
tvVersion
.
setText
(
getString
(
R
.
string
.
tv_now_version
)+
versionCode
);
mBind
.
tvVersion
.
setText
(
getString
(
R
.
string
.
tv_now_version
)+
versionCode
);
// mBind.imageAbout.setOnClickListener(view -> startActivity(new Intent(this,InputtipsActivity.class)));
}
}
}
}
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
View file @
35dcd8a2
...
@@ -15,6 +15,8 @@ import android.support.v4.content.FileProvider;
...
@@ -15,6 +15,8 @@ import android.support.v4.content.FileProvider;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
...
@@ -85,15 +87,12 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -85,15 +87,12 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
private
TextView
[]
mTabs
;
private
TextView
[]
mTabs
;
private
NotificationManager
notificationManager
;
private
NotificationManager
notificationManager
;
private
NotificationCompat
.
Builder
builder
;
private
NotificationCompat
.
Builder
builder
;
// private ManagerFragment managerFragment;
// private HomeFirstTabFragment firstFragment;
private
HomeSaleFragment
saleFragment
;
private
HomeSaleFragment
saleFragment
;
private
HomeOrderFragment
secondFragment
;
private
HomeOrderFragment
secondFragment
;
private
HomeLearnFragment
learnFragment
;
private
HomeLearnFragment
learnFragment
;
// private HomeMessageFragment thirdFragment;
// private HomePersonFragment fourFragment;
private
HomeUserFragment
fourFragment
;
private
HomeUserFragment
fourFragment
;
private
int
mFirstPositon
=
0
;
private
int
mFirstPositon
=
2
;
private
BadgeView
mBadgeView
;
private
BadgeView
mOrderBadgeView
;
private
BadgeView
mOrderBadgeView
;
private
BadgeView
mSaleBadgeView
;
private
BadgeView
mSaleBadgeView
;
private
BadgeView
mLearnBadgeView
;
private
BadgeView
mLearnBadgeView
;
...
@@ -119,22 +118,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -119,22 +118,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
secondFragment
=
HomeOrderFragment
.
newInstance
();
secondFragment
=
HomeOrderFragment
.
newInstance
();
learnFragment
=
new
HomeLearnFragment
();
learnFragment
=
new
HomeLearnFragment
();
fourFragment
=
HomeUserFragment
.
newInstance
();
fourFragment
=
HomeUserFragment
.
newInstance
();
// thirdFragment = HomeMessageFragment.newInstance();
mFragments
=
new
Fragment
[]{
saleFragment
,
secondFragment
,
learnFragment
,
fourFragment
};
// fourFragment = HomePersonFragment.newInstance();
// if (UserManager.getInstance().getRole() == Constants.ENGINEER) {
// firstFragment = HomeFirstTabFragment.newInstance();
// mFragments = new Fragment[]{firstFragment, secondFragment, thirdFragment, fourFragment};
// mFirstPositon = 1;
mFragments
=
new
Fragment
[]{
saleFragment
,
secondFragment
,
learnFragment
,
fourFragment
};
mFirstPositon
=
0
;
// } else if (UserManager.getInstance().getRole() == Constants.MANAGER_ENGINEER) {
// managerFragment = ManagerFragment.newInstance();
// mFragments = new Fragment[]{managerFragment, secondFragment, thirdFragment, fourFragment};
// mFragments = new Fragment[]{saleFragment, secondFragment, learnFragment,fourFragment};
// mFirstPositon = 0;
// mBind.tabFirst.setText(getString(R.string.send_order));
// }
// mTabs = new TextView[]{mBind.tabFirst, mBind.tabSecond, mBind.tabThird, mBind.tabFour};
mTabs
=
new
TextView
[]{
mBind
.
tabSale
,
mBind
.
tabSecond
,
mBind
.
tabLearn
,
mBind
.
tabFour
};
mTabs
=
new
TextView
[]{
mBind
.
tabSale
,
mBind
.
tabSecond
,
mBind
.
tabLearn
,
mBind
.
tabFour
};
addFragment
();
addFragment
();
initListener
();
initListener
();
...
@@ -160,12 +144,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -160,12 +144,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
}
}
private
void
initListener
()
{
private
void
initListener
()
{
// mBind.tabFirst.setOnClickListener(o -> showHideFragment(0, mPosition));
// mBind.tabSecond.setOnClickListener(o -> showHideFragment(1, mPosition));
// mBind.tabThird.setOnClickListener(o -> {
// showHideFragment(2, mPosition);
// });
// mBind.tabFour.setOnClickListener(o -> showHideFragment(3, mPosition));
mBind
.
tabSale
.
setOnClickListener
(
o
->
showHideFragment
(
0
,
mPosition
));
mBind
.
tabSale
.
setOnClickListener
(
o
->
showHideFragment
(
0
,
mPosition
));
mBind
.
tabSecond
.
setOnClickListener
(
o
->
{
mBind
.
tabSecond
.
setOnClickListener
(
o
->
{
if
(
mPosition
!=
1
){
if
(
mPosition
!=
1
){
...
@@ -179,6 +157,12 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -179,6 +157,12 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
});
});
mBind
.
tabLearn
.
setOnClickListener
(
o
->
showHideFragment
(
2
,
mPosition
));
mBind
.
tabLearn
.
setOnClickListener
(
o
->
showHideFragment
(
2
,
mPosition
));
mBind
.
tabFour
.
setOnClickListener
(
o
->
showHideFragment
(
3
,
mPosition
));
mBind
.
tabFour
.
setOnClickListener
(
o
->
showHideFragment
(
3
,
mPosition
));
mBind
.
rlInvateCode
.
setOnTouchListener
((
view
,
motionEvent
)
->
true
);
mBind
.
tvCancle
.
setOnClickListener
(
v
->
{
hideInvateCodeView
();
mPresenter
.
jumpInvateCode
();
});
mBind
.
tvConfirm
.
setOnClickListener
(
v
->
mPresenter
.
saveInvateCode
());
}
}
//提示去认证身份
//提示去认证身份
...
@@ -253,19 +237,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -253,19 +237,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
*/
*/
@Override
@Override
public
void
isShowRedIcon
(
int
num
)
{
public
void
isShowRedIcon
(
int
num
)
{
// num = (int) SPUtils.get(Constants.HX_NUM, 0);
// if (mBadgeView == null) {
// mBadgeView = new BadgeView(this);
// mBadgeView.setTargetView(mBind.tabThird);
// mBadgeView.setBadgeGravity(Gravity.CENTER);
// mBadgeView.setBadgeMargin(12, 0, 0, 12);
// }
// if (num < 100) {
// mBadgeView.setText(num + "", TextView.BufferType.NORMAL);
// } else {
// mBadgeView.setText("99+");
// }
// thirdFragment.getNum(num);
}
}
@Subscribe
@Subscribe
...
@@ -273,13 +244,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -273,13 +244,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
if
(
event
.
num
<=
0
)
if
(
event
.
num
<=
0
)
return
;
return
;
if
(
mOrderBadgeView
==
null
)
{
if
(
mOrderBadgeView
==
null
)
{
// mOrderBadgeView = new BadgeView(this);
// mOrderBadgeView.setTargetView(mBind.tabSecond);
// mOrderBadgeView.setBadgeGravity(Gravity.CENTER);
// mOrderBadgeView.setBadgeMargin(30, -8, 0, 0);
// mOrderBadgeView.setBackground(0,Color.TRANSPARENT);
// mOrderBadgeView.setTextColor(Color.parseColor("#FF5A4B"));
// mOrderBadgeView.setTextSize(18);
mOrderBadgeView
=
new
BadgeView
(
this
);
mOrderBadgeView
=
new
BadgeView
(
this
);
mOrderBadgeView
.
setTargetView
(
mBind
.
tabSecond
);
mOrderBadgeView
.
setTargetView
(
mBind
.
tabSecond
);
...
@@ -291,12 +255,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -291,12 +255,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
}
else
{
}
else
{
mOrderBadgeView
.
setText
(
"99+"
);
mOrderBadgeView
.
setText
(
"99+"
);
}
}
// if (event.num < 100) {
// mBind.tabSecond.setText(getText(R.string.order)+"("+event.num + ")");
// } else {
// mBind.tabSecond.setText(getText(R.string.order)+"(99+)");
// }
}
}
@Subscribe
@Subscribe
...
@@ -416,6 +374,18 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -416,6 +374,18 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
startActivity
(
intent
);
startActivity
(
intent
);
}
}
@Override
public
void
showInvateCodeView
()
{
mBind
.
rlInvateCode
.
setVisibility
(
View
.
VISIBLE
);
}
@Override
public
void
hideInvateCodeView
()
{
mBind
.
rlInvateCode
.
setVisibility
(
View
.
GONE
);
mUserInfo
.
setNewAccount
(
""
);
UserManager
.
getInstance
().
saveUser
(
mUserInfo
);
}
/**
/**
* 处理intent传来的信息.
* 处理intent传来的信息.
*
*
...
@@ -424,26 +394,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
...
@@ -424,26 +394,6 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
private
void
doAction
(
Intent
intent
)
{
private
void
doAction
(
Intent
intent
)
{
InformBean
info
=
(
InformBean
)
intent
.
getSerializableExtra
(
Constants
.
MESSAGE_INFO
);
InformBean
info
=
(
InformBean
)
intent
.
getSerializableExtra
(
Constants
.
MESSAGE_INFO
);
if
(
info
!=
null
)
{
if
(
info
!=
null
)
{
// Map<String, String> map_ekv = new HashMap<>();
// if (info.getCategory() == 1 && (info.getFunctionType() == 2)) {
// dumpReceActivity();//待接单列表
// map_ekv.put("type", mActivity.getString(com.dayu.order.R.string.receive_list));
// } else {
// int secondIndex = 0;
// if (info.getCategory() == 1) {
// secondIndex = 0; //系统通知
// map_ekv.put("type", mActivity.getString(com.dayu.order.R.string.message_system));
// } else if (info.getCategory() == 2) {
// secondIndex = 1;//大鱼通知
// map_ekv.put("type", mActivity.getString(com.dayu.order.R.string.message_dayu));
// }
// showHideFragment(0, mPosition);
// if (thirdFragment != null) {
// thirdFragment.setIndex(secondIndex);
// thirdFragment.swtichFragment(secondIndex);
// }
// }
// MobclickAgent.onEvent(mActivity, "notificaition_click", map_ekv);
showHideFragment
(
0
,
mPosition
);
showHideFragment
(
0
,
mPosition
);
}
}
}
}
...
...
app/src/main/java/com/dayu/bigfish/ui/SettingActivity.java
View file @
35dcd8a2
...
@@ -8,6 +8,7 @@ import android.os.Build;
...
@@ -8,6 +8,7 @@ import android.os.Build;
import
android.os.Environment
;
import
android.os.Environment
;
import
android.support.v4.app.NotificationCompat
;
import
android.support.v4.app.NotificationCompat
;
import
android.support.v4.content.FileProvider
;
import
android.support.v4.content.FileProvider
;
import
android.view.View
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.dayu.base.api.DownloadService
;
import
com.dayu.base.api.DownloadService
;
...
@@ -19,7 +20,10 @@ import com.dayu.bigfish.api.protocol.VersionInfo;
...
@@ -19,7 +20,10 @@ import com.dayu.bigfish.api.protocol.VersionInfo;
import
com.dayu.bigfish.databinding.ActivitySettingBinding
;
import
com.dayu.bigfish.databinding.ActivitySettingBinding
;
import
com.dayu.bigfish.presenter.setting.SettingContract
;
import
com.dayu.bigfish.presenter.setting.SettingContract
;
import
com.dayu.bigfish.presenter.setting.SettingPresenter
;
import
com.dayu.bigfish.presenter.setting.SettingPresenter
;
import
com.dayu.common.Constants
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.utils.AppUtils
;
import
com.dayu.widgets.ChangeEnvDialog
;
import
com.dayu.widgets.CustomDialog
;
import
com.dayu.widgets.CustomDialog
;
import
com.dayu.widgets.listener.OnCloseListener
;
import
com.dayu.widgets.listener.OnCloseListener
;
import
com.dayu.widgets.listener.onDownloadListener
;
import
com.dayu.widgets.listener.onDownloadListener
;
...
@@ -42,8 +46,17 @@ public class SettingActivity extends BaseActivity<SettingPresenter, ActivitySett
...
@@ -42,8 +46,17 @@ public class SettingActivity extends BaseActivity<SettingPresenter, ActivitySett
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mBind
.
toolbar
.
setNavigationOnClickListener
(
v
->
dumpBack
());
mBind
.
toolbar
.
setNavigationOnClickListener
(
v
->
dumpBack
());
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
setting_center
));
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
setting_center
));
initChangeEnv
();
}
//初始化切换开发环境相关布局
private
void
initChangeEnv
()
{
if
(
Constants
.
IS_DEBUG
)
{
mBind
.
tvTitle
.
setOnClickListener
(
v
->
onTitleClick
());
}
}
}
@Override
@Override
...
@@ -123,4 +136,23 @@ public class SettingActivity extends BaseActivity<SettingPresenter, ActivitySett
...
@@ -123,4 +136,23 @@ public class SettingActivity extends BaseActivity<SettingPresenter, ActivitySett
.
setContentText
(
getString
(
R
.
string
.
new_version
));
.
setContentText
(
getString
(
R
.
string
.
new_version
));
notificationManager
.
notify
(
0
,
builder
.
build
());
notificationManager
.
notify
(
0
,
builder
.
build
());
}
}
private
int
clickCount
=
0
;
private
long
clickTime
=
0
;
public
void
onTitleClick
()
{
if
(
System
.
currentTimeMillis
()
-
clickTime
<
1500
)
{
clickTime
=
System
.
currentTimeMillis
();
clickCount
++;
}
else
{
clickTime
=
System
.
currentTimeMillis
();
clickCount
=
0
;
}
if
(
clickCount
>=
4
)
{
new
ChangeEnvDialog
().
show
(
this
);
clickCount
=
0
;
}
}
}
}
app/src/main/res/layout/activity_main.xml
View file @
35dcd8a2
...
@@ -8,146 +8,231 @@
...
@@ -8,146 +8,231 @@
type=
"com.dayu.bigfish.presenter.main.MainPresenter"
/>
type=
"com.dayu.bigfish.presenter.main.MainPresenter"
/>
</data>
</data>
<
Linear
Layout
<
Relative
Layout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
android:orientation=
"vertical"
>
<
Relative
Layout
<
Linear
Layout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
0dp
"
android:layout_height=
"
match_parent
"
android:
layout_weight=
"1
"
>
android:
orientation=
"vertical
"
>
<FrameLayout
<RelativeLayout
android:id=
"@+id/fl_container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
match_parent
"
android:layout_height=
"
0dp
"
android:layout_weight=
"1"
/
>
android:layout_weight=
"1"
>
<ImageView
<FrameLayout
android:layout_width=
"match_parent
"
android:id=
"@+id/fl_container
"
android:layout_height=
"wrap_cont
ent"
android:layout_width=
"match_par
ent"
android:layout_alignParentBottom=
"true
"
android:layout_height=
"match_parent
"
android:background=
"@drawable/actionbar_shadow_up
"
/>
android:layout_weight=
"1
"
/>
</RelativeLayout>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:background=
"@drawable/actionbar_shadow_up"
/>
<LinearLayout
</RelativeLayout>
android:id=
"@+id/ll_tab"
android:layout_width=
"match_parent"
android:layout_height=
"53.3dp"
android:background=
"@color/cl_home_listview_bg"
android:orientation=
"horizontal"
android:visibility=
"visible"
>
<TextView
android:visibility=
"gone"
android:id=
"@+id/tab_first"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_weight=
"1"
android:drawablePadding=
"2dp"
android:drawableTop=
"@drawable/tab_first_selector"
android:gravity=
"center"
android:text=
"@string/schedule"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
<TextView
android:id=
"@+id/tab_sale"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_weight=
"1"
android:drawablePadding=
"2dp"
android:drawableTop=
"@drawable/tab_first_selector"
android:gravity=
"center"
android:text=
"@string/tab_sale"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
<TextView
android:id=
"@+id/tab_second"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_weight=
"1"
android:drawablePadding=
"2dp"
android:drawableTop=
"@drawable/tab_second_selector"
android:gravity=
"center"
android:text=
"@string/order"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
<TextView
android:id=
"@+id/tab_learn"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_weight=
"1"
android:drawablePadding=
"2dp"
android:drawableTop=
"@drawable/tab_learn_selector"
android:gravity=
"center"
android:text=
"@string/learn_str"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
<LinearLayout
<LinearLayout
android:visibility=
"gone"
android:id=
"@+id/ll_tab"
android:id=
"@+id/tab_get_order"
android:layout_width=
"match_parent"
android:layout_width=
"0dp"
android:layout_height=
"53.3dp"
android:layout_height=
"42dp"
android:background=
"@color/cl_home_listview_bg"
android:layout_gravity=
"center"
android:orientation=
"horizontal"
android:layout_weight=
"1"
android:visibility=
"visible"
>
android:background=
"@drawable/tab_blue_react"
android:gravity=
"center"
<TextView
android:onClick=
"@{()->presenter.dumpReceActivity()}"
android:id=
"@+id/tab_first"
android:orientation=
"vertical"
>
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/tab_first_selector"
android:drawablePadding=
"2dp"
android:gravity=
"center"
android:text=
"@string/schedule"
android:textColor=
"#585858"
android:textSize=
"10sp"
android:visibility=
"gone"
/>
<TextView
<TextView
android:id=
"@+id/tab_
order_num
"
android:id=
"@+id/tab_
sale
"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@{presenter.tabRecive}"
android:layout_marginTop=
"10dp"
android:textColor=
"@color/cl_white"
android:layout_weight=
"1"
android:textSize=
"16.7sp"
/>
android:drawableTop=
"@drawable/tab_first_selector"
android:drawablePadding=
"2dp"
android:gravity=
"center"
android:text=
"@string/tab_sale"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:id=
"@+id/tab_second"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/home_receive_order"
android:layout_marginTop=
"10dp"
android:textColor=
"@color/cl_white"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/tab_second_selector"
android:drawablePadding=
"2dp"
android:gravity=
"center"
android:text=
"@string/order"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
<TextView
android:id=
"@+id/tab_learn"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/tab_learn_selector"
android:drawablePadding=
"2dp"
android:gravity=
"center"
android:text=
"@string/learn_str"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
<LinearLayout
android:id=
"@+id/tab_get_order"
android:layout_width=
"0dp"
android:layout_height=
"42dp"
android:layout_gravity=
"center"
android:layout_weight=
"1"
android:background=
"@drawable/tab_blue_react"
android:gravity=
"center"
android:onClick=
"@{()->presenter.dumpReceActivity()}"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<TextView
android:id=
"@+id/tab_order_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@{presenter.tabRecive}"
android:textColor=
"@color/cl_white"
android:textSize=
"16.7sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/home_receive_order"
android:textColor=
"@color/cl_white"
android:textSize=
"10sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tab_third"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/tab_third_selector"
android:drawablePadding=
"2dp"
android:gravity=
"center"
android:paddingTop=
"10dp"
android:paddingBottom=
"10dp"
android:text=
"@string/message"
android:textColor=
"#585858"
android:textSize=
"10sp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tab_four"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/tab_four_selector"
android:drawablePadding=
"2dp"
android:gravity=
"center"
android:text=
"@string/personal"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
android:textSize=
"10sp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
<RelativeLayout
android:visibility=
"gone"
android:visibility=
"gone"
android:id=
"@+id/tab_third"
android:id=
"@+id/rl_invate_code"
android:layout_width=
"0dp"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"#66000000"
android:drawablePadding=
"2dp"
android:focusable=
"true"
android:paddingTop=
"10dp"
>
android:paddingBottom=
"10dp"
<LinearLayout
android:layout_gravity=
"center"
android:layout_width=
"match_parent"
android:drawableTop=
"@drawable/tab_third_selector"
android:gravity=
"center"
android:text=
"@string/message"
android:textColor=
"#585858"
android:textSize=
"10sp"
/>
<TextView
android:id=
"@+id/tab_four"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:orientation=
"vertical"
android:layout_weight=
"1"
android:background=
"@drawable/item_shape"
android:drawablePadding=
"2dp"
android:layout_margin=
"40dp"
android:drawableTop=
"@drawable/tab_four_selector"
android:layout_centerInParent=
"true"
android:gravity=
"center"
>
android:text=
"@string/personal"
<TextView
android:textColor=
"#585858"
android:id=
"@+id/tv_title"
android:textSize=
"10sp"
/>
style=
"@style/common_text_style"
</LinearLayout>
android:layout_width=
"match_parent"
</LinearLayout>
android:layout_height=
"45dp"
android:text=
"填写邀请码"
android:gravity=
"center"
android:textSize=
"16sp"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"@color/cl_line"
/>
<EditText
android:id=
"@+id/edt_invate_code"
style=
"@style/edt_user_edit"
android:text=
"@={presenter.invateCode}"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginLeft=
"15dp"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/bg_input_register_react"
android:layout_marginRight=
"15dp"
android:hint=
"输入邀请码"
android:maxLength=
"20"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"38dp"
android:layout_gravity=
"center_horizontal"
android:layout_margin=
"30dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_cancle"
style=
"@style/tv_btn"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginRight=
"40dp"
android:layout_weight=
"1"
android:textColor=
"@color/white"
android:background=
"@drawable/btn_grayaa_commom"
android:text=
"@string/jump_str"
/>
<TextView
android:id=
"@+id/tv_confirm"
style=
"@style/tv_btn"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:textColor=
"@color/white"
android:layout_weight=
"1"
android:background=
"@drawable/btn_blue_commom"
android:text=
"@string/confirm_str"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/activity_setting.xml
View file @
35dcd8a2
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
<TextView
style=
"@style/line"
/>
<TextView
style=
"@style/line"
/>
<RelativeLayout
<RelativeLayout
android:visibility=
"gone"
android:id=
"@+id/set_message"
android:id=
"@+id/set_message"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"54dp"
android:layout_height=
"54dp"
...
...
app/src/main/res/mipmap-hdpi/logo.jpg
deleted
100755 → 0
View file @
467dccfd
19.3 KB
app/src/main/res/mipmap-xhdpi/logo.jpg
deleted
100755 → 0
View file @
467dccfd
29.4 KB
app/src/main/res/mipmap-xxhdpi/logo.jpg
View file @
35dcd8a2
47.4 KB
|
W:
|
H:
27.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/mipmap-xxhdpi/wechatimg.png
View file @
35dcd8a2
24.5 KB
|
W:
|
H:
85.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/mipmap-xxxhdpi/logo.jpg
deleted
100755 → 0
View file @
467dccfd
69.2 KB
app/src/main/res/values/strings.xml
View file @
35dcd8a2
<resources>
<resources>
<string
name=
"jump_str"
>
跳过
</string>
</resources>
</resources>
baseSDK/src/main/java/com/dayu/base/ui/activity/DataBindingActivity.java
View file @
35dcd8a2
package
com
.
dayu
.
base
.
ui
.
activity
;
package
com
.
dayu
.
base
.
ui
.
activity
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.res.Configuration
;
import
android.content.res.Resources
;
import
android.databinding.DataBindingUtil
;
import
android.databinding.DataBindingUtil
;
import
android.databinding.ViewDataBinding
;
import
android.databinding.ViewDataBinding
;
import
android.os.Bundle
;
import
android.os.Bundle
;
...
@@ -54,6 +56,16 @@ public abstract class DataBindingActivity<B extends ViewDataBinding> extends App
...
@@ -54,6 +56,16 @@ public abstract class DataBindingActivity<B extends ViewDataBinding> extends App
MobclickAgent
.
onPause
(
mActivity
);
MobclickAgent
.
onPause
(
mActivity
);
}
}
@Override
public
Resources
getResources
()
{
Resources
res
=
super
.
getResources
();
Configuration
configuration
=
res
.
getConfiguration
();
if
(
configuration
.
fontScale
!=
1.0f
)
{
configuration
.
fontScale
=
1.0f
;
res
.
updateConfiguration
(
configuration
,
res
.
getDisplayMetrics
());
}
return
res
;
}
public
abstract
int
getLayoutId
();
public
abstract
int
getLayoutId
();
...
...
baseSDK/src/main/java/com/dayu/base/ui/adapter/MediaChooseAdapter.java
View file @
35dcd8a2
...
@@ -157,7 +157,7 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
...
@@ -157,7 +157,7 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
// .minimumCompressSize(100
)// 小于100kb的图片不压缩
.
minimumCompressSize
(
Constants
.
MINIMUM_COMPRESSSIZE
)
// 小于100kb的图片不压缩
.
synOrAsy
(
true
);
//同步true或异步false 压缩 默认同步、
.
synOrAsy
(
true
);
//同步true或异步false 压缩 默认同步、
// .enableCrop(true)//是否裁剪
// .enableCrop(true)//是否裁剪
// .freeStyleCropEnabled(true)
// .freeStyleCropEnabled(true)
...
...
baseSDK/src/main/java/com/dayu/base/ui/adapter/PhotoViewAdapter.java
View file @
35dcd8a2
...
@@ -130,7 +130,7 @@ public class PhotoViewAdapter extends RecyclerView.Adapter<PhotoViewAdapter.Hold
...
@@ -130,7 +130,7 @@ public class PhotoViewAdapter extends RecyclerView.Adapter<PhotoViewAdapter.Hold
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
.
minimumCompressSize
(
2
*
1024
)
// 小于**kb的图片不压缩
.
minimumCompressSize
(
Constants
.
MINIMUM_COMPRESSSIZE
)
// 小于**kb的图片不压缩
.
synOrAsy
(
true
);
//同步true或异步false 压缩 默认同步、
.
synOrAsy
(
true
);
//同步true或异步false 压缩 默认同步、
// .enableCrop(true)//是否裁剪
// .enableCrop(true)//是否裁剪
// .freeStyleCropEnabled(true)
// .freeStyleCropEnabled(true)
...
...
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
35dcd8a2
...
@@ -31,51 +31,57 @@ public class Constants {
...
@@ -31,51 +31,57 @@ public class Constants {
public
static
final
String
PROGRAM_PATH
=
"pages/mallDetail/main?goodsId=gid&userId=uid&type=1"
;
//小程序路径
public
static
final
String
PROGRAM_PATH
=
"pages/mallDetail/main?goodsId=gid&userId=uid&type=1"
;
//小程序路径
public
static
final
String
INVITE_NEW_SHARE_URL
=
"http://app.dl.kf.ai/ext/#/shareMaster?code="
;
//邀请新人分享链接
public
static
final
String
INVITE_NEW_SHARE_URL
=
"http://app.dl.kf.ai/ext/#/shareMaster?code="
;
//邀请新人分享链接
public
static
final
String
INVITE_NEW_SHARE_URL_BUSINESS
=
"http://app.dl.kf.ai/ext/#/merchants?code="
;
//邀请商家分享链接
/**
/**
* dev环境配置.
* dev环境配置.
*/
*/
// public static String ENVIROMENT = "debug";
// 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 String BASE_URL = "http://47.94.101.239:3112";
// public static final String BASE_URL = "http://47.94.101.239:3112";
// public static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
// public static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
// public final static String UP_VIDEO = "/file/uploadVideoOne?targetPath=dev/video";
// public static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
// public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
// public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
// public static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
// public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
// public static final String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
// public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
// public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=dev/video";
// 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;
// public static final boolean CAN_CHANGE_ENV = true; //是否显示切换开发环境菜单
/**
/**
* uat测试环境配置.
* uat测试环境配置.
*/
*/
// public static
final
String ENVIROMENT = "uat";
// public static String ENVIROMENT = "uat";
// public static
final
int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static
final
String BASE_URL = "http://47.95.223.6:3112";
// public static 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
static String WEB_SOP = "http://47.95.223.6:9004/#/sop
";
// public
final static String UP_VIDEO = "/file/uploadVideoOne?targetPath=test/video
";
// public
static String WEB_SOP_DETAIL = "http://47.95.223.6:9004/#/sopdetail
";
// public
final static String WEB_SOP = "http://47.95.223.6:9004/#/sop
";
// public
static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail
";
// public
final static String WEB_SOP_DETAIL = "http://47.95.223.6:9004/#/sopdetail
";
// public
static String CHECK_MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manyServiceResult
";
// public
final static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail
";
// public
static String MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manySop
";
// public
final static String CHECK_MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manyServiceResult
";
// public
static final String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply
";
// public
final static String MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manySop
";
// public
static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=test/video
";
// public static final boolean IS_DEBUG = true;
// public static final boolean IS_DEBUG = true;
// public static final boolean CAN_CHANGE_ENV = false; //是否显示切换开发环境菜单
/**
/**
* 正式环境.
* 正式环境.
*/
*/
public
static
final
String
ENVIROMENT
=
"release"
;
public
static
String
ENVIROMENT
=
"release"
;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_OFF
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_OFF
;
public
static
final
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
static
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply
"
;
public
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop
"
;
public
final
static
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=online/video
"
;
public
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail
"
;
public
final
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop
"
;
public
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail
"
;
public
final
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail
"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult
"
;
public
final
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail
"
;
public
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop
"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult
"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply
"
;
public
final
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop
"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=online/video
"
;
public
static
final
boolean
IS_DEBUG
=
false
;
public
static
final
boolean
IS_DEBUG
=
false
;
public
static
final
boolean
CAN_CHANGE_ENV
=
false
;
//是否显示切换开发环境菜单
/**
/**
* 统一配置.
* 统一配置.
...
@@ -242,6 +248,7 @@ public class Constants {
...
@@ -242,6 +248,7 @@ public class Constants {
public
static
final
int
CAMERA_CODE
=
100
;
public
static
final
int
CAMERA_CODE
=
100
;
public
static
final
int
CAMERA_IMG
=
101
;
public
static
final
int
CAMERA_IMG
=
101
;
public
static
final
int
CAMERA_VIDEO
=
102
;
public
static
final
int
CAMERA_VIDEO
=
102
;
public
static
final
int
MINIMUM_COMPRESSSIZE
=
4
*
1024
;
//图片压缩大小临界值
public
static
final
HashMap
<
Integer
,
List
<
TreeAddressBean
>>
treeAddressMap
=
new
HashMap
<>();
//地址数据
public
static
final
HashMap
<
Integer
,
List
<
TreeAddressBean
>>
treeAddressMap
=
new
HashMap
<>();
//地址数据
/**
/**
...
...
baseSDK/src/main/java/com/dayu/event/UserInfo.java
View file @
35dcd8a2
...
@@ -15,6 +15,7 @@ public class UserInfo {
...
@@ -15,6 +15,7 @@ public class UserInfo {
*/
*/
private
String
accountId
;
private
String
accountId
;
/**
/**
* 用户所属服务商id
* 用户所属服务商id
*/
*/
...
@@ -36,6 +37,17 @@ public class UserInfo {
...
@@ -36,6 +37,17 @@ public class UserInfo {
private
List
<
Integer
>
roles
;
private
List
<
Integer
>
roles
;
private
String
mobile
;
private
String
mobile
;
//不为空时弹出邀请码弹框
private
String
newAccount
;
public
String
getNewAccount
()
{
return
newAccount
;
}
public
void
setNewAccount
(
String
newAccount
)
{
this
.
newAccount
=
newAccount
;
}
public
String
getMobile
()
{
public
String
getMobile
()
{
return
mobile
;
return
mobile
;
}
}
...
...
baseSDK/src/main/java/com/dayu/utils/AppUtils.java
View file @
35dcd8a2
package
com
.
dayu
.
utils
;
package
com
.
dayu
.
utils
;
import
android.annotation.SuppressLint
;
import
android.content.pm.PackageInfo
;
import
android.content.pm.PackageInfo
;
import
android.content.pm.PackageManager
;
import
android.content.pm.PackageManager
;
import
android.telephony.TelephonyManager
;
import
android.telephony.TelephonyManager
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.dayu.baselibrary.R
;
import
com.dayu.baselibrary.R
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.common.BaseConstant
;
import
com.dayu.common.Constants
;
import
com.hyphenate.chat.EMClient
;
/**
/**
...
@@ -19,6 +24,7 @@ public class AppUtils {
...
@@ -19,6 +24,7 @@ public class AppUtils {
public
static
String
getIMEI
()
{
public
static
String
getIMEI
()
{
TelephonyManager
telephonyManager
=
(
TelephonyManager
)
BaseApplication
.
getBaseApp
().
getSystemService
(
BaseApplication
.
getContext
().
TELEPHONY_SERVICE
);
TelephonyManager
telephonyManager
=
(
TelephonyManager
)
BaseApplication
.
getBaseApp
().
getSystemService
(
BaseApplication
.
getContext
().
TELEPHONY_SERVICE
);
@SuppressLint
(
"MissingPermission"
)
String
imei
=
telephonyManager
.
getDeviceId
();
String
imei
=
telephonyManager
.
getDeviceId
();
return
imei
;
return
imei
;
...
@@ -40,4 +46,88 @@ public class AppUtils {
...
@@ -40,4 +46,88 @@ public class AppUtils {
}
}
}
}
public
static
boolean
isReleaseEnv
()
{
return
SPUtils
.
get
(
"env"
,
Constants
.
ENVIROMENT
).
equals
(
"release"
);
}
public
static
boolean
isDevEnv
()
{
return
SPUtils
.
get
(
"env"
,
Constants
.
ENVIROMENT
).
equals
(
"debug"
);
}
public
static
boolean
isUatEnv
()
{
return
SPUtils
.
get
(
"env"
,
Constants
.
ENVIROMENT
).
equals
(
"uat"
);
}
/**
* 切换到dev环境
*/
public
static
void
changeToDevEnv
()
{
SPUtils
.
put
(
"env"
,
"debug"
);
Constants
.
ENVIROMENT
=
"debug"
;
Constants
.
BASE_URL
=
"http://47.94.101.239:3112"
;
Constants
.
WEB_SOP
=
"http://47.94.101.239:9004/#/sop"
;
Constants
.
CHECK_MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manyServiceResult"
;
Constants
.
MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manySop"
;
Constants
.
WEB_SOP_DETAIL
=
"http://47.94.101.239:9004/#/sopdetail"
;
Constants
.
WEB_ZHI_SHI
=
"http://47.94.101.239:9004/#/detail"
;
}
/**
* 切换到uat环境
*/
public
static
void
changeToUatEnv
()
{
SPUtils
.
put
(
"env"
,
"uat"
);
Constants
.
ENVIROMENT
=
"uat"
;
Constants
.
BASE_URL
=
"http://47.95.223.6:3112"
;
Constants
.
WEB_SOP
=
"http://47.95.223.6:9004/#/sop"
;
Constants
.
WEB_SOP_DETAIL
=
"http://47.95.223.6:9004/#/sopdetail"
;
Constants
.
WEB_ZHI_SHI
=
"http://47.95.223.6:9004/#/detail"
;
Constants
.
CHECK_MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manyServiceResult"
;
Constants
.
MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manySop"
;
}
/**
* 切换到release环境
*/
public
static
void
changeToReleaseEnv
()
{
SPUtils
.
put
(
"env"
,
"release"
);
Constants
.
ENVIROMENT
=
"release"
;
Constants
.
BASE_URL
=
"https://mobile.kf.ai"
;
Constants
.
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
Constants
.
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
Constants
.
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
Constants
.
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult"
;
Constants
.
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop"
;
}
/**
* 退出登录
*/
public
static
void
exitApp
(){
EMClient
.
getInstance
().
logout
(
true
);
UserManager
.
getInstance
().
clearUserInfo
();
AppManager
.
getInstance
().
finishAllActivity
();
// System.exit(0);
}
/**
* 初始化开发环境
*/
public
static
void
initEnv
()
{
String
env
=
(
String
)
SPUtils
.
get
(
"env"
,
Constants
.
ENVIROMENT
);
switch
(
env
){
case
"debug"
:
changeToDevEnv
();
break
;
case
"uat"
:
changeToUatEnv
();
break
;
case
"release"
:
changeToReleaseEnv
();
break
;
}
}
}
}
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
View file @
35dcd8a2
package
com
.
dayu
.
utils
;
package
com
.
dayu
.
utils
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.ClipData
;
import
android.content.ClipboardManager
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.graphics.Color
;
...
@@ -13,6 +15,7 @@ import android.widget.ImageView;
...
@@ -13,6 +15,7 @@ import android.widget.ImageView;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.dayu.baselibrary.R
;
import
com.dayu.baselibrary.R
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.socialize.Config
;
import
com.umeng.socialize.Config
;
...
@@ -68,6 +71,11 @@ public class CommonUtils {
...
@@ -68,6 +71,11 @@ public class CommonUtils {
imm
.
showSoftInput
(
view
,
InputMethodManager
.
SHOW_FORCED
);
imm
.
showSoftInput
(
view
,
InputMethodManager
.
SHOW_FORCED
);
}
}
public
static
void
dialPhone
(
String
phoneNum
)
{
dialPhone
(
BaseApplication
.
getContext
(),
phoneNum
);
}
/**
/**
* 拨打电话(跳转到拨号界面,用户手动点击拨打)
* 拨打电话(跳转到拨号界面,用户手动点击拨打)
*/
*/
...
@@ -137,6 +145,7 @@ public class CommonUtils {
...
@@ -137,6 +145,7 @@ public class CommonUtils {
return
""
;
return
""
;
}
}
}
}
/**
/**
* 计算工单(预约/服务)时间差
* 计算工单(预约/服务)时间差
*/
*/
...
@@ -159,6 +168,13 @@ public class CommonUtils {
...
@@ -159,6 +168,13 @@ public class CommonUtils {
}
}
}
}
public
static
void
copyText
(
Context
context
,
String
text
)
{
ClipboardManager
cm
=
(
ClipboardManager
)
context
.
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
ClipData
mClipData
=
ClipData
.
newPlainText
(
""
,
text
);
cm
.
setPrimaryClip
(
mClipData
);
ToastUtils
.
showShortToast
(
R
.
string
.
copy_success
);
}
/**
/**
* List转String
* List转String
*
*
...
@@ -235,8 +251,9 @@ public class CommonUtils {
...
@@ -235,8 +251,9 @@ public class CommonUtils {
/**
/**
* 获取视频时长
* 获取视频时长
*
* @param videoPath
* @param videoPath
* @return
毫秒
* @return 毫秒
*/
*/
public
static
long
getVideoLength
(
String
videoPath
)
{
public
static
long
getVideoLength
(
String
videoPath
)
{
long
duration
;
long
duration
;
...
@@ -251,11 +268,12 @@ public class CommonUtils {
...
@@ -251,11 +268,12 @@ public class CommonUtils {
}
}
return
duration
;
return
duration
;
}
}
public
static
void
setVideoThumb
(
Context
context
,
JzvdStd
jzvdStd
,
String
url
)
{
public
static
void
setVideoThumb
(
Context
context
,
JzvdStd
jzvdStd
,
String
url
)
{
// jzvdStd.thumbImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
// jzvdStd.thumbImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
// GlideImageLoader.loadFit(context, jzvdStd.thumbImageView,url, R.drawable.icon_video_default);
// 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";
// 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
);
}
}
...
@@ -266,6 +284,11 @@ public class CommonUtils {
...
@@ -266,6 +284,11 @@ public class CommonUtils {
String
description
,
UMShareListener
callBack
)
{
String
description
,
UMShareListener
callBack
)
{
UMWeb
web
=
new
UMWeb
(
url
);
UMWeb
web
=
new
UMWeb
(
url
);
web
.
setTitle
(
title
);
web
.
setTitle
(
title
);
if
(
TextUtils
.
isEmpty
(
imgUrl
))
{
web
.
setThumb
(
new
UMImage
(
activity
,
R
.
drawable
.
icon_app_logo
));
}
else
{
web
.
setThumb
(
new
UMImage
(
activity
,
imgUrl
));
}
web
.
setThumb
(
new
UMImage
(
activity
,
imgUrl
));
web
.
setThumb
(
new
UMImage
(
activity
,
imgUrl
));
web
.
setDescription
(
description
);
web
.
setDescription
(
description
);
new
ShareAction
(
activity
).
withMedia
(
web
)
new
ShareAction
(
activity
).
withMedia
(
web
)
...
@@ -298,7 +321,8 @@ public class CommonUtils {
...
@@ -298,7 +321,8 @@ public class CommonUtils {
umMin
.
setUserName
(
"gh_0e5cd0cdbf46"
);
umMin
.
setUserName
(
"gh_0e5cd0cdbf46"
);
if
(
"uat"
.
equals
(
Constants
.
ENVIROMENT
))
if
(
"uat"
.
equals
(
Constants
.
ENVIROMENT
))
Config
.
setMiniPreView
();
//设置预览版
Config
.
setMiniPreView
();
//设置预览版
// Config.setMiniTest(); //设置测试版
if
(
"debug"
.
equals
(
Constants
.
ENVIROMENT
))
Config
.
setMiniTest
();
//设置测试版
new
ShareAction
(
activity
)
new
ShareAction
(
activity
)
.
withMedia
(
umMin
)
.
withMedia
(
umMin
)
.
setPlatform
(
platform
)
.
setPlatform
(
platform
)
...
@@ -310,9 +334,9 @@ public class CommonUtils {
...
@@ -310,9 +334,9 @@ public class CommonUtils {
* 获取年月日 格式日期
* 获取年月日 格式日期
*/
*/
public
static
String
getYearData
(
String
dataStr
)
{
public
static
String
getYearData
(
String
dataStr
)
{
if
(
TextUtils
.
isEmpty
(
dataStr
)){
if
(
TextUtils
.
isEmpty
(
dataStr
))
{
return
UIUtils
.
getString
(
R
.
string
.
unknown
);
return
UIUtils
.
getString
(
R
.
string
.
unknown
);
}
else
{
}
else
{
SimpleDateFormat
df
=
null
;
SimpleDateFormat
df
=
null
;
Date
sDate
=
null
;
Date
sDate
=
null
;
try
{
try
{
...
...
baseSDK/src/main/java/com/dayu/utils/MediaChooseUtils.java
View file @
35dcd8a2
...
@@ -3,6 +3,7 @@ package com.dayu.utils;
...
@@ -3,6 +3,7 @@ package com.dayu.utils;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.os.Environment
;
import
android.os.Environment
;
import
com.dayu.common.Constants
;
import
com.luck.picture.lib.PictureSelectionModel
;
import
com.luck.picture.lib.PictureSelectionModel
;
import
com.luck.picture.lib.PictureSelector
;
import
com.luck.picture.lib.PictureSelector
;
import
com.luck.picture.lib.config.PictureConfig
;
import
com.luck.picture.lib.config.PictureConfig
;
...
@@ -83,7 +84,7 @@ public class MediaChooseUtils {
...
@@ -83,7 +84,7 @@ public class MediaChooseUtils {
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
.
minimumCompressSize
(
100
)
// 小于100kb的图片不压缩
.
minimumCompressSize
(
Constants
.
MINIMUM_COMPRESSSIZE
)
// 小于100kb的图片不压缩
// .enableCrop(true)//是否裁剪
// .enableCrop(true)//是否裁剪
// .freeStyleCropEnabled(true)
// .freeStyleCropEnabled(true)
.
synOrAsy
(
true
);
.
synOrAsy
(
true
);
...
...
baseSDK/src/main/java/com/dayu/utils/TimeCountUtil2.java
0 → 100644
View file @
35dcd8a2
package
com
.
dayu
.
utils
;
import
android.app.Activity
;
import
android.os.CountDownTimer
;
import
android.text.Spannable
;
import
android.text.SpannableString
;
import
android.widget.TextView
;
import
com.dayu.baselibrary.R
;
/**
* 倒计时的工具类
* 2017/8/24
*/
public
class
TimeCountUtil2
extends
CountDownTimer
{
private
Activity
mActivity
;
private
TextView
btn
;
//按钮
private
String
mDescribe
;
private
String
mAgain
;
// 在这个构造方法里需要传入三个参数,一个是Activity,一个是总的时间millisInFuture,一个是countDownInterval,然后就是你在哪个按钮上做这个是,就把这个按钮传过来就可以了
public
TimeCountUtil2
(
Activity
mActivity
,
long
millisInFuture
,
long
countDownInterval
,
TextView
btn
)
{
super
(
millisInFuture
,
countDownInterval
);
this
.
mActivity
=
mActivity
;
this
.
btn
=
btn
;
}
public
void
setDescribe
(
String
str
){
mDescribe
=
str
;
}
public
void
setDescribeAgain
(
String
str
){
mAgain
=
str
;
}
@Override
public
void
onTick
(
long
millisUntilFinished
)
{
btn
.
setClickable
(
false
);
//设置不能点击
btn
.
setText
(
millisUntilFinished
/
1000
+
mDescribe
);
//设置倒计时时间
btn
.
setTextColor
(
mActivity
.
getResources
().
getColor
(
R
.
color
.
cl_selector_hui
));
Spannable
span
=
new
SpannableString
(
btn
.
getText
().
toString
());
//获取按钮的文字
btn
.
setText
(
span
);
}
@Override
public
void
onFinish
()
{
btn
.
setText
(
mAgain
);
btn
.
setClickable
(
true
);
//重新获得点击
btn
.
setTextColor
(
mActivity
.
getResources
().
getColor
(
R
.
color
.
white
));
}
}
baseSDK/src/main/java/com/dayu/utils/UtilsUserAccountMatcher.java
View file @
35dcd8a2
...
@@ -53,7 +53,7 @@ public class UtilsUserAccountMatcher {
...
@@ -53,7 +53,7 @@ public class UtilsUserAccountMatcher {
}
}
public
static
boolean
isPhoneNum
(
String
phoneNum
)
{
public
static
boolean
isPhoneNum
(
String
phoneNum
)
{
return
phonePattern
.
matcher
(
phoneNum
).
matches
();
return
!
TextUtils
.
isEmpty
(
phoneNum
)
&&
phonePattern
.
matcher
(
phoneNum
).
matches
();
}
}
public
static
boolean
isSmsCode
(
String
str
)
{
public
static
boolean
isSmsCode
(
String
str
)
{
...
...
baseSDK/src/main/java/com/dayu/widgets/ChangeEnvDialog.java
0 → 100644
View file @
35dcd8a2
package
com
.
dayu
.
widgets
;
import
android.app.Activity
;
import
android.app.Dialog
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.widget.EditText
;
import
android.widget.TextView
;
import
com.dayu.baselibrary.R
;
import
com.dayu.utils.AppUtils
;
public
class
ChangeEnvDialog
{
public
void
show
(
Activity
activity
)
{
View
view
=
View
.
inflate
(
activity
,
R
.
layout
.
dialog_change_env
,
null
);
Dialog
mDialog
=
new
Dialog
(
activity
,
R
.
style
.
CustomDialog
);
mDialog
.
setContentView
(
view
);
TextView
tvDev
=
view
.
findViewById
(
R
.
id
.
tv_dev
);
TextView
tvUat
=
view
.
findViewById
(
R
.
id
.
tv_uat
);
TextView
tvRelease
=
view
.
findViewById
(
R
.
id
.
tv_release
);
TextView
tvCancle
=
view
.
findViewById
(
R
.
id
.
tv_cancle
);
tvDev
.
setVisibility
(
AppUtils
.
isDevEnv
()
?
View
.
GONE
:
View
.
VISIBLE
);
tvUat
.
setVisibility
(
AppUtils
.
isUatEnv
()
?
View
.
GONE
:
View
.
VISIBLE
);
tvRelease
.
setVisibility
(
AppUtils
.
isReleaseEnv
()
?
View
.
GONE
:
View
.
VISIBLE
);
tvDev
.
setOnClickListener
(
v
->
toDev
());
tvUat
.
setOnClickListener
(
v
->
toUat
());
tvRelease
.
setOnClickListener
(
v
->
toRelease
());
tvCancle
.
setOnClickListener
(
v
->
mDialog
.
dismiss
());
Window
window
=
mDialog
.
getWindow
();
WindowManager
.
LayoutParams
wl
=
window
.
getAttributes
();
wl
.
width
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
;
wl
.
height
=
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
;
mDialog
.
onWindowAttributesChanged
(
wl
);
mDialog
.
setCanceledOnTouchOutside
(
false
);
mDialog
.
show
();
}
public
void
toDev
()
{
AppUtils
.
changeToDevEnv
();
AppUtils
.
exitApp
();
}
public
void
toUat
()
{
AppUtils
.
changeToUatEnv
();
AppUtils
.
exitApp
();
}
public
void
toRelease
()
{
AppUtils
.
changeToReleaseEnv
();
AppUtils
.
exitApp
();
}
}
baseSDK/src/main/res/drawable-xhdpi/icon_dayu_logo.jpg
deleted
100644 → 0
View file @
467dccfd
29.4 KB
baseSDK/src/main/res/drawable-xxhdpi/icon_app_logo.png
View file @
35dcd8a2
24.5 KB
|
W:
|
H:
85.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
baseSDK/src/main/res/drawable-xxhdpi/icon_dayu_logo.jpg
View file @
35dcd8a2
47.4 KB
|
W:
|
H:
27.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
baseSDK/src/main/res/drawable-xxxhdpi/icon_dayu_logo.jpg
deleted
100644 → 0
View file @
467dccfd
69.2 KB
baseSDK/src/main/res/layout/activity_camera.xml
View file @
35dcd8a2
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
android:id=
"@+id/jcameraview"
android:id=
"@+id/jcameraview"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
app:duration_max=
"
18
0000"
app:duration_max=
"
30
0000"
app:iconLeft=
"@drawable/ic_back"
app:iconLeft=
"@drawable/ic_back"
app:iconMargin=
"20dp"
app:iconMargin=
"20dp"
app:iconRight=
"@null"
app:iconRight=
"@null"
...
...
baseSDK/src/main/res/layout/dialog_change_env.xml
0 → 100644
View file @
35dcd8a2
<?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"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"30dp"
android:layout_centerInParent=
"true"
android:background=
"@drawable/item_shape"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_dev"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:gravity=
"center"
android:text=
"Dev 环境"
android:textColor=
"@color/common_text_color"
android:textSize=
"15sp"
/>
<TextView
style=
"@style/line"
/>
<TextView
android:id=
"@+id/tv_uat"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:gravity=
"center"
android:text=
"UAT 环境"
android:textColor=
"@color/common_text_color"
android:textSize=
"15sp"
/>
<TextView
style=
"@style/line"
/>
<TextView
android:id=
"@+id/tv_release"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:gravity=
"center"
android:text=
"正式环境"
android:textColor=
"@color/common_text_color"
android:textSize=
"15sp"
/>
<TextView
style=
"@style/line"
/>
<TextView
android:background=
"@drawable/btn_blue_commom"
android:layout_margin=
"30dp"
android:id=
"@+id/tv_cancle"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:gravity=
"center"
android:text=
"取消"
android:textColor=
"@color/white"
android:textSize=
"15sp"
/>
</LinearLayout>
</RelativeLayout>
baseSDK/src/main/res/values/colors.xml
View file @
35dcd8a2
...
@@ -41,6 +41,8 @@
...
@@ -41,6 +41,8 @@
<color
name=
"common_text_color"
>
#3a3a3a
</color>
<color
name=
"common_text_color"
>
#3a3a3a
</color>
<color
name=
"editext_color"
>
#FFB6B6B6
</color>
<color
name=
"editext_color"
>
#FFB6B6B6
</color>
<color
name=
"view_color"
>
#E6E6E6
</color>
<color
name=
"view_color"
>
#E6E6E6
</color>
<color
name=
"dark_red"
>
#a30014
</color>
<color
name=
"blue_register"
>
#FF0e15fb
</color>
<color
name=
"blue_register"
>
#FF0e15fb
</color>
...
...
baseSDK/src/main/res/values/dimens.xml
View file @
35dcd8a2
...
@@ -119,6 +119,8 @@
...
@@ -119,6 +119,8 @@
<dimen
name=
"dp_23"
>
23dp
</dimen>
<dimen
name=
"dp_23"
>
23dp
</dimen>
<dimen
name=
"dp_sale_step"
>
1dp
</dimen>
<dimen
name=
"dp_sale_step"
>
1dp
</dimen>
<dimen
name=
"common_btn_radius"
>
5dp
</dimen>
</resources>
</resources>
\ No newline at end of file
baseSDK/src/main/res/values/strings.xml
View file @
35dcd8a2
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
<string
name=
"is_loading"
>
正在加载
</string>
<string
name=
"is_loading"
>
正在加载
</string>
<string
name=
"have_no_data"
>
没有更多数据
</string>
<string
name=
"have_no_data"
>
没有更多数据
</string>
<string
name=
"try_load_again"
>
加载失败(再次上拉试试~)
</string>
<string
name=
"try_load_again"
>
加载失败(再次上拉试试~)
</string>
<string
name=
"enviroment_debug"
>
测试环境%1
$s
</string>
<string
name=
"enviroment_debug"
>
Dev
环境%1$s
</string>
<string
name=
"enviroment_uat"
>
UAT环境%1$s
</string>
<string
name=
"enviroment_uat"
>
UAT环境%1$s
</string>
<string
name=
"enviroment_demons"
>
演示环境%1$s
</string>
<string
name=
"enviroment_demons"
>
演示环境%1$s
</string>
<string
name=
"account_notice"
>
您的账号在另一台设备中登录
</string>
<string
name=
"account_notice"
>
您的账号在另一台设备中登录
</string>
...
@@ -580,6 +580,7 @@
...
@@ -580,6 +580,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=
"register_login"
>
注册登录
</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>
...
@@ -913,7 +914,8 @@ C) åœ¨ç”²æ–¹ä½¿ç”¨å¤§é±¼å¹³å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
...
@@ -913,7 +914,8 @@ C) åœ¨ç”²æ–¹ä½¿ç”¨å¤§é±¼å¹³å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"invate_person_count"
>
邀请人数
</string>
<string
name=
"invate_person_count"
>
邀请人数
</string>
<string
name=
"reward_total_money"
>
奖励总额
</string>
<string
name=
"reward_total_money"
>
奖励总额
</string>
<string
name=
"be_rewarded_count"
>
获奖次数
</string>
<string
name=
"be_rewarded_count"
>
获奖次数
</string>
<string
name=
"invate_new_reward"
>
邀请新人有奖
</string>
<string
name=
"invate_new_reward"
>
邀请师傅有奖
</string>
<string
name=
"invite_record"
>
邀请记录
</string>
<string
name=
"user_platform_reward"
>
平台奖励
</string>
<string
name=
"user_platform_reward"
>
平台奖励
</string>
<string
name=
"user_service_income"
>
服务收入
</string>
<string
name=
"user_service_income"
>
服务收入
</string>
<string
name=
"user_service_record"
>
服务业绩
</string>
<string
name=
"user_service_record"
>
服务业绩
</string>
...
@@ -935,6 +937,7 @@ C) åœ¨ç”²æ–¹ä½¿ç”¨å¤§é±¼å¹³å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
...
@@ -935,6 +937,7 @@ C) åœ¨ç”²æ–¹ä½¿ç”¨å¤§é±¼å¹³å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"user_bank_holer_hint"
>
请输入开户人姓名
</string>
<string
name=
"user_bank_holer_hint"
>
请输入开户人姓名
</string>
<string
name=
"user_addr_info"
>
快递地址信息
</string>
<string
name=
"user_addr_info"
>
快递地址信息
</string>
<string
name=
"user_receiver_addr"
>
收件地址:
</string>
<string
name=
"user_receiver_addr"
>
收件地址:
</string>
<string
name=
"user_receiver_addr2"
>
接单/收货地址:
</string>
<string
name=
"user_receiver_name"
>
收件人姓名:
</string>
<string
name=
"user_receiver_name"
>
收件人姓名:
</string>
<string
name=
"user_receiver_phone"
>
收件人手机号:
</string>
<string
name=
"user_receiver_phone"
>
收件人手机号:
</string>
<string
name=
"edit_str"
>
编辑
</string>
<string
name=
"edit_str"
>
编辑
</string>
...
@@ -1015,6 +1018,8 @@ C) åœ¨ç”²æ–¹ä½¿ç”¨å¤§é±¼å¹³å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
...
@@ -1015,6 +1018,8 @@ C) åœ¨ç”²æ–¹ä½¿ç”¨å¤§é±¼å¹³å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"moment_take_video"
>
点击开始录制
</string>
<string
name=
"moment_take_video"
>
点击开始录制
</string>
<string
name=
"moment_permission_4"
>
应用需要录音权限来拍摄视频
</string>
<string
name=
"moment_permission_4"
>
应用需要录音权限来拍摄视频
</string>
<string
name=
"request_permission_failure"
>
获取权限失败
</string>
<string
name=
"request_permission_failure"
>
获取权限失败
</string>
<string
name=
"copy_success"
>
复制成功
</string>
</resources>
</resources>
baseSDK/src/main/res/values/styles.xml
View file @
35dcd8a2
...
@@ -360,4 +360,27 @@
...
@@ -360,4 +360,27 @@
<item
name=
"colorControlNormal"
>
@color/tv_cl
</item>
<item
name=
"colorControlNormal"
>
@color/tv_cl
</item>
<item
name=
"colorControlActivated"
>
@color/bg_button
</item>
<item
name=
"colorControlActivated"
>
@color/bg_button
</item>
</style>
</style>
<style
name=
"tv_btn"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:gravity"
>
center
</item>
<item
name=
"android:textSize"
>
14sp
</item>
<item
name=
"android:textColor"
>
@color/white
</item>
</style>
<style
name=
"ll_horizontal"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:orientation"
>
horizontal
</item>
<item
name=
"android:gravity"
>
center_vertical
</item>
</style>
<style
name=
"fill_horizontal"
>
<item
name=
"android:layout_width"
>
0dp
</item>
<item
name=
"android:layout_height"
>
1dp
</item>
<item
name=
"android:layout_weight"
>
1
</item>
</style>
</resources>
</resources>
build.gradle
View file @
35dcd8a2
...
@@ -5,8 +5,8 @@ buildscript {
...
@@ -5,8 +5,8 @@ buildscript {
ext
.
build_tools_version
=
"27.0.3"
ext
.
build_tools_version
=
"27.0.3"
ext
.
min_sdk_version
=
16
ext
.
min_sdk_version
=
16
ext
.
target_sdk_version
=
26
ext
.
target_sdk_version
=
26
ext
.
version_code
=
25
0
ext
.
version_code
=
25
5
ext
.
verson_name
=
"2.5.
0
"
ext
.
verson_name
=
"2.5.
5
"
ext
.
gradle_version
=
'3.1.4'
ext
.
gradle_version
=
'3.1.4'
ext
.
isReleaseMinify
=
false
ext
.
isReleaseMinify
=
false
ext
.
isDebugMinify
=
false
ext
.
isDebugMinify
=
false
...
...
learnCenter/src/main/java/com/dayu/learncenter/adapter/LearnAdapter.java
View file @
35dcd8a2
...
@@ -11,6 +11,7 @@ import com.dayu.utils.CommonUtils;
...
@@ -11,6 +11,7 @@ import com.dayu.utils.CommonUtils;
import
com.dayu.utils.LogUtils
;
import
com.dayu.utils.LogUtils
;
import
com.dayu.widgets.JZMediaIjk
;
import
com.dayu.widgets.JZMediaIjk
;
import
com.dayu.widgets.MyJzvdStd
;
import
com.dayu.widgets.MyJzvdStd
;
import
com.umeng.analytics.MobclickAgent
;
import
cn.jzvd.JzvdStd
;
import
cn.jzvd.JzvdStd
;
...
@@ -47,6 +48,7 @@ public class LearnAdapter extends CoreAdapter<CommonLearnBean, ItemCommonLearnBi
...
@@ -47,6 +48,7 @@ public class LearnAdapter extends CoreAdapter<CommonLearnBean, ItemCommonLearnBi
holder
.
jzVideo
.
setPlayCallBack
(
new
MyJzvdStd
.
PlayCallBack
()
{
holder
.
jzVideo
.
setPlayCallBack
(
new
MyJzvdStd
.
PlayCallBack
()
{
@Override
@Override
public
void
onstart
()
{
public
void
onstart
()
{
MobclickAgent
.
onEvent
(
mContext
,
"look_learningVideo"
);
if
(
item
.
getPlayStatus
()
==
2
&&
item
.
getProgressTimes
()
>
0
)
{
if
(
item
.
getPlayStatus
()
==
2
&&
item
.
getProgressTimes
()
>
0
)
{
holder
.
jzVideo
.
seekToInAdvance
=
item
.
getProgressTimes
();
holder
.
jzVideo
.
seekToInAdvance
=
item
.
getProgressTimes
();
}
}
...
...
learnCenter/src/main/java/com/dayu/learncenter/ui/activity/CourseDetailActivity.java
View file @
35dcd8a2
...
@@ -24,6 +24,7 @@ import com.dayu.utils.ProgressUtil;
...
@@ -24,6 +24,7 @@ import com.dayu.utils.ProgressUtil;
import
com.dayu.widgets.JZMediaIjk
;
import
com.dayu.widgets.JZMediaIjk
;
import
com.dayu.widgets.KeyboardStateObserver
;
import
com.dayu.widgets.KeyboardStateObserver
;
import
com.dayu.widgets.MyJzvdStd
;
import
com.dayu.widgets.MyJzvdStd
;
import
com.umeng.analytics.MobclickAgent
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -84,6 +85,8 @@ public class CourseDetailActivity extends BaseActivity<SImplePresenter, Activity
...
@@ -84,6 +85,8 @@ public class CourseDetailActivity extends BaseActivity<SImplePresenter, Activity
private
void
pointVideo
()
{
private
void
pointVideo
()
{
showDialog
();
showDialog
();
int
type
=
isPointed
?
2
:
1
;
int
type
=
isPointed
?
2
:
1
;
if
(
type
==
1
)
MobclickAgent
.
onEvent
(
mActivity
,
"like_learningClass"
);
Api
.
getService
(
LearnService
.
class
).
pointCourse
(
courseId
,
mUserId
,
type
).
compose
(
Api
.
applySchedulers
())
Api
.
getService
(
LearnService
.
class
).
pointCourse
(
courseId
,
mUserId
,
type
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
success
->
{
.
subscribe
(
mPresenter
.
baseObserver
(
success
->
{
if
(
success
)
{
if
(
success
)
{
...
@@ -219,6 +222,7 @@ public class CourseDetailActivity extends BaseActivity<SImplePresenter, Activity
...
@@ -219,6 +222,7 @@ public class CourseDetailActivity extends BaseActivity<SImplePresenter, Activity
//发送
//发送
mBind
.
btnSend
.
setOnClickListener
(
v
->
{
mBind
.
btnSend
.
setOnClickListener
(
v
->
{
MobclickAgent
.
onEvent
(
mActivity
,
"leaveMessage_learningClass"
);
String
content
=
mBind
.
edtComment
.
getText
().
toString
();
String
content
=
mBind
.
edtComment
.
getText
().
toString
();
if
(
TextUtils
.
isEmpty
(
content
))
return
;
if
(
TextUtils
.
isEmpty
(
content
))
return
;
ProgressUtil
.
startLoad
(
mActivity
);
ProgressUtil
.
startLoad
(
mActivity
);
...
...
learnCenter/src/main/java/com/dayu/learncenter/ui/activity/PubCourseActivity.java
View file @
35dcd8a2
...
@@ -28,6 +28,7 @@ import com.dayu.widgets.TextDialog;
...
@@ -28,6 +28,7 @@ import com.dayu.widgets.TextDialog;
import
com.luck.picture.lib.PictureSelector
;
import
com.luck.picture.lib.PictureSelector
;
import
com.luck.picture.lib.config.PictureConfig
;
import
com.luck.picture.lib.config.PictureConfig
;
import
com.luck.picture.lib.entity.LocalMedia
;
import
com.luck.picture.lib.entity.LocalMedia
;
import
com.umeng.analytics.MobclickAgent
;
import
java.io.File
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -105,7 +106,7 @@ public class PubCourseActivity extends BaseActivity<PubCoursePresenter, Activity
...
@@ -105,7 +106,7 @@ public class PubCourseActivity extends BaseActivity<PubCoursePresenter, Activity
if
(
pos
==
0
)
{
if
(
pos
==
0
)
{
recordVideo
();
recordVideo
();
}
else
{
}
else
{
MediaChooseUtils
.
chooseSigleVideo
(
this
,
18
1
);
MediaChooseUtils
.
chooseSigleVideo
(
this
,
30
1
);
}
}
});
});
}
}
...
@@ -136,6 +137,7 @@ public class PubCourseActivity extends BaseActivity<PubCoursePresenter, Activity
...
@@ -136,6 +137,7 @@ public class PubCourseActivity extends BaseActivity<PubCoursePresenter, Activity
protected
void
onConfimClick
()
{
protected
void
onConfimClick
()
{
if
(
canSubmit
())
{
if
(
canSubmit
())
{
MobclickAgent
.
onEvent
(
mActivity
,
"upload_learningVideo"
);
Jzvd
.
goOnPlayOnPause
();
Jzvd
.
goOnPlayOnPause
();
PubCourseData
pubData
=
new
PubCourseData
(
mUserId
,
theme
,
desc
,
mUserInfo
.
getAccountName
()
PubCourseData
pubData
=
new
PubCourseData
(
mUserId
,
theme
,
desc
,
mUserInfo
.
getAccountName
()
,
CommonUtils
.
getVideoLength
(
videoPath
));
,
CommonUtils
.
getVideoLength
(
videoPath
));
...
...
locationComponent/build.gradle
View file @
35dcd8a2
...
@@ -30,4 +30,5 @@ dependencies {
...
@@ -30,4 +30,5 @@ dependencies {
androidTestImplementation
'com.android.support.test:runner:1.0.2'
androidTestImplementation
'com.android.support.test:runner:1.0.2'
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.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_2DMap_V5.2.0_20170627.jar'
)
api
files
(
'libs/AMap_Search_V7.3.0_20200331.jar'
)
}
}
locationComponent/src/main/AndroidManifest.xml
View file @
35dcd8a2
...
@@ -8,5 +8,8 @@
...
@@ -8,5 +8,8 @@
<activity
<activity
android:name=
".base.BaseMapActivity"
android:name=
".base.BaseMapActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".base.InputtipsActivity"
android:screenOrientation=
"portrait"
/>
</application>
</application>
</manifest>
</manifest>
locationComponent/src/main/java/com/dayu/location/base/InputtipsActivity.java
0 → 100644
View file @
35dcd8a2
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 @
35dcd8a2
<?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 @
35dcd8a2
<?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/java/com/dayu/order/presenter/receivingorder/ReceivingPresenter.java
View file @
35dcd8a2
...
@@ -62,6 +62,7 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
...
@@ -62,6 +62,7 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
mView
.
showDialog
();
mView
.
showDialog
();
OrderApiFactory
.
receiveOrder
(
orders
,
engineer
).
subscribe
(
baseObserver
(
OrderApiFactory
.
receiveOrder
(
orders
,
engineer
).
subscribe
(
baseObserver
(
aBoolean
->
{
aBoolean
->
{
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"get_serviceOrder"
);
mView
.
showToast
(
R
.
string
.
receive_order_success
);
mView
.
showToast
(
R
.
string
.
receive_order_success
);
receiveOrderSuccess
();
receiveOrderSuccess
();
},
responeThrowable
->
{
},
responeThrowable
->
{
...
...
orderCenter/src/main/java/com/dayu/order/presenter/subcribeTime/SubcribeTimePresenter.java
View file @
35dcd8a2
...
@@ -5,6 +5,7 @@ import android.os.Bundle;
...
@@ -5,6 +5,7 @@ import android.os.Bundle;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.OrderApiFactory
;
...
@@ -17,6 +18,7 @@ import com.dayu.utils.ProgressUtil;
...
@@ -17,6 +18,7 @@ import com.dayu.utils.ProgressUtil;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UtilsDate
;
import
com.dayu.utils.UtilsDate
;
import
com.dayu.utils.UtilsUserAccountMatcher
;
import
com.dayu.utils.UtilsUserAccountMatcher
;
import
com.umeng.analytics.MobclickAgent
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -109,6 +111,7 @@ public class SubcribeTimePresenter extends SubcribeContract.Presenter {
...
@@ -109,6 +111,7 @@ public class SubcribeTimePresenter extends SubcribeContract.Presenter {
OrderApiFactory
.
subcriceTime
(
orderId
,
doorTime
,
doorComment
).
subscribe
(
baseObserver
(
aBoolean
->
{
OrderApiFactory
.
subcriceTime
(
orderId
,
doorTime
,
doorComment
).
subscribe
(
baseObserver
(
aBoolean
->
{
mView
.
showToast
(
R
.
string
.
order_commite_success
);
mView
.
showToast
(
R
.
string
.
order_commite_success
);
if
(
mState
==
SUBCRIBE_TIME
)
{
if
(
mState
==
SUBCRIBE_TIME
)
{
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"handle_serviceOrder"
);
mView
.
showToast
(
R
.
string
.
subcribe_time_success
);
mView
.
showToast
(
R
.
string
.
subcribe_time_success
);
EventBus
.
getDefault
().
post
(
new
RefreshTab
(
1
));
EventBus
.
getDefault
().
post
(
new
RefreshTab
(
1
));
mDisposable
=
Observable
.
timer
(
500
,
TimeUnit
.
MILLISECONDS
).
subscribe
(
aLong
->
{
mDisposable
=
Observable
.
timer
(
500
,
TimeUnit
.
MILLISECONDS
).
subscribe
(
aLong
->
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/fragment/MultiOrderDetailFragment.java
View file @
35dcd8a2
...
@@ -226,6 +226,7 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag
...
@@ -226,6 +226,7 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag
showDialog
();
showDialog
();
OrderApiFactory
.
receiveOrder
(
orderId
,
mUserId
).
subscribe
(
mPresenter
.
baseObserver
(
OrderApiFactory
.
receiveOrder
(
orderId
,
mUserId
).
subscribe
(
mPresenter
.
baseObserver
(
aBoolean
->
{
aBoolean
->
{
MobclickAgent
.
onEvent
(
mActivity
,
"get_serviceOrder"
);
EventBus
.
getDefault
().
post
(
new
TakeOrderSuccessEvent
());
EventBus
.
getDefault
().
post
(
new
TakeOrderSuccessEvent
());
ToastUtils
.
showLongToast
(
R
.
string
.
take_oreder_success_tosee
);
ToastUtils
.
showLongToast
(
R
.
string
.
take_oreder_success_tosee
);
mBind
.
tvTakeOrder
.
setVisibility
(
View
.
GONE
);
mBind
.
tvTakeOrder
.
setVisibility
(
View
.
GONE
);
...
...
orderCenter/src/main/res/layout/activity_subscribe_time.xml
View file @
35dcd8a2
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
android:background=
"@drawable/subscribe_time_shape"
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:gravity=
"top"
android:hint=
"@string/tv_time_text_edit_text"
android:hint=
"@string/tv_time_text_edit_text"
android:inputType=
"text"
android:inputType=
"text
MultiLine
"
android:maxLength=
"200"
android:maxLength=
"200"
android:paddingLeft=
"@dimen/dp_13"
android:paddingLeft=
"@dimen/dp_13"
android:paddingTop=
"@dimen/dp_11"
android:paddingTop=
"@dimen/dp_11"
...
...
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/ProductInstructionFragment.java
View file @
35dcd8a2
...
@@ -83,6 +83,7 @@ public class ProductInstructionFragment extends BaseFragment<SImplePresenter, Fr
...
@@ -83,6 +83,7 @@ public class ProductInstructionFragment extends BaseFragment<SImplePresenter, Fr
if
(
mDetail
!=
null
){
if
(
mDetail
!=
null
){
CommonUtils
.
shareProgram
(
mActivity
,
mDetail
.
getFirstUrl
(),
mDetail
.
getGoodsModel
(),
CommonUtils
.
shareProgram
(
mActivity
,
mDetail
.
getFirstUrl
(),
mDetail
.
getGoodsModel
(),
mDetail
.
getBrief
(),
mUserId
,
mDetail
.
getId
(),
SHARE_MEDIA
.
WEIXIN
,
null
);
mDetail
.
getBrief
(),
mUserId
,
mDetail
.
getId
(),
SHARE_MEDIA
.
WEIXIN
,
null
);
MobclickAgent
.
onEvent
(
mActivity
,
"share_goods"
);
}
}
}
}
...
...
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleProductFragment.java
View file @
35dcd8a2
...
@@ -185,6 +185,7 @@ public class SaleProductFragment extends BaseFragment<SaleProductPresent, Fragme
...
@@ -185,6 +185,7 @@ public class SaleProductFragment extends BaseFragment<SaleProductPresent, Fragme
@Override
@Override
public
void
share
(
ProductListBean
item
)
{
public
void
share
(
ProductListBean
item
)
{
MobclickAgent
.
onEvent
(
mActivity
,
"share_goods"
);
CommonUtils
.
shareProgram
(
mActivity
,
item
.
getFirstUrl
(),
item
.
getGoodsModel
(),
CommonUtils
.
shareProgram
(
mActivity
,
item
.
getFirstUrl
(),
item
.
getGoodsModel
(),
item
.
getBrief
(),
mUserId
,
item
.
getId
(),
SHARE_MEDIA
.
WEIXIN
,
null
);
item
.
getBrief
(),
mUserId
,
item
.
getId
(),
SHARE_MEDIA
.
WEIXIN
,
null
);
}
}
...
...
userCenter/src/main/java/com/dayu/usercenter/adapter/ServiceWechatAdapter.java
0 → 100644
View file @
35dcd8a2
package
com
.
dayu
.
usercenter
.
adapter
;
import
android.support.annotation.Nullable
;
import
android.widget.TextView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.usercenter.R
;
import
com.dayu.utils.CommonUtils
;
import
java.util.List
;
public
class
ServiceWechatAdapter
extends
BaseQuickAdapter
<
String
,
BaseViewHolder
>
{
public
ServiceWechatAdapter
(
@Nullable
List
<
String
>
data
)
{
super
(
R
.
layout
.
item_service_wechat
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
helper
.
setText
(
R
.
id
.
tv_desc
,
"客服"
+(
mData
.
indexOf
(
item
)+
1
)+
":"
);
TextView
tvPhone
=
helper
.
getView
(
R
.
id
.
tv_phone
);
TextView
tvCopy
=
helper
.
getView
(
R
.
id
.
tv_copy
);
tvPhone
.
setText
(
item
);
tvPhone
.
setOnClickListener
(
view
->
CommonUtils
.
dialPhone
(
item
));
tvCopy
.
setOnClickListener
(
view
->
CommonUtils
.
copyText
(
mContext
,
item
));
}
}
userCenter/src/main/java/com/dayu/usercenter/api/UserService2.java
View file @
35dcd8a2
...
@@ -10,6 +10,7 @@ import com.dayu.usercenter.model.bean.BusinessSceneBean;
...
@@ -10,6 +10,7 @@ import com.dayu.usercenter.model.bean.BusinessSceneBean;
import
com.dayu.usercenter.model.EditBankData
;
import
com.dayu.usercenter.model.EditBankData
;
import
com.dayu.usercenter.model.bean.CommonRecordListBean
;
import
com.dayu.usercenter.model.bean.CommonRecordListBean
;
import
com.dayu.usercenter.model.bean.GlobelRateBean
;
import
com.dayu.usercenter.model.bean.GlobelRateBean
;
import
com.dayu.usercenter.model.bean.InviteRecordBean
;
import
com.dayu.usercenter.model.bean.SaleArriveListBean
;
import
com.dayu.usercenter.model.bean.SaleArriveListBean
;
import
com.dayu.usercenter.model.bean.SaleRecordBean
;
import
com.dayu.usercenter.model.bean.SaleRecordBean
;
import
com.dayu.usercenter.model.bean.SaleRecordListBean
;
import
com.dayu.usercenter.model.bean.SaleRecordListBean
;
...
@@ -66,7 +67,6 @@ public interface UserService2 {
...
@@ -66,7 +67,6 @@ public interface UserService2 {
Observable
<
BaseResponse
<
Boolean
>>
updateBankInfo
(
@Body
EditBankData
data
);
Observable
<
BaseResponse
<
Boolean
>>
updateBankInfo
(
@Body
EditBankData
data
);
/**
/**
* 设置地址信息
* 设置地址信息
*
*
...
@@ -109,11 +109,12 @@ public interface UserService2 {
...
@@ -109,11 +109,12 @@ public interface UserService2 {
/**
/**
* 服务产品类型
* 服务产品类型
* @param status 1启用 2禁用
*
*
* @return
* @return
*/
*/
@GET
(
Constants
.
API_7300
+
"/label/list"
)
@GET
(
Constants
.
API_7300
+
"/label/list"
)
Observable
<
BaseResponse
<
List
<
ServiceTypeBean
>>>
getServiceType
();
Observable
<
BaseResponse
<
List
<
ServiceTypeBean
>>>
getServiceType
(
@Query
(
"status"
)
int
status
);
/**
/**
* 服务产品类型
* 服务产品类型
...
@@ -221,8 +222,9 @@ public interface UserService2 {
...
@@ -221,8 +222,9 @@ public interface UserService2 {
/**
/**
* 奖励明细
* 奖励明细
** @param type 1工程师 2小程序用户
* * @param type 1工程师 2小程序用户
* @param rewardType 1:销售 2:服务 3:邀请 4:平台
*
* @param rewardType 1:销售 2:服务 3:邀请 4:平台
* @return
* @return
*/
*/
@GET
(
Constants
.
API_7800
+
"/payAccountRewardItem"
)
@GET
(
Constants
.
API_7800
+
"/payAccountRewardItem"
)
...
@@ -234,11 +236,30 @@ public interface UserService2 {
...
@@ -234,11 +236,30 @@ public interface UserService2 {
/**
/**
* 用户页-现金到账,销售奖励,服务收入,邀请奖励,平台奖励
* 用户页-现金到账,销售奖励,服务收入,邀请奖励,平台奖励
*
* @param accountId
* @param accountId
* @return
* @return
*/
*/
@GET
(
Constants
.
API_7800
+
"/payAccountRewardItem/engineerIncome/accountId/{accountId}"
)
@GET
(
Constants
.
API_7800
+
"/payAccountRewardItem/engineerIncome/accountId/{accountId}"
)
Observable
<
BaseResponse
<
UserIncomeBean
>>
getIncoms
(
@Path
(
"accountId"
)
int
accountId
);
Observable
<
BaseResponse
<
UserIncomeBean
>>
getIncoms
(
@Path
(
"accountId"
)
int
accountId
);
/**
* 获取客服微信
*
* @return
*/
@GET
(
Constants
.
API_7100
+
"/account/dynamic"
)
Observable
<
BaseResponse
<
List
<
String
>>>
getServiceWechat
();
/**
* 邀请记录
*
* @return
*/
@GET
(
Constants
.
API_7100
+
"/inviters/records"
)
Observable
<
BaseResponse
<
BasePageBean
<
InviteRecordBean
>>>
getInviteRecord
(
@Query
(
"inviterId"
)
int
id
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
);
}
}
userCenter/src/main/java/com/dayu/usercenter/model/bean/InviteRecordBean.java
0 → 100644
View file @
35dcd8a2
package
com
.
dayu
.
usercenter
.
model
.
bean
;
public
class
InviteRecordBean
{
/**
* id : 2
* invitedId : 1473
* invitedName : 大的很
* inviterId : 640
* inviterName : 孙路路
* createTime : 2020-04-09 14:37:38
* mobile : 15033662222
* realName : 大的很
*/
private
int
id
;
private
int
invitedId
;
private
String
invitedName
;
private
int
inviterId
;
private
String
inviterName
;
private
String
createTime
;
private
String
mobile
;
private
String
realName
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getInvitedId
()
{
return
invitedId
;
}
public
void
setInvitedId
(
int
invitedId
)
{
this
.
invitedId
=
invitedId
;
}
public
String
getInvitedName
()
{
return
invitedName
;
}
public
void
setInvitedName
(
String
invitedName
)
{
this
.
invitedName
=
invitedName
;
}
public
int
getInviterId
()
{
return
inviterId
;
}
public
void
setInviterId
(
int
inviterId
)
{
this
.
inviterId
=
inviterId
;
}
public
String
getInviterName
()
{
return
inviterName
;
}
public
void
setInviterName
(
String
inviterName
)
{
this
.
inviterName
=
inviterName
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getMobile
()
{
return
mobile
;
}
public
void
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobile
;
}
public
String
getRealName
()
{
return
realName
;
}
public
void
setRealName
(
String
realName
)
{
this
.
realName
=
realName
;
}
}
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserContract.java
View file @
35dcd8a2
...
@@ -8,6 +8,8 @@ import com.dayu.usercenter.data.protocol.OrderRecord;
...
@@ -8,6 +8,8 @@ import com.dayu.usercenter.data.protocol.OrderRecord;
import
com.dayu.usercenter.data.protocol.TodayAchievement
;
import
com.dayu.usercenter.data.protocol.TodayAchievement
;
import
com.dayu.usercenter.model.bean.UserIncomeBean
;
import
com.dayu.usercenter.model.bean.UserIncomeBean
;
import
java.util.List
;
/**
/**
* Created by luo on 2016/8/4.
* Created by luo on 2016/8/4.
*/
*/
...
@@ -28,6 +30,8 @@ public interface HomeUserContract {
...
@@ -28,6 +30,8 @@ public interface HomeUserContract {
void
toCommonRecord
(
int
type
);
void
toCommonRecord
(
int
type
);
void
copyWechat
(
String
wechatNum
);
/**
/**
* 跳转到设置.
* 跳转到设置.
...
@@ -38,6 +42,8 @@ public interface HomeUserContract {
...
@@ -38,6 +42,8 @@ public interface HomeUserContract {
void
setIncomData
(
UserIncomeBean
data
);
void
setIncomData
(
UserIncomeBean
data
);
void
setWechatData
(
List
<
String
>
wechats
);
}
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserPresenter.java
View file @
35dcd8a2
...
@@ -10,8 +10,10 @@ import com.dayu.usercenter.api.UserService2;
...
@@ -10,8 +10,10 @@ import com.dayu.usercenter.api.UserService2;
import
com.dayu.usercenter.ui.activity2.BusinessTypeActivity
;
import
com.dayu.usercenter.ui.activity2.BusinessTypeActivity
;
import
com.dayu.usercenter.ui.activity2.CashRecordActivity
;
import
com.dayu.usercenter.ui.activity2.CashRecordActivity
;
import
com.dayu.usercenter.ui.activity2.InvateNewActivity
;
import
com.dayu.usercenter.ui.activity2.InvateNewActivity
;
import
com.dayu.usercenter.ui.activity2.InviteRecordActivity
;
import
com.dayu.usercenter.ui.activity2.UserInfoActivity
;
import
com.dayu.usercenter.ui.activity2.UserInfoActivity
;
import
com.dayu.usercenter.ui.activity2.UserLicenceActivity
;
import
com.dayu.usercenter.ui.activity2.UserLicenceActivity
;
import
com.dayu.utils.CommonUtils
;
/**
/**
* Created by luofan
* Created by luofan
...
@@ -43,8 +45,10 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
...
@@ -43,8 +45,10 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
getUserInfo
();
getUserInfo
();
getRecordInfo
();
getRecordInfo
();
getIncomData
();
getIncomData
();
getWechtData
();
}
}
public
void
getUserInfo
()
{
public
void
getUserInfo
()
{
UserApiFactory
.
getEngineerInfo
(
mUid
).
subscribe
(
baseObserver
(
data
->{
UserApiFactory
.
getEngineerInfo
(
mUid
).
subscribe
(
baseObserver
(
data
->{
mInviteCode
=
data
.
getInvitationCode
();
mInviteCode
=
data
.
getInvitationCode
();
...
@@ -64,6 +68,10 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
...
@@ -64,6 +68,10 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
.
subscribe
(
baseObserver
(
data
->
mView
.
setIncomData
(
data
)));
.
subscribe
(
baseObserver
(
data
->
mView
.
setIncomData
(
data
)));
}
}
private
void
getWechtData
()
{
Api
.
getService
(
UserService2
.
class
).
getServiceWechat
().
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
wechats
->
mView
.
setWechatData
(
wechats
)));
}
@Override
@Override
public
void
dumpToSetting
()
{
public
void
dumpToSetting
()
{
...
@@ -92,6 +100,17 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
...
@@ -92,6 +100,17 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
public
void
dumpToInvate
()
{
public
void
dumpToInvate
()
{
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
INVITE_CODE
,
mInviteCode
);
bundle
.
putString
(
Constants
.
INVITE_CODE
,
mInviteCode
);
bundle
.
putInt
(
Constants
.
TYPE
,
2
);
mView
.
startActivity
(
InvateNewActivity
.
class
,
bundle
);
}
public
void
toInviteRecord
()
{
mView
.
startActivity
(
InviteRecordActivity
.
class
);
}
public
void
invateProvider
()
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
INVITE_CODE
,
mInviteCode
);
bundle
.
putInt
(
Constants
.
TYPE
,
1
);
mView
.
startActivity
(
InvateNewActivity
.
class
,
bundle
);
mView
.
startActivity
(
InvateNewActivity
.
class
,
bundle
);
}
}
...
@@ -102,6 +121,13 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
...
@@ -102,6 +121,13 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
public
void
toCommonRecord
(
int
type
)
{
public
void
toCommonRecord
(
int
type
)
{
mView
.
toCommonRecord
(
type
);
mView
.
toCommonRecord
(
type
);
}
}
public
void
copy
(
String
str
)
{
mView
.
copyWechat
(
str
);
}
public
void
dial
(
String
str
)
{
CommonUtils
.
dialPhone
(
str
);
}
}
}
userCenter/src/main/java/com/dayu/usercenter/presenter/pwlogin/PwLoginPresenter.java
View file @
35dcd8a2
...
@@ -145,25 +145,35 @@ public class PwLoginPresenter extends PwLoginContract.Presenter {
...
@@ -145,25 +145,35 @@ public class PwLoginPresenter extends PwLoginContract.Presenter {
@Override
@Override
public
void
dumpAndSave
(
UserInfo
info
)
{
public
void
dumpAndSave
(
UserInfo
info
)
{
LogUtils
.
e
(
"HxAccount: "
+
info
.
getHxAccount
());
LogUtils
.
e
(
"HxAccount: "
+
info
.
getHxAccount
());
switch
(
UserManager
.
getInstance
().
getRole
(
info
))
{
if
(
info
.
getRoles
()
!=
null
&&
info
.
getRoles
().
contains
(
2
)){
// case Constants.MANAGER:
info
.
setSiteId
(-
1
);
// UserManager.getInstance().saveUser(info);
info
.
setMobile
(
phoneNume
.
get
());
// loginHx(info.getHxAccount(), info.getHxPwd());
UserManager
.
getInstance
().
saveUser
(
info
);
// getStations(Integer.parseInt(info.getAccountId()));
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
// break;
}
else
{
case
Constants
.
ENGINEER
:
ToastUtils
.
showShortToast
(
UIUtils
.
getString
(
R
.
string
.
login_faile
));
case
Constants
.
MANAGER_ENGINEER
:
if
(
info
.
getDetectStatus
()
==
1
||
info
.
getDetectStatus
()
==
2
||
info
.
getDetectStatus
()
==
3
)
{
UserManager
.
getInstance
().
saveUser
(
info
);
getSiteId
(
info
);
}
else
{
ToastUtils
.
showShortToast
(
UIUtils
.
getString
(
R
.
string
.
login_faile
));
}
break
;
default
:
ToastUtils
.
showShortToast
(
UIUtils
.
getString
(
R
.
string
.
login_faile
));
break
;
}
}
// switch (UserManager.getInstance().getRole(info)) {
//// case Constants.MANAGER:
//// UserManager.getInstance().saveUser(info);
//// loginHx(info.getHxAccount(), info.getHxPwd());
//// getStations(Integer.parseInt(info.getAccountId()));
//// break;
// case Constants.ENGINEER:
// case Constants.MANAGER_ENGINEER:
// if (info.getDetectStatus() == 1 || info.getDetectStatus() == 2 || info.getDetectStatus() == 3) {
// UserManager.getInstance().saveUser(info);
// getSiteId(info);
// } else {
// LogUtils.e("fail0");
// ToastUtils.showShortToast(UIUtils.getString(R.string.login_faile));
// }
// break;
// default:
// LogUtils.e("fail1");
// ToastUtils.showShortToast(UIUtils.getString(R.string.login_faile));
// break;
// }
}
}
private
void
showLoginDialog
()
{
private
void
showLoginDialog
()
{
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/smslogin/SmsLoginPresenter.java
View file @
35dcd8a2
...
@@ -29,16 +29,21 @@ import com.hyphenate.chat.EMClient;
...
@@ -29,16 +29,21 @@ import com.hyphenate.chat.EMClient;
public
class
SmsLoginPresenter
extends
SmsLoginContract
.
Presenter
{
public
class
SmsLoginPresenter
extends
SmsLoginContract
.
Presenter
{
private
String
mPhone
;
private
String
mPhone
;
public
ObservableField
<
String
>
phoneNume
=
new
ObservableField
<>();
public
ObservableField
<
String
>
phoneNume
=
new
ObservableField
<>();
public
ObservableField
<
String
>
code
=
new
ObservableField
<>();
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
Bundle
bundle
=
mView
.
getBundle
();
Bundle
bundle
=
mView
.
getBundle
();
mPhone
=
bundle
.
getString
(
UserConstant
.
PHONE
);
if
(
bundle
!=
null
)
{
phoneNume
.
set
(
mPhone
);
mPhone
=
bundle
.
getString
(
UserConstant
.
PHONE
);
phoneNume
.
set
(
mPhone
);
}
}
}
@Override
@Override
public
void
sendCode
(
int
type
)
{
public
void
sendCode
(
int
type
)
{
if
(
TextUtils
.
isEmpty
(
mPhone
)
&&
phoneNume
.
get
()
!=
null
)
mPhone
=
phoneNume
.
get
();
mView
.
showDialog
();
mView
.
showDialog
();
if
(
type
==
1
)
{
if
(
type
==
1
)
{
mView
.
changeCodeBtn
();
mView
.
changeCodeBtn
();
...
@@ -54,6 +59,12 @@ public class SmsLoginPresenter extends SmsLoginContract.Presenter {
...
@@ -54,6 +59,12 @@ public class SmsLoginPresenter extends SmsLoginContract.Presenter {
},
throwable
->
mView
.
showToast
(
R
.
string
.
send_code_faile
)));
},
throwable
->
mView
.
showToast
(
R
.
string
.
send_code_faile
)));
}
}
public
void
login
()
{
if
(
code
.
get
()
!=
null
&&
phoneNume
.
get
()
!=
null
)
mPhone
=
phoneNume
.
get
();
login
(
code
.
get
());
}
@Override
@Override
public
void
login
(
String
code
)
{
public
void
login
(
String
code
)
{
mView
.
showDialog
();
mView
.
showDialog
();
...
@@ -116,29 +127,42 @@ public class SmsLoginPresenter extends SmsLoginContract.Presenter {
...
@@ -116,29 +127,42 @@ public class SmsLoginPresenter extends SmsLoginContract.Presenter {
@Override
@Override
public
void
dumpAndSave
(
UserInfo
info
)
{
public
void
dumpAndSave
(
UserInfo
info
)
{
// List<Integer> role = info.getRoles();
if
(
info
.
getRoles
()
!=
null
&&
info
.
getRoles
().
contains
(
2
)){
// role.clear();
info
.
setSiteId
(-
1
);
// role.add(3);
info
.
setMobile
(
phoneNume
.
get
());
// info.setRoles(role);
UserManager
.
getInstance
().
saveUser
(
info
);
switch
(
UserManager
.
getInstance
().
getRole
(
info
))
{
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
// case Constants.MANAGER:
}
else
{
// UserManager.getInstance().saveUser(info);
ToastUtils
.
showShortToast
(
UIUtils
.
getString
(
R
.
string
.
login_faile
));
// loginHx(info.getHxAccount(), info.getHxPwd());
// getStations(Integer.parseInt(info.getAccountId()));
// break;
case
Constants
.
ENGINEER
:
case
Constants
.
MANAGER_ENGINEER
:
if
(
info
.
getDetectStatus
()
==
1
||
info
.
getDetectStatus
()
==
2
||
info
.
getDetectStatus
()
==
3
)
{
UserManager
.
getInstance
().
saveUser
(
info
);
getSiteId
(
info
);
}
else
{
ToastUtils
.
showShortToast
(
UIUtils
.
getString
(
R
.
string
.
login_faile
));
}
break
;
default
:
ToastUtils
.
showShortToast
(
UIUtils
.
getString
(
R
.
string
.
login_faile
));
break
;
}
}
//// List<Integer> role = info.getRoles();
//// role.clear();
//// role.add(3);
//// info.setRoles(role);
// switch (UserManager.getInstance().getRole(info)) {
//// case Constants.MANAGER:
//// UserManager.getInstance().saveUser(info);
//// loginHx(info.getHxAccount(), info.getHxPwd());
//// getStations(Integer.parseInt(info.getAccountId()));
//// break;
// case Constants.ENGINEER:
// case Constants.MANAGER_ENGINEER:
// if (info.getDetectStatus() == 1 || info.getDetectStatus() == 2 || info.getDetectStatus() == 3) {
// info.setSiteId(-1);
// UserManager.getInstance().saveUser(info);
// ARouter.getInstance().build(RouterPath.PATH_MAIN).navigation();
//
//// UserManager.getInstance().saveUser(info);
//// getSiteId(info);
// } else {
// ToastUtils.showShortToast(UIUtils.getString(R.string.login_faile));
// }
// break;
// default:
// ToastUtils.showShortToast(UIUtils.getString(R.string.login_faile));
// break;
// }
}
}
@Override
@Override
...
@@ -187,7 +211,7 @@ public class SmsLoginPresenter extends SmsLoginContract.Presenter {
...
@@ -187,7 +211,7 @@ public class SmsLoginPresenter extends SmsLoginContract.Presenter {
break
;
break
;
default
:
default
:
// ToastUtils.showShortToast(R.string.login_faile);
// ToastUtils.showShortToast(R.string.login_faile);
dealSiteId
(
info
,-
1
);
dealSiteId
(
info
,
-
1
);
break
;
break
;
}
}
}));
}));
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity/SmsLoginActivity.java
View file @
35dcd8a2
...
@@ -8,6 +8,7 @@ import android.text.TextUtils;
...
@@ -8,6 +8,7 @@ import android.text.TextUtils;
import
android.view.View
;
import
android.view.View
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.common.BaseConstant
;
import
com.dayu.common.BaseConstant
;
...
@@ -17,10 +18,17 @@ import com.dayu.usercenter.R;
...
@@ -17,10 +18,17 @@ import com.dayu.usercenter.R;
import
com.dayu.usercenter.common.UserConstant
;
import
com.dayu.usercenter.common.UserConstant
;
import
com.dayu.usercenter.databinding.ActivitySmsLoginBinding
;
import
com.dayu.usercenter.databinding.ActivitySmsLoginBinding
;
import
com.dayu.usercenter.event.RegisterSuccessEvent
;
import
com.dayu.usercenter.event.RegisterSuccessEvent
;
import
com.dayu.usercenter.presenter.smslogin.SmsLoginContract
;
import
com.dayu.usercenter.presenter.smslogin.SmsLoginPresenter
;
import
com.dayu.utils.AppUtils
;
import
com.dayu.utils.AppUtils
;
import
com.dayu.utils.TimeCountUtil
;
import
com.dayu.utils.TimeCountUtil2
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UtilsUserAccountMatcher
;
import
com.dayu.utils.UtilsUserAccountMatcher
;
import
com.dayu.widgets.ChangeEnvDialog
;
import
com.dayu.widgets.CustomDialog
;
import
com.dayu.widgets.listener.OnCloseListener
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.analytics.MobclickAgent
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -33,7 +41,7 @@ import org.greenrobot.eventbus.Subscribe;
...
@@ -33,7 +41,7 @@ import org.greenrobot.eventbus.Subscribe;
*/
*/
@Route
(
path
=
BaseConstant
.
PATH_LOGIN
)
@Route
(
path
=
BaseConstant
.
PATH_LOGIN
)
public
class
SmsLoginActivity
extends
DataBindingActivity
<
ActivitySmsLoginBinding
>
{
public
class
SmsLoginActivity
extends
BaseActivity
<
SmsLoginPresenter
,
ActivitySmsLoginBinding
>
implements
SmsLoginContract
.
View
{
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_sms_login
;
return
R
.
layout
.
activity_sms_login
;
...
@@ -53,6 +61,28 @@ public class SmsLoginActivity extends DataBindingActivity<ActivitySmsLoginBindin
...
@@ -53,6 +61,28 @@ public class SmsLoginActivity extends DataBindingActivity<ActivitySmsLoginBindin
mBind
.
environment
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
environment
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
environment
.
setText
(
String
.
format
(
getString
(
R
.
string
.
enviroment_demons
),
versionCode
));
mBind
.
environment
.
setText
(
String
.
format
(
getString
(
R
.
string
.
enviroment_demons
),
versionCode
));
}
}
setListener
();
if
(
Constants
.
IS_DEBUG
)
{
mBind
.
ivLogo
.
setOnClickListener
(
v
->
onTitleClick
());
}
}
private
void
setListener
()
{
// mBind.next.setOnClickListener(v -> {
// UIUtils.hideSoftInputFromWindow(mActivity);
// String phone = mBind.mobile.getText().toString().trim();
// if (!UtilsUserAccountMatcher.isPhoneNum(phone)) {
// ToastUtils.showShortToast(R.string.alipay_phone_error);
// } else {
// Intent intent = new Intent(mActivity, SmsCodeActivity.class);
// Bundle bundle = new Bundle();
// bundle.putString(UserConstant.PHONE, phone);
// intent.putExtra(Constants.BUNDLE, bundle);
// startActivity(intent, bundle);
// }
// });
mBind
.
tvAgreement
.
setOnClickListener
(
v
->
{
mBind
.
tvAgreement
.
setOnClickListener
(
v
->
{
Intent
intent
=
new
Intent
(
mActivity
,
AgreementActivity
.
class
);
Intent
intent
=
new
Intent
(
mActivity
,
AgreementActivity
.
class
);
startActivity
(
intent
);
startActivity
(
intent
);
...
@@ -61,28 +91,23 @@ public class SmsLoginActivity extends DataBindingActivity<ActivitySmsLoginBindin
...
@@ -61,28 +91,23 @@ public class SmsLoginActivity extends DataBindingActivity<ActivitySmsLoginBindin
mBind
.
mobile
.
addTextChangedListener
(
new
MyTextWatcher
()
{
mBind
.
mobile
.
addTextChangedListener
(
new
MyTextWatcher
()
{
@Override
@Override
public
void
afterTextChanged
(
Editable
s
)
{
public
void
afterTextChanged
(
Editable
s
)
{
if
(!
TextUtils
.
isEmpty
(
s
.
toString
()))
{
isMatch
(
s
.
toString
(),
mPresenter
.
code
.
get
());
mBind
.
next
.
setEnabled
(
true
);
if
(
UtilsUserAccountMatcher
.
isPhoneNum
(
s
.
toString
()))
{
mBind
.
next
.
setAlpha
(
1
);
mBind
.
getCode
.
setEnabled
(
true
);
mBind
.
getCode
.
setAlpha
(
1
);
}
else
{
}
else
{
mBind
.
next
.
setEnabled
(
false
);
mBind
.
getCode
.
setEnabled
(
false
);
mBind
.
next
.
setAlpha
(
0.35f
);
mBind
.
getCode
.
setAlpha
(
0.35f
);
}
}
}
}
});
});
mBind
.
next
.
setOnClickListener
(
v
->
{
mBind
.
code
.
addTextChangedListener
(
new
MyTextWatcher
()
{
UIUtils
.
hideSoftInputFromWindow
(
mActivity
);
@Override
String
phone
=
mBind
.
mobile
.
getText
().
toString
().
trim
();
public
void
afterTextChanged
(
Editable
s
)
{
if
(!
UtilsUserAccountMatcher
.
isPhoneNum
(
phone
))
{
isMatch
(
mPresenter
.
phoneNume
.
get
(),
s
.
toString
());
ToastUtils
.
showShortToast
(
R
.
string
.
alipay_phone_error
);
}
else
{
Intent
intent
=
new
Intent
(
mActivity
,
SmsCodeActivity
.
class
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
UserConstant
.
PHONE
,
phone
);
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
startActivity
(
intent
,
bundle
);
}
}
});
});
mBind
.
getCode
.
setEnabled
(
false
);
mBind
.
next
.
setEnabled
(
false
);
mBind
.
next
.
setEnabled
(
false
);
mBind
.
useAccount
.
setOnClickListener
(
v
->
{
mBind
.
useAccount
.
setOnClickListener
(
v
->
{
Intent
intent
=
new
Intent
(
mActivity
,
PwLoginActivity
.
class
);
Intent
intent
=
new
Intent
(
mActivity
,
PwLoginActivity
.
class
);
...
@@ -97,14 +122,82 @@ public class SmsLoginActivity extends DataBindingActivity<ActivitySmsLoginBindin
...
@@ -97,14 +122,82 @@ public class SmsLoginActivity extends DataBindingActivity<ActivitySmsLoginBindin
});
});
}
}
public
void
isMatch
(
String
phone
,
String
code
)
{
if
(
UtilsUserAccountMatcher
.
isPhoneNum
(
phone
)
&&
UtilsUserAccountMatcher
.
isSmsCode
(
code
))
{
mBind
.
next
.
setAlpha
(
1
);
mBind
.
next
.
setEnabled
(
true
);
}
else
{
mBind
.
next
.
setAlpha
(
0.35f
);
mBind
.
next
.
setEnabled
(
false
);
}
}
@Subscribe
@Subscribe
public
void
registerSuccess
(
RegisterSuccessEvent
event
){
public
void
registerSuccess
(
RegisterSuccessEvent
event
){
finish
();
finish
();
}
}
@Override
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
@Override
protected
void
onDestroy
()
{
protected
void
onDestroy
()
{
super
.
onDestroy
();
super
.
onDestroy
();
EventBus
.
getDefault
().
unregister
(
this
);
EventBus
.
getDefault
().
unregister
(
this
);
}
}
@Override
public
void
changeCodeBtn
()
{
TimeCountUtil2
timeCountUtil
=
new
TimeCountUtil2
(
mActivity
,
60000
,
1000
,
mBind
.
getCode
);
timeCountUtil
.
setDescribe
(
getString
(
R
.
string
.
send_code_agian
));
timeCountUtil
.
setDescribeAgain
(
UIUtils
.
getString
(
R
.
string
.
send_again
));
timeCountUtil
.
start
();
MobclickAgent
.
onEvent
(
mActivity
,
"sms_code"
);
}
@Override
public
void
changeVoiceCodeBtn
()
{
mBind
.
tvVoiceCode
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_text
));
mBind
.
tvVoiceCode
.
setClickable
(
false
);
MobclickAgent
.
onEvent
(
mActivity
,
"sms_voice"
);
}
@Override
public
void
showLoginDialog
(
OnCloseListener
listener
)
{
CustomDialog
customDialog
=
new
CustomDialog
(
mActivity
,
R
.
style
.
CustomDialog
,
getString
(
R
.
string
.
engineer_identity_not_audite
)
,
listener
);
customDialog
.
setTitle
(
getString
(
R
.
string
.
certification
))
.
setPositiveButton
(
getString
(
R
.
string
.
go_certification
))
.
setNegativeButton
(
getString
(
R
.
string
.
skip
));
customDialog
.
show
();
}
@Override
public
void
setError
(
String
str
)
{
if
(
TextUtils
.
isEmpty
(
str
))
{
mBind
.
code
.
setText
(
""
);
}
else
{
mBind
.
code
.
setText
(
""
);
}
}
private
int
clickCount
=
0
;
private
long
clickTime
=
0
;
public
void
onTitleClick
()
{
if
(
System
.
currentTimeMillis
()
-
clickTime
<
1500
)
{
clickTime
=
System
.
currentTimeMillis
();
clickCount
++;
}
else
{
clickTime
=
System
.
currentTimeMillis
();
clickCount
=
0
;
}
if
(
clickCount
>=
4
)
{
new
ChangeEnvDialog
().
show
(
this
);
clickCount
=
0
;
}
}
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/BusinessTypeActivity.java
View file @
35dcd8a2
...
@@ -80,7 +80,7 @@ public class BusinessTypeActivity extends BaseActivity<SImplePresenter, Activity
...
@@ -80,7 +80,7 @@ public class BusinessTypeActivity extends BaseActivity<SImplePresenter, Activity
setTypeAdapter
();
setTypeAdapter
();
}));
}));
//服务类型数据
//服务类型数据
Api
.
getService
(
UserService2
.
class
).
getServiceType
().
compose
(
Api
.
applySchedulers
())
Api
.
getService
(
UserService2
.
class
).
getServiceType
(
1
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
datas
->
{
.
subscribe
(
mPresenter
.
baseObserver
(
datas
->
{
mBind
.
refreshLayout
.
finishRefresh
();
mBind
.
refreshLayout
.
finishRefresh
();
typeDatas
=
datas
;
typeDatas
=
datas
;
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/CashRecordActivity.java
View file @
35dcd8a2
...
@@ -12,6 +12,7 @@ import com.dayu.usercenter.R;
...
@@ -12,6 +12,7 @@ import com.dayu.usercenter.R;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.databinding.ActivityCashRecordBinding
;
import
com.dayu.usercenter.databinding.ActivityCashRecordBinding
;
import
com.dayu.usercenter.model.bean.SaleArriveListBean
;
import
com.dayu.usercenter.model.bean.SaleArriveListBean
;
import
com.umeng.analytics.MobclickAgent
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -33,6 +34,7 @@ public class CashRecordActivity extends BaseActivity<SImplePresenter,ActivityCas
...
@@ -33,6 +34,7 @@ public class CashRecordActivity extends BaseActivity<SImplePresenter,ActivityCas
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
initUser
();
initUser
();
MobclickAgent
.
onEvent
(
mActivity
,
"look_income"
);
mBind
.
receivingBack
.
setOnClickListener
(
view
->
dumpBack
());
mBind
.
receivingBack
.
setOnClickListener
(
view
->
dumpBack
());
mBind
.
refreshLayout
.
setEnableLoadMore
(
false
);
mBind
.
refreshLayout
.
setEnableLoadMore
(
false
);
mBind
.
refreshLayout
.
setOnRefreshListener
(
refreshLayout
->
{
mBind
.
refreshLayout
.
setOnRefreshListener
(
refreshLayout
->
{
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/InvateNewActivity.java
View file @
35dcd8a2
...
@@ -11,6 +11,7 @@ import com.dayu.usercenter.api.UserApiFactory;
...
@@ -11,6 +11,7 @@ import com.dayu.usercenter.api.UserApiFactory;
import
com.dayu.usercenter.databinding.ActivityInvateNewBinding
;
import
com.dayu.usercenter.databinding.ActivityInvateNewBinding
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.ToastUtils
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.socialize.UMShareAPI
;
import
com.umeng.socialize.UMShareAPI
;
import
com.umeng.socialize.UMShareListener
;
import
com.umeng.socialize.UMShareListener
;
import
com.umeng.socialize.bean.SHARE_MEDIA
;
import
com.umeng.socialize.bean.SHARE_MEDIA
;
...
@@ -20,6 +21,8 @@ import com.umeng.socialize.bean.SHARE_MEDIA;
...
@@ -20,6 +21,8 @@ import com.umeng.socialize.bean.SHARE_MEDIA;
*/
*/
public
class
InvateNewActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityInvateNewBinding
>
{
public
class
InvateNewActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityInvateNewBinding
>
{
private
String
mInviteCode
;
private
String
mInviteCode
;
private
int
mType
;
// 1.邀请商家 2.邀请师傅
@Override
@Override
public
void
setPresenter
()
{
public
void
setPresenter
()
{
...
@@ -35,6 +38,14 @@ public class InvateNewActivity extends BaseActivity<SImplePresenter, ActivityInv
...
@@ -35,6 +38,14 @@ public class InvateNewActivity extends BaseActivity<SImplePresenter, ActivityInv
public
void
initView
()
{
public
void
initView
()
{
initUser
();
initUser
();
mInviteCode
=
getBundle
().
getString
(
Constants
.
INVITE_CODE
);
mInviteCode
=
getBundle
().
getString
(
Constants
.
INVITE_CODE
);
mType
=
getBundle
().
getInt
(
Constants
.
TYPE
);
if
(
mType
==
1
)
{
mBind
.
tvForward
.
setBackgroundResource
(
R
.
drawable
.
btn_dark_red
);
mBind
.
tvForward
.
setText
(
R
.
string
.
forward_provider_now
);
mBind
.
tvTitle
.
setText
(
R
.
string
.
invate_provider_title
);
mBind
.
tvRule1
.
setText
(
R
.
string
.
invate_provider_rule1
);
mBind
.
tvRule2
.
setText
(
R
.
string
.
invate_provider_rule2
);
}
if
(
TextUtils
.
isEmpty
(
mInviteCode
))
{
if
(
TextUtils
.
isEmpty
(
mInviteCode
))
{
getCode
();
getCode
();
}
else
{
}
else
{
...
@@ -47,9 +58,12 @@ public class InvateNewActivity extends BaseActivity<SImplePresenter, ActivityInv
...
@@ -47,9 +58,12 @@ public class InvateNewActivity extends BaseActivity<SImplePresenter, ActivityInv
//分享按钮点击事件
//分享按钮点击事件
private
void
setListener
()
{
private
void
setListener
()
{
mBind
.
tvForward
.
setOnClickListener
(
v
->
{
mBind
.
tvForward
.
setOnClickListener
(
v
->
{
String
url
=
Constants
.
INVITE_NEW_SHARE_URL
+
mInviteCode
;
if
(
mType
==
2
)
CommonUtils
.
shareWxUrl
(
this
,
url
,
Constants
.
AppLogoUrl
,
getString
(
R
.
string
.
invite_new_share_title
),
MobclickAgent
.
onEvent
(
mActivity
,
"invite_master"
);
getString
(
R
.
string
.
invite_new_share_content
),
new
UMShareListener
()
{
String
url
=
mType
==
2
?
Constants
.
INVITE_NEW_SHARE_URL
:
Constants
.
INVITE_NEW_SHARE_URL_BUSINESS
;
String
title
=
getString
(
R
.
string
.
invite_new_share_title
);
String
desc
=
getString
(
mType
==
2
?
R
.
string
.
invite_new_share_content
:
R
.
string
.
invite_new_share_content_business
);
CommonUtils
.
shareWxUrl
(
this
,
url
+
mInviteCode
,
Constants
.
AppLogoUrl
,
title
,
desc
,
new
UMShareListener
()
{
@Override
@Override
public
void
onStart
(
SHARE_MEDIA
share_media
)
{
public
void
onStart
(
SHARE_MEDIA
share_media
)
{
}
}
...
@@ -57,7 +71,7 @@ public class InvateNewActivity extends BaseActivity<SImplePresenter, ActivityInv
...
@@ -57,7 +71,7 @@ public class InvateNewActivity extends BaseActivity<SImplePresenter, ActivityInv
@Override
@Override
public
void
onResult
(
SHARE_MEDIA
share_media
)
{
public
void
onResult
(
SHARE_MEDIA
share_media
)
{
if
(
share_media
==
SHARE_MEDIA
.
WEIXIN_CIRCLE
)
{
if
(
share_media
==
SHARE_MEDIA
.
WEIXIN_CIRCLE
)
{
ToastUtils
.
showShort
Toast
(
R
.
string
.
share_finish
);
show
Toast
(
R
.
string
.
share_finish
);
}
}
}
}
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/InviteRecordActivity.java
0 → 100644
View file @
35dcd8a2
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
import
android.support.v7.widget.LinearLayoutManager
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.common.Constants
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.databinding.ActivityInviteRecordBinding
;
import
com.dayu.usercenter.model.bean.InviteRecordBean
;
import
com.dayu.usercenter.model.bean.SaleArriveListBean
;
import
com.umeng.analytics.MobclickAgent
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
InviteRecordActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityInviteRecordBinding
>
{
BaseQuickAdapter
<
InviteRecordBean
,
BaseViewHolder
>
mAdapter
;
List
<
InviteRecordBean
>
mDatas
=
new
ArrayList
<>();
int
page
=
1
;
@Override
public
void
setPresenter
()
{
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_invite_record
;
}
@Override
public
void
initView
()
{
initUser
();
mBind
.
receivingBack
.
setOnClickListener
(
view
->
dumpBack
());
mBind
.
refreshLayout
.
setEnableLoadMore
(
false
);
mBind
.
refreshLayout
.
setOnRefreshListener
(
refreshLayout
->
{
page
=
1
;
getDetailData
();
});
mBind
.
refreshLayout
.
setOnLoadMoreListener
(
refreshLayout
->
{
getDetailData
();
});
showDialog
();
getDetailData
();
}
private
void
getDetailData
(){
Api
.
getService
(
UserService2
.
class
).
getInviteRecord
(
mUserId
,
page
,
Constants
.
PAGESIZE
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
data
->{
mBind
.
refreshLayout
.
finishRefresh
();
mBind
.
refreshLayout
.
finishLoadMore
();
if
(
page
==
1
)
{
mDatas
.
clear
();
}
mDatas
.
addAll
(
data
.
getData
());
setAdapter
();
mBind
.
refreshLayout
.
setEnableLoadMore
(
page
<
data
.
getTotalPages
());
page
+=
1
;
},
responeThrowable
->
{
mBind
.
refreshLayout
.
finishRefresh
();
mBind
.
refreshLayout
.
finishLoadMore
();
}));
}
private
void
setAdapter
()
{
if
(
mAdapter
!=
null
){
mAdapter
.
notifyDataSetChanged
();
}
else
{
mAdapter
=
new
BaseQuickAdapter
<
InviteRecordBean
,
BaseViewHolder
>(
R
.
layout
.
item_invite_record
,
mDatas
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
InviteRecordBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_item1
,
item
.
getCreateTime
());
helper
.
setText
(
R
.
id
.
tv_item2
,
item
.
getRealName
());
helper
.
setText
(
R
.
id
.
tv_item3
,
item
.
getMobile
());
}
};
mBind
.
rvCache
.
setLayoutManager
(
new
LinearLayoutManager
(
mActivity
));
mBind
.
rvCache
.
setAdapter
(
mAdapter
);
}
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/UserLicenceActivity.java
View file @
35dcd8a2
...
@@ -9,6 +9,7 @@ import com.dayu.base.ui.presenter.SImplePresenter;
...
@@ -9,6 +9,7 @@ import com.dayu.base.ui.presenter.SImplePresenter;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.databinding.ActivityUserLicenceBinding
;
import
com.dayu.usercenter.databinding.ActivityUserLicenceBinding
;
import
com.dayu.usercenter.ui.fragment.UserLicenceFragment
;
import
com.dayu.usercenter.ui.fragment.UserLicenceFragment
;
import
com.umeng.analytics.MobclickAgent
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -34,6 +35,7 @@ public class UserLicenceActivity extends BaseActivity<SImplePresenter,ActivityUs
...
@@ -34,6 +35,7 @@ public class UserLicenceActivity extends BaseActivity<SImplePresenter,ActivityUs
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
MobclickAgent
.
onEvent
(
mActivity
,
"look_certification"
);
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
mFragments
.
add
(
UserLicenceFragment
.
newInstance
(
1
));
mFragments
.
add
(
UserLicenceFragment
.
newInstance
(
1
));
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomeUserFragment.java
View file @
35dcd8a2
package
com
.
dayu
.
usercenter
.
ui
.
fragment
;
package
com
.
dayu
.
usercenter
.
ui
.
fragment
;
import
android.content.ClipData
;
import
android.content.ClipboardManager
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.BitmapFactory
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
...
@@ -16,6 +20,7 @@ import com.dayu.event.UserInfo;
...
@@ -16,6 +20,7 @@ import com.dayu.event.UserInfo;
import
com.dayu.provider.event.CertificationEvent
;
import
com.dayu.provider.event.CertificationEvent
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.adapter.ServiceWechatAdapter
;
import
com.dayu.usercenter.data.protocol.EngineerInfo
;
import
com.dayu.usercenter.data.protocol.EngineerInfo
;
import
com.dayu.usercenter.data.protocol.OrderRecord
;
import
com.dayu.usercenter.data.protocol.OrderRecord
;
import
com.dayu.usercenter.data.protocol.TodayAchievement
;
import
com.dayu.usercenter.data.protocol.TodayAchievement
;
...
@@ -27,6 +32,7 @@ import com.dayu.usercenter.presenter.homeuser.HomeUserContract;
...
@@ -27,6 +32,7 @@ import com.dayu.usercenter.presenter.homeuser.HomeUserContract;
import
com.dayu.usercenter.presenter.homeuser.HomeUserPresenter
;
import
com.dayu.usercenter.presenter.homeuser.HomeUserPresenter
;
import
com.dayu.usercenter.ui.activity.WithdrawalsActivity
;
import
com.dayu.usercenter.ui.activity.WithdrawalsActivity
;
import
com.dayu.usercenter.ui.activity2.CommonRecordActivity
;
import
com.dayu.usercenter.ui.activity2.CommonRecordActivity
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.UserManager
;
import
com.dayu.utils.UserManager
;
...
@@ -37,6 +43,8 @@ import org.greenrobot.eventbus.EventBus;
...
@@ -37,6 +43,8 @@ import org.greenrobot.eventbus.EventBus;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.util.List
;
/**
/**
* Created by luofan
* Created by luofan
* on 2017/11/20.
* on 2017/11/20.
...
@@ -148,16 +156,23 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
...
@@ -148,16 +156,23 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
// mBind.tvSaleReward.setText(""+record.getSalesPrice());
// mBind.tvSaleReward.setText(""+record.getSalesPrice());
//// mBind.tvSaleRecord.setText(record.getSalesCount() + "");
//// mBind.tvSaleRecord.setText(record.getSalesCount() + "");
// mBind.tvServiceIncome.setText(""+record.getServiceTotalPrice());
// mBind.tvServiceIncome.setText(""+record.getServiceTotalPrice());
mBind
.
tvBusinessType
.
setText
(
record
.
getCategoryCounts
()
+
""
);
mBind
.
tvBusinessType
.
setText
(
record
.
getCategoryCounts
()
+
""
);
}
}
@Override
@Override
public
void
setIncomData
(
UserIncomeBean
data
)
{
public
void
setIncomData
(
UserIncomeBean
data
)
{
mBind
.
tvCashArrive
.
setText
(
"¥"
+
data
.
getWithdrawPrice
());
mBind
.
tvCashArrive
.
setText
(
"¥"
+
data
.
getWithdrawPrice
());
mBind
.
tvSaleReward
.
setText
(
"¥"
+
data
.
getSalesRewardPrice
());
mBind
.
tvSaleReward
.
setText
(
"¥"
+
data
.
getSalesRewardPrice
());
mBind
.
tvServiceIncome
.
setText
(
"¥"
+
data
.
getServicePrice
());
mBind
.
tvServiceIncome
.
setText
(
"¥"
+
data
.
getServicePrice
());
mBind
.
tvInvateReward
.
setText
(
"¥"
+
data
.
getInviteRewardPrice
());
mBind
.
tvInvateReward
.
setText
(
"¥"
+
data
.
getInviteRewardPrice
());
mBind
.
tvPlatformReward
.
setText
(
"¥"
+
data
.
getPlatformRewardPrice
());
mBind
.
tvPlatformReward
.
setText
(
"¥"
+
data
.
getPlatformRewardPrice
());
}
@Override
public
void
setWechatData
(
List
<
String
>
wechats
)
{
ServiceWechatAdapter
adapter
=
new
ServiceWechatAdapter
(
wechats
);
mBind
.
rvWechat
.
setLayoutManager
(
new
LinearLayoutManager
(
mActivity
));
mBind
.
rvWechat
.
setAdapter
(
adapter
);
}
}
...
@@ -173,7 +188,12 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
...
@@ -173,7 +188,12 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
@Override
@Override
public
void
toCommonRecord
(
int
type
)
{
public
void
toCommonRecord
(
int
type
)
{
CommonRecordActivity
.
launch
(
mActivity
,
type
);
CommonRecordActivity
.
launch
(
mActivity
,
type
);
}
@Override
public
void
copyWechat
(
String
wechatNum
)
{
CommonUtils
.
copyText
(
mActivity
,
wechatNum
);
}
}
...
@@ -190,8 +210,6 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
...
@@ -190,8 +210,6 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
}
}
private
void
showAlertDialog
()
{
private
void
showAlertDialog
()
{
CustomDialog
dialog
=
new
CustomDialog
(
mActivity
,
R
.
style
.
CustomDialog
,
mActivity
.
getString
(
R
.
string
.
not_set_account
)
CustomDialog
dialog
=
new
CustomDialog
(
mActivity
,
R
.
style
.
CustomDialog
,
mActivity
.
getString
(
R
.
string
.
not_set_account
)
,
(
dialog1
,
confirm
)
->
{
,
(
dialog1
,
confirm
)
->
{
...
@@ -301,12 +319,12 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
...
@@ -301,12 +319,12 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
}
}
@Subscribe
@Subscribe
public
void
refreshRecord
(
RefreshUserRecordEvent
event
){
public
void
refreshRecord
(
RefreshUserRecordEvent
event
)
{
mPresenter
.
getRecordInfo
();
mPresenter
.
getRecordInfo
();
}
}
@Subscribe
@Subscribe
public
void
refreshUser
(
RefreshUserInfoEvent
event
){
public
void
refreshUser
(
RefreshUserInfoEvent
event
)
{
mPresenter
.
getUserInfo
();
mPresenter
.
getUserInfo
();
}
}
}
}
userCenter/src/main/release/AndroidManifest.xml
View file @
35dcd8a2
...
@@ -98,6 +98,9 @@
...
@@ -98,6 +98,9 @@
<activity
<activity
android:name=
".ui.activity2.CashRecordActivity"
android:name=
".ui.activity2.CashRecordActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity2.InviteRecordActivity"
android:screenOrientation=
"portrait"
/>
</application>
</application>
</manifest>
</manifest>
userCenter/src/main/res/drawable/btn_dark_red.xml
0 → 100644
View file @
35dcd8a2
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/common_btn_radius"
/>
<solid
android:color=
"@color/dark_red"
/>
</shape>
\ No newline at end of file
userCenter/src/main/res/layout/activity_invate_new.xml
View file @
35dcd8a2
...
@@ -43,12 +43,14 @@
...
@@ -43,12 +43,14 @@
android:text=
"@string/invate_reward_rule"
android:text=
"@string/invate_reward_rule"
/>
/>
<TextView
<TextView
android:id=
"@+id/tv_rule1"
style=
"@style/common_text_style"
style=
"@style/common_text_style"
android:text=
"@string/invate_reward_rule1"
android:text=
"@string/invate_reward_rule1"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
android:textColor=
"#666"
android:textColor=
"#666"
/>
/>
<TextView
<TextView
android:id=
"@+id/tv_rule2"
style=
"@style/common_text_style"
style=
"@style/common_text_style"
android:text=
"@string/invate_reward_rule2"
android:text=
"@string/invate_reward_rule2"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
...
...
userCenter/src/main/res/layout/activity_invite_record.xml
0 → 100644
View file @
35dcd8a2
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/title_back"
style=
"@style/title"
>
<TextView
android:id=
"@+id/tv_title"
style=
"@style/text_title"
android:text=
"@string/invite_record"
/>
<ImageView
android:id=
"@+id/receiving_back"
style=
"@style/title_image_back"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginTop=
"5dp"
android:paddingLeft=
"1dp"
android:paddingRight=
"1dp"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1.2"
android:background=
"@drawable/bg_order_step_title1"
android:gravity=
"center"
android:text=
"@string/invite_time"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/bg_order_step_title2"
android:gravity=
"center"
android:text=
"@string/be_invated_person"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/bg_order_step_title1"
android:gravity=
"center"
android:text=
"@string/str_phone"
/>
</LinearLayout>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/refresh_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"65dp"
>
<android.support.v7.widget.RecyclerView
android:layout_marginLeft=
"1dp"
android:layout_marginRight=
"1dp"
android:id=
"@+id/rv_cache"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:overScrollMode=
"never"
/>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/activity_pwlogin_layout.xml
View file @
35dcd8a2
...
@@ -133,6 +133,7 @@
...
@@ -133,6 +133,7 @@
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<TextView
<TextView
android:visibility=
"gone"
android:id=
"@+id/tv_register"
android:id=
"@+id/tv_register"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
userCenter/src/main/res/layout/activity_sms_login.xml
View file @
35dcd8a2
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout>
<layout>
<data>
<variable
name=
"presenter"
type=
"com.dayu.usercenter.presenter.smslogin.SmsLoginPresenter"
/>
</data>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -16,21 +22,31 @@
...
@@ -16,21 +22,31 @@
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<TextView
<TextView
android:visibility=
"gone"
android:id=
"@+id/tv_title"
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginBottom=
"59dp"
android:layout_marginBottom=
"59dp"
android:layout_marginTop=
"1
27
dp"
android:layout_marginTop=
"1
00
dp"
android:text=
"@string/sms_login"
android:text=
"@string/sms_login"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"24sp"
/>
android:textSize=
"24sp"
/>
<ImageView
android:id=
"@+id/iv_logo"
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"50dp"
android:layout_marginBottom=
"60dp"
android:src=
"@drawable/icon_app_logo"
/>
<TextView
<TextView
android:id=
"@+id/tv_86"
android:id=
"@+id/tv_86"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/
tv_title
"
android:layout_below=
"@+id/
iv_logo
"
android:layout_marginLeft=
"56dp"
android:layout_marginLeft=
"56dp"
android:layout_marginRight=
"38dp"
android:layout_marginRight=
"38dp"
android:text=
"@string/sms_86"
android:text=
"@string/sms_86"
...
@@ -39,38 +55,116 @@
...
@@ -39,38 +55,116 @@
<EditText
<EditText
android:id=
"@+id/mobile"
android:id=
"@+id/mobile"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_marginRight=
"30dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/
tv_title
"
android:layout_below=
"@+id/
iv_logo
"
android:layout_toRightOf=
"@id/tv_86"
android:layout_toRightOf=
"@
+
id/tv_86"
android:background=
"@null"
android:background=
"@null"
android:hint=
"@string/tv_login_phone_editext_hint"
android:hint=
"@string/tv_login_phone_editext_hint"
android:inputType=
"phone"
android:inputType=
"phone"
android:text=
"@={presenter.phoneNume}"
android:maxLength=
"11"
android:maxLength=
"11"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"17sp"
/>
android:textSize=
"16sp"
/>
<View
<View
android:id=
"@+id/line"
android:id=
"@+id/line"
android:layout_width=
"250dp"
android:layout_width=
"match_parent"
android:layout_marginLeft=
"55dp"
android:layout_marginRight=
"30dp"
android:layout_height=
"1dp"
android:layout_height=
"1dp"
android:layout_below=
"@+id/mobile"
android:layout_below=
"@+id/mobile"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"7.5dp"
android:layout_marginTop=
"7.5dp"
android:background=
"@color/cl_line"
/>
android:background=
"@color/cl_line"
/>
<LinearLayout
android:id=
"@+id/ll_code"
android:layout_below=
"@+id/line"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginTop=
"15dp"
android:gravity=
"center_vertical"
android:paddingLeft=
"53dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"20dp"
android:text=
"@string/sms_code"
android:textColor=
"@color/editext_color"
android:textSize=
"16sp"
/>
<EditText
android:id=
"@+id/code"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_weight=
"1"
android:background=
"@null"
android:hint=
"@string/input_sms_code"
android:inputType=
"number"
android:text=
"@={presenter.code}"
android:textColor=
"@color/default_text_color"
android:maxLength=
"10"
android:textSize=
"16sp"
/>
<View
android:visibility=
"gone"
android:layout_width=
"1dp"
android:layout_height=
"match_parent"
android:background=
"@color/cl_line"
/>
<TextView
android:id=
"@+id/get_code"
android:layout_width=
"wrap_content"
android:layout_height=
"35dp"
android:paddingLeft=
"10dp"
android:paddingRight=
"10dp"
android:layout_marginRight=
"30dp"
android:gravity=
"center"
android:alpha=
"0.35"
android:background=
"@drawable/btn_blue_commom"
android:onClick=
"@{()->presenter.sendCode(1)}"
android:text=
"@string/tv_login_register_button_text"
android:textColor=
"@color/white"
/>
</LinearLayout>
<View
android:id=
"@+id/line_code"
android:layout_width=
"match_parent"
android:layout_marginLeft=
"55dp"
android:layout_marginRight=
"30dp"
android:layout_height=
"1dp"
android:layout_below=
"@+id/ll_code"
android:background=
"@color/cl_line"
/>
<TextView
android:id=
"@+id/tv_voice_code"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:layout_below=
"@+id/line_code"
android:onClick=
"@{()->presenter.sendCode(2)}"
android:layout_centerHorizontal=
"true"
android:text=
"@string/voice_code_notice"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"14sp"
/>
<TextView
<TextView
android:id=
"@+id/next"
android:id=
"@+id/next"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"47dp"
android:layout_height=
"47dp"
android:layout_below=
"@+id/
lin
e"
android:layout_below=
"@+id/
tv_voice_cod
e"
android:layout_marginLeft=
"25dp"
android:layout_marginLeft=
"25dp"
android:layout_marginRight=
"25dp"
android:layout_marginRight=
"25dp"
android:layout_marginTop=
"3
8.5
dp"
android:layout_marginTop=
"3
0
dp"
android:alpha=
"0.35"
android:alpha=
"0.35"
android:background=
"@drawable/tab_blue_react"
android:background=
"@drawable/tab_blue_react"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"@string/next_step"
android:text=
"@string/register_login"
android:onClick=
"@{()->presenter.login()}"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
...
@@ -79,11 +173,13 @@
...
@@ -79,11 +173,13 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/next"
android:layout_below=
"@+id/next"
android:layout_centerHorizontal=
"true"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"25dp"
android:layout_marginTop=
"25dp"
android:layout_marginTop=
"25dp"
android:text=
"@string/use_account_login"
android:text=
"@string/use_account_login"
android:textColor=
"@color/
bg_button
"
/>
android:textColor=
"@color/
text_color
"
/>
<TextView
<TextView
android:visibility=
"gone"
android:id=
"@+id/tv_register"
android:id=
"@+id/tv_register"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -91,7 +187,6 @@
...
@@ -91,7 +187,6 @@
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"25dp"
android:layout_marginTop=
"25dp"
android:text=
"@string/register_account"
android:text=
"@string/register_account"
android:layout_toRightOf=
"@id/use_account"
android:layout_marginLeft=
"25dp"
android:layout_marginLeft=
"25dp"
android:textColor=
"@color/blue_register"
/>
android:textColor=
"@color/blue_register"
/>
...
...
userCenter/src/main/res/layout/activity_user_info.xml
View file @
35dcd8a2
...
@@ -241,7 +241,7 @@
...
@@ -241,7 +241,7 @@
<TextView
<TextView
style=
"@style/user_info_text"
style=
"@style/user_info_text"
android:text=
"@string/user_receiver_addr"
/>
android:text=
"@string/user_receiver_addr
2
"
/>
<TextView
<TextView
android:id=
"@+id/tv_addr_add"
android:id=
"@+id/tv_addr_add"
...
...
userCenter/src/main/res/layout/fragment_home_user.xml
View file @
35dcd8a2
...
@@ -29,356 +29,397 @@
...
@@ -29,356 +29,397 @@
</RelativeLayout>
</RelativeLayout>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/refresh_layout"
android:id=
"@+id/refresh_layout"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:paddingBottom=
"2dp"
>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@color/cl_white"
>
android:paddingBottom=
"2dp"
>
<
android.support.v4.widget.NestedScrollView
<
LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/cl_white"
>
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<LinearLayout
<ImageView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_horizontal"
android:scaleType=
"fitXY"
android:orientation=
"vertical"
>
android:src=
"@drawable/person_title_view"
android:visibility=
"gone"
/>
<RelativeLayout
android:id=
"@+id/person_one"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/table_record_title_bg"
android:onClick=
"@{()->presenter.toUserSetting()}"
android:padding=
"10dp"
>
<ImageView
<ImageView
android:layout_width=
"
match_par
ent"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:scaleType=
"fitXY"
android:layout_alignParentRight=
"true"
android:src=
"@drawable/person_title_view"
android:layout_centerVertical=
"true"
android:visibility=
"gone"
/>
android:layout_marginRight=
"10dp"
android:src=
"@drawable/icon_arrow_right_gray"
/>
<RelativeLayout
<com.dayu.widgets.CircleImageView
android:id=
"@+id/person_one"
android:id=
"@+id/iv_header"
android:layout_width=
"match_parent"
imageUrl=
"@{presenter.mUrl}"
android:layout_height=
"wrap_content"
android:layout_width=
"120dp"
android:background=
"@color/table_record_title_bg"
android:layout_height=
"120dp"
android:onClick=
"@{()->presenter.toUserSetting()}"
android:layout_marginLeft=
"10dp"
android:padding=
"10dp"
>
android:src=
"@drawable/user"
/>
<!--android:onClick="@{()->presenter.dumpToPersonalInfo()}"-->
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"10dp"
android:src=
"@drawable/icon_arrow_right_gray"
/>
<com.dayu.widgets.CircleImageView
android:id=
"@+id/iv_header"
imageUrl=
"@{presenter.mUrl}"
android:layout_width=
"120dp"
android:layout_height=
"120dp"
android:layout_marginLeft=
"10dp"
android:src=
"@drawable/user"
/>
<!--android:onClick="@{()->presenter.dumpToPersonalInfo()}"-->
<ImageView
android:layout_width=
"73dp"
android:layout_height=
"20dp"
android:layout_alignLeft=
"@id/iv_header"
android:layout_alignBottom=
"@id/iv_header"
android:layout_marginLeft=
"5dp"
android:src=
"@drawable/head_shape"
android:visibility=
"gone"
/>
<ImageView
<TextView
android:layout_width=
"73dp"
android:layout_width=
"44dp"
android:layout_height=
"20dp"
android:layout_height=
"15dp"
android:layout_alignLeft=
"@id/iv_header"
android:layout_alignLeft=
"@id/iv_header"
android:layout_alignBottom=
"@id/iv_header"
android:layout_alignBottom=
"@id/iv_header"
android:layout_marginLeft=
"5dp"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/head_shape"
android:layout_marginLeft=
"20dp"
android:visibility=
"gone"
/>
android:layout_marginBottom=
"3dp"
android:text=
"@string/personal_info"
android:textColor=
"@color/white"
android:textSize=
"11sp"
android:visibility=
"gone"
/>
<TextView
<TextView
android:layout_width=
"44dp"
android:id=
"@+id/tv_name"
android:layout_height=
"15dp"
android:layout_width=
"wrap_content"
android:layout_alignLeft=
"@id/iv_header"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/iv_header"
android:layout_marginLeft=
"30dp"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"25dp"
android:layout_marginLeft=
"20dp"
android:layout_toRightOf=
"@id/iv_header"
android:layout_marginBottom=
"3dp"
android:text=
"@string/tv_person_center_name"
android:text=
"@string/personal_info"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/white"
android:textSize=
"14.7sp"
android:textSize=
"11sp"
android:textStyle=
"bold"
/>
android:visibility=
"gone"
/>
<ImageView
android:id=
"@+id/iv_audited"
android:layout_width=
"41dp"
android:layout_height=
"14dp"
android:layout_marginLeft=
"2dp"
android:layout_marginTop=
"17dp"
android:layout_toRightOf=
"@id/tv_name"
android:src=
"@drawable/icon_authentication"
android:visibility=
"gone"
/>
<RelativeLayout
android:id=
"@+id/persone_two"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name"
android:layout_alignLeft=
"@id/tv_name"
android:layout_marginTop=
"9.3dp"
>
<TextView
<TextView
android:id=
"@+id/tv_
name
"
android:id=
"@+id/tv_
sex
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"30dp"
android:text=
"@string/tv_person_center_sex_value"
android:layout_marginTop=
"25dp"
android:layout_toRightOf=
"@id/iv_header"
android:text=
"@string/tv_person_center_name"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14.7sp"
android:textSize=
"12sp"
/>
android:textStyle=
"bold"
/>
<TextView
<ImageView
android:id=
"@+id/tv_age"
android:id=
"@+id/iv_audited"
android:layout_width=
"41dp"
android:layout_height=
"14dp"
android:layout_marginLeft=
"2dp"
android:layout_marginTop=
"17dp"
android:layout_toRightOf=
"@id/tv_name"
android:src=
"@drawable/icon_authentication"
android:visibility=
"gone"
/>
<RelativeLayout
android:id=
"@+id/persone_two"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name"
android:layout_alignLeft=
"@id/tv_name"
android:layout_marginTop=
"9.3dp"
>
<TextView
android:id=
"@+id/tv_sex"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/tv_person_center_sex_value"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_age"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_toRightOf=
"@id/tv_sex"
android:text=
"@string/tv_person_center_age_value"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/persone_two"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_alignLeft=
"@id/tv_name"
android:layout_toRightOf=
"@id/tv_sex"
android:layout_marginTop=
"9.3dp"
android:text=
"@string/tv_person_center_age_value"
android:orientation=
"horizontal"
>
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/str_phone"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_toRightOf=
"@id/tv_age"
android:text=
"@string/tv_person_center_phone"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:layout_below=
"@id/persone_two"
android:layout_marginBottom=
"15dp"
android:layout_alignLeft=
"@id/tv_name"
android:layout_marginTop=
"9.3dp"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/
user_customer_satisfied
"
android:text=
"@string/
str_phone
"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
<TextView
<TextView
android:id=
"@+id/tv_
scor
e"
android:id=
"@+id/tv_
phon
e"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/zero_score"
android:layout_toRightOf=
"@id/tv_age"
android:text=
"@string/tv_person_center_phone"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
<LinearLayout
android:id=
"@+id/tv_star"
android:layout_width=
"90dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:orientation=
"horizontal"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<ImageView
android:id=
"@+id/person_line"
android:layout_width=
"293.3dp"
android:layout_height=
"0.6dp"
android:layout_marginTop=
"15dp"
android:background=
"@color/cl_work_raiod"
android:visibility=
"gone"
/>
<RelativeLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"wrap_content"
android:layout_height=
"70dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/user_customer_satisfied"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_score"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:text=
"@string/zero_score"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"12sp"
/>
<LinearLayout
android:id=
"@+id/tv_star"
android:layout_width=
"90dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:orientation=
"horizontal"
/>
android:background=
"@drawable/personal_center_selector"
</LinearLayout>
android:onClick=
"@{()->presenter.dumpToCacheRecord()}"
>
<ImageView
android:id=
"@+id/person_line"
android:layout_width=
"293.3dp"
android:layout_height=
"0.6dp"
android:layout_marginTop=
"15dp"
android:background=
"@color/cl_work_raiod"
android:visibility=
"gone"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:background=
"@drawable/personal_center_selector"
android:onClick=
"@{()->presenter.dumpToCacheRecord()}"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_centerHorizontal=
"true"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:layout_centerHorizontal=
"true"
>
<TextView
<TextView
style=
"@style/tv_user_bottom1"
style=
"@style/tv_user_bottom1"
android:layout_marginTop=
"0dp"
android:layout_marginLeft=
"25dp"
android:layout_marginLeft=
"25dp"
android:layout_marginTop=
"0dp"
android:text=
"@string/user_cash_arrive"
/>
android:text=
"@string/user_cash_arrive"
/>
<TextView
<TextView
android:id=
"@+id/tv_cash_arrive"
android:id=
"@+id/tv_cash_arrive"
style=
"@style/tv_user_bottom2"
style=
"@style/tv_user_bottom2"
android:textSize=
"26sp"
android:layout_marginTop=
"0dp"
android:layout_marginLeft=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"0dp"
android:text=
"0"
android:textColor=
"@color/cl_order_item_date"
android:textSize=
"26sp"
/>
</LinearLayout>
</RelativeLayout>
<LinearLayout
style=
"@style/ll_user_bottom"
android:layout_marginTop=
"10dp"
>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:onClick=
"@{()->presenter.toCommonRecord(1)}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_sale_reward"
/>
<TextView
android:id=
"@+id/tv_sale_reward"
style=
"@style/tv_user_bottom2"
android:text=
"0"
android:text=
"0"
android:textColor=
"@color/cl_order_item_date"
/>
android:textColor=
"@color/cl_order_item_date"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<LinearLayout
style=
"@style/ll_user_bottom"
<LinearLayout
android:layout_marginTop=
"10dp"
style=
"@style/ll_user_bottom2"
>
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.toCommonRecord(2)}"
>
<
LinearLayout
<
TextView
style=
"@style/
ll_user_bottom2
"
style=
"@style/
tv_user_bottom1
"
android:
onClick=
"@{()->presenter.toCommonRecord(1)}"
>
android:
text=
"@string/user_service_income"
/
>
<TextView
<TextView
style=
"@style/tv_user_bottom1"
android:id=
"@+id/tv_service_income"
android:text=
"@string/user_sale_reward"
/>
style=
"@style/tv_user_bottom2"
android:text=
"0"
android:textColor=
"@color/cl_order_item_date"
/>
</LinearLayout>
</LinearLayout>
<TextView
<LinearLayout
android:id=
"@+id/tv_sale_reward"
style=
"@style/ll_user_bottom"
style=
"@style/tv_user_bottom2"
android:layout_marginTop=
"10dp"
>
android:text=
"0"
android:textColor=
"@color/cl_order_item_date"
/>
</LinearLayout>
<LinearLayout
<LinearLayout
style=
"@style/ll_user_bottom2"
style=
"@style/ll_user_bottom2"
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.toCommonRecord(3)}"
>
android:onClick=
"@{()->presenter.toCommonRecord(2)}"
>
<TextView
<TextView
style=
"@style/tv_user_bottom1"
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_invate_reward"
/>
android:text=
"@string/user_service_income"
/>
<TextView
<TextView
android:id=
"@+id/tv_invate_reward"
android:id=
"@+id/tv_service_income"
style=
"@style/tv_user_bottom2"
style=
"@style/tv_user_bottom2"
android:text=
"0"
android:text=
"0"
android:textColor=
"@color/text_common_green"
/>
android:textColor=
"@color/cl_order_item_date"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
style=
"@style/ll_user_bottom"
style=
"@style/ll_user_bottom2"
android:layout_marginTop=
"10dp"
>
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.toCommonRecord(4)}"
>
<LinearLayout
style=
"@style/ll_user_bottom2"
<TextView
android:onClick=
"@{()->presenter.toCommonRecord(3)}"
style=
"@style/tv_user_bottom1"
>
android:text=
"@string/user_platform_reward"
/>
<TextView
<TextView
style=
"@style/tv_user_bottom1"
android:id=
"@+id/tv_platform_reward"
android:text=
"@string/user_invate_reward"
/>
style=
"@style/tv_user_bottom2"
android:text=
"0"
<TextView
android:textColor=
"@color/text_common_green"
/>
android:id=
"@+id/tv_invate_reward"
style=
"@style/tv_user_bottom2"
android:textColor=
"@color/text_common_green"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.toCommonRecord(4)}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_platform_reward"
/>
<TextView
android:id=
"@+id/tv_platform_reward"
style=
"@style/tv_user_bottom2"
android:textColor=
"@color/text_common_green"
android:text=
"0"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
>
<LinearLayout
<LinearLayout
style=
"@style/ll_user_bottom"
style=
"@style/ll_user_bottom2"
android:layout_marginTop=
"10dp"
android:onClick=
"@{()->presenter.dumpToBusinessType()}"
>
android:layout_marginBottom=
"10dp"
>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:onClick=
"@{()->presenter.dumpToBusinessType()}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/user_business_type"
/>
<TextView
android:id=
"@+id/tv_business_type"
style=
"@style/tv_user_bottom2"
android:text=
"0"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.dumpToLicence()}"
>
<TextView
<TextView
style=
"@style/tv_user_bottom1"
style=
"@style/tv_user_bottom1"
android:text=
"@string/tv_person_center_licenc
e"
/>
android:text=
"@string/user_business_typ
e"
/>
<TextView
<TextView
android:id=
"@+id/tv_licence"
android:id=
"@+id/tv_business_type"
style=
"@style/tv_user_bottom2"
style=
"@style/tv_user_bottom2"
android:text=
"0"
/>
android:text=
"0"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
style=
"@style/ll_user_bottom2"
android:layout_marginLeft=
"10dp"
android:onClick=
"@{()->presenter.dumpToLicence()}"
>
<TextView
style=
"@style/tv_user_bottom1"
android:text=
"@string/tv_person_center_licence"
/>
<TextView
android:id=
"@+id/tv_licence"
style=
"@style/tv_user_bottom2"
android:text=
"0"
/>
</LinearLayout>
</LinearLayout>
<TextView
style=
"@style/common_text_style"
android:layout_width=
"match_parent"
android:paddingLeft=
"18dp"
android:text=
"@string/add_service_wechat"
android:textSize=
"15sp"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_wechat"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:focusable=
"false"
android:focusableInTouchMode=
"false"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"15dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/apply_part"
android:layout_width=
"0dp"
android:layout_weight=
"2"
android:layout_height=
"45dp"
android:background=
"@drawable/btn_blue_commom"
android:gravity=
"center"
android:onClick=
"@{()->presenter.dumpToInvate()}"
android:text=
"@string/invate_new_reward"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
/>
<TextView
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"45dp"
android:background=
"@drawable/btn_blue_commom"
android:gravity=
"center"
android:layout_marginLeft=
"15dp"
android:onClick=
"@{()->presenter.toInviteRecord()}"
android:text=
"@string/invite_record"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
/>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:layout_marginBottom=
"15dp"
android:background=
"@drawable/btn_dark_red"
android:gravity=
"center"
android:onClick=
"@{()->presenter.invateProvider()}"
android:text=
"@string/invate_provider_title"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
<TextView
android:id=
"@+id/apply_part"
android:layout_width=
"match_parent"
android:layout_height=
"49dp"
android:gravity=
"center"
android:text=
"@string/invate_new_reward"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
android:background=
"@drawable/btn_blue_commom"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:layout_marginBottom=
"15dp"
android:onClick=
"@{()->presenter.dumpToInvate()}"
/>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
userCenter/src/main/res/layout/item_invite_record.xml
0 → 100644
View file @
35dcd8a2
<?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=
"horizontal"
>
<TextView
android:id=
"@+id/tv_item1"
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_weight=
"1.2"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item1"
android:gravity=
"center"
android:maxLines=
"5"
android:paddingTop=
"5dp"
android:paddingBottom=
"5dp"
/>
<TextView
android:id=
"@+id/tv_item2"
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item2"
android:gravity=
"center"
android:maxLines=
"5"
android:paddingTop=
"5dp"
android:paddingBottom=
"5dp"
/>
<TextView
android:id=
"@+id/tv_item3"
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item1"
android:gravity=
"center"
android:maxLines=
"5"
android:paddingTop=
"5dp"
android:paddingBottom=
"5dp"
/>
</LinearLayout>
userCenter/src/main/res/layout/item_service_wechat.xml
0 → 100644
View file @
35dcd8a2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
style=
"@style/ll_service_wechat"
android:layout_marginBottom=
"5dp"
>
<TextView
android:id=
"@+id/tv_desc"
style=
"@style/common_text_style"
android:text=
"客服:"
/>
<TextView
android:id=
"@+id/tv_phone"
style=
"@style/common_text_style"
android:layout_marginLeft=
"10dp"
android:textColor=
"@color/text_common_blue"
/>
<View
style=
"@style/fill_horizontal"
/>
<TextView
android:id=
"@+id/tv_copy"
style=
"@style/tv_copy_wecht_btn"
/>
</LinearLayout>
userCenter/src/main/res/values/strings.xml
View file @
35dcd8a2
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<string
name=
"share_reward_money"
>
分享奖金
</string>
<string
name=
"share_reward_money"
>
分享奖金
</string>
<string
name=
"reward_money"
>
奖励金额
</string>
<string
name=
"reward_money"
>
奖励金额
</string>
<string
name=
"be_invated_person"
>
被邀请人
</string>
<string
name=
"be_invated_person"
>
被邀请人
</string>
<string
name=
"invite_time"
>
邀请时间
</string>
<string
name=
"reward_company"
>
奖励方
</string>
<string
name=
"reward_company"
>
奖励方
</string>
<string
name=
"reward_date"
>
奖励日期
</string>
<string
name=
"reward_date"
>
奖励日期
</string>
<string
name=
"deatail_addr_"
>
详细地址:
</string>
<string
name=
"deatail_addr_"
>
详细地址:
</string>
...
@@ -32,12 +33,20 @@
...
@@ -32,12 +33,20 @@
<string
name=
"sale_record_rule4_1_2"
>
的佣金。(佣金含依法代扣代缴个人劳务收入所得税费和支付手续费等)
</string>
<string
name=
"sale_record_rule4_1_2"
>
的佣金。(佣金含依法代扣代缴个人劳务收入所得税费和支付手续费等)
</string>
<string
name=
"sale_record_rule4_2"
>
的佣金,对于[消费返利]平台收取每笔返利金额
</string>
<string
name=
"sale_record_rule4_2"
>
的佣金,对于[消费返利]平台收取每笔返利金额
</string>
<string
name=
"sale_record_rule4_3"
>
的佣金。(佣金含依法代扣代缴个人劳务收入所得税费和支付手续费等)
</string>
<string
name=
"sale_record_rule4_3"
>
的佣金。(佣金含依法代扣代缴个人劳务收入所得税费和支付手续费等)
</string>
<string
name=
"invate_user_title"
>
邀请新人有奖
</string>
<string
name=
"invate_reward_rule"
>
奖励规则:
</string>
<string
name=
"invate_reward_rule"
>
奖励规则:
</string>
<string
name=
"invate_reward_rule1"
>
1、成功邀请一名新人注册大鱼师傅APP, 被邀请人的销售奖励/服务收入的5%给您。
</string>
<string
name=
"invate_reward_rule1"
>
1、成功邀请一名新人注册大鱼师傅APP, 被邀请人的销售奖励/服务收入的5%给您。
</string>
<string
name=
"invate_reward_rule2"
>
2、请务必提醒被邀请人在注册APP时准确输入您的【专属邀请码】;如果输入错误或忘记输入,系统无法识别并记账。
</string>
<string
name=
"invate_reward_rule2"
>
2、请务必提醒被邀请人在注册APP时准确输入您的【专属邀请码】;如果输入错误或忘记输入,系统无法识别并记账。
</string>
<string
name=
"remember_your_invate_code"
>
请牢记您的专属邀请码:
</string>
<string
name=
"remember_your_invate_code"
>
请牢记您的专属邀请码:
</string>
<string
name=
"forward_invate_now"
>
马上转发\n【大鱼师傅APP】注册链接
</string>
<string
name=
"forward_invate_now"
>
马上转发\n【大鱼师傅APP】注册链接
</string>
<string
name=
"invate_provider_title"
>
推荐商家有奖
</string>
<string
name=
"invate_provider_rule1"
>
1、推荐成功注册大鱼商家,该商家前十单销售奖励/服务工费的10%都归您。
</string>
<string
name=
"invate_provider_rule2"
>
2、请务必提醒商家注册时准确输入您的【专属邀请码】;如果输入错误或忘记输入,系统无法识别并记账。
</string>
<string
name=
"forward_provider_now"
>
马上转发\n【大鱼商家APP】注册链接
</string>
<string
name=
"share_finish"
>
分享结束
</string>
<string
name=
"share_finish"
>
分享结束
</string>
<string
name=
"invite_new_share_title"
>
大鱼师傅
</string>
<string
name=
"invite_new_share_title"
>
大鱼师傅
</string>
<string
name=
"invite_new_share_content"
>
邀请师傅瓜分千万佣金!
</string>
<string
name=
"invite_new_share_content"
>
邀请师傅瓜分千万佣金!
</string>
<string
name=
"invite_new_share_content_business"
>
邀请商家瓜分千万佣金!
</string>
<string
name=
"add_service_wechat"
>
添加客服微信获得更多派单
</string>
<string
name=
"copy_wechat_num"
>
复制微信号
</string>
</resources>
</resources>
userCenter/src/main/res/values/styles.xml
View file @
35dcd8a2
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<style
name=
"ll_user_bottom2"
>
<style
name=
"ll_user_bottom2"
>
<item
name=
"android:layout_width"
>
0dp
</item>
<item
name=
"android:layout_width"
>
0dp
</item>
<item
name=
"android:layout_weight"
>
1
</item>
<item
name=
"android:layout_weight"
>
1
</item>
<item
name=
"android:layout_height"
>
100
dp
</item>
<item
name=
"android:layout_height"
>
86
dp
</item>
<item
name=
"android:orientation"
>
vertical
</item>
<item
name=
"android:orientation"
>
vertical
</item>
<item
name=
"android:gravity"
>
center_horizontal
</item>
<item
name=
"android:gravity"
>
center_horizontal
</item>
<item
name=
"android:background"
>
@drawable/personal_center_selector
</item>
<item
name=
"android:background"
>
@drawable/personal_center_selector
</item>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<style
name=
"tv_user_bottom1"
>
<style
name=
"tv_user_bottom1"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:layout_marginTop"
>
@dimen/dp_1
6.7
</item>
<item
name=
"android:layout_marginTop"
>
@dimen/dp_1
1
</item>
<item
name=
"android:textColor"
>
@color/cl_home_title_text_color
</item>
<item
name=
"android:textColor"
>
@color/cl_home_title_text_color
</item>
<item
name=
"android:textSize"
>
14sp
</item>
<item
name=
"android:textSize"
>
14sp
</item>
</style>
</style>
...
@@ -33,4 +33,18 @@
...
@@ -33,4 +33,18 @@
<item
name=
"android:textSize"
>
22sp
</item>
<item
name=
"android:textSize"
>
22sp
</item>
</style>
</style>
<style
name=
"ll_service_wechat"
parent=
"ll_horizontal"
>
<item
name=
"android:layout_marginLeft"
>
20dp
</item>
<item
name=
"android:layout_marginRight"
>
20dp
</item>
<item
name=
"android:layout_marginTop"
>
10dp
</item>
</style>
<style
name=
"tv_copy_wecht_btn"
parent=
"tv_btn"
>
<item
name=
"android:layout_width"
>
95dp
</item>
<item
name=
"android:layout_height"
>
30dp
</item>
<item
name=
"android:text"
>
@string/copy_wechat_num
</item>
<item
name=
"android:background"
>
@drawable/btn_blue_commom
</item>
<item
name=
"android:textSize"
>
13sp
</item>
</style>
</resources>
</resources>
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