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
daf0c5f7
Commit
daf0c5f7
authored
Jun 16, 2021
by
宋永孟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复了攻略、说明、退出APP的三个问题
parent
157af2b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
74 deletions
+103
-74
LifeAccountAuthActivity.kt
...enghuoquan/newscontent/ui/auth/LifeAccountAuthActivity.kt
+65
-55
LifeAccountPersonalAuthActivity.kt
...an/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
+36
-18
activity_life_account_auth.xml
...ontent/src/main/res/layout/activity_life_account_auth.xml
+1
-0
activity_life_account_personal_auth.xml
...c/main/res/layout/activity_life_account_personal_auth.xml
+1
-1
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountAuthActivity.kt
View file @
daf0c5f7
...
...
@@ -22,69 +22,79 @@ import com.yidian.xpage.XPageManager
*/
class
LifeAccountAuthActivity
:
BaseActivity
<
ActivityLifeAccountAuthBinding
>(),
View
.
OnClickListener
,
IAuthAuthenticationCallback
,
IAuthMerchantCheckCallback
{
override
fun
createViewBinding
():
ActivityLifeAccountAuthBinding
{
return
ActivityLifeAccountAuthBinding
.
inflate
(
layoutInflater
)
}
override
fun
getXPageName
():
Str
ing
{
return
XRouterPathConstants
.
LIFE_ACCOUNT_AUTH
}
override
fun
createViewBinding
():
ActivityLifeAccountAuthBind
ing
{
return
ActivityLifeAccountAuthBinding
.
inflate
(
layoutInflater
)
}
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
super
.
init
(
savedInstanceState
)
initView
()
initListener
()
}
override
fun
getXPageName
():
String
{
return
XRouterPathConstants
.
LIFE_ACCOUNT_AUTH
}
private
fun
initView
()
{
viewBind
.
layoutCommonHeader
.
tvTitle
.
text
=
resources
.
getString
(
R
.
string
.
join_life_circle
)
viewBind
.
viewPersonalAuth
.
setData
(
resources
.
getString
(
R
.
string
.
personal_auth
),
resources
.
getString
(
R
.
string
.
personal_auth_condition
),
resources
.
getString
(
R
.
string
.
personal_auth_description
),
false
)
viewBind
.
viewEnterpriseAuth
.
setData
(
resources
.
getString
(
R
.
string
.
enterprise_auth
),
resources
.
getString
(
R
.
string
.
enterprise_auth_condition
),
resources
.
getString
(
R
.
string
.
enterprise_auth_description
),
false
)
}
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
super
.
init
(
savedInstanceState
)
initView
()
initListener
()
}
private
fun
initView
()
{
viewBind
.
layoutCommonHeader
.
ivBack
.
visibility
=
View
.
GONE
private
fun
initListener
()
{
viewBind
.
layoutCommonHeader
.
ivBack
.
setOnClickListener
(
this
)
viewBind
.
tvJoinStrategy
.
setOnClickListener
(
this
)
viewBind
.
viewPersonalAuth
.
setOnClickListener
(
this
)
viewBind
.
viewEnterpriseAuth
.
setOnClickListener
(
this
)
viewBind
.
layoutCommonHeader
.
tvTitle
.
text
=
resources
.
getString
(
R
.
string
.
join_life_circle
)
viewBind
.
viewPersonalAuth
.
setData
(
resources
.
getString
(
R
.
string
.
personal_auth
),
resources
.
getString
(
R
.
string
.
personal_auth_condition
),
resources
.
getString
(
R
.
string
.
personal_auth_description
),
false
)
viewBind
.
viewEnterpriseAuth
.
setData
(
resources
.
getString
(
R
.
string
.
enterprise_auth
),
resources
.
getString
(
R
.
string
.
enterprise_auth_condition
),
resources
.
getString
(
R
.
string
.
enterprise_auth_description
),
false
)
if
(
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
!=
null
)
{
val
paramsMap
=
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
as
HashMap
<*,
*>
var
fromTag
=
paramsMap
[
"from"
]
as
String
if
(
fromTag
==
"auth"
)
{
viewBind
.
layoutCommonHeader
.
ivBack
.
visibility
=
View
.
VISIBLE
}
}
}
private
fun
initListener
()
{
viewBind
.
layoutCommonHeader
.
ivBack
.
setOnClickListener
(
this
)
viewBind
.
tvJoinStrategy
.
setOnClickListener
(
this
)
viewBind
.
viewPersonalAuth
.
setOnClickListener
(
this
)
viewBind
.
viewEnterpriseAuth
.
setOnClickListener
(
this
)
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_back
->
{
XPageManager
.
pop
(
null
)
}
R
.
id
.
tv_join_strategy
->
{
// TODO: 5/26/21 入驻攻略
}
R
.
id
.
view_personal_auth
->
{
// 请求个人认证信息 用于回显已填入的信息
ApiService
.
authAuthentication
(
this
)
}
R
.
id
.
view_enterprise_auth
->
{
// 请求企业认证信息 用于回显已填入的信息
ApiService
.
authMerchantCheck
(
this
,
hashMapOf
())
}
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_back
->
{
XPageManager
.
pop
(
null
)
}
R
.
id
.
tv_join_strategy
->
{
// TODO: 5/26/21 入驻攻略
}
R
.
id
.
view_personal_auth
->
{
// 请求个人认证信息 用于回显已填入的信息
ApiService
.
authAuthentication
(
this
)
}
R
.
id
.
view_enterprise_auth
->
{
// 请求企业认证信息 用于回显已填入的信息
ApiService
.
authMerchantCheck
(
this
,
hashMapOf
())
}
}
}
override
fun
authAuthenticationSuccess
(
result
:
AuthAuthenticationBean
.
Response
?)
{
viewBind
.
viewPersonalAuth
.
isSelected
=
true
viewBind
.
viewEnterpriseAuth
.
isSelected
=
false
// 跳转个人认证页
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH
,
hashMapOf
(
Pair
(
LifeAccountPersonalAuthActivity
.
EXTRA_AUTH_DATA
,
result
))
)
override
fun
authAuthenticationSuccess
(
result
:
AuthAuthenticationBean
.
Response
?)
{
viewBind
.
viewPersonalAuth
.
isSelected
=
true
viewBind
.
viewEnterpriseAuth
.
isSelected
=
false
// 跳转个人认证页
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH
,
hashMapOf
(
Pair
(
LifeAccountPersonalAuthActivity
.
EXTRA_AUTH_DATA
,
result
))
)
finish
()
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
View file @
daf0c5f7
...
...
@@ -4,7 +4,9 @@ import android.os.Bundle
import
android.util.Log
import
android.view.View
import
android.widget.CompoundButton
import
android.widget.Toast
import
com.orhanobut.hawk.Hawk
import
com.yidian.common.AppConfig
import
com.yidian.common.HawkConfig
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.base.BaseActivity
...
...
@@ -15,6 +17,7 @@ import com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthPersonalCompleteCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthAuthenticationBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthPersonalCompleteBean
import
com.yidian.shenghuoquan.newscontent.ui.ProtocolActivity
import
com.yidian.xpage.XPageManager
/**
...
...
@@ -71,6 +74,8 @@ class LifeAccountPersonalAuthActivity :
viewBind
.
svOccupation
.
setOnClickListener
(
this
)
viewBind
.
cbProtocol
.
setOnCheckedChangeListener
(
this
)
viewBind
.
btnNext
.
setOnClickListener
(
this
)
viewBind
.
tvPrivacyCertification
.
setOnClickListener
(
this
)
viewBind
.
tvUserAgreement
.
setOnClickListener
(
this
)
}
private
fun
initData
()
{
...
...
@@ -108,24 +113,37 @@ class LifeAccountPersonalAuthActivity :
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_back
->
XPageManager
.
pop
(
null
)
R
.
id
.
sv_occupation
->
{
// TODO: 5/27/21 跳转职业标签选择 选择完成后进行下一步检查
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
=
"工程师"
viewBind
.
svOccupation
.
setContentResult
(
"工程师"
)
checkNextCondition
()
}
R
.
id
.
btn_next
->
{
// 个人认证 完成认证
val
requestParams
=
HashMap
<
String
,
String
?>()
requestParams
[
"mobile"
]
=
Hawk
.
get
(
HawkConfig
.
Mobile
,
""
)
ApiService
.
authComplete
(
this
,
requestParams
)
}
when
(
v
?.
id
)
{
R
.
id
.
iv_back
->
XPageManager
.
pop
(
null
)
R
.
id
.
sv_occupation
->
{
// TODO: 5/27/21 跳转职业标签选择 选择完成后进行下一步检查
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
=
"工程师"
viewBind
.
svOccupation
.
setContentResult
(
"工程师"
)
checkNextCondition
()
}
R
.
id
.
btn_next
->
{
// 个人认证 完成认证
val
requestParams
=
HashMap
<
String
,
String
?>()
requestParams
[
"mobile"
]
=
Hawk
.
get
(
HawkConfig
.
Mobile
,
""
)
ApiService
.
authComplete
(
this
,
requestParams
)
}
R
.
id
.
tv_privacy_certification
->
{
val
urlMap
=
HashMap
<
String
,
String
>()
urlMap
[
ProtocolActivity
.
ProtocolUrlKey
]
=
AppConfig
.
privacyPolicyStatement
XPageManager
.
push
(
XRouterPathConstants
.
PROTOCOL
,
urlMap
)
}
R
.
id
.
tv_user_agreement
->
{
val
urlMap
=
HashMap
<
String
,
String
>()
urlMap
[
ProtocolActivity
.
ProtocolUrlKey
]
=
AppConfig
.
userProtocol
XPageManager
.
push
(
XRouterPathConstants
.
PROTOCOL
,
urlMap
)
}
}
}
override
fun
onCheckedChanged
(
buttonView
:
CompoundButton
?,
isChecked
:
Boolean
)
{
...
...
@@ -171,4 +189,4 @@ class LifeAccountPersonalAuthActivity :
"request auth complete failure: message: $message"
)
}
}
\ No newline at end of file
}
Components/newscontent/src/main/res/layout/activity_life_account_auth.xml
View file @
daf0c5f7
...
...
@@ -70,6 +70,7 @@
android:text=
"@string/join_strategy"
android:textColor=
"#FF1852F1"
android:textSize=
"13sp"
android:visibility=
"gone"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/view_enterprise_auth"
/>
...
...
Components/newscontent/src/main/res/layout/activity_life_account_personal_auth.xml
View file @
daf0c5f7
...
...
@@ -81,7 +81,7 @@
android:layout_marginBottom=
"33dp"
android:alpha=
"0.32"
android:background=
"@drawable/bg_btn_auth"
android:enabled=
"
fals
e"
android:enabled=
"
tru
e"
android:text=
"@string/auth_finish"
android:textColor=
"#FFFFFFFF"
android:textSize=
"17sp"
...
...
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