Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
杨凯
YDL-Component-Medical
Commits
65e8bb4d
Commit
65e8bb4d
authored
Mar 04, 2021
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat 渠道包加人账号注销功能
parent
dd25b0a6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
172 additions
and
134 deletions
+172
-134
config.gradle
config.gradle
+2
-2
UnRegisterEvent.java
m-user/src/main/java/com/yidianling/user/event/UnRegisterEvent.java
+14
-0
UserApi.kt
m-user/src/main/java/com/yidianling/user/http/UserApi.kt
+8
-1
UserHttp.kt
m-user/src/main/java/com/yidianling/user/http/UserHttp.kt
+4
-0
UserHttpImpl.kt
m-user/src/main/java/com/yidianling/user/http/UserHttpImpl.kt
+55
-39
UserForbidLoginParam.kt
m-user/src/main/java/com/yidianling/user/http/request/UserForbidLoginParam.kt
+11
-0
AccountSettingActivity.java
m-user/src/main/java/com/yidianling/user/mine/AccountSettingActivity.java
+27
-92
AccountUnRegisterActivity.kt
m-user/src/main/java/com/yidianling/user/mine/AccountUnRegisterActivity.kt
+50
-0
VerificationCodePresenterImpl.kt
m-user/src/main/java/com/yidianling/user/ui/login/presenter/VerificationCodePresenterImpl.kt
+1
-0
No files found.
config.gradle
View file @
65e8bb4d
...
...
@@ -8,7 +8,7 @@ ext {
"m-confide"
:
"0.0.48.91"
,
"m-consultant"
:
"0.0.59.40"
,
"m-fm"
:
"0.0.30.00"
,
"m-user"
:
"0.0.60.4
5
"
,
"m-user"
:
"0.0.60.4
6
"
,
"m-home"
:
"0.0.22.51"
,
"m-im"
:
"0.0.18.30"
,
"m-dynamic"
:
"0.0.7.13"
,
...
...
@@ -91,7 +91,7 @@ ext {
"m-confide"
:
"0.0.48.91"
,
"m-consultant"
:
"0.0.51.16"
,
"m-fm"
:
"0.0.23.5"
,
"m-user"
:
"0.0.60.4
5
"
,
"m-user"
:
"0.0.60.4
6
"
,
"m-home"
:
"0.0.22.51"
,
"m-im"
:
"0.0.3.15"
,
"m-dynamic"
:
"0.0.1.7"
,
...
...
m-user/src/main/java/com/yidianling/user/event/UnRegisterEvent.java
0 → 100644
View file @
65e8bb4d
package
com
.
yidianling
.
user
.
event
;
/**
* @Author: 刘鹏
* @Description: 注销账号发送event
* @CreateDate: 3/3/21 8:07 PM
* -------------------------------
* @UpdateUser:
* @UpdateDate: 3/3/21 8:07 PM
* @UpdateRemark:
* @Version:
*/
public
class
UnRegisterEvent
{
}
m-user/src/main/java/com/yidianling/user/http/UserApi.kt
View file @
65e8bb4d
...
...
@@ -201,5 +201,11 @@ interface UserApi {
@FormUrlEncoded
@POST
(
"user/getNewUserJumpUrl"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
getNewUserJumpUrl
(
@FieldMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseAPIResponse
<
String
>>
fun
getNewUserJumpUrl
(
@FieldMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseAPIResponse
<
String
>>
//获取新用户引导页面url
//用户注销账号
@FormUrlEncoded
@POST
(
"user/forbid_login"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
userForbidLogin
(
@FieldMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseAPIResponse
<
Boolean
>>
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/http/UserHttp.kt
View file @
65e8bb4d
...
...
@@ -77,4 +77,7 @@ interface UserHttp {
fun
getFocusData
():
Observable
<
BaseAPIResponse
<
List
<
CollectFocusItemBean
>>>
fun
getNewUserJumpUrl
():
Observable
<
BaseAPIResponse
<
String
>>
/**用户注销账号*/
fun
userForbidLogin
(
param
:
UserForbidLoginParam
):
Observable
<
BaseAPIResponse
<
Boolean
>>
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/http/UserHttpImpl.kt
View file @
65e8bb4d
...
...
@@ -13,8 +13,8 @@ import com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.common.tools.RxAppTool
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.UserHelper
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.bean.CheckPhonePassBean
import
com.yidianling.user.bean.CollectFocusItemBean
import
com.yidianling.user.http.request.*
...
...
@@ -22,7 +22,6 @@ import com.yidianling.user.http.response.CheckPassword
import
com.yidianling.user.http.response.CountryResponse
import
com.yidianling.user.http.response.ExistResponse
import
com.yidianling.user.http.response.SecretResponse
import
com.yidianling.user.mine.bean.RedPackDataForRegister
import
com.yidianling.user.mine.bean.RedPacketId
import
com.yidianling.user.mine.bean.RedPacketIdCmd
import
com.yidianling.user.rxlogin.LoginObservable
...
...
@@ -64,38 +63,38 @@ class UserHttpImpl private constructor() : UserHttp {
override
fun
login
(
param
:
LoginParam
):
Observable
<
BaseResponse
<
UserResponseBean
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
login
(
it
)
}
.
flatMap
{
getUserApi
().
login
(
it
)
}
}
override
fun
countryList
():
Observable
<
BaseResponse
<
CountryResponse
>>
{
return
getUserApi
().
countryList
(
""
)
.
compose
(
RxUtils
.
netCheck
())
.
compose
(
RxUtils
.
netCheck
())
}
override
fun
phoneExist
(
param
:
ExistParam
):
Observable
<
BaseResponse
<
ExistResponse
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
phoneExists
(
it
)
}
.
flatMap
{
getUserApi
().
phoneExists
(
it
)
}
}
override
fun
code
(
param
:
CodeParam
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
getCode
(
it
)
}
.
flatMap
{
getUserApi
().
getCode
(
it
)
}
}
override
fun
bindPhone
(
param
:
BindPhoneParam
):
Observable
<
BaseResponse
<
UserResponseBean
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
bindPhone
(
it
)
}
.
flatMap
{
getUserApi
().
bindPhone
(
it
)
}
}
override
fun
forget
(
param
:
ForgetParam
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
forget
(
it
)
}
.
flatMap
{
getUserApi
().
forget
(
it
)
}
}
override
fun
register
(
param
:
RegisterParam
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
register
(
it
)
}
.
flatMap
{
getUserApi
().
register
(
it
)
}
}
override
fun
channelId
(
param
:
ChannelIdParam
):
Observable
<
BaseResponse
<
LinkedTreeMap
<
String
,
String
>>>
{
...
...
@@ -115,66 +114,75 @@ class UserHttpImpl private constructor() : UserHttp {
override
fun
setUserInfo
(
param
:
UserInfoParam
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
setUserInfo
(
it
)
}
.
flatMap
{
getUserApi
().
setUserInfo
(
it
)
}
}
//验证账号密码
override
fun
checkPhonePass
(
cmd
:
CheckPhonePassBean
):
Observable
<
BaseResponse
<
CheckPassword
>>
{
return
RxUtils
.
mapObservable
(
cmd
)
.
flatMap
{
getUserApi
().
checkPhonePass
(
it
)
}
.
flatMap
{
getUserApi
().
checkPhonePass
(
it
)
}
}
override
fun
uploadHead
(
param
:
HeadParam
):
Observable
<
BaseResponse
<
Any
>>
{
return
Observable
.
just
(
param
)
.
compose
(
RxUtils
.
netCheck
())
.
subscribeOn
(
Schedulers
.
io
())
.
map
{
val
map
=
HashMap
<
String
,
RequestBody
>()
val
mediaType
=
MediaType
.
parse
(
"text/plain"
)
map
[
"type"
]
=
RequestBody
.
create
(
mediaType
,
it
.
type
)
map
[
"value"
]
=
RequestBody
.
create
(
mediaType
,
it
.
value
)
map
[
"ffrom"
]
=
RequestBody
.
create
(
mediaType
,
YdlCommonOut
.
getChannelName
())
map
[
"isFromApp"
]
=
RequestBody
.
create
(
mediaType
,
"1"
)
map
[
"osBuild"
]
=
RequestBody
.
create
(
mediaType
,
"""${RxDeviceTool.getBuildBrandModel()},${RxDeviceTool.getSDKVersionName()},${RxAppTool.getAppVersionName(BaseApp.getApp())}"""
)
map
[
"ts"
]
=
RequestBody
.
create
(
mediaType
,
(
System
.
currentTimeMillis
()
/
1000
).
toString
())
map
[
"version"
]
=
RequestBody
.
create
(
mediaType
,
RxAppTool
.
getAppVersionName
(
BaseApp
.
getApp
()))
val
userInfo
=
UserHelper
.
getUserInfo
()
if
(
userInfo
!=
null
)
{
map
[
"uid"
]
=
RequestBody
.
create
(
mediaType
,
userInfo
.
uid
)
map
[
"accessToken"
]
=
RequestBody
.
create
(
mediaType
,
userInfo
.
accessToken
)
}
val
fileBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"multipart/form-data"
),
it
.
file
)
map
.
put
(
"""head"; filename="${it.file.name}"""
,
fileBody
)
map
}
.
flatMap
{
getUserApi
().
uploadHeadImg
(
it
)
.
compose
(
RxUtils
.
netCheck
())
.
subscribeOn
(
Schedulers
.
io
())
.
map
{
val
map
=
HashMap
<
String
,
RequestBody
>()
val
mediaType
=
MediaType
.
parse
(
"text/plain"
)
map
[
"type"
]
=
RequestBody
.
create
(
mediaType
,
it
.
type
)
map
[
"value"
]
=
RequestBody
.
create
(
mediaType
,
it
.
value
)
map
[
"ffrom"
]
=
RequestBody
.
create
(
mediaType
,
YdlCommonOut
.
getChannelName
())
map
[
"isFromApp"
]
=
RequestBody
.
create
(
mediaType
,
"1"
)
map
[
"osBuild"
]
=
RequestBody
.
create
(
mediaType
,
"""${RxDeviceTool.getBuildBrandModel()},${RxDeviceTool.getSDKVersionName()},${
RxAppTool.getAppVersionName(
BaseApp.getApp()
)
}"""
)
map
[
"ts"
]
=
RequestBody
.
create
(
mediaType
,
(
System
.
currentTimeMillis
()
/
1000
).
toString
())
map
[
"version"
]
=
RequestBody
.
create
(
mediaType
,
RxAppTool
.
getAppVersionName
(
BaseApp
.
getApp
()))
val
userInfo
=
UserHelper
.
getUserInfo
()
if
(
userInfo
!=
null
)
{
map
[
"uid"
]
=
RequestBody
.
create
(
mediaType
,
userInfo
.
uid
)
map
[
"accessToken"
]
=
RequestBody
.
create
(
mediaType
,
userInfo
.
accessToken
)
}
val
fileBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"multipart/form-data"
),
it
.
file
)
map
.
put
(
"""head"; filename="${it.file.name}"""
,
fileBody
)
map
}
.
flatMap
{
getUserApi
().
uploadHeadImg
(
it
)
}
}
override
fun
bindQQ
(
param
:
BindQQ
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
bindQQ
(
it
)
}
.
flatMap
{
getUserApi
().
bindQQ
(
it
)
}
}
override
fun
bindWX
(
param
:
BindWX
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
bindWx
(
it
)
}
.
flatMap
{
getUserApi
().
bindWx
(
it
)
}
}
override
fun
logout
(
param
:
Logout
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
logout
(
it
)
}
.
flatMap
{
getUserApi
().
logout
(
it
)
}
}
override
fun
checkPwd
(
param
:
CheckPwd
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
checkPwd
(
it
)
}
.
flatMap
{
getUserApi
().
checkPwd
(
it
)
}
}
override
fun
changePhone
(
param
:
ChangePhone
):
Observable
<
BaseResponse
<
Any
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
changePhone
(
it
)
}
.
flatMap
{
getUserApi
().
changePhone
(
it
)
}
}
override
fun
privacyAgree
(
uid
:
String
):
Observable
<
BaseResponse
<
Any
>>
{
...
...
@@ -221,6 +229,14 @@ class UserHttpImpl private constructor() : UserHttp {
.
flatMap
{
getUserApi
().
getNewUserJumpUrl
(
it
)
}
}
/**
* 用户注销账号调用接口
* */
override
fun
userForbidLogin
(
param
:
UserForbidLoginParam
):
Observable
<
BaseAPIResponse
<
Boolean
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
userForbidLogin
(
it
)
}
}
private
object
Holder
{
val
INSTANCE
=
UserHttpImpl
()
}
...
...
m-user/src/main/java/com/yidianling/user/http/request/UserForbidLoginParam.kt
0 → 100644
View file @
65e8bb4d
package
com.yidianling.user.http.request
import
com.ydl.ydlcommon.data.http.BaseCommand
/**
* 用户自行注销账号
* */
class
UserForbidLoginParam
:
BaseCommand
()
{
var
userPort
:
Int
=
1
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/mine/AccountSettingActivity.java
View file @
65e8bb4d
...
...
@@ -30,6 +30,7 @@ import com.yidianling.user.R;
import
com.yidianling.user.UserConstants
;
import
com.yidianling.user.UserHelper
;
import
com.yidianling.user.api.event.RefreshRecentContactListEvent
;
import
com.yidianling.user.event.UnRegisterEvent
;
import
com.yidianling.user.event.UpdateBindStatusEvent
;
import
com.yidianling.user.http.LoginApiRequestUtil
;
import
com.yidianling.user.http.UserHttp
;
...
...
@@ -71,7 +72,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
@NotNull
@Override
public
StatusBarOptions
getStatusViewOptions
()
{
return
new
StatusBarOptions
(
true
,
true
);
return
new
StatusBarOptions
(
true
,
true
);
}
@Override
...
...
@@ -162,7 +163,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
final
String
EAR_MODE_OPEN
=
ModularServiceManager
.
INSTANCE
.
provide
(
IImService
.
class
).
getEarModeOpenType
();
final
String
EAR_MODE_CLOSE
=
ModularServiceManager
.
INSTANCE
.
provide
(
IImService
.
class
).
getEarModeCloseType
();
SharedPreferencesEditor
.
putString
(
EAR_MODE_KEY
,
b
?
EAR_MODE_OPEN
:
EAR_MODE_CLOSE
);
}
catch
(
Exception
e
)
{}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
void
init
()
{
...
...
@@ -170,7 +173,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
//设置听筒模式
try
{
ModularServiceManager
.
INSTANCE
.
provide
(
IImService
.
class
).
updateEarMode
(
b
);
}
catch
(
Exception
e
)
{}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
changeEarMode
(
b
);
});
jtv_phone
.
setRightText
(
isNullString
(
UserHelper
.
INSTANCE
.
getUserInfo
().
getUserInfo
().
getPhone
()));
...
...
@@ -231,6 +236,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
}
}
public
void
onEvent
(
UnRegisterEvent
event
)
{
LogOut
();
}
@Override
public
void
onClick
(
View
v
)
{
...
...
@@ -266,8 +274,8 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
LogOut
();
}
else
if
(
id
==
R
.
id
.
person_notify_setting
)
{
startActivity
(
new
Intent
(
this
,
NotificationsSettingActivity
.
class
));
}
else
if
(
id
==
R
.
id
.
tv_account_unregister
)
{
startActivity
(
new
Intent
(
this
,
AccountUnRegisterActivity
.
class
));
}
else
if
(
id
==
R
.
id
.
tv_account_unregister
)
{
startActivity
(
new
Intent
(
this
,
AccountUnRegisterActivity
.
class
));
}
}
...
...
@@ -307,25 +315,25 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
@SuppressLint
(
"CheckResult"
)
@Override
public
void
onComplete
(
SHARE_MEDIA
share_media
,
int
i
,
Map
<
String
,
String
>
map
)
{
if
(
map
==
null
||
map
.
size
()==
0
)
{
if
(
map
==
null
||
map
.
size
()
==
0
)
{
return
;
}
userHttp
.
bindQQ
(
new
BindQQ
(
map
.
get
(
"openid"
),
map
.
get
(
"unionid"
)))
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
o
->
{
dismissProgressDialog
();
if
(
o
.
code
==
0
)
{
if
(
o
.
code
==
0
)
{
Objects
.
requireNonNull
(
UserHelper
.
INSTANCE
.
getUserInfo
().
getUserInfo
()).
setBind_qq
(
1
);
jtv_qq
.
setRightText
(
"已绑定"
);
ToastUtil
.
toastShort
(
"绑定成功"
);
}
else
{
}
else
{
ToastHelper
.
Companion
.
show
(
o
.
msg
);
}
},
new
ThrowableConsumer
()
{
@Override
public
void
accept
(
@NotNull
String
msg
)
{
dismissProgressDialog
();
ToastHelper
.
Companion
.
show
(
msg
);
dismissProgressDialog
();
ToastHelper
.
Companion
.
show
(
msg
);
}
});
...
...
@@ -346,59 +354,6 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
}
/* *//**
* 绑定微信
*//*
private void bindWx() {
showProgressDialog("绑定微信中...");
UMShareAPI.get(this).doOauthVerify(this, SHARE_MEDIA.WEIXIN, new UMAuthListener() {
@Override
public void onStart(SHARE_MEDIA share_media) {
}
@SuppressLint("CheckResult")
@Override
public void onComplete(SHARE_MEDIA share_media, int i, Map<String, String> map) {
if (map == null||map.size()==0) {
return;
}
String openid = map.get("openid");
String unionid = map.get("unionid");
userHttp.bindWX(new BindWX(openid, unionid))
.observeOn(AndroidSchedulers.mainThread())
.subscribe(o -> {
dismissProgressDialog();
if(o.code == 0 ) {
UserHelper.INSTANCE.getUserInfo().getUserInfo().setBind_weixin(1);
jtv_wechat.setRightText("已绑定");
ToastUtil.toastShort("绑定成功");
}else{
ToastHelper.Companion.show(o.msg);
}
}, new ThrowableConsumer() {
@Override
public void accept(@NotNull String msg) {
dismissProgressDialog();
}
});
UMShareAPI.get(AccountSettingActivity.this).deleteOauth(AccountSettingActivity.this, SHARE_MEDIA.WEIXIN, this);
}
@Override
public void onError(SHARE_MEDIA share_media, int i, Throwable throwable) {
dismissProgressDialog();
ToastUtil.toastShort(throwable.getMessage());
}
@Override
public void onCancel(SHARE_MEDIA share_media, int i) {
dismissProgressDialog();
}
});
}*/
/**
* 绑定微信
*/
...
...
@@ -413,7 +368,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
@SuppressLint
(
"CheckResult"
)
@Override
public
void
onComplete
(
SHARE_MEDIA
share_media
,
int
i
,
Map
<
String
,
String
>
map
)
{
if
(
map
==
null
||
map
.
size
()==
0
)
{
if
(
map
==
null
||
map
.
size
()
==
0
)
{
return
;
}
String
openid
=
map
.
get
(
"openid"
);
...
...
@@ -423,11 +378,11 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
o
->
{
dismissProgressDialog
();
if
(
o
.
code
==
0
)
{
if
(
o
.
code
==
0
)
{
UserHelper
.
INSTANCE
.
getUserInfo
().
getUserInfo
().
setBind_weixin
(
1
);
jtv_wechat
.
setRightText
(
"已绑定"
);
ToastUtil
.
toastShort
(
"绑定成功"
);
}
else
{
}
else
{
ToastHelper
.
Companion
.
show
(
o
.
msg
);
}
},
new
ThrowableConsumer
()
{
...
...
@@ -452,6 +407,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
}
});
}
/**
* 确认弹窗
*
...
...
@@ -475,30 +431,6 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
.
show
();
}
/* *//**
* 判断是否满足解绑条件
*
* @param type 1-微信 2-qq
*//*
private void checkUnbind(int type) {
//没有绑定手机号,且微信和qq只有一个绑定了,解绑前需要再次弹窗确认
if (TextUtils.isEmpty(UserHelper.INSTANCE.getUserInfo().getUserInfo().getPhone())) {
int flag = 0;
if (UserHelper.INSTANCE.getUserInfo().getUserInfo().getBind_weixin() == 1) {
flag++;
}
if (UserHelper.INSTANCE.getUserInfo().getUserInfo().getBind_qq() == 1) {
flag++;
}
if (flag != 2) {
//满足再次弹窗确认条件
noticeDialog(type);
}
} else {
unbindThirdLogin(type);
}
}*/
/**
* 判断是否满足解绑条件
*
...
...
@@ -517,7 +449,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
if
(
flag
!=
2
)
{
//满足再次弹窗确认条件
noticeDialog
(
type
);
}
else
{
}
else
{
unbindThirdLogin
(
type
);
}
}
else
{
...
...
@@ -525,6 +457,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
}
}
/**
* 再次弹窗确认提示
*
...
...
@@ -620,7 +553,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
}
else
{
tb_eare
.
setChecked
(
false
);
}
}
catch
(
Exception
e
)
{}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
TextUtils
.
isEmpty
(
UserHelper
.
INSTANCE
.
getUserInfo
().
getUserInfo
().
getPhone
()))
{
ll_change_password
.
setVisibility
(
View
.
VISIBLE
);
...
...
m-user/src/main/java/com/yidianling/user/mine/AccountUnRegisterActivity.kt
View file @
65e8bb4d
package
com.yidianling.user.mine
import
android.annotation.SuppressLint
import
android.view.Gravity
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.user.R
import
com.yidianling.user.event.UnRegisterEvent
import
com.yidianling.user.http.UserHttpImpl
import
com.yidianling.user.http.request.UserForbidLoginParam
import
de.greenrobot.event.EventBus
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.activity_account_un_register.*
/**
...
...
@@ -17,9 +27,48 @@ class AccountUnRegisterActivity : BaseActivity() {
override
fun
getStatusViewOptions
():
StatusBarOptions
{
return
StatusBarOptions
(
isAddStatusView
=
true
,
statusBarDarkMode
=
true
)
}
override
fun
initDataAndEvent
()
{
//无网络 读取本地文件
web_view
.
loadUrl
(
"file:///android_asset/html/accountUnregister.html"
)
tv_unregister
.
setOnClickListener
{
CommonDialog
(
this
)
.
setTitle
(
"确定注销账号?"
)
.
setTitle_color
(
R
.
color
.
platform_color_242424
)
.
setMessage
(
"""
1.您的账号内如有剩余金额,如未用完,视为放弃将被清零;
2.您的订单(已购买的咨询、课程、测评等)将被终止且无法继续接受服务;
"""
.
trimIndent
()
)
.
setMessageTextGravity
(
Gravity
.
LEFT
)
.
setMessageColor
(
R
.
color
.
platform_color_666666
)
.
setLeftOnclick
(
"下次再说"
)
{
}
.
setLeftButton_color
(
R
.
color
.
platform_color_666666
)
.
setRightClick
(
"确定"
)
{
userForbidLogin
()
}
.
setRightButton_color
(
R
.
color
.
white
)
.
setRightButtonBackgroundColor
(
R
.
color
.
baby_blue
)
.
show
()
}
}
@SuppressLint
(
"CheckResult"
)
private
fun
userForbidLogin
()
{
val
param
=
UserForbidLoginParam
()
param
.
userPort
=
1
;
UserHttpImpl
.
getInstance
().
userForbidLogin
(
param
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
if
(!
isFinishing
&&
it
.
data
)
{
ToastUtil
.
toastShort
(
"账号已注销"
)
EventBus
.
getDefault
().
post
(
UnRegisterEvent
())
finish
()
}
}
}
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/ui/login/presenter/VerificationCodePresenterImpl.kt
View file @
65e8bb4d
...
...
@@ -152,6 +152,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
}
mView
.
closeActivity
()
}
else
{
ToastUtil
.
toastShort
(
it
.
msg
)
mView
.
startAnim
()
}
},
{
...
...
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