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
ab8e344a
Commit
ab8e344a
authored
Jun 15, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'd/v_accountLogOff' into 'release'
注销登录功能合并 See merge request app_android_lib/YDL-Component!163
parents
ee3dbe51
f54cbd9c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
17 deletions
+39
-17
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
config.gradle
config.gradle
+2
-6
UserApi.kt
m-user/src/main/java/com/yidianling/user/http/UserApi.kt
+10
-1
UserHttp.kt
m-user/src/main/java/com/yidianling/user/http/UserHttp.kt
+5
-1
UserHttpImpl.kt
m-user/src/main/java/com/yidianling/user/http/UserHttpImpl.kt
+9
-1
AccountUnRegisterActivity.kt
m-user/src/main/java/com/yidianling/user/mine/AccountUnRegisterActivity.kt
+11
-6
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
ab8e344a
...
...
@@ -20,10 +20,10 @@ import java.util.List;
*/
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
// public static String appEnv = YDLConstants.ENV_PROD;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
lifecycles
.
add
(
new
DemoAppLifecycles
());
...
...
config.gradle
View file @
ab8e344a
...
...
@@ -8,7 +8,7 @@ ext {
"m-confide"
:
"0.0.50.25"
,
"m-consultant"
:
"0.0.60.67"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.4
8
"
,
"m-user"
:
"0.0.62.4
9
"
,
"m-home"
:
"0.0.23.90"
,
"m-im"
:
"0.0.21.57"
,
"m-dynamic"
:
"0.0.7.74"
,
...
...
@@ -35,7 +35,6 @@ ext {
//mdt 组件
"ydl-tuicore"
:
"0.0.23"
,
//第一步
"ydl-platform"
:
"0.0.41.39"
,
//第二步 若干
...
...
@@ -44,9 +43,6 @@ ext {
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.30.18"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
//以下 几乎不会动
...
...
@@ -97,7 +93,7 @@ ext {
"m-confide"
:
"0.0.50.25"
,
"m-consultant"
:
"0.0.60.67"
,
"m-fm"
:
"0.0.30.09"
,
"m-user"
:
"0.0.62.4
8
"
,
"m-user"
:
"0.0.62.4
9
"
,
"m-home"
:
"0.0.23.90"
,
"m-im"
:
"0.0.21.57"
,
"m-dynamic"
:
"0.0.7.74"
,
...
...
m-user/src/main/java/com/yidianling/user/http/UserApi.kt
View file @
ab8e344a
...
...
@@ -229,13 +229,22 @@ interface UserApi {
fun
unBindThirdLogin
(
@Body
body
:
RequestBody
):
Observable
<
BaseResponse
<
Any
>>
/**
* 用户注销账号
* 用户注销账号
(原有禁止登录逻辑)
*/
@FormUrlEncoded
@POST
(
"user/forbid_login"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
userForbidLogin
(
@FieldMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseAPIResponse
<
Boolean
>>
/**
* 用户注销账号
*/
@FormUrlEncoded
@POST
(
"login/v2/accountLogOff"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
)
fun
accountLogOff
(
@FieldMap
params
:
Map
<
String
,
String
>):
Observable
<
BaseAPIResponse
<
Boolean
>>
/**
* 是否需要强绑定手机号
*/
...
...
m-user/src/main/java/com/yidianling/user/http/UserHttp.kt
View file @
ab8e344a
...
...
@@ -79,6 +79,9 @@ interface UserHttp {
fun
getNewUserJumpUrl
():
Observable
<
BaseAPIResponse
<
String
>>
/**用户注销账号*/
/**用户注销账号
(禁止登录)
*/
fun
userForbidLogin
(
param
:
UserForbidLoginParam
):
Observable
<
BaseAPIResponse
<
Boolean
>>
/**用户注销账号*/
fun
accountLogOff
(
param
:
UserForbidLoginParam
):
Observable
<
BaseAPIResponse
<
Boolean
>>
}
\ No newline at end of file
m-user/src/main/java/com/yidianling/user/http/UserHttpImpl.kt
View file @
ab8e344a
...
...
@@ -231,13 +231,21 @@ class UserHttpImpl private constructor() : UserHttp {
}
/**
* 用户注销账号调用接口
* 用户注销账号调用接口
(禁止登陆)
* */
override
fun
userForbidLogin
(
param
:
UserForbidLoginParam
):
Observable
<
BaseAPIResponse
<
Boolean
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
userForbidLogin
(
it
)
}
}
/**
* 用户注销账号调用接口
* */
override
fun
accountLogOff
(
param
:
UserForbidLoginParam
):
Observable
<
BaseAPIResponse
<
Boolean
>>
{
return
RxUtils
.
mapObservable
(
param
)
.
flatMap
{
getUserApi
().
accountLogOff
(
it
)
}
}
private
object
Holder
{
val
INSTANCE
=
UserHttpImpl
()
}
...
...
m-user/src/main/java/com/yidianling/user/mine/AccountUnRegisterActivity.kt
View file @
ab8e344a
...
...
@@ -38,9 +38,10 @@ class AccountUnRegisterActivity : BaseActivity() {
.
setTitle_color
(
R
.
color
.
platform_color_242424
)
.
setMessage
(
"""
1.您的账号内如有剩余金额,如未用完,视为放弃将被清零;
2.您的订单(已购买的咨询、课程、测评等)将被终止且无法继续接受服务;
为了保护您的账户、财产安全,在您提交注销前,需同时满足以下条件:
1.账号财产已清零,即账户余额为0;
2.不存在交易中的订单,即咨询订单状态均为交易成功或交易关闭;
3.无退款中的订单。
"""
.
trimIndent
()
)
.
setMessageTextGravity
(
Gravity
.
LEFT
)
...
...
@@ -60,15 +61,18 @@ class AccountUnRegisterActivity : BaseActivity() {
private
fun
userForbidLogin
()
{
val
param
=
UserForbidLoginParam
()
param
.
userPort
=
1
;
UserHttpImpl
.
getInstance
().
userForbidLogin
(
param
)
UserHttpImpl
.
getInstance
().
accountLogOff
(
param
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
if
(!
isFinishing
&&
it
.
data
)
{
ToastUtil
.
toast
Short
(
"账号已注销"
)
if
(
it
.
code
==
"200"
&&
!
isFinishing
&&
it
.
data
)
{
ToastUtil
.
toast
Long
(
this
@AccountUnRegisterActivity
,
"账号已注销"
)
EventBus
.
getDefault
().
post
(
UnRegisterEvent
())
finish
()
}
else
{
ToastUtil
.
toastLong
(
this
@AccountUnRegisterActivity
,
it
.
msg
)
}
}
}
}
\ No newline at end of file
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