Commit bf7dc656 by YKai

feat:一键登录代码更新

parent fbcba731
...@@ -29,22 +29,31 @@ class OneKeyLoginHelp { ...@@ -29,22 +29,31 @@ class OneKeyLoginHelp {
private const val YDL_EXPERT_APP_KEY = "i4Y/PVRAz4P/aqajQF7SOd3JUIKEsJbRurH04azLyX6N2upi292OrLHECRmtTVAqY24HFjwUjW1QjRwJA9aFbNzl3zl7L5DEDBZ4+QSU28vq34HccmAjAeUCC7qCHbN7QLVZqhVpuYUCMZ5fp2NdhANJl/741wHccdPk/Un5c4larDNuv1KEo2OZOds2J1WFiBx7giWtzli4NwMq9x+9sb0aXPZZQ9C9Kr8T/0+/ccYdotwFm7XWenNs/G3Jy1HHVqqOCDecKPbyXR+cV0jBUisSjv+SEUTfpcc3iUGH5OjZyQ6OfaLkdjATsr5K9oVP" private const val YDL_EXPERT_APP_KEY = "i4Y/PVRAz4P/aqajQF7SOd3JUIKEsJbRurH04azLyX6N2upi292OrLHECRmtTVAqY24HFjwUjW1QjRwJA9aFbNzl3zl7L5DEDBZ4+QSU28vq34HccmAjAeUCC7qCHbN7QLVZqhVpuYUCMZ5fp2NdhANJl/741wHccdPk/Un5c4larDNuv1KEo2OZOds2J1WFiBx7giWtzli4NwMq9x+9sb0aXPZZQ9C9Kr8T/0+/ccYdotwFm7XWenNs/G3Jy1HHVqqOCDecKPbyXR+cV0jBUisSjv+SEUTfpcc3iUGH5OjZyQ6OfaLkdjATsr5K9oVP"
const val YDL_USER_APP = 1 const val YDL_USER_APP = 1
const val YDL_EXPERT_APP = 2 const val YDL_EXPERT_APP = 2
const val PHONE_CHECK =1 // 本机号码验证
const val ONE_KEY_LOGIN = 2 // 一键登录
} }
constructor(activity: BaseActivity, Authtype:Int) { /**
* 构造方法
*
* @param activity
* @param authType 1表示用户端一键登录 2表示
* @param loginType 1本机号码校验 2一键登录
*/
constructor(activity: BaseActivity, authType:Int,loginType:Int) {
mActivity = activity mActivity = activity
mPhoneNumberAuthHelper = PhoneNumberAuthHelper.getInstance(activity, mTokenListener) mPhoneNumberAuthHelper = PhoneNumberAuthHelper.getInstance(activity, mTokenListener)
mPhoneNumberAuthHelper?.let { mPhoneNumberAuthHelper?.let {
// APP是否处于调试状态,使⽤ getReporter.setLoggerEnable(true) 可以关闭此项检测 // APP是否处于调试状态,使⽤ getReporter.setLoggerEnable(true) 可以关闭此项检测
it.reporter.setLoggerEnable(true) it.reporter.setLoggerEnable(true)
// 设置密钥 // 设置密钥
if (Authtype== YDL_USER_APP){ if (authType== YDL_USER_APP){
it.setAuthSDKInfo(YDL_USER_APP_KEY) it.setAuthSDKInfo(YDL_USER_APP_KEY)
}else if (Authtype== YDL_EXPERT_APP){ }else if (authType== YDL_EXPERT_APP){
it.setAuthSDKInfo(YDL_EXPERT_APP_KEY) it.setAuthSDKInfo(YDL_EXPERT_APP_KEY)
} }
// 检查认证环境 // 检查认证环境
it.checkEnvAvailable(2) // type 1:本机号码校验 2: ⼀键登录 it.checkEnvAvailable(loginType) // type 1:本机号码校验 2: ⼀键登录
} }
} }
......
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