Commit 8069f63c by YKai

feat:一键登录代码优化

parent bda2f90e
......@@ -118,12 +118,6 @@ interface UserApi {
@POST("phone/verification/init")
fun checkAliAuth(@Body body: RequestBody): Observable<BaseResponse<PhoneAuthResponseBean>>
//第三方登录获取用户信息
@POST("login/v2/login_wechat_qq")
@Headers( YDL_DOMAIN+ YDL_DOMAIN_LOGIN_BASE_URL,LOGIN_USER_PORT)
fun thirdPartJavaLogin(@Body body: RequestBody): Observable<BaseResponse<UserResponseBean>>
//获取隐私政策数据
@GET("site/get-privacy-content")
fun getSecretData(): Observable<BaseResponse<SecretResponse>>
......@@ -152,6 +146,10 @@ interface UserApi {
//第三方登录获取用户信息
@POST("login/v2/login_wechat_qq")
@Headers( YDL_DOMAIN+ YDL_DOMAIN_LOGIN_BASE_URL,LOGIN_USER_PORT)
fun thirdPartJavaLogin(@Body body: RequestBody): Observable<BaseResponse<UserResponseBean>>
/**
* 绑定手机号
......
......@@ -16,6 +16,7 @@ import com.mobile.auth.gatewayauth.model.TokenRet
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.JPushUtils
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
......@@ -310,7 +311,7 @@ object OneKeyLoginHelp {
AuthUIConfig.Builder()
.setStatusBarColor(Color.TRANSPARENT)
.setWebViewStatusBarColor(Color.TRANSPARENT)
.setStatusBarUIFlag(View.SYSTEM_UI_FLAG_LOW_PROFILE)
.setStatusBarUIFlag(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
.setNavText("登录解锁更多功能")
.setNavTextColor(Color.parseColor("#242424"))
.setWebNavTextColor(Color.parseColor("#242424")) // 设置协议页面标题字体颜色
......@@ -355,10 +356,13 @@ object OneKeyLoginHelp {
when (tokenRet.code) {
ResultCode.CODE_START_AUTHPAGE_SUCCESS -> { // 唤起一键登录页面成功
LogUtil.e("唤起授权页成功:$s")
if (mIsFromGuide){
mActivity.finish()
}
}
ResultCode.CODE_SUCCESS -> { // 获取token成功
val param = PhoneLoginAutoParam(tokenRet.token, "11111111111",2,2,"",
RxAppTool.getAppVersionName(BaseApp.Companion.getApp())) // JPushUtils.getRegistrationID()
val param = PhoneLoginAutoParam(tokenRet.token, JPushUtils.getRegistrationID(),2,2,"",
RxAppTool.getAppVersionName(BaseApp.Companion.getApp()))
LoginApiRequestUtil.autoLogin(param)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......
......@@ -3,6 +3,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
tools:ignore="ResourceName">
<alpha
android:duration="0"
android:duration="300"
android:fromAlpha="0"
android:toAlpha="1.0"
/>
</set>
......@@ -3,7 +3,9 @@
xmlns:android="http://schemas.android.com/apk/res/android"
tools:ignore="ResourceName">
<alpha
android:duration="0"
android:duration="300"
android:fromAlpha="1"
android:toAlpha="0"
/>
</set>
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