Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
d0c3418d
Commit
d0c3418d
authored
Oct 29, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新版个人中心,修改手机号码
parent
d513b651
Changes
39
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
2138 additions
and
378 deletions
+2138
-378
build.gradle
RvFrame/build.gradle
+0
-2
PickerPresenter.java
...com/ruiwenliu/wrapper/base/presenter/PickerPresenter.java
+1
-0
UserInfoBean.java
...rc/main/java/com/ruiwenliu/wrapper/bean/UserInfoBean.java
+58
-1
IsAppInstall.java
...ls/src/main/java/com/rv/component/utils/IsAppInstall.java
+20
-0
ApiConfig.java
...e_home/src/main/java/com/rv/home/rv/module/ApiConfig.java
+6
-0
AndroidManifest.xml
module_mine/src/main/AndroidManifest.xml
+4
-2
MineFragment.java
module_mine/src/main/java/com/rv/rvmine/MineFragment.java
+38
-22
SwitchFragmentListener.java
...e/src/main/java/com/rv/rvmine/SwitchFragmentListener.java
+7
-0
AccountBindDto.java
...mine/src/main/java/com/rv/rvmine/bean/AccountBindDto.java
+64
-0
BindCallBackBean.java
...ne/src/main/java/com/rv/rvmine/bean/BindCallBackBean.java
+15
-0
BindPhoneFirstFragment.java
...n/java/com/rv/rvmine/fragment/BindPhoneFirstFragment.java
+55
-0
BindPhoneSecondFragment.java
.../java/com/rv/rvmine/fragment/BindPhoneSecondFragment.java
+220
-0
BindPhoneThirdFragment.java
...n/java/com/rv/rvmine/fragment/BindPhoneThirdFragment.java
+234
-0
AccountSafeActivity.java
...main/java/com/rv/rvmine/traveler/AccountSafeActivity.java
+413
-0
AlterNickNameActivity.java
...in/java/com/rv/rvmine/traveler/AlterNickNameActivity.java
+71
-0
BindPhoneActivity.java
...c/main/java/com/rv/rvmine/traveler/BindPhoneActivity.java
+129
-0
PersonalInformationActivity.java
...a/com/rv/rvmine/traveler/PersonalInformationActivity.java
+61
-131
SettingActivity.java
...src/main/java/com/rv/rvmine/traveler/SettingActivity.java
+9
-6
icon_bind_phone.png
module_mine/src/main/res/drawable-xhdpi/icon_bind_phone.png
+0
-0
shape_rv_bg_bind_phone_button.xml
...e/src/main/res/drawable/shape_rv_bg_bind_phone_button.xml
+6
-0
shape_rv_bg_f2f2f2.xml
module_mine/src/main/res/drawable/shape_rv_bg_f2f2f2.xml
+5
-0
shape_rv_bg_f3eadc.xml
module_mine/src/main/res/drawable/shape_rv_bg_f3eadc.xml
+5
-0
shape_rv_bg_fbf9e8.xml
module_mine/src/main/res/drawable/shape_rv_bg_fbf9e8.xml
+5
-0
shape_rv_bg_fdc349.xml
module_mine/src/main/res/drawable/shape_rv_bg_fdc349.xml
+5
-0
shape_rv_bg_fde6b5.xml
module_mine/src/main/res/drawable/shape_rv_bg_fde6b5.xml
+5
-0
activity_account_safe.xml
module_mine/src/main/res/layout/activity_account_safe.xml
+162
-0
activity_alter_nick_name.xml
module_mine/src/main/res/layout/activity_alter_nick_name.xml
+26
-0
activity_bind_phone.xml
module_mine/src/main/res/layout/activity_bind_phone.xml
+16
-0
activity_mine.xml
module_mine/src/main/res/layout/activity_mine.xml
+36
-10
activity_personal_information.xml
...ine/src/main/res/layout/activity_personal_information.xml
+15
-156
activity_setting.xml
module_mine/src/main/res/layout/activity_setting.xml
+20
-20
fragment_bind_phone_first.xml
...le_mine/src/main/res/layout/fragment_bind_phone_first.xml
+44
-0
fragment_bind_phone_second.xml
...e_mine/src/main/res/layout/fragment_bind_phone_second.xml
+79
-0
fragment_bind_phone_third.xml
...le_mine/src/main/res/layout/fragment_bind_phone_third.xml
+98
-0
rv_dialog_choose_gender.xml
module_mine/src/main/res/layout/rv_dialog_choose_gender.xml
+54
-28
WalletApi.java
...n_wallet/src/main/java/com/xxrv/wallet/api/WalletApi.java
+9
-0
AccountNumberListBean.java
...main/java/com/xxrv/wallet/bean/AccountNumberListBean.java
+117
-0
AuthResult.java
...wallet/src/main/java/com/xxrv/wallet/bean/AuthResult.java
+1
-0
WalletAuthInfoBean.java
...rc/main/java/com/xxrv/wallet/bean/WalletAuthInfoBean.java
+25
-0
No files found.
RvFrame/build.gradle
View file @
d0c3418d
apply
plugin:
'com.android.library'
android
{
compileSdkVersion
rootProject
.
ext
.
compileSdkVersion
buildToolsVersion
rootProject
.
ext
.
buildToolsVersion
...
...
@@ -77,7 +76,6 @@ android {
//api 'com.just.agentweb:filechooser:4.0.3-beta'
//api 'com.just.agentweb:download:4.0.3-beta'
//百度定位
api
files
(
'libs/BaiduLBS_Android.jar'
)
//bugly
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/base/presenter/PickerPresenter.java
View file @
d0c3418d
...
...
@@ -32,6 +32,7 @@ public class PickerPresenter extends CommonPresenter {
public
final
int
TYPE_CAMERA_CROP_CODE
=
1003
;
//照相并裁剪
public
final
int
TYPE_ALBUM_CROP_CODE
=
1004
;
//相册并裁剪
public
final
int
TYPE_CROP_CODE
=
1005
;
//裁剪后的结果
private
String
cameraUrl
;
private
File
imageFile
;
private
Uri
cropUri
;
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/bean/UserInfoBean.java
View file @
d0c3418d
package
com
.
ruiwenliu
.
wrapper
.
bean
;
import
com.google.gson.annotations.SerializedName
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
java.io.Serializable
;
...
...
@@ -46,8 +45,14 @@ public class UserInfoBean extends BaseBean implements Serializable {
private
String
wxOpenid
;
//微信unionid
private
String
unionid
;
// 微信
private
String
wxNickname
;
//qq
private
String
openid
;
// QQ昵称
private
String
qqNickname
;
// 支付宝昵称
private
String
aliPayNickName
;
//状态:0-启用,1-禁用
private
Integer
status
;
//身份证号
...
...
@@ -85,6 +90,10 @@ public class UserInfoBean extends BaseBean implements Serializable {
private
String
positionName
;
// 职位名称
private
boolean
isBindAliPay
;
//是否绑定支付宝
private
boolean
isBindWx
;
// 是否绑定过微信
private
boolean
isBindQQ
;
// 是否绑定过QQ;
public
Integer
getId
()
{
return
id
;
...
...
@@ -301,5 +310,53 @@ public class UserInfoBean extends BaseBean implements Serializable {
public
void
setBigIcon
(
String
bigIcon
)
{
this
.
bigIcon
=
bigIcon
;
}
public
boolean
isBindAliPay
()
{
return
isBindAliPay
;
}
public
void
setBindAliPay
(
boolean
bindAliPay
)
{
isBindAliPay
=
bindAliPay
;
}
public
String
getWxNickname
()
{
return
wxNickname
;
}
public
void
setWxNickname
(
String
wxNickname
)
{
this
.
wxNickname
=
wxNickname
;
}
public
String
getQqNickname
()
{
return
qqNickname
;
}
public
void
setQqNickname
(
String
qqNickname
)
{
this
.
qqNickname
=
qqNickname
;
}
public
String
getAliPayNickName
()
{
return
aliPayNickName
;
}
public
void
setAliPayNickName
(
String
aliPayNickName
)
{
this
.
aliPayNickName
=
aliPayNickName
;
}
public
boolean
isBindWx
()
{
return
isBindWx
;
}
public
void
setBindWx
(
boolean
bindWx
)
{
isBindWx
=
bindWx
;
}
public
boolean
isBindQQ
()
{
return
isBindQQ
;
}
public
void
setBindQQ
(
boolean
bindQQ
)
{
isBindQQ
=
bindQQ
;
}
}
}
component_utils/src/main/java/com/rv/component/utils/IsAppInstall.java
View file @
d0c3418d
...
...
@@ -41,4 +41,24 @@ public class IsAppInstall {
}
return
false
;
}
/**
* 判断qq是否可用
*
* @param context
* @return
*/
public
static
boolean
isZfbClientAvailable
(
Context
context
)
{
final
PackageManager
packageManager
=
context
.
getPackageManager
();
List
<
PackageInfo
>
pinfo
=
packageManager
.
getInstalledPackages
(
0
);
if
(
pinfo
!=
null
)
{
for
(
int
i
=
0
;
i
<
pinfo
.
size
();
i
++)
{
String
pn
=
pinfo
.
get
(
i
).
packageName
;
if
(
pn
.
equals
(
"com.eg.android.AlipayGphone"
))
{
return
true
;
}
}
}
return
false
;
}
}
module_home/src/main/java/com/rv/home/rv/module/ApiConfig.java
View file @
d0c3418d
...
...
@@ -163,4 +163,10 @@ public class ApiConfig {
public
static
String
HTTP_URL_PRICE_BASEORDER
=
RvFrameConfig
.
HOST
+
"/api/order/baseOrder/"
;
public
static
String
HTTP_URL_PRERENT_DAYS
=
RvFrameConfig
.
HOST
+
"/api/app/cofig/app/unauth/types?types=999"
;
public
static
String
HTTP_URL_CHECK_MOBILE_CODE
=
RvFrameConfig
.
HOST
+
"/api/admin/api/app/unauth/checkMobilecode"
;
public
static
String
HTTP_URL_UPDATE_PHONE
=
RvFrameConfig
.
HOST
+
"/api/auth/jwt/updUsername"
;
public
static
String
HTTP_URL_USER_BIND
=
RvFrameConfig
.
HOST
+
"/api/admin/app/user/bind"
;
}
module_mine/src/main/AndroidManifest.xml
View file @
d0c3418d
...
...
@@ -3,7 +3,7 @@
package=
"com.rv.rvmine"
>
<application>
<activity
android:name=
".fragment.MyReleasePatFragment"
></activity
>
<activity
android:name=
".fragment.MyReleasePatFragment"
/
>
<activity
android:name=
".personal.IDCardCertificationShowActivity"
android:screenOrientation=
"portrait"
/>
...
...
@@ -13,7 +13,9 @@
<activity
android:name=
".traveler.MyReleaseActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
"com.rv.version.activity.UpdateAppActivity"
/>
<activity
android:name=
".traveler.AccountSafeActivity"
/>
<activity
android:name=
".traveler.BindPhoneActivity"
/>
<activity
android:name=
".traveler.AlterNickNameActivity"
></activity>
</application>
</manifest>
\ No newline at end of file
module_mine/src/main/java/com/rv/rvmine/MineFragment.java
View file @
d0c3418d
...
...
@@ -4,10 +4,15 @@ import android.annotation.SuppressLint;
import
android.app.ActivityOptions
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.text.SpannableString
;
import
android.text.Spanned
;
import
android.text.TextUtils
;
import
android.text.style.AbsoluteSizeSpan
;
import
android.text.style.ForegroundColorSpan
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
...
...
@@ -93,7 +98,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
TextView
tvLogin
;
@BindView
(
R2
.
id
.
tv_verified
)
TextView
tvVerified
;
// @BindView(R2.id.tv_membership_level)
// @BindView(R2.id.tv_membership_level)
// TextView tvMembershipLevel;
@BindView
(
R2
.
id
.
tv_member_hint
)
TextView
tvMemberHint
;
...
...
@@ -115,14 +120,16 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
Banner
mineBanner
;
@BindView
(
R2
.
id
.
refresh
)
SimpleRefreshLayout
mSimpleRefreshLayout
;
@BindView
(
R2
.
id
.
tv_user_identity
)
TextView
tvUserIdentity
;
//
@BindView(R2.id.tv_user_identity)
//
TextView tvUserIdentity;
@BindView
(
R2
.
id
.
tv_integral
)
TextView
tvIntegral
;
@BindView
(
R2
.
id
.
tv_wallet
)
TextView
tvWallet
;
@BindView
(
R2
.
id
.
tv_coupon
)
TextView
tvCoupon
;
@BindView
(
R2
.
id
.
tv_capacity
)
TextView
tvCapacity
;
private
UserInfoBean
.
UserInfo
info
;
...
...
@@ -149,14 +156,14 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
tvNickname
.
setVisibility
(
View
.
GONE
);
((
View
)
ivMember
.
getParent
()).
setVisibility
(
View
.
GONE
);
((
View
)
ivMember
.
getParent
()
.
getParent
()
).
setVisibility
(
View
.
GONE
);
tvLogin
.
setVisibility
(
View
.
VISIBLE
);
tvVerified
.
setVisibility
(
View
.
GONE
);
tvViewPrivileges
.
setText
(
"查看会员特权"
);
mSimpleRefreshLayout
.
setPullDownEnable
(
false
);
}
else
{
tvNickname
.
setVisibility
(
View
.
VISIBLE
);
((
View
)
ivMember
.
getParent
()).
setVisibility
(
View
.
VISIBLE
);
((
View
)
ivMember
.
getParent
()
.
getParent
()
).
setVisibility
(
View
.
VISIBLE
);
// ivMember.setVisibility(View.VISIBLE);
tvLogin
.
setVisibility
(
View
.
GONE
);
tvVerified
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -172,7 +179,6 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
setMember
(
userInfo
);
}
}
private
void
initRefresh
()
{
...
...
@@ -256,7 +262,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
@OnClick
({
R2
.
id
.
iv_avatar
,
R2
.
id
.
tv_login
,
R2
.
id
.
tv_verified
,
R2
.
id
.
rl_item_to_be_paid
,
R2
.
id
.
rl_item_staying
,
R2
.
id
.
iv_item_message
,
R2
.
id
.
rl_item_traveling
,
R2
.
id
.
rl_item_completed
,
R2
.
id
.
rl_item_collection
,
R2
.
id
.
rl_item_my_release
,
R2
.
id
.
iv_item_setting
,
R2
.
id
.
ll_item_view_privileges
,
R2
.
id
.
rl_item_order_all
,
R2
.
id
.
ll_item_integral
,
R2
.
id
.
ll_item_wallet
,
R2
.
id
.
ll_item_coupon
,
R2
.
id
.
ll_item_promotion
,
R2
.
id
.
rl_item_check_in
,
R2
.
id
.
rl_item_travel_management
})
R2
.
id
.
ll_item_coupon
,
R2
.
id
.
ll_item_promotion
,
R2
.
id
.
rl_item_check_in
,
R2
.
id
.
rl_item_travel_management
,
R2
.
id
.
tv_nickname
})
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
iv_item_setting
)
{
...
...
@@ -267,7 +273,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
if
(
isLogin
())
return
;
showToast
(
"该功能还在开发中。。。"
);
}
else
if
(
id
==
R
.
id
.
iv_avatar
)
{
}
else
if
(
id
==
R
.
id
.
iv_avatar
||
id
==
R
.
id
.
tv_nickname
)
{
//头像
if
(
isLogin
())
return
;
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
...
...
@@ -384,16 +390,21 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
ivAvatar
.
setBackgroundResource
(
0
);
ivAvatar
.
setImageResource
(
R
.
drawable
.
common_icon_avatar_default
);
tvNickname
.
setVisibility
(
View
.
GONE
);
((
View
)
ivMember
.
getParent
()).
setVisibility
(
View
.
GONE
);
((
View
)
ivMember
.
getParent
()
.
getParent
()
).
setVisibility
(
View
.
GONE
);
// ivMember.setVisibility(View.GONE);
tvLogin
.
setVisibility
(
View
.
VISIBLE
);
tvVerified
.
setVisibility
(
View
.
GONE
);
tvUserIdentity
.
setVisibility
(
View
.
GONE
);
//
tvUserIdentity.setVisibility(View.GONE);
tvViewPrivileges
.
setText
(
"查看会员特权"
);
// tvMembershipLevel.setText("会员中心");
tvMemberHint
.
setText
(
"免费用车- -天"
);
tvIntegral
.
setText
(
"0"
);
tvWallet
.
setText
(
"0"
);
SpannableString
s
=
new
SpannableString
(
"¥ 0"
);
s
.
setSpan
(
new
AbsoluteSizeSpan
(
10
,
true
),
0
,
1
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
s
.
setSpan
(
new
AbsoluteSizeSpan
(
20
,
true
),
1
,
s
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
s
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#171413"
)),
0
,
s
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
tvWallet
.
setText
(
s
);
tvCoupon
.
setText
(
"0"
);
mSimpleRefreshLayout
.
setPullDownEnable
(
false
);
}
...
...
@@ -522,7 +533,12 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
private
void
profitData
(
InfoProfitBean
bean
)
{
if
(
bean
!=
null
&&
bean
.
getData
()
!=
null
)
{
tvIntegral
.
setText
(
bean
.
getData
().
getTotalPoint
());
tvWallet
.
setText
(
bean
.
getData
().
getBalance
());
SpannableString
s
=
new
SpannableString
(
"¥ "
+
bean
.
getData
().
getBalance
());
s
.
setSpan
(
new
AbsoluteSizeSpan
(
10
,
true
),
0
,
1
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
s
.
setSpan
(
new
AbsoluteSizeSpan
(
20
,
true
),
1
,
s
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
s
.
setSpan
(
new
ForegroundColorSpan
(
Color
.
parseColor
(
"#171413"
)),
0
,
s
.
length
(),
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
tvWallet
.
setText
(
s
);
tvCoupon
.
setText
(
bean
.
getData
().
getCouponNumber
());
}
}
...
...
@@ -534,6 +550,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
if
(
info
!=
null
)
{
GlideManager
.
getInstance
(
_mActivity
).
loadImage
(
info
.
getHeadimgurl
(),
ivAvatar
);
tvNickname
.
setText
(
info
.
getNickname
());
tvCapacity
.
setText
(
info
.
getPositionName
());
//更新实名信息
UtilsManager
.
getInstance
(
OkGoUtil
.
application
).
setSharePreferencesSave
(
SPConstance
.
USER_JSON
).
putString
(
SPConstance
.
USER_JSON_USERINFO
,
JSON
.
toJSONString
(
info
)).
commit
();
if
(
info
.
getCertificationStatus
()
==
0
)
{
//实名认证状态:0-未认证,1-已认证
...
...
@@ -548,26 +565,25 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
}
else
{
ivMember
.
setVisibility
(
View
.
GONE
);
}
if
(
TextUtils
.
isEmpty
(
info
.
getPositionName
()))
{
tvUserIdentity
.
setVisibility
(
View
.
GONE
);
}
else
{
tvUserIdentity
.
setText
(
info
.
getPositionName
());
tvUserIdentity
.
setVisibility
(
View
.
VISIBLE
);
}
// if (TextUtils.isEmpty(info.getPositionName())) {
// tvUserIdentity.setVisibility(View.GONE);
// } else {
// tvUserIdentity.setText(info.getPositionName());
// tvUserIdentity.setVisibility(View.VISIBLE);
//
// }
setMember
(
info
);
}
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
tvNickname
.
setVisibility
(
View
.
GONE
);
((
View
)
ivMember
.
getParent
()).
setVisibility
(
View
.
GONE
);
((
View
)
ivMember
.
getParent
()
.
getParent
()
).
setVisibility
(
View
.
GONE
);
// ivMember.setVisibility(View.GONE);
tvLogin
.
setVisibility
(
View
.
VISIBLE
);
tvVerified
.
setVisibility
(
View
.
GONE
);
}
else
{
tvNickname
.
setVisibility
(
View
.
VISIBLE
);
((
View
)
ivMember
.
getParent
()).
setVisibility
(
View
.
VISIBLE
);
((
View
)
ivMember
.
getParent
()
.
getParent
()
).
setVisibility
(
View
.
VISIBLE
);
// ivMember.setVisibility(View.VISIBLE);
tvLogin
.
setVisibility
(
View
.
GONE
);
tvVerified
.
setVisibility
(
View
.
VISIBLE
);
...
...
module_mine/src/main/java/com/rv/rvmine/SwitchFragmentListener.java
0 → 100644
View file @
d0c3418d
package
com
.
rv
.
rvmine
;
public
interface
SwitchFragmentListener
{
void
setTitle
(
String
title
)
;
void
next
();
void
changeSuccess
(
String
phone
);
}
module_mine/src/main/java/com/rv/rvmine/bean/AccountBindDto.java
0 → 100644
View file @
d0c3418d
package
com
.
rv
.
rvmine
.
bean
;
public
class
AccountBindDto
{
private
String
openId
;
private
String
unionId
;
private
String
nickName
;
private
String
type
;
private
String
code
;
public
String
getOpenId
()
{
return
openId
;
}
public
void
setOpenId
(
String
openId
)
{
this
.
openId
=
openId
;
}
public
String
getUnionId
()
{
return
unionId
;
}
public
void
setUnionId
(
String
unionId
)
{
this
.
unionId
=
unionId
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
AccountBindDto
(
String
openId
,
String
unionId
,
String
nickName
,
String
type
,
String
code
)
{
this
.
openId
=
openId
;
this
.
unionId
=
unionId
;
this
.
nickName
=
nickName
;
this
.
type
=
type
;
this
.
code
=
code
;
}
public
AccountBindDto
(
String
openId
,
String
unionId
,
String
nickName
,
String
type
)
{
this
.
openId
=
openId
;
this
.
unionId
=
unionId
;
this
.
nickName
=
nickName
;
this
.
type
=
type
;
}
}
module_mine/src/main/java/com/rv/rvmine/bean/BindCallBackBean.java
0 → 100644
View file @
d0c3418d
package
com
.
rv
.
rvmine
.
bean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
public
class
BindCallBackBean
extends
BaseBean
{
private
String
data
;
public
String
getData
()
{
return
data
;
}
public
void
setData
(
String
data
)
{
this
.
data
=
data
;
}
}
module_mine/src/main/java/com/rv/rvmine/fragment/BindPhoneFirstFragment.java
0 → 100644
View file @
d0c3418d
package
com
.
rv
.
rvmine
.
fragment
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.TextView
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseFragment
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.rv.rvmine.R
;
import
com.rv.rvmine.R2
;
import
com.rv.rvmine.SwitchFragmentListener
;
import
butterknife.BindView
;
public
class
BindPhoneFirstFragment
extends
BaseFragment
<
CommonPresenter
>
{
@BindView
(
R2
.
id
.
tv_phone
)
TextView
tvPhone
;
@BindView
(
R2
.
id
.
btn_update_phone
)
Button
btnUpdatePhone
;
private
String
phone
;
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
fragment_bind_phone_first
;
}
@Override
protected
void
initView
(
Bundle
savedInstanceState
)
{
((
SwitchFragmentListener
)
_mActivity
).
setTitle
(
"绑定手机号"
);
phone
=
getArguments
().
getString
(
"phone"
);
if
(!
TextUtils
.
isEmpty
(
phone
))
tvPhone
.
setText
(
phone
);
btnUpdatePhone
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
((
SwitchFragmentListener
)
_mActivity
).
next
();
}
});
}
@Override
protected
void
loadData
(
Bundle
savedInstanceState
)
{
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
}
}
module_mine/src/main/java/com/rv/rvmine/fragment/BindPhoneSecondFragment.java
0 → 100644
View file @
d0c3418d
package
com
.
rv
.
rvmine
.
fragment
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.TextView
;
import
com.base.utils.tools.android.NetworkUtil
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseFragment
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.ruiwenliu.wrapper.util.RxJavaManager
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.ui.login.bean.SendCodeBean
;
import
com.rv.rvmine.R
;
import
com.rv.rvmine.R2
;
import
com.rv.rvmine.SwitchFragmentListener
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
butterknife.BindView
;
import
io.reactivex.Observer
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.functions.Consumer
;
public
class
BindPhoneSecondFragment
extends
BaseFragment
<
CommonPresenter
>
{
@BindView
(
R2
.
id
.
tv_phone
)
TextView
tvPhone
;
@BindView
(
R2
.
id
.
tv_get_code
)
TextView
tvGetCode
;
@BindView
(
R2
.
id
.
et_phone_code
)
EditText
etPhoneCode
;
@BindView
(
R2
.
id
.
btn_next
)
Button
btnNext
;
private
String
phone
;
private
Disposable
mDisposable
;
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
fragment_bind_phone_second
;
}
@Override
protected
void
initView
(
Bundle
savedInstanceState
)
{
((
SwitchFragmentListener
)
_mActivity
).
setTitle
(
"验证手机号"
);
phone
=
getArguments
().
getString
(
"phone"
);
if
(!
TextUtils
.
isEmpty
(
phone
))
tvPhone
.
setText
(
phone
);
etPhoneCode
.
addTextChangedListener
(
watcher
);
tvGetCode
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
getPhone
()))
{
showToast
(
getString
(
com
.
rv
.
home
.
R
.
string
.
rv_phone_hint
));
return
;
}
if
(
getPhone
().
length
()
!=
11
)
{
showToast
(
"手机号码不正确"
);
return
;
}
sendCode
();
}
});
btnNext
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
getPhone
())
||
getPhone
().
length
()
!=
11
)
{
showToast
(
"手机号码不正确"
);
return
;
}
if
(
TextUtils
.
isEmpty
(
getCode
()))
{
showToast
(
"短信验证码为空"
);
return
;
}
checkMobilecode
();
}
});
}
/**
* 获得手机号
*
* @return
*/
private
String
getPhone
()
{
return
phone
;
}
private
String
getCode
()
{
return
etPhoneCode
.
getText
().
toString
().
trim
();
}
/**
* 发送验证码
*/
private
void
sendCode
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"username"
,
getPhone
());
map
.
put
(
"type"
,
4
);
mPresenter
.
postData
(
0
,
ApiConfig
.
HTTP_URL_SEND_CODE
,
SendCodeBean
.
class
,
map
,
true
);
}
/**
* 发送验证码
*/
private
void
checkMobilecode
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"phone"
,
getPhone
());
map
.
put
(
"mobilecode"
,
getCode
());
mPresenter
.
getData
(
1
,
ApiConfig
.
HTTP_URL_CHECK_MOBILE_CODE
,
BaseBean
.
class
,
map
,
true
);
}
@Override
protected
void
loadData
(
Bundle
savedInstanceState
)
{
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
if
(
requestType
==
0
)
{
showToast
(
getString
(
com
.
rv
.
home
.
R
.
string
.
rv_phone_code_toast
));
sendCode
(
60
);
}
else
if
(
requestType
==
1
)
{
((
SwitchFragmentListener
)
_mActivity
).
next
();
}
}
@Override
public
void
onShowError
(
String
errorMsg
,
int
errorType
)
{
if
(
getContext
()
!=
null
&&
!
NetworkUtil
.
isNetworkAvailable
(
getContext
()))
{
showToast
(
"网络异常,请检察您的网络"
);
return
;
}
if
(!
TextUtils
.
isEmpty
(
errorMsg
))
showToast
(
errorMsg
);
}
/**
* 发送验证码
*
* @param timeLong 验证码时长
*/
private
void
sendCode
(
final
int
timeLong
)
{
RxJavaManager
.
getInstance
().
sendCode
(
timeLong
,
new
Consumer
<
Disposable
>()
{
@Override
public
void
accept
(
Disposable
disposable
)
throws
Exception
{
tvGetCode
.
setEnabled
(
false
);
}
},
new
Observer
<
Long
>()
{
@Override
public
void
onSubscribe
(
Disposable
d
)
{
mDisposable
=
d
;
}
@Override
public
void
onNext
(
Long
aLong
)
{
tvGetCode
.
setText
(
""
+
aLong
+
"s"
);
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onComplete
()
{
tvGetCode
.
setEnabled
(
true
);
tvGetCode
.
setText
(
getString
(
com
.
rv
.
home
.
R
.
string
.
rv_login_rest
));
}
});
}
/**
* 停止计时
*/
public
void
stopCarousel
()
{
if
(
mDisposable
!=
null
&&
!
mDisposable
.
isDisposed
())
{
mDisposable
.
dispose
();
}
}
@Override
public
void
onStop
()
{
super
.
onStop
();
stopCarousel
();
}
private
TextWatcher
watcher
=
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
if
(!
TextUtils
.
isEmpty
(
getCode
())
&&
getCode
().
length
()
>=
4
)
{
btnNext
.
setBackgroundResource
(
R
.
drawable
.
shape_rv_bg_fdc349
);
}
else
{
btnNext
.
setBackgroundResource
(
R
.
drawable
.
shape_rv_bg_fde6b5
);
}
}
@Override
public
void
afterTextChanged
(
Editable
s
)
{
}
};
}
module_mine/src/main/java/com/rv/rvmine/fragment/BindPhoneThirdFragment.java
0 → 100644
View file @
d0c3418d
package
com
.
rv
.
rvmine
.
fragment
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.TextView
;
import
com.base.utils.tools.android.NetworkUtil
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseFragment
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.ruiwenliu.wrapper.util.RxJavaManager
;
import
com.rv.component.utils.DateUtils
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.ui.login.bean.SendCodeBean
;
import
com.rv.rvmine.R
;
import
com.rv.rvmine.R2
;
import
com.rv.rvmine.SwitchFragmentListener
;
import
com.rv.rvmine.bean.BindCallBackBean
;
import
com.yuyife.okgo.OkGoUtil
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
butterknife.BindView
;
import
io.reactivex.Observer
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.functions.Consumer
;
public
class
BindPhoneThirdFragment
extends
BaseFragment
<
CommonPresenter
>
{
@BindView
(
R2
.
id
.
et_phone
)
EditText
etPhone
;
@BindView
(
R2
.
id
.
et_phone_code
)
EditText
etPhoneCode
;
@BindView
(
R2
.
id
.
tv_get_code
)
TextView
tvGetCode
;
@BindView
(
R2
.
id
.
btn_next
)
Button
btnNext
;
private
String
oldPhone
;
private
Disposable
mDisposable
;
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
fragment_bind_phone_third
;
}
@Override
protected
void
initView
(
Bundle
savedInstanceState
)
{
oldPhone
=
getArguments
().
getString
(
"phone"
);
((
SwitchFragmentListener
)
_mActivity
).
setTitle
(
"验证手机号"
);
etPhoneCode
.
addTextChangedListener
(
watcher
);
etPhone
.
addTextChangedListener
(
watcher
);
tvGetCode
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
// 获取短信验证码
if
(
TextUtils
.
isEmpty
(
getPhone
()))
{
showToast
(
getString
(
com
.
rv
.
home
.
R
.
string
.
rv_phone_hint
));
return
;
}
if
(
getPhone
().
length
()
!=
11
)
{
showToast
(
"手机号码不正确"
);
return
;
}
if
(
getPhone
().
equals
(
oldPhone
))
{
showToast
(
"新号码不能与旧号码一样"
);
return
;
}
sendCode
();
}
});
btnNext
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
isEmpty
(
getPhone
())
||
getPhone
().
length
()
!=
11
)
{
showToast
(
"手机号码不正确"
);
return
;
}
if
(
TextUtils
.
isEmpty
(
getCode
()))
{
showToast
(
"短信验证码为空"
);
return
;
}
updateMobile
();
// ((SwitchFragmentListener) _mActivity).changeSuccess(oldPhone);
}
});
}
@Override
protected
void
loadData
(
Bundle
savedInstanceState
)
{
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
if
(
requestType
==
0
)
{
showToast
(
getString
(
com
.
rv
.
home
.
R
.
string
.
rv_phone_code_toast
));
sendCode
(
60
);
}
else
if
(
requestType
==
1
)
{
showToast
(
"手机号更改成功"
);
BindCallBackBean
bean
=
(
BindCallBackBean
)
result
;
if
(!
TextUtils
.
isEmpty
(
bean
.
getData
()))
OkGoUtil
.
setToken
(
bean
.
getData
(),
DateUtils
.
getCurDate
());
((
SwitchFragmentListener
)
_mActivity
).
changeSuccess
(
getPhone
());
}
}
@Override
public
void
onShowError
(
String
errorMsg
,
int
errorType
)
{
if
(
getContext
()
!=
null
&&
!
NetworkUtil
.
isNetworkAvailable
(
getContext
()))
{
showToast
(
"网络异常,请检察您的网络"
);
return
;
}
if
(!
TextUtils
.
isEmpty
(
errorMsg
))
showToast
(
errorMsg
);
}
/**
* 获得手机号
*
* @return
*/
private
String
getPhone
()
{
return
etPhone
.
getText
().
toString
().
trim
();
}
private
String
getCode
()
{
return
etPhoneCode
.
getText
().
toString
().
trim
();
}
/**
* 发送验证码
*
* @param timeLong 验证码时长
*/
private
void
sendCode
(
final
int
timeLong
)
{
RxJavaManager
.
getInstance
().
sendCode
(
timeLong
,
new
Consumer
<
Disposable
>()
{
@Override
public
void
accept
(
Disposable
disposable
)
throws
Exception
{
tvGetCode
.
setEnabled
(
false
);
}
},
new
Observer
<
Long
>()
{
@Override
public
void
onSubscribe
(
Disposable
d
)
{
mDisposable
=
d
;
}
@Override
public
void
onNext
(
Long
aLong
)
{
tvGetCode
.
setText
(
""
+
aLong
+
"s"
);
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onComplete
()
{
tvGetCode
.
setEnabled
(
true
);
tvGetCode
.
setText
(
getString
(
com
.
rv
.
home
.
R
.
string
.
rv_login_rest
));
}
});
}
/**
* 发送验证码
*/
private
void
sendCode
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"username"
,
getPhone
());
mPresenter
.
postData
(
0
,
ApiConfig
.
HTTP_URL_SEND_CODE
,
SendCodeBean
.
class
,
map
,
true
);
}
private
void
updateMobile
()
{
if
(!
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
Map
<
String
,
String
>
head
=
new
HashMap
<>();
head
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
Map
<
String
,
String
>
body
=
new
HashMap
<>();
body
.
put
(
"username"
,
getPhone
());
body
.
put
(
"mobilecode"
,
getCode
());
mPresenter
.
postData
(
RvFrameConfig
.
HOST
,
1
,
ApiConfig
.
HTTP_URL_UPDATE_PHONE
,
BindCallBackBean
.
class
,
body
,
head
,
true
);
}
}
/**
* 停止计时
*/
public
void
stopCarousel
()
{
if
(
mDisposable
!=
null
&&
!
mDisposable
.
isDisposed
())
{
mDisposable
.
dispose
();
}
}
@Override
public
void
onStop
()
{
super
.
onStop
();
stopCarousel
();
}
private
TextWatcher
watcher
=
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
if
(!
TextUtils
.
isEmpty
(
getPhone
())
&&
getPhone
().
length
()
==
11
&&
!
TextUtils
.
isEmpty
(
getCode
())
&&
getCode
().
length
()
>=
4
)
{
btnNext
.
setBackgroundResource
(
R
.
drawable
.
shape_rv_bg_fdc349
);
}
else
{
btnNext
.
setBackgroundResource
(
R
.
drawable
.
shape_rv_bg_fde6b5
);
}
}
@Override
public
void
afterTextChanged
(
Editable
s
)
{
}
};
}
module_mine/src/main/java/com/rv/rvmine/traveler/AccountSafeActivity.java
0 → 100644
View file @
d0c3418d
This diff is collapsed.
Click to expand it.
module_mine/src/main/java/com/rv/rvmine/traveler/AlterNickNameActivity.java
0 → 100644
View file @
d0c3418d
package
com
.
rv
.
rvmine
.
traveler
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.View
;
import
android.widget.EditText
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.rvmine.R
;
import
com.rv.rvmine.R2
;
import
butterknife.BindView
;
public
class
AlterNickNameActivity
extends
BaseStatusActivity
<
CommonPresenter
>
{
@BindView
(
R2
.
id
.
et_nickname
)
EditText
etNickname
;
@Override
protected
int
setLayout
()
{
return
R
.
layout
.
activity_alter_nick_name
;
}
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
titleView
.
setTitle
(
"个人资料"
);
titleView
.
setText
(
R
.
id
.
tv_title_right
,
"保存"
);
titleView
.
setTextColor
(
R
.
id
.
tv_title_right
,
Color
.
parseColor
(
"#666666"
));
titleView
.
setChildClickListener
(
R
.
id
.
tv_title_right
,
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
upUserinfo
();
}
});
String
nickName
=
intent
.
getStringExtra
(
"nick"
);
if
(!
TextUtils
.
isEmpty
(
nickName
))
{
etNickname
.
setText
(
nickName
);
if
(
nickName
.
length
()
<=
32
)
{
etNickname
.
setSelection
(
nickName
.
length
());
}
else
{
etNickname
.
setSelection
(
32
);
}
}
}
private
void
upUserinfo
()
{
if
(
TextUtils
.
isEmpty
(
getNickName
()))
{
showToast
(
"昵称不能为空"
);
}
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
"nick"
,
getNickName
());
setResult
(
RESULT_OK
,
intent
);
finish
();
}
private
String
getNickName
()
{
return
etNickname
.
getText
().
toString
().
trim
();
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
}
}
module_mine/src/main/java/com/rv/rvmine/traveler/BindPhoneActivity.java
0 → 100644
View file @
d0c3418d
package
com
.
rv
.
rvmine
.
traveler
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.KeyEvent
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.ruiwenliu.wrapper.bean.UserInfoBean
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.utils.CacheEnum
;
import
com.rv.component.utils.RvCache
;
import
com.rv.rvmine.R
;
import
com.rv.rvmine.SwitchFragmentListener
;
import
com.rv.rvmine.fragment.BindPhoneFirstFragment
;
import
com.rv.rvmine.fragment.BindPhoneSecondFragment
;
import
com.rv.rvmine.fragment.BindPhoneThirdFragment
;
public
class
BindPhoneActivity
extends
BaseStatusActivity
<
CommonPresenter
>
implements
SwitchFragmentListener
{
private
int
currentPage
=
1
;
private
UserInfoBean
bean
;
private
BindPhoneFirstFragment
firstFragment
;
private
BindPhoneSecondFragment
secondFragment
;
private
BindPhoneThirdFragment
thirdFragment
;
private
boolean
isChanged
;
@Override
protected
int
setLayout
()
{
return
R
.
layout
.
activity_bind_phone
;
}
@Override
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
bean
=
(
UserInfoBean
)
intent
.
getSerializableExtra
(
"user"
);
firstFragment
=
new
BindPhoneFirstFragment
();
if
(
bean
!=
null
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"phone"
,
bean
.
getData
().
getUsername
());
firstFragment
.
setArguments
(
bundle
);
}
getSupportFragmentManager
().
beginTransaction
().
replace
(
R
.
id
.
fl_content
,
firstFragment
)
.
addToBackStack
(
null
).
commit
();
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
}
@Override
public
void
setTitle
(
String
title
)
{
if
(!
TextUtils
.
isEmpty
(
title
))
titleView
.
setTitle
(
title
);
}
@Override
public
void
next
()
{
switch
(
currentPage
)
{
case
1
:
secondFragment
=
new
BindPhoneSecondFragment
();
if
(
bean
!=
null
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"phone"
,
bean
.
getData
().
getUsername
());
secondFragment
.
setArguments
(
bundle
);
}
getSupportFragmentManager
().
beginTransaction
().
replace
(
R
.
id
.
fl_content
,
secondFragment
)
.
addToBackStack
(
null
).
commit
();
currentPage
=
2
;
break
;
case
2
:
thirdFragment
=
new
BindPhoneThirdFragment
();
if
(
bean
!=
null
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"phone"
,
bean
.
getData
().
getUsername
());
thirdFragment
.
setArguments
(
bundle
);
}
getSupportFragmentManager
().
beginTransaction
().
replace
(
R
.
id
.
fl_content
,
thirdFragment
)
.
addToBackStack
(
null
).
commit
();
currentPage
=
3
;
break
;
}
}
@Override
public
void
changeSuccess
(
String
phone
)
{
isChanged
=
true
;
bean
.
getData
().
setUsername
(
phone
);
RvCache
.
getInstance
().
save
(
bean
,
CacheEnum
.
USER
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"phone"
,
bean
.
getData
().
getUsername
());
firstFragment
.
setArguments
(
bundle
);
getSupportFragmentManager
().
beginTransaction
().
replace
(
R
.
id
.
fl_content
,
firstFragment
)
.
addToBackStack
(
null
).
commit
();
currentPage
=
1
;
}
@Override
public
boolean
onKeyDown
(
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
finish
();
return
true
;
}
return
super
.
onKeyDown
(
keyCode
,
event
);
}
@Override
public
void
finish
()
{
if
(
currentPage
>
1
)
{
getSupportFragmentManager
().
popBackStack
();
currentPage
-=
1
;
}
else
{
if
(
isChanged
)
{
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
"phone"
,
bean
.
getData
().
getUsername
());
setResult
(
RESULT_OK
,
intent
);
}
super
.
finish
();
}
}
}
module_mine/src/main/java/com/rv/rvmine/traveler/PersonalInformationActivity.java
View file @
d0c3418d
This diff is collapsed.
Click to expand it.
module_mine/src/main/java/com/rv/rvmine/traveler/SettingActivity.java
View file @
d0c3418d
...
...
@@ -76,10 +76,10 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
tvOutSign
.
setText
(
"立即登录"
);
tvOutSign
.
setBackgroundResource
(
R
.
drawable
.
shape_rv_bg_shallow_dark_yellow_circle
);
//
tvOutSign.setBackgroundResource(R.drawable.shape_rv_bg_shallow_dark_yellow_circle);
}
else
{
tvOutSign
.
setText
(
"退出登录"
);
tvOutSign
.
setBackgroundResource
(
R
.
drawable
.
shape_rv_button_light_gray
);
//
tvOutSign.setBackgroundResource(R.drawable.shape_rv_button_light_gray);
}
DownListenerManager
.
getInstance
().
addDownListener
(
this
);
...
...
@@ -99,7 +99,7 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
@Override
public
void
onNext
(
LoginSuccessfulEvent
event
)
{
tvOutSign
.
setText
(
"退出登录"
);
tvOutSign
.
setBackgroundResource
(
R
.
drawable
.
shape_rv_button_light_gray
);
//
tvOutSign.setBackgroundResource(R.drawable.shape_rv_button_light_gray);
}
});
}
...
...
@@ -142,18 +142,20 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
DownListenerManager
.
getInstance
().
removeDownListener
(
this
);
}
@OnClick
({
R2
.
id
.
rl_item_
change_password
,
R2
.
id
.
ll_item_app_push
,
R2
.
id
.
rl_item_clear_cache
,
R2
.
id
.
rl_item_check_for_updates
,
R2
.
id
.
rl_item_about_us
,
R2
.
id
.
tv_out_sign
})
@OnClick
({
R2
.
id
.
rl_item_
account_safe
,
R2
.
id
.
ll_item_app_push
,
R2
.
id
.
rl_item_clear_cache
,
R2
.
id
.
rl_item_check_for_updates
,
R2
.
id
.
rl_item_about_us
,
R2
.
id
.
tv_out_sign
})
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
rl_item_
change_password
)
{
if
(
id
==
R
.
id
.
rl_item_
account_safe
)
{
//修改密码
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
startActivity
(
LoginRvActivity
.
getIntent
(
mActivity
,
0
));
return
;
}
startActivity
(
RegisteredActivity
.
getIntent
(
mActivity
,
1
,
0
));
startActivity
(
new
Intent
(
mActivity
,
AccountSafeActivity
.
class
));
// startActivity(RegisteredActivity.getIntent(mActivity, 1, 0));
}
else
if
(
id
==
R
.
id
.
ll_item_app_push
)
{
//App推送消息
...
...
@@ -164,6 +166,7 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
deleteDir
(
Environment
.
getExternalStorageDirectory
()
+
"/photo/crop"
);
showToast
(
"清理成功!"
);
}
else
if
(
id
==
R
.
id
.
rl_item_check_for_updates
)
{
if
(!
DownListenerManager
.
getInstance
().
isDown
())
...
...
module_mine/src/main/res/drawable-xhdpi/icon_bind_phone.png
0 → 100644
View file @
d0c3418d
17.7 KB
module_mine/src/main/res/drawable/shape_rv_bg_bind_phone_button.xml
0 → 100644
View file @
d0c3418d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#ffffffff"
/>
<stroke
android:width=
"1dp"
android:color=
"#ffcccccc"
/>
<corners
android:topLeftRadius=
"80dp"
android:topRightRadius=
"80dp"
android:bottomLeftRadius=
"80dp"
android:bottomRightRadius=
"80dp"
/>
</shape>
\ No newline at end of file
module_mine/src/main/res/drawable/shape_rv_bg_f2f2f2.xml
0 → 100644
View file @
d0c3418d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/dp_10"
/>
<solid
android:color=
"#f2f2f2"
/>
</shape>
\ No newline at end of file
module_mine/src/main/res/drawable/shape_rv_bg_f3eadc.xml
0 → 100644
View file @
d0c3418d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/dp_40"
/>
<solid
android:color=
"#F3EADC"
/>
</shape>
\ No newline at end of file
module_mine/src/main/res/drawable/shape_rv_bg_fbf9e8.xml
0 → 100644
View file @
d0c3418d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/size_30"
/>
<solid
android:color=
"#fbf9e8"
/>
</shape>
\ No newline at end of file
module_mine/src/main/res/drawable/shape_rv_bg_fdc349.xml
0 → 100644
View file @
d0c3418d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/size_100"
/>
<solid
android:color=
"#fdc349"
/>
</shape>
\ No newline at end of file
module_mine/src/main/res/drawable/shape_rv_bg_fde6b5.xml
0 → 100644
View file @
d0c3418d
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"@dimen/size_100"
/>
<solid
android:color=
"#fde6b5"
/>
</shape>
\ No newline at end of file
module_mine/src/main/res/layout/activity_account_safe.xml
0 → 100644
View file @
d0c3418d
<?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=
"match_parent"
android:background=
"@color/colorLine"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<RelativeLayout
android:id=
"@+id/rl_item_phone"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"手机号"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_16"
/>
<TextView
android:id=
"@+id/tv_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:contentDescription=
"手机号"
android:textColor=
"@color/colorMain"
android:drawablePadding=
"3dp"
android:drawableRight=
"@drawable/common_icon_rig_black_gray"
android:textSize=
"@dimen/sp_16"
/>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
<RelativeLayout
android:id=
"@+id/rl_update_pwd"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"登录密码"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:id=
"@+id/tv_version"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@drawable/common_icon_rig_black_gray"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_15"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<RelativeLayout
android:id=
"@+id/rl_qq"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"QQ"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_16"
/>
<TextView
android:id=
"@+id/tv_qq"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:drawableRight=
"@drawable/common_icon_rig_black_gray"
android:drawablePadding=
"@dimen/size_3"
android:text=
"去授权绑定QQ"
android:textColor=
"#CCCCCC"
android:textSize=
"@dimen/sp_16"
/>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
<RelativeLayout
android:id=
"@+id/rl_wx"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"微信"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_16"
/>
<TextView
android:id=
"@+id/tv_wx"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:drawableRight=
"@drawable/common_icon_rig_black_gray"
android:drawablePadding=
"@dimen/size_3"
android:text=
"去授权绑定微信"
android:textColor=
"#CCCCCC"
android:textSize=
"@dimen/sp_16"
/>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
<RelativeLayout
android:id=
"@+id/rl_zfb"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"支付宝"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_16"
/>
<TextView
android:id=
"@+id/tv_zfb"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:drawableRight=
"@drawable/common_icon_rig_black_gray"
android:drawablePadding=
"@dimen/size_3"
android:text=
"去授权绑定支付宝"
android:textColor=
"#CCCCCC"
android:textSize=
"@dimen/sp_16"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
module_mine/src/main/res/layout/activity_alter_nick_name.xml
0 → 100644
View file @
d0c3418d
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#F5F5F5"
tools:context=
".traveler.AlterNickNameActivity"
>
<EditText
android:id=
"@+id/et_nickname"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_marginTop=
"@dimen/dp_10"
android:background=
"@color/colorWrite"
android:ellipsize=
"end"
android:hint=
"请输入昵称"
android:maxLength=
"32"
android:paddingLeft=
"@dimen/dp_10"
android:paddingRight=
"@dimen/dp_10"
android:singleLine=
"true"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/sp_14"
/>
</LinearLayout>
\ No newline at end of file
module_mine/src/main/res/layout/activity_bind_phone.xml
0 → 100644
View file @
d0c3418d
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
".traveler.BindPhoneActivity"
>
<FrameLayout
android:id=
"@+id/fl_content"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
/>
</LinearLayout>
\ No newline at end of file
module_mine/src/main/res/layout/activity_mine.xml
View file @
d0c3418d
...
...
@@ -129,24 +129,50 @@
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"
@dimen/size_15
"
android:layout_height=
"
wrap_content
"
android:layout_marginTop=
"@dimen/text_10"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
android:visibility=
"gone"
>
<ImageView
android:id=
"@+id/iv_member"
android:layout_width=
"@dimen/size_15"
android:layout_height=
"@dimen/size_15"
/>
<LinearLayout
android:paddingLeft=
"5dp"
android:paddingRight=
"5dp"
android:paddingTop=
"2dp"
android:paddingBottom=
"2dp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_rv_bg_fbf9e8"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/iv_member"
android:layout_width=
"@dimen/size_15"
android:layout_height=
"@dimen/size_15"
/>
<TextView
android:id=
"@+id/tv_member"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/size_15"
android:layout_marginLeft=
"@dimen/size_2"
android:gravity=
"center"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_10"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_
member
"
android:id=
"@+id/tv_
capacity
"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/size_15"
android:layout_marginLeft=
"@dimen/size_2"
android:gravity=
"center"
android:textColor=
"@color/colorMain"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:background=
"@drawable/shape_rv_bg_f3eadc"
android:paddingLeft=
"5dp"
android:paddingTop=
"1dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"1dp"
android:textColor=
"#ffd6b263"
android:textSize=
"@dimen/text_10"
/>
</LinearLayout>
<TextView
...
...
module_mine/src/main/res/layout/activity_personal_information.xml
View file @
d0c3418d
...
...
@@ -50,20 +50,21 @@
android:textColor=
"@color/text_Main"
android:textSize=
"@dimen/text_16"
/>
<
EditText
android:id=
"@+id/
et
_nickname"
<
TextView
android:id=
"@+id/
tv
_nickname"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:background=
"@null"
android:drawableRight=
"@drawable/common_icon_rig_black"
android:drawablePadding=
"3dp"
android:ellipsize=
"end"
android:gravity=
"right|center_vertical"
android:hint=
"请输入昵称"
android:maxLength=
"32"
android:singleLine=
"true"
android:ellipsize=
"end"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:text=
"请输入昵称"
android:textColor=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
</LinearLayout>
...
...
@@ -80,19 +81,18 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:gravity=
"center_vertical"
android:visibility=
"gone"
>
android:gravity=
"center_vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"
姓名
"
android:text=
"
手机号
"
android:textColor=
"@color/text_Main"
android:textSize=
"@dimen/text_16"
/>
<EditText
android:id=
"@+id/et_
nam
e"
android:id=
"@+id/et_
phon
e"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_15"
...
...
@@ -100,11 +100,14 @@
android:background=
"@null"
android:enabled=
"false"
android:gravity=
"right|center_vertical"
android:hint=
"请输入姓名"
android:maxLength=
"10"
android:hint=
"请输入手机号"
android:inputType=
"phone|number"
android:maxLength=
"11"
android:maxLines=
"1"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
<include
layout=
"@layout/common_line"
/>
...
...
@@ -179,149 +182,5 @@
android:src=
"@drawable/common_icon_rig_black"
/>
</LinearLayout>
<include
layout=
"@layout/common_line"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:gravity=
"center_vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"手机号"
android:textColor=
"@color/text_Main"
android:textSize=
"@dimen/text_16"
/>
<EditText
android:id=
"@+id/et_phone"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:background=
"@null"
android:enabled=
"false"
android:gravity=
"right|center_vertical"
android:hint=
"请输入手机号"
android:inputType=
"phone|number"
android:maxLength=
"11"
android:maxLines=
"1"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
<include
layout=
"@layout/common_line"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:gravity=
"center_vertical"
android:visibility=
"gone"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"身份证号"
android:textColor=
"@color/text_Main"
android:textSize=
"@dimen/text_16"
/>
<EditText
android:id=
"@+id/et_id_card"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:background=
"@null"
android:enabled=
"false"
android:gravity=
"right|center_vertical"
android:hint=
"请输入身份证号"
android:maxLength=
"18"
android:maxLines=
"1"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_15"
android:background=
"@color/colorWrite"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/size_15"
android:paddingRight=
"@dimen/size_15"
>
<LinearLayout
android:id=
"@+id/ll_item_binding_qq"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:gravity=
"center_vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"QQ"
android:textColor=
"@color/text_Main"
android:textSize=
"@dimen/text_16"
/>
<TextView
android:id=
"@+id/tv_binding_qq"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:gravity=
"right|center_vertical"
android:hint=
"去授权绑定QQ"
android:text=
""
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_8"
android:src=
"@drawable/common_icon_rig_black"
/>
</LinearLayout>
<include
layout=
"@layout/common_line"
/>
<LinearLayout
android:id=
"@+id/ll_item_binding_wechat"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:gravity=
"center_vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"微信"
android:textColor=
"@color/text_Main"
android:textSize=
"@dimen/text_16"
/>
<TextView
android:id=
"@+id/tv_binding_wx"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:gravity=
"right|center_vertical"
android:hint=
"去授权绑定微信"
android:text=
""
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_8"
android:src=
"@drawable/common_icon_rig_black"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
module_mine/src/main/res/layout/activity_setting.xml
View file @
d0c3418d
...
...
@@ -14,7 +14,7 @@
android:paddingRight=
"@dimen/size_15"
>
<RelativeLayout
android:id=
"@+id/rl_item_
change_password
"
android:id=
"@+id/rl_item_
account_safe
"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
...
...
@@ -22,7 +22,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"
修改密码
"
android:text=
"
账号与安全
"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_16"
/>
...
...
@@ -31,7 +31,7 @@
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@drawable/common_icon_rig_black"
/>
android:src=
"@drawable/common_icon_rig_black
_gray
"
/>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
...
...
@@ -78,7 +78,7 @@
android:paddingRight=
"@dimen/size_15"
>
<RelativeLayout
android:id=
"@+id/rl_item_c
lear_cache
"
android:id=
"@+id/rl_item_c
heck_for_updates
"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
...
...
@@ -86,22 +86,26 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"
清除缓存
"
android:text=
"
检查更新
"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_16"
/>
<ImageView
<TextView
android:id=
"@+id/tv_version"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@drawable/common_icon_rig_black"
/>
android:drawableRight=
"@drawable/common_icon_rig_black_gray"
android:drawablePadding=
"@dimen/size_3"
android:textColor=
"#171413"
android:textSize=
"@dimen/sp_12"
/>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
<RelativeLayout
android:id=
"@+id/rl_item_c
heck_for_updates
"
android:id=
"@+id/rl_item_c
lear_cache
"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
...
...
@@ -109,19 +113,16 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:text=
"
检查更新
"
android:text=
"
清除缓存
"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_16"
/>
<TextView
android:id=
"@+id/tv_version"
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:drawablePadding=
"@dimen/size_3"
android:textColor=
"#999999"
android:textSize=
"@dimen/sp_12"
/>
android:src=
"@drawable/common_icon_rig_black_gray"
/>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
...
...
@@ -144,7 +145,7 @@
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:src=
"@drawable/common_icon_rig_black"
/>
android:src=
"@drawable/common_icon_rig_black
_gray
"
/>
</RelativeLayout>
</LinearLayout>
...
...
@@ -153,13 +154,12 @@
android:id=
"@+id/tv_out_sign"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_20"
android:layout_marginTop=
"@dimen/size_70"
android:layout_marginRight=
"@dimen/size_20"
android:background=
"@drawable/shape_rv_button_light_gray"
android:layout_marginTop=
"@dimen/size_15"
android:background=
"@color/colorWrite"
android:gravity=
"center"
android:text=
"退出登录"
android:textColor=
"@color/colorWrite"
/>
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/sp_16"
/>
</LinearLayout>
module_mine/src/main/res/layout/fragment_bind_phone_first.xml
0 → 100644
View file @
d0c3418d
<?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=
"match_parent"
android:background=
"@color/white"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"@dimen/size_100"
android:layout_height=
"@dimen/size_100"
android:layout_marginTop=
"@dimen/size_50"
android:src=
"@drawable/icon_bind_phone"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"17dp"
android:text=
"绑定的手机号码"
android:textColor=
"#666666"
android:textSize=
"@dimen/sp_14"
/>
<TextView
android:id=
"@+id/tv_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"7dp"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/sp_16"
/>
<Button
android:id=
"@+id/btn_update_phone"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_marginLeft=
"27dp"
android:layout_marginTop=
"52dp"
android:layout_marginRight=
"27dp"
android:background=
"@drawable/shape_rv_bg_bind_phone_button"
android:gravity=
"center"
android:text=
"更换手机号"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/sp_16"
/>
</LinearLayout>
module_mine/src/main/res/layout/fragment_bind_phone_second.xml
0 → 100644
View file @
d0c3418d
<?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=
"match_parent"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/size_20"
android:paddingRight=
"@dimen/size_20"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/size_20"
android:text=
"更换手机号前,需先验证当前绑定手机号"
android:textColor=
"@color/text_Gray"
android:textSize=
"@dimen/sp_14"
/>
<TextView
android:id=
"@+id/tv_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"13dp"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/sp_14"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_marginTop=
"26sp"
android:background=
"@drawable/shape_rv_bg_f2f2f2"
android:orientation=
"horizontal"
>
<EditText
android:layout_marginLeft=
"@dimen/dp_10"
android:id=
"@+id/et_phone_code"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@color/colorGrayBg"
android:gravity=
"center_vertical|left"
android:hint=
"请输入验证码"
android:inputType=
"number"
android:maxLength=
"6"
android:paddingLeft=
"3dp"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/sp_14"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/size_12"
android:layout_marginBottom=
"@dimen/text_12"
android:background=
"@color/text_Gray"
/>
<TextView
android:id=
"@+id/tv_get_code"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"13dp"
android:layout_marginRight=
"13dp"
android:gravity=
"center"
android:text=
"获取验证码"
android:textColor=
"@color/colorMain"
android:textSize=
"14sp"
/>
</LinearLayout>
<Button
android:id=
"@+id/btn_next"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_marginTop=
"31dp"
android:background=
"@drawable/shape_rv_bg_fde6b5"
android:gravity=
"center"
android:text=
"下一步"
android:textColor=
"@color/colorWrite"
android:textSize=
"@dimen/sp_16"
/>
</LinearLayout>
module_mine/src/main/res/layout/fragment_bind_phone_third.xml
0 → 100644
View file @
d0c3418d
<?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=
"match_parent"
android:orientation=
"vertical"
android:paddingLeft=
"@dimen/size_20"
android:paddingRight=
"@dimen/size_20"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_marginTop=
"@dimen/size_30"
android:background=
"@drawable/shape_rv_bg_f2f2f2"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"13dp"
android:gravity=
"center"
android:text=
"+86"
android:textColor=
"#3A3938"
android:textSize=
"@dimen/sp_14"
/>
<EditText
android:id=
"@+id/et_phone"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_weight=
"1"
android:background=
"@color/colorGrayBg"
android:gravity=
"center_vertical|left"
android:hint=
"请输入新绑定的手机号"
android:inputType=
"phone"
android:maxLength=
"11"
android:paddingLeft=
"13dp"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/sp_14"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_marginTop=
"26sp"
android:background=
"@drawable/shape_rv_bg_f2f2f2"
android:orientation=
"horizontal"
>
<EditText
android:maxLength=
"8"
android:id=
"@+id/et_phone_code"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_weight=
"1"
android:background=
"@color/colorGrayBg"
android:gravity=
"center_vertical|left"
android:hint=
"请输入验证码"
android:inputType=
"number"
android:paddingLeft=
"3dp"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/sp_14"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/size_12"
android:layout_marginBottom=
"@dimen/text_12"
android:background=
"@color/text_Gray"
/>
<TextView
android:id=
"@+id/tv_get_code"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"13dp"
android:layout_marginRight=
"13dp"
android:gravity=
"center"
android:text=
"获取验证码"
android:textColor=
"@color/colorMain"
android:textSize=
"14sp"
/>
</LinearLayout>
<Button
android:id=
"@+id/btn_next"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_marginTop=
"@dimen/dp_40"
android:background=
"@drawable/shape_rv_bg_fde6b5"
android:gravity=
"center"
android:text=
"完成"
android:textColor=
"@color/colorWrite"
android:textSize=
"@dimen/sp_16"
/>
</LinearLayout>
module_mine/src/main/res/layout/rv_dialog_choose_gender.xml
View file @
d0c3418d
...
...
@@ -4,49 +4,75 @@
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_40"
android:layout_marginRight=
"@dimen/size_40"
android:background=
"@color/colorWrite"
android:background=
"@drawable/shape_rv_bg_write"
android:gravity=
"center_horizontal"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_130"
<TextView
android:gravity=
"center"
android:orientation=
"horizontal"
>
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/text_12"
android:layout_marginBottom=
"@dimen/size_15"
android:text=
"性别"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/size_20"
/>
<include
layout=
"@layout/common_line"
/>
<RelativeLayout
android:id=
"@+id/rl_man"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
>
<TextView
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_20"
android:text=
"男"
android:textColor=
"@color/colorMain"
android:textSize=
"18sp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
<CheckBox
android:layout_marginRight=
"@dimen/size_15"
android:layout_centerVertical=
"true"
android:layout_alignParentRight=
"true"
android:id=
"@+id/cb_man"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:button=
"@drawable/selector_rv_check"
android:enabled=
"true"
android:text=
"男"
android:textSize=
"@dimen/text_16"
android:paddingLeft=
"@dimen/size_5"
android:button=
"@drawable/selector_rv_check"
/>
android:paddingLeft=
"@dimen/size_5"
android:textSize=
"@dimen/text_16"
/>
</RelativeLayout>
<include
layout=
"@layout/common_line"
/>
<RelativeLayout
android:id=
"@+id/rl_woman"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
>
<TextView
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_20"
android:text=
"女"
android:textColor=
"@color/colorMain"
android:textSize=
"18sp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
<CheckBox
android:layout_marginRight=
"@dimen/size_15"
android:layout_centerVertical=
"true"
android:layout_alignParentRight=
"true"
android:id=
"@+id/cb_girl"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:
layout_marginLeft=
"@dimen/size_100
"
android:
button=
"@drawable/selector_rv_check
"
android:enabled=
"true"
android:text=
"女"
android:paddingLeft=
"@dimen/size_5"
android:textSize=
"@dimen/text_16"
android:button=
"@drawable/selector_rv_check"
/>
</LinearLayout>
<include
layout=
"@layout/common_line"
/>
<TextView
android:id=
"@+id/tv_ok"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:background=
"@color/gray_FFB74B"
android:gravity=
"center"
android:text=
"确认"
/>
android:textSize=
"@dimen/text_16"
/>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
plugin_wallet/src/main/java/com/xxrv/wallet/api/WalletApi.java
View file @
d0c3418d
...
...
@@ -31,4 +31,13 @@ public class WalletApi {
//提现详情
public
static
String
HTTP_URL_WALLET_WITHDRAWDETAIL
=
RvFrameConfig
.
HOST_H5_DETAIL
+
"/h5/appHtml/view/withdrawDetail.html"
;
//获取支付宝授权信息authInfo
public
static
String
HTTP_URL_WALLET_UNAUTH_GETPARAM
=
RvFrameConfig
.
HOST
+
"/api/universal/info/app/unauth/getParam"
;
//提交支付宝code
public
static
String
HTTP_URL_WALLET_ALIPAY_GETUSERINFO
=
RvFrameConfig
.
HOST
+
"/api/admin/alipay/getUserInfo"
;
//获取帐号信息
public
static
String
HTTP_URL_WALLET_ACCOUNT_NUMBER
=
RvFrameConfig
.
HOST
+
"/api/admin/alipay/get"
;
}
plugin_wallet/src/main/java/com/xxrv/wallet/bean/AccountNumberListBean.java
0 → 100644
View file @
d0c3418d
package
com
.
xxrv
.
wallet
.
bean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 获取支付账号列表
*/
public
class
AccountNumberListBean
extends
BaseBean
{
private
List
<
DataBean
>
data
;
private
boolean
rel
;
public
List
<
DataBean
>
getData
()
{
return
data
;
}
public
void
setData
(
List
<
DataBean
>
data
)
{
this
.
data
=
data
;
}
public
boolean
isRel
()
{
return
rel
;
}
public
void
setRel
(
boolean
rel
)
{
this
.
rel
=
rel
;
}
public
static
class
DataBean
implements
Serializable
{
private
String
id
;
// ":6,
private
int
userId
;
//":75,
private
String
txAlipay
;
//":"2088212169302286",
private
int
isDefault
;
//":0,
private
long
crtTime
;
//":1571125067723,
private
int
isDel
;
//":0,
private
String
nickname
;
//":"PeakLin",
private
int
type
;
//":1
private
boolean
check
;
public
boolean
getCheck
()
{
return
check
;
}
public
void
setCheck
(
boolean
check
)
{
this
.
check
=
check
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
int
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
int
userId
)
{
this
.
userId
=
userId
;
}
public
String
getTxAlipay
()
{
return
txAlipay
;
}
public
void
setTxAlipay
(
String
txAlipay
)
{
this
.
txAlipay
=
txAlipay
;
}
public
int
getIsDefault
()
{
return
isDefault
;
}
public
void
setIsDefault
(
int
isDefault
)
{
this
.
isDefault
=
isDefault
;
}
public
long
getCrtTime
()
{
return
crtTime
;
}
public
void
setCrtTime
(
long
crtTime
)
{
this
.
crtTime
=
crtTime
;
}
public
int
getIsDel
()
{
return
isDel
;
}
public
void
setIsDel
(
int
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
}
}
plugin_wallet/src/main/java/com/xxrv/wallet/bean/AuthResult.java
0 → 100644
View file @
d0c3418d
package
com
.
xxrv
.
wallet
.
bean
;
import
android.text.TextUtils
;
import
java.util.Map
;
public
class
AuthResult
{
private
String
resultStatus
;
private
String
result
;
private
String
memo
;
private
String
resultCode
;
private
String
authCode
;
private
String
alipayOpenId
;
public
AuthResult
(
Map
<
String
,
String
>
rawResult
,
boolean
removeBrackets
)
{
if
(
rawResult
==
null
)
{
return
;
}
for
(
String
key
:
rawResult
.
keySet
())
{
if
(
TextUtils
.
equals
(
key
,
"resultStatus"
))
{
resultStatus
=
rawResult
.
get
(
key
);
}
else
if
(
TextUtils
.
equals
(
key
,
"result"
))
{
result
=
rawResult
.
get
(
key
);
}
else
if
(
TextUtils
.
equals
(
key
,
"memo"
))
{
memo
=
rawResult
.
get
(
key
);
}
}
String
[]
resultValue
=
result
.
split
(
"&"
);
for
(
String
value
:
resultValue
)
{
if
(
value
.
startsWith
(
"alipay_open_id"
))
{
alipayOpenId
=
removeBrackets
(
getValue
(
"alipay_open_id="
,
value
),
removeBrackets
);
continue
;
}
if
(
value
.
startsWith
(
"auth_code"
))
{
authCode
=
removeBrackets
(
getValue
(
"auth_code="
,
value
),
removeBrackets
);
continue
;
}
if
(
value
.
startsWith
(
"result_code"
))
{
resultCode
=
removeBrackets
(
getValue
(
"result_code="
,
value
),
removeBrackets
);
continue
;
}
}
}
private
String
removeBrackets
(
String
str
,
boolean
remove
)
{
if
(
remove
)
{
if
(!
TextUtils
.
isEmpty
(
str
))
{
if
(
str
.
startsWith
(
"\""
))
{
str
=
str
.
replaceFirst
(
"\""
,
""
);
}
if
(
str
.
endsWith
(
"\""
))
{
str
=
str
.
substring
(
0
,
str
.
length
()
-
1
);
}
}
}
return
str
;
}
@Override
public
String
toString
()
{
return
"authCode={"
+
authCode
+
"}; resultStatus={"
+
resultStatus
+
"}; memo={"
+
memo
+
"}; result={"
+
result
+
"}"
;
}
private
String
getValue
(
String
header
,
String
data
)
{
return
data
.
substring
(
header
.
length
(),
data
.
length
());
}
public
String
getResultStatus
()
{
return
resultStatus
;
}
public
String
getMemo
()
{
return
memo
;
}
public
String
getResult
()
{
return
result
;
}
public
String
getResultCode
()
{
return
resultCode
;
}
public
String
getAuthCode
()
{
return
authCode
;
}
public
String
getAlipayOpenId
()
{
return
alipayOpenId
;
}
}
\ No newline at end of file
plugin_wallet/src/main/java/com/xxrv/wallet/bean/WalletAuthInfoBean.java
0 → 100644
View file @
d0c3418d
package
com
.
xxrv
.
wallet
.
bean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
public
class
WalletAuthInfoBean
extends
BaseBean
{
private
String
data
;
private
boolean
rel
;
public
String
getData
()
{
return
data
;
}
public
void
setData
(
String
data
)
{
this
.
data
=
data
;
}
public
boolean
isRel
()
{
return
rel
;
}
public
void
setRel
(
boolean
rel
)
{
this
.
rel
=
rel
;
}
}
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