Commit d7ad6890 by 霍志良

Merge remote-tracking branch 'origin/4.1.63修改心理咨询马甲包微信qq也要勾选协议' into 周六主包同步注销登录功能李总紧急让改的

# Conflicts:
#	config.gradle
#	m-user/src/main/AndroidManifest.xml
#	m-user/src/main/java/com/yidianling/user/http/UserApi.kt
#	m-user/src/main/java/com/yidianling/user/mine/AccountSettingActivity.java
#	m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
#	m-user/src/main/java/com/yidianling/user/ui/login/presenter/VerificationCodePresenterImpl.kt
parents 5e31aee3 65e8bb4d
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
package="com.yidianling.user"> package="com.yidianling.user">
<application> <application>
<activity android:name=".mine.AccountUnRegisterActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme"/>
<activity <activity
android:name=".ui.LoginActivity" android:name=".ui.LoginActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
...@@ -94,10 +97,10 @@ ...@@ -94,10 +97,10 @@
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.ContactCustomerServiceActivity" android:name="com.yidianling.user.mine.ContactCustomerServiceActivity"
android:screenOrientation="portrait" android:theme="@style/platform_NoTitleTheme"
android:theme="@style/platform_NoTitleTheme" /> android:screenOrientation="portrait" />
<activity <activity
android:name="com.yidianling.user.mine.FeedBackActivity" android:name=".mine.FeedBackActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateUnspecified" /> android:windowSoftInputMode="adjustPan|stateUnspecified" />
<activity <activity
...@@ -146,23 +149,23 @@ ...@@ -146,23 +149,23 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.EditAccountActivity" android:name=".mine.EditAccountActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.AddAccountActivity" android:name=".mine.AddAccountActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.RechargeResultActivity" android:name=".mine.RechargeResultActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.PwdCheckActivity" android:name=".mine.PwdCheckActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
android:name="com.yidianling.user.mine.PhoneChangeActivity" android:name=".mine.PhoneChangeActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<activity <activity
...@@ -170,7 +173,6 @@ ...@@ -170,7 +173,6 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" android:theme="@style/platform_NoTitleTheme"
android:windowSoftInputMode="adjustResize" /> android:windowSoftInputMode="adjustResize" />
<activity <activity
android:name=".mine.ReceiveRedPacketActivity" android:name=".mine.ReceiveRedPacketActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
...@@ -180,7 +182,6 @@ ...@@ -180,7 +182,6 @@
android:name=".ui.collect.CollectSexAndBirthActivity" android:name=".ui.collect.CollectSexAndBirthActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" /> android:launchMode="singleTop" />
<activity <activity
android:name=".ui.collect.CollectFocusActivity" android:name=".ui.collect.CollectFocusActivity"
android:exported="true" android:exported="true"
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<style>
.protocol{
text-align: justify;
padding: 0 20px;
box-sizing: border-box;
}
.title {
color: rgba(36, 36, 36, 100);
font-size: 18px;
text-align: center;
font-family: PingFangSC-Medium;
}
</style>
<div class="protocol">
<p>本协议适用于壹点灵账号注销功能服务,其作为壹点灵《用户注册协议》的补充协议,是壹点灵《用户注册协议》的不可分割的重要组成部分,具有同等的法律效力。若本协议与壹点灵《用户注册协议》约定不一致的,以本协议约定为准。本协议没明确规定的,则仍以壹点灵《用户注册协议》为准。</p>
<p>【特别说明】 亲爱的用户,在您正式开始下一步壹点灵账号注销流程前,我们先为您做出如下特别说明: 注销壹点灵账号后, 您将无法再以此账号登录和壹点灵旗下的 所有产品与服务以及产品及服务中与第三方合作的服务内容 (以下简称为“壹点灵旗下的产品与服务”,例如 “壹点灵”、“咨询师工作台”、“爱情恋爱配对测试”等),壹点灵也将同时终止在该账号下为您提供我们的高品质、多元化的产品与服务,这同时也不可避免地会给您的售后维权带来不便。且壹点灵账号一旦注销完成,将无法恢复。请您在注销前慎重考虑。</p>
<p>若您经过慎重考虑后仍执意决定注销壹点灵账号的,请您务必先行仔细阅读和充分理解本《壹点灵账号注销协议》,在同意全部内容、且在账号符合全部注销条件后,按照我们的注销操作指引点击进行下一步操作,您勾选本注销协议并点击下一步操作的,即视为您已经同意并签署和遵守本协议全部内容。如您在注销后需要再次使用我们的服务的,欢迎您使用手机号码或壹点灵允许的其他方式重新注册。同时,我们也非常希望能够了解您使用我们的产品/服务体验,您可以通过客服或发邮件至 kf@ydl.com 的方式反馈给我们,以便我们进一步改进和完善我们的产品和服务。</p>
<p>(如您执意决定注销壹点灵账号的,请继续向下阅读)</p>
<p>一、您需要首先知悉的是:在您的壹点灵账号注销后,将(可能)产生包括但不限于如下结果需要您自行承担:</p>
<p>1. 壹点灵账号一旦注销,您将无法登录、使用该账号(也包括无法再使用第三方登录方式),也就是说您将无法再以此账号(亦包括第三方账号绑定的壹点灵账号)登录/使用/继续使用壹点灵旗下的所有产品与服务;</p>
<p>2.
壹点灵账号一旦注销,您曾通过该账号登录、使用的壹点灵旗下的产品与服务下的所有内容、信息、数据、记录将会被全部删除或匿名化处理,您也无法再检索、访问、获取、继续使用和找回,也无权要求我们找回(但法律法规另有约定的除外),包括但不限于:</p>
<p>• 该账号下的个人资料(例如:头像、昵称等)及绑定信息(例如:绑定手机号、邮箱等);</p>
<p>• 该账号下的您的个人隐私信息(同时您亦不再享有《壹点灵隐私政策》中约定的您的用户权利,但法律法规另有约定的除外);</p>
<p>• 该账号曾发表的所有内容(例如:音频、图片、照片、评论、互动、点赞等);</p>
<p>• 其他所有内容、信息、数据、记录。</p>
<p>3. 您同意通过注销账号的方式放弃该账号在壹点灵旗下的产品与服务使用期间已产生的但未消耗完毕的权益及未来的逾期利益。即壹点灵账号一旦注销,我们将会对该账号下的全部权益做清除处理,包括但不限于:</p>
<p>• 您尚未到期的各类VIP会员权益、等级等;</p>
<p>• 您尚未使用的积分、卡券、优惠券、代金券、成长值等;</p>
<p>• 您尚未消耗掉的壹贝;</p>
<p>• 您在壹点灵旗下的产品与/或服务中发布的内容未来的收益权益;</p>
<p>• 您在壹点灵旗下的产品与/或服务中的各类身份权益;</p>
<p>• 您在壹点灵旗下的产品与/或服务中已经购买的未到期的在线服务内容;</p>
<p>• 其他已产生但未消耗完毕的权益或未来预期的收益。</p>
<p>4. 壹点灵账号一旦注销,将无法恢复(即使您在注销后以相同手机号码再次向我们申请注册壹点灵账号,此时该账号将默认为新的用户账号。因此,我们善意地提醒您在申请注销前对需要备份的内容提前自行做好备份);</p>
<p>5. 壹点灵账号一旦注销,您与我们曾签署过的相关用户协议、其他权利义务性文件等相应终止(但已约定继续生效的或法律法规另有规定的除外);</p>
<p>6. 其他因壹点灵账号注销(可能)产生的结果。</p>
<p>二、在您向我们申请/继续申请注销壹点灵账号之前,为保障您的账号安全和财产权益,您需先行检查与确保您申请注销的壹点灵账号已经同时满足以下条件,这些条件包括但不限于:</p>
<p>1. 该账号是通过我们的官方渠道注册、符合《壹点灵用户网络服务使用协议》及相关平台说明规范的账号;且为您本人注册的账号;</p>
<p>2. 需按照我们的官方渠道提供的注销流程和操作指引进行注销操作;</p>
<p>3. 该账号处于安全状态,包括但不限于:</p>
<p>• 该账号在申请注销期间无未处理完毕的(被)投诉、举报;</p>
<p>• 该账号在申请注销期间未处于非法的被检查状态、被限制的状态;</p>
<p>• 无其他不安全/异常状态。</p>
<p>4. 该账号内无余额/资金,包括但不限于:</p>
<p>• 壹贝已消耗完毕;</p>
<p>• 资金管理内余额已被提现或消费完毕;</p>
<p>• 其他账号内的余额/资金均已被提现或消费完毕。</p>
<p>5. 该账号内无未处理完毕的交易,包括但不限于:</p>
<p>• 壹点灵咨询中无未完成的咨询订单;</p>
<p>6. 其他应满足的条件。</p>
<p>上述问题您可首先尝试自行处理,如您无法处理的或在处理过程中有任何疑惑的,可联系壹点灵客服协助处理。</p>
<p>三、如何注销壹点灵账号?</p>
<p>1. 您需按照我们的官方渠道提供的注销流程和操作指引,在相关功能设置页面进行注销操作;</p>
<p>2. 您已经仔细阅读与充分理解、且同意本《壹点灵账号注销协议》的全部内容;同时,您已经检查与确认满足了本协议第二条的要求;</p>
<p>3.
在您完成上述第2点后,我们将根据您的账号安全状态以及您的相关产品与服务的使用情况等综合判断您的账号是否符合注销条件。如满足注销条件,为保障您的账号安全和财产权益,我们需要进行注销申请的身份验证以确保您真的是账号的有权使用人(如注册手机验证方式等)。如我们在综合判断后发现账号不符合注销条件的,或者身份验证失败的,您的注销可能会失败,您可以按照我们的指引进行后续操作或联系壹点灵客服协助处理;</p>
<p>4.
在您完成上述第3点后,我们将根据您的账号安全状态以及您的相关产品与服务的使用情况等综合判断您的账号是否符合注销条件。如满足注销条件,为保障您的账号安全和财产权益,我们需要进行注销申请的身份验证以确保您真的是账号的有权使用人(如注册手机验证方式等)。如我们在综合判断后发现账号不符合注销条件的,或者身份验证失败的,您的注销可能会失败,您可以按照我们的指引进行后续操作或联系壹点灵客服协助处理;</p>
<p>5. 该账号内无未处理完毕的交易,包括但不限于:</p>
<p>具体的注销流程化和操作以平台公布的为准。您理解并同意,在您申请注销壹点灵账号期间,如我们需要对相关交易、投诉或其他与您的账号相关的事项进行核实的,或者我们有其他合理的理由的,我们有权冻结您的该账号且暂时不为您提供注销服务。</p>
<p>本协议未尽事宜,请参考《壹点灵用户网络服务使用协议》、《壹点灵隐私政策》及平台相关规则、说明等。同时,您知悉并同意:即使您的壹点灵账号被注销了,也并不减轻或免除您应根据相关法律法规、相关协议、规则等(可能)需要承担的相关责任。</p>
<p>如在壹点灵账号注销过程中有任何问题您无法处理的或在处理过程中有任何疑惑的,可联系壹点灵客服协助处理。 本协议之效力、解释、变更、执行与争议解决均适用中华人民共和国法律。因本协议产生之争议,双方尽最大诚意进行友好协商,如果双方不能协商一致,均应依照中华人民共和国法律予以处理。</p>
</div>
</body>
</html>
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 {
}
...@@ -142,6 +142,13 @@ interface UserApi { ...@@ -142,6 +142,13 @@ interface UserApi {
@FormUrlEncoded @FormUrlEncoded
@POST("user/getNewUserJumpUrl") @POST("user/getNewUserJumpUrl")
@Headers( YDL_DOMAIN+ YDL_DOMAIN_JAVA) @Headers( YDL_DOMAIN+ YDL_DOMAIN_JAVA)
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>>
fun getNewUserJumpUrl(@FieldMap params: Map<String, String>): Observable<BaseAPIResponse<String>> fun getNewUserJumpUrl(@FieldMap params: Map<String, String>): Observable<BaseAPIResponse<String>>
......
...@@ -77,4 +77,7 @@ interface UserHttp { ...@@ -77,4 +77,7 @@ interface UserHttp {
fun getFocusData(): Observable<BaseAPIResponse<List<CollectFocusItemBean>>> fun getFocusData(): Observable<BaseAPIResponse<List<CollectFocusItemBean>>>
fun getNewUserJumpUrl(): Observable<BaseAPIResponse<String>> fun getNewUserJumpUrl(): Observable<BaseAPIResponse<String>>
/**用户注销账号*/
fun userForbidLogin(param: UserForbidLoginParam):Observable<BaseAPIResponse<Boolean>>
} }
\ No newline at end of file
...@@ -13,8 +13,8 @@ import com.ydl.ydlcommon.router.YdlCommonOut ...@@ -13,8 +13,8 @@ import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlnet.YDLHttpUtils import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.common.tools.RxAppTool import com.yidianling.common.tools.RxAppTool
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.UserHelper import com.yidianling.user.UserHelper
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.bean.CheckPhonePassBean import com.yidianling.user.bean.CheckPhonePassBean
import com.yidianling.user.bean.CollectFocusItemBean import com.yidianling.user.bean.CollectFocusItemBean
import com.yidianling.user.http.request.* import com.yidianling.user.http.request.*
...@@ -22,7 +22,6 @@ import com.yidianling.user.http.response.CheckPassword ...@@ -22,7 +22,6 @@ import com.yidianling.user.http.response.CheckPassword
import com.yidianling.user.http.response.CountryResponse import com.yidianling.user.http.response.CountryResponse
import com.yidianling.user.http.response.ExistResponse import com.yidianling.user.http.response.ExistResponse
import com.yidianling.user.http.response.SecretResponse 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.RedPacketId
import com.yidianling.user.mine.bean.RedPacketIdCmd import com.yidianling.user.mine.bean.RedPacketIdCmd
import com.yidianling.user.rxlogin.LoginObservable import com.yidianling.user.rxlogin.LoginObservable
...@@ -64,38 +63,38 @@ class UserHttpImpl private constructor() : UserHttp { ...@@ -64,38 +63,38 @@ class UserHttpImpl private constructor() : UserHttp {
override fun login(param: LoginParam): Observable<BaseResponse<UserResponseBean>> { override fun login(param: LoginParam): Observable<BaseResponse<UserResponseBean>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().login(it) } .flatMap { getUserApi().login(it) }
} }
override fun countryList(): Observable<BaseResponse<CountryResponse>> { override fun countryList(): Observable<BaseResponse<CountryResponse>> {
return getUserApi().countryList("") return getUserApi().countryList("")
.compose(RxUtils.netCheck()) .compose(RxUtils.netCheck())
} }
override fun phoneExist(param: ExistParam): Observable<BaseResponse<ExistResponse>> { override fun phoneExist(param: ExistParam): Observable<BaseResponse<ExistResponse>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().phoneExists(it) } .flatMap { getUserApi().phoneExists(it) }
} }
override fun code(param: CodeParam): Observable<BaseResponse<Any>> { override fun code(param: CodeParam): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().getCode(it) } .flatMap { getUserApi().getCode(it) }
} }
override fun bindPhone(param: BindPhoneParam): Observable<BaseResponse<UserResponseBean>> { override fun bindPhone(param: BindPhoneParam): Observable<BaseResponse<UserResponseBean>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().bindPhone(it) } .flatMap { getUserApi().bindPhone(it) }
} }
override fun forget(param: ForgetParam): Observable<BaseResponse<Any>> { override fun forget(param: ForgetParam): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().forget(it) } .flatMap { getUserApi().forget(it) }
} }
override fun register(param: RegisterParam): Observable<BaseResponse<Any>> { override fun register(param: RegisterParam): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().register(it) } .flatMap { getUserApi().register(it) }
} }
override fun channelId(param: ChannelIdParam): Observable<BaseResponse<LinkedTreeMap<String, String>>> { override fun channelId(param: ChannelIdParam): Observable<BaseResponse<LinkedTreeMap<String, String>>> {
...@@ -115,66 +114,75 @@ class UserHttpImpl private constructor() : UserHttp { ...@@ -115,66 +114,75 @@ class UserHttpImpl private constructor() : UserHttp {
override fun setUserInfo(param: UserInfoParam): Observable<BaseResponse<Any>> { override fun setUserInfo(param: UserInfoParam): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().setUserInfo(it) } .flatMap { getUserApi().setUserInfo(it) }
} }
//验证账号密码 //验证账号密码
override fun checkPhonePass(cmd: CheckPhonePassBean): Observable<BaseResponse<CheckPassword>> { override fun checkPhonePass(cmd: CheckPhonePassBean): Observable<BaseResponse<CheckPassword>> {
return RxUtils.mapObservable(cmd) return RxUtils.mapObservable(cmd)
.flatMap { getUserApi().checkPhonePass(it) } .flatMap { getUserApi().checkPhonePass(it) }
} }
override fun uploadHead(param: HeadParam): Observable<BaseResponse<Any>> { override fun uploadHead(param: HeadParam): Observable<BaseResponse<Any>> {
return Observable.just(param) return Observable.just(param)
.compose(RxUtils.netCheck()) .compose(RxUtils.netCheck())
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.map { .map {
val map = HashMap<String, RequestBody>() val map = HashMap<String, RequestBody>()
val mediaType = MediaType.parse("text/plain") val mediaType = MediaType.parse("text/plain")
map["type"] = RequestBody.create(mediaType, it.type) map["type"] = RequestBody.create(mediaType, it.type)
map["value"] = RequestBody.create(mediaType, it.value) map["value"] = RequestBody.create(mediaType, it.value)
map["ffrom"] = RequestBody.create(mediaType, YdlCommonOut.getChannelName()) map["ffrom"] = RequestBody.create(mediaType, YdlCommonOut.getChannelName())
map["isFromApp"] = RequestBody.create(mediaType, "1") map["isFromApp"] = RequestBody.create(mediaType, "1")
map["osBuild"] = RequestBody.create(mediaType, """${RxDeviceTool.getBuildBrandModel()},${RxDeviceTool.getSDKVersionName()},${RxAppTool.getAppVersionName(BaseApp.getApp())}""") map["osBuild"] = RequestBody.create(
map["ts"] = RequestBody.create(mediaType, (System.currentTimeMillis() / 1000).toString()) mediaType,
map["version"] = RequestBody.create(mediaType, RxAppTool.getAppVersionName(BaseApp.getApp())) """${RxDeviceTool.getBuildBrandModel()},${RxDeviceTool.getSDKVersionName()},${
val userInfo = UserHelper.getUserInfo() RxAppTool.getAppVersionName(
if (userInfo != null) { BaseApp.getApp()
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["ts"] =
map.put("""head"; filename="${it.file.name}""", fileBody) RequestBody.create(mediaType, (System.currentTimeMillis() / 1000).toString())
map map["version"] =
} RequestBody.create(mediaType, RxAppTool.getAppVersionName(BaseApp.getApp()))
.flatMap { val userInfo = UserHelper.getUserInfo()
getUserApi().uploadHeadImg(it) 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>> { override fun bindQQ(param: BindQQ): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().bindQQ(it) } .flatMap { getUserApi().bindQQ(it) }
} }
override fun bindWX(param: BindWX): Observable<BaseResponse<Any>> { override fun bindWX(param: BindWX): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().bindWx(it) } .flatMap { getUserApi().bindWx(it) }
} }
override fun logout(param: Logout): Observable<BaseResponse<Any>> { override fun logout(param: Logout): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().logout(it) } .flatMap { getUserApi().logout(it) }
} }
override fun checkPwd(param: CheckPwd): Observable<BaseResponse<Any>> { override fun checkPwd(param: CheckPwd): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().checkPwd(it) } .flatMap { getUserApi().checkPwd(it) }
} }
override fun changePhone(param: ChangePhone): Observable<BaseResponse<Any>> { override fun changePhone(param: ChangePhone): Observable<BaseResponse<Any>> {
return RxUtils.mapObservable(param) return RxUtils.mapObservable(param)
.flatMap { getUserApi().changePhone(it) } .flatMap { getUserApi().changePhone(it) }
} }
override fun privacyAgree(uid: String): Observable<BaseResponse<Any>> { override fun privacyAgree(uid: String): Observable<BaseResponse<Any>> {
...@@ -221,6 +229,14 @@ class UserHttpImpl private constructor() : UserHttp { ...@@ -221,6 +229,14 @@ class UserHttpImpl private constructor() : UserHttp {
.flatMap { getUserApi().getNewUserJumpUrl(it) } .flatMap { getUserApi().getNewUserJumpUrl(it) }
} }
/**
* 用户注销账号调用接口
* */
override fun userForbidLogin(param: UserForbidLoginParam): Observable<BaseAPIResponse<Boolean>> {
return RxUtils.mapObservable(param)
.flatMap { getUserApi().userForbidLogin(it) }
}
private object Holder { private object Holder {
val INSTANCE = UserHttpImpl() val INSTANCE = UserHttpImpl()
} }
......
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
...@@ -31,6 +31,7 @@ import com.yidianling.user.R; ...@@ -31,6 +31,7 @@ import com.yidianling.user.R;
import com.yidianling.user.UserConstants; import com.yidianling.user.UserConstants;
import com.yidianling.user.UserHelper; import com.yidianling.user.UserHelper;
import com.yidianling.user.api.event.RefreshRecentContactListEvent; import com.yidianling.user.api.event.RefreshRecentContactListEvent;
import com.yidianling.user.event.UnRegisterEvent;
import com.yidianling.user.event.UpdateBindStatusEvent; import com.yidianling.user.event.UpdateBindStatusEvent;
import com.yidianling.user.http.LoginApiRequestUtil; import com.yidianling.user.http.LoginApiRequestUtil;
import com.yidianling.user.http.UserHttp; import com.yidianling.user.http.UserHttp;
...@@ -67,11 +68,12 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -67,11 +68,12 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
JumpTextView jtv_wechat; JumpTextView jtv_wechat;
JumpTextView jtv_qq; JumpTextView jtv_qq;
RoundCornerButton rcb_exit; RoundCornerButton rcb_exit;
JumpTextView tvAccountUnRegister;
@NotNull @NotNull
@Override @Override
public StatusBarOptions getStatusViewOptions() { public StatusBarOptions getStatusViewOptions() {
return new StatusBarOptions(true,true); return new StatusBarOptions(true, true);
} }
@Override @Override
...@@ -91,6 +93,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -91,6 +93,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
jtv_wechat = findViewById(R.id.jtv_wechat); jtv_wechat = findViewById(R.id.jtv_wechat);
jtv_qq = findViewById(R.id.jtv_qq); jtv_qq = findViewById(R.id.jtv_qq);
rcb_exit = findViewById(R.id.rcb_exit); rcb_exit = findViewById(R.id.rcb_exit);
tvAccountUnRegister = findViewById(R.id.tv_account_unregister);
jtv_phone.setOnClickListener(this); jtv_phone.setOnClickListener(this);
jtv_change_password.setOnClickListener(this); jtv_change_password.setOnClickListener(this);
...@@ -99,6 +102,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -99,6 +102,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
rcb_exit.setOnClickListener(this); rcb_exit.setOnClickListener(this);
person_notify_setting.setOnClickListener(this); person_notify_setting.setOnClickListener(this);
person_black_setting.setOnClickListener(this); person_black_setting.setOnClickListener(this);
tvAccountUnRegister.setOnClickListener(this);
init(); init();
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
...@@ -160,7 +164,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -160,7 +164,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
final String EAR_MODE_OPEN = ModularServiceManager.INSTANCE.provide(IImService.class).getEarModeOpenType(); final String EAR_MODE_OPEN = ModularServiceManager.INSTANCE.provide(IImService.class).getEarModeOpenType();
final String EAR_MODE_CLOSE = ModularServiceManager.INSTANCE.provide(IImService.class).getEarModeCloseType(); final String EAR_MODE_CLOSE = ModularServiceManager.INSTANCE.provide(IImService.class).getEarModeCloseType();
SharedPreferencesEditor.putString(EAR_MODE_KEY, b ? EAR_MODE_OPEN : EAR_MODE_CLOSE); SharedPreferencesEditor.putString(EAR_MODE_KEY, b ? EAR_MODE_OPEN : EAR_MODE_CLOSE);
}catch (Exception e) {} } catch (Exception e) {
e.printStackTrace();
}
} }
void init() { void init() {
...@@ -168,7 +174,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -168,7 +174,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
//设置听筒模式 //设置听筒模式
try { try {
ModularServiceManager.INSTANCE.provide(IImService.class).updateEarMode(b); ModularServiceManager.INSTANCE.provide(IImService.class).updateEarMode(b);
}catch (Exception e) {} } catch (Exception e) {
e.printStackTrace();
}
changeEarMode(b); changeEarMode(b);
}); });
jtv_phone.setRightText(isNullString(UserHelper.INSTANCE.getUserInfo().getUserInfo().getPhone())); jtv_phone.setRightText(isNullString(UserHelper.INSTANCE.getUserInfo().getUserInfo().getPhone()));
...@@ -229,6 +237,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -229,6 +237,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
} }
} }
public void onEvent(UnRegisterEvent event) {
LogOut();
}
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -264,6 +275,8 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -264,6 +275,8 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
LogOut(); LogOut();
} else if (id == R.id.person_notify_setting) { } else if (id == R.id.person_notify_setting) {
startActivity(new Intent(this, NotificationsSettingActivity.class)); startActivity(new Intent(this, NotificationsSettingActivity.class));
} else if (id == R.id.tv_account_unregister) {
startActivity(new Intent(this, AccountUnRegisterActivity.class));
} }
} }
...@@ -303,25 +316,25 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -303,25 +316,25 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
@Override @Override
public void onComplete(SHARE_MEDIA share_media, int i, Map<String, String> map) { 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; return;
} }
userHttp.bindQQ(new BindQQ(map.get("openid"), map.get("unionid"))) userHttp.bindQQ(new BindQQ(map.get("openid"), map.get("unionid")))
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(o -> { .subscribe(o -> {
dismissProgressDialog(); dismissProgressDialog();
if(o.code == 0 ) { if (o.code == 0) {
Objects.requireNonNull(UserHelper.INSTANCE.getUserInfo().getUserInfo()).setBind_qq(1); Objects.requireNonNull(UserHelper.INSTANCE.getUserInfo().getUserInfo()).setBind_qq(1);
jtv_qq.setRightText("已绑定"); jtv_qq.setRightText("已绑定");
ToastUtil.toastShort("绑定成功"); ToastUtil.toastShort("绑定成功");
}else { } else {
ToastHelper.Companion.show(o.msg); ToastHelper.Companion.show(o.msg);
} }
}, new ThrowableConsumer() { }, new ThrowableConsumer() {
@Override @Override
public void accept(@NotNull String msg) { public void accept(@NotNull String msg) {
dismissProgressDialog(); dismissProgressDialog();
ToastHelper.Companion.show(msg); ToastHelper.Companion.show(msg);
} }
}); });
...@@ -356,7 +369,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -356,7 +369,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
@Override @Override
public void onComplete(SHARE_MEDIA share_media, int i, Map<String, String> map) { 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; return;
} }
String openid = map.get("openid"); String openid = map.get("openid");
...@@ -366,11 +379,11 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -366,11 +379,11 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(o -> { .subscribe(o -> {
dismissProgressDialog(); dismissProgressDialog();
if(o.code == 0 ) { if (o.code == 0) {
UserHelper.INSTANCE.getUserInfo().getUserInfo().setBind_weixin(1); UserHelper.INSTANCE.getUserInfo().getUserInfo().setBind_weixin(1);
jtv_wechat.setRightText("已绑定"); jtv_wechat.setRightText("已绑定");
ToastUtil.toastShort("绑定成功"); ToastUtil.toastShort("绑定成功");
}else{ } else {
ToastHelper.Companion.show(o.msg); ToastHelper.Companion.show(o.msg);
} }
}, new ThrowableConsumer() { }, new ThrowableConsumer() {
...@@ -541,7 +554,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -541,7 +554,9 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
} else { } else {
tb_eare.setChecked(false); tb_eare.setChecked(false);
} }
}catch (Exception e) {} } catch (Exception e) {
e.printStackTrace();
}
if (!TextUtils.isEmpty(UserHelper.INSTANCE.getUserInfo().getUserInfo().getPhone())) { if (!TextUtils.isEmpty(UserHelper.INSTANCE.getUserInfo().getUserInfo().getPhone())) {
ll_change_password.setVisibility(View.VISIBLE); ll_change_password.setVisibility(View.VISIBLE);
......
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.*
/**
* 账号注销协议页面
*/
class AccountUnRegisterActivity : BaseActivity() {
override fun layoutResId(): Int {
return R.layout.activity_account_un_register
}
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
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/platform_color_1DA1F2"/>
<corners android:radius="8dp" />
</shape>
\ No newline at end of file
<?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:ignore="ResourceName">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:background="@color/platform_white"
app:pa_left_start_icon="@drawable/platform_common_back"
app:pa_title_text="壹点灵账号注销协议" />
<WebView
android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="77dp"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width"
android:background="#EDEDED" />
<TextView
android:id="@+id/tv_unregister"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginStart="@dimen/platform_dp_20"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginEnd="@dimen/platform_dp_20"
android:background="@drawable/shape_btn_blue_radius_8"
android:gravity="center"
android:textSize="@dimen/platform_sp_16"
android:text="确定注销账号"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
...@@ -155,6 +155,25 @@ ...@@ -155,6 +155,25 @@
android:layout_height="@dimen/divide_line_stroke_width" android:layout_height="@dimen/divide_line_stroke_width"
android:background="#EDEDED" /> android:background="#EDEDED" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width"
android:layout_marginTop="14dp"
android:background="#EDEDED" />
<com.ydl.ydlcommon.view.JumpTextView
android:id="@+id/tv_account_unregister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
app:pa_jump_tv_left_text="注销账号"
app:pa_jump_tv_right_color="#333333" />
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width"
android:background="#EDEDED" />
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width" android:layout_height="@dimen/divide_line_stroke_width"
......
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName"> <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName">
<!--网络提示模块--> <!--网络提示模块-->
<!--动态模块--> <!--动态模块-->
<string name="user_edittext_hint"></string> <string name="user_edittext_hint"></string>
<string name="redpacket_tips_title">红包说明</string> <string name="redpacket_tips_title">红包说明</string>
<string name="redpacket_tips_content1" >1.红包仅限于感谢使用,不能用于支付咨询费,无咨询售后保障</string> <string name="redpacket_tips_content1">1.红包仅限于感谢使用,不能用于支付咨询费,无咨询售后保障</string>
<string name="redpacket_tips_content2">2.红包一经发送且咨询师已收取,不支持退款</string> <string name="redpacket_tips_content2">2.红包一经发送且咨询师已收取,不支持退款</string>
<string name="redpacket_tips_content3">3.咨询师未确认收取红包会在24小时退回账户</string> <string name="redpacket_tips_content3">3.咨询师未确认收取红包会在24小时退回账户</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment