Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
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
bp
ShenghuoquanBusiness
Commits
bb9977cb
Commit
bb9977cb
authored
Jun 06, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 个人、企业认证前检查
parent
4d1dd983
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
10 deletions
+54
-10
LifeAccountAuthActivity.kt
...enghuoquan/newscontent/ui/auth/LifeAccountAuthActivity.kt
+54
-10
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountAuthActivity.kt
View file @
bb9977cb
package
com.yidian.shenghuoquan.newscontent.ui.auth
import
android.os.Bundle
import
android.util.Log
import
android.view.View
import
com.orhanobut.hawk.Hawk
import
com.yidian.common.HawkConfig
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.base.BaseActivity
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountAuthBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthAuthenticationCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthMerchantCheckCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthAuthenticationBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthMerchantCheckBean
import
com.yidian.xpage.XPageManager
/**
...
...
@@ -14,7 +23,7 @@ import com.yidian.xpage.XPageManager
* description: 生活号认证
*/
class
LifeAccountAuthActivity
:
BaseActivity
<
ActivityLifeAccountAuthBinding
>(),
View
.
OnClickListener
{
View
.
OnClickListener
,
IAuthAuthenticationCallback
,
IAuthMerchantCheckCallback
{
override
fun
createViewBinding
():
ActivityLifeAccountAuthBinding
{
return
ActivityLifeAccountAuthBinding
.
inflate
(
layoutInflater
)
}
...
...
@@ -27,7 +36,6 @@ class LifeAccountAuthActivity : BaseActivity<ActivityLifeAccountAuthBinding>(),
super
.
init
(
savedInstanceState
)
initView
()
initListener
()
// TODO: 5/29/21 请求104接口 检测个人认证状态
}
private
fun
initView
()
{
...
...
@@ -61,17 +69,53 @@ class LifeAccountAuthActivity : BaseActivity<ActivityLifeAccountAuthBinding>(),
// TODO: 5/26/21 入驻攻略
}
R
.
id
.
view_personal_auth
->
{
viewBind
.
viewPersonalAuth
.
isSelected
=
true
viewBind
.
viewEnterpriseAuth
.
isSelected
=
false
// 跳转个人认证页
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH
,
null
)
// 请求个人认证信息 用于回显已填入的信息
ApiService
.
authAuthentication
(
this
)
}
R
.
id
.
view_enterprise_auth
->
{
viewBind
.
viewPersonalAuth
.
isSelected
=
false
v
iewBind
.
viewEnterpriseAuth
.
isSelected
=
true
// 跳转企业认证页
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH
,
null
)
// 请求企业认证信息 用于回显已填入的信息
v
al
params
=
HashMap
<
String
,
String
>(
1
)
params
[
"user_id"
]
=
Hawk
.
get
(
HawkConfig
.
UserId
,
""
)
ApiService
.
authMerchantCheck
(
this
,
params
)
}
}
}
override
fun
authAuthenticationSuccess
(
result
:
AuthAuthenticationBean
.
Response
?)
{
// TODO: 6/6/21 带参跳转
viewBind
.
viewPersonalAuth
.
isSelected
=
true
viewBind
.
viewEnterpriseAuth
.
isSelected
=
false
// 跳转个人认证页
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH
,
null
)
}
override
fun
authAuthenticationFailure
(
message
:
String
?)
{
Log
.
e
(
Constant
.
LIFE_ACCOUNT_AUTH_TAG
,
"request auth authentication failure, message: $message"
)
// Test
viewBind
.
viewPersonalAuth
.
isSelected
=
true
viewBind
.
viewEnterpriseAuth
.
isSelected
=
false
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH
,
null
)
}
override
fun
authMerchantCheckSuccess
(
result
:
AuthMerchantCheckBean
.
Response
?)
{
// TODO: 6/6/21 带参跳转
viewBind
.
viewPersonalAuth
.
isSelected
=
false
viewBind
.
viewEnterpriseAuth
.
isSelected
=
true
// 跳转企业认证页
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH
,
null
)
}
override
fun
authMerchantCheckFailure
(
message
:
String
?)
{
Log
.
e
(
Constant
.
LIFE_ACCOUNT_AUTH_TAG
,
"request auth merchant check failure, message: $message"
)
// Test
viewBind
.
viewPersonalAuth
.
isSelected
=
false
viewBind
.
viewEnterpriseAuth
.
isSelected
=
true
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH
,
null
)
}
}
\ 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