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
d25f579f
Commit
d25f579f
authored
Jun 25, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SHQBD-253 个人认证流程校验身份信息是否已认证逻辑,点击更换信息,清空职业标签回显并替换fragment
parent
49204c80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
52 deletions
+64
-52
LifeAccountPersonalAuthActivity.kt
...an/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
+10
-5
LifeAccountAuthSelectView.kt
...nghuoquan/newscontent/widget/LifeAccountAuthSelectView.kt
+54
-47
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
View file @
d25f579f
...
...
@@ -41,7 +41,7 @@ class LifeAccountPersonalAuthActivity :
/**
* 当前fragment
*/
private
val
fragment
by
lazy
{
LifeAccountIDCardAuthFragment
()
}
private
lateinit
var
curFragment
:
LifeAccountIDCardAuthFragment
/**
* 认证数据 还原认证流程用
...
...
@@ -94,11 +94,12 @@ class LifeAccountPersonalAuthActivity :
// 如果有已存在的认证流程则还原进度
authData
?.
let
{
LifeAccountAuthDataManager
.
generatePersonalAuthData
(
it
)
}
authData
?.
occupation
?.
let
{
viewBind
.
svOccupation
.
setContentResult
(
it
)
}
curFragment
=
LifeAccountIDCardAuthFragment
()
val
bundle
=
Bundle
()
bundle
.
putSerializable
(
LifeAccountIDCardAuthFragment
.
EXTRA_AUTH_DATA
,
authData
)
f
ragment
.
arguments
=
bundle
curF
ragment
.
arguments
=
bundle
supportFragmentManager
.
beginTransaction
()
.
add
(
R
.
id
.
fragment_container
,
f
ragment
).
commit
()
.
add
(
R
.
id
.
fragment_container
,
curF
ragment
).
commit
()
}
/**
...
...
@@ -202,8 +203,12 @@ class LifeAccountPersonalAuthActivity :
// 更换认证信息
// 清空认证数据
clearLifeAccountAuthData
()
supportFragmentManager
.
beginTransaction
().
remove
(
fragment
).
add
(
R
.
id
.
fragment_container
,
LifeAccountIDCardAuthFragment
()).
commit
()
// 清空职业标签回显
viewBind
.
svOccupation
.
clearContentResult
()
// 清空身份信息页 直接替换fragment
val
targetFragment
=
LifeAccountIDCardAuthFragment
()
supportFragmentManager
.
beginTransaction
().
remove
(
curFragment
).
add
(
R
.
id
.
fragment_container
,
targetFragment
).
commit
()
curFragment
=
targetFragment
}
override
fun
onRightOption
()
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountAuthSelectView.kt
View file @
d25f579f
...
...
@@ -13,62 +13,69 @@ import com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountAuthSelect
* description: 生活号认证 职业标签/商户类型选择
*/
class
LifeAccountAuthSelectView
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
)
:
YdConstraintLayout
(
context
,
attrs
,
defStyle
),
View
.
OnClickListener
{
private
val
viewBinding
=
ViewLifeAccountAuthSelectBinding
.
bind
(
View
.
inflate
(
getContext
(),
R
.
layout
.
view_life_account_auth_select
,
this
)
private
val
viewBinding
=
ViewLifeAccountAuthSelectBinding
.
bind
(
View
.
inflate
(
getContext
(),
R
.
layout
.
view_life_account_auth_select
,
this
)
)
init
{
val
typeArray
=
getContext
().
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
LifeAccountAuthSelectView
)
viewBinding
.
tvName
.
text
=
typeArray
.
getString
(
R
.
styleable
.
LifeAccountAuthSelectView_LifeAccountAuthSelectView_name_text
)
viewBinding
.
tvContent
.
hint
=
typeArray
.
getString
(
R
.
styleable
.
LifeAccountAuthSelectView_LifeAccountAuthSelectView_content_hint_text
)
typeArray
.
recycle
()
}
init
{
val
typeArray
=
getContext
().
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
LifeAccountAuthSelectView
)
viewBinding
.
tvName
.
text
=
typeArray
.
getString
(
R
.
styleable
.
LifeAccountAuthSelectView_LifeAccountAuthSelectView_name_text
)
viewBinding
.
tvContent
.
hint
=
typeArray
.
getString
(
R
.
styleable
.
LifeAccountAuthSelectView_LifeAccountAuthSelectView_content_hint_text
)
typeArray
.
recycle
()
}
/**
* 回显选择的内容
*/
fun
setContentResult
(
text
:
String
)
{
viewBinding
.
tvContent
.
text
=
text
}
/**
* 回显选择的内容
*/
fun
setContentResult
(
text
:
String
)
{
viewBinding
.
tvContent
.
text
=
text
}
/**
* 获取当前选择的内容
*/
fun
getCurSelectItem
():
String
{
return
viewBinding
.
tvContent
.
text
.
toString
()
}
/**
* 获取当前选择的内容
*/
fun
getContentResult
():
String
{
return
viewBinding
.
tvContent
.
text
.
toString
()
}
/**
* 设置是否能选择 即是否可以弹出选择弹窗
* @param enable true为可选择 false为不可选择
*/
fun
enableSelect
(
enable
:
Boolean
)
{
isEnabled
=
enable
viewBinding
.
ivSelect
.
visibility
=
if
(
enable
)
View
.
VISIBLE
else
View
.
GONE
}
/**
* 设置是否能选择 即是否可以弹出选择弹窗
* @param enable true为可选择 false为不可选择
*/
fun
enableSelect
(
enable
:
Boolean
)
{
isEnabled
=
enable
viewBinding
.
ivSelect
.
visibility
=
if
(
enable
)
View
.
VISIBLE
else
View
.
GONE
}
/**
* 清空当前选择的内容
*/
fun
clearContentResult
()
{
viewBinding
.
tvContent
.
text
=
""
}
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
}
}
interface
OnLifeAccountAuthSelectViewCallback
{
/**
* 点击选择功能
*/
fun
onLifeAccountAuthSelect
()
}
interface
OnLifeAccountAuthSelectViewCallback
{
/**
* 点击选择功能
*/
fun
onLifeAccountAuthSelect
()
}
}
\ 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