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
7a31e9e6
Commit
7a31e9e6
authored
Jun 10, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.yidian-inc.com:8021/bp/ShenghuoquanBusiness
into dev
parents
86808c22
1a402b85
Changes
50
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
1311 additions
and
145 deletions
+1311
-145
XRouterPathConstants.kt
...n/src/main/java/com/yidian/common/XRouterPathConstants.kt
+3
-0
AndroidManifest.xml
Components/newscontent/src/main/AndroidManifest.xml
+4
-0
MerchantServiceAdapter.kt
...henghuoquan/newscontent/adapter/MerchantServiceAdapter.kt
+77
-0
NewsContentApplication.kt
...an/shenghuoquan/newscontent/app/NewsContentApplication.kt
+16
-1
LifeAccountMerchantAuthData.kt
...nghuoquan/newscontent/bean/LifeAccountMerchantAuthData.kt
+1
-0
LifeAccountPersonalAuthData.kt
...nghuoquan/newscontent/bean/LifeAccountPersonalAuthData.kt
+4
-4
MerchantServiceBean.kt
...dian/shenghuoquan/newscontent/bean/MerchantServiceBean.kt
+21
-0
Constant.kt
.../com/yidian/shenghuoquan/newscontent/constant/Constant.kt
+4
-0
ApiService.kt
...va/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
+6
-6
IAuthPersonalCompleteCallback.kt
...ewscontent/http/callback/IAuthPersonalCompleteCallback.kt
+13
-0
AuthAuthenticationBean.kt
...oquan/newscontent/http/httpbean/AuthAuthenticationBean.kt
+8
-3
AuthMerchantCheckBean.kt
...uoquan/newscontent/http/httpbean/AuthMerchantCheckBean.kt
+4
-2
AuthPersonalCompleteBean.kt
...uan/newscontent/http/httpbean/AuthPersonalCompleteBean.kt
+11
-0
LifeAccountAuthActivity.kt
...enghuoquan/newscontent/ui/auth/LifeAccountAuthActivity.kt
+9
-14
LifeAccountAuthDataManager.kt
...huoquan/newscontent/ui/auth/LifeAccountAuthDataManager.kt
+43
-12
LifeAccountBusinessLicenseAuthFragment.kt
...content/ui/auth/LifeAccountBusinessLicenseAuthFragment.kt
+54
-12
LifeAccountEnterpriseAuthActivity.kt
.../newscontent/ui/auth/LifeAccountEnterpriseAuthActivity.kt
+83
-24
LifeAccountIDCardAuthFragment.kt
...quan/newscontent/ui/auth/LifeAccountIDCardAuthFragment.kt
+80
-54
LifeAccountPersonalAuthActivity.kt
...an/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
+72
-9
LifeAccountPersonalAuthCompleteActivity.kt
...ontent/ui/auth/LifeAccountPersonalAuthCompleteActivity.kt
+15
-2
MerchantCenterActivity.kt
...nghuoquan/newscontent/ui/center/MerchantCenterActivity.kt
+67
-0
MerchantCenterBottomHintDialog.kt
...n/newscontent/ui/dialog/MerchantCenterBottomHintDialog.kt
+86
-0
LifeAccountAuthBusinessInfoEditView.kt
...newscontent/widget/LifeAccountAuthBusinessInfoEditView.kt
+1
-1
LifeAccountAuthIdentityInfoEditView.kt
...newscontent/widget/LifeAccountAuthIdentityInfoEditView.kt
+1
-1
LifeAccountAuthImageView.kt
...enghuoquan/newscontent/widget/LifeAccountAuthImageView.kt
+11
-0
LifeAccountLabelView.kt
...n/shenghuoquan/newscontent/widget/LifeAccountLabelView.kt
+98
-0
MerchantAssetView.kt
...dian/shenghuoquan/newscontent/widget/MerchantAssetView.kt
+49
-0
MerchantServiceView.kt
...an/shenghuoquan/newscontent/widget/MerchantServiceView.kt
+49
-0
shape_bg_bottom_hint.xml
...ewscontent/src/main/res/drawable/shape_bg_bottom_hint.xml
+13
-0
shape_bg_bottom_warn.xml
...ewscontent/src/main/res/drawable/shape_bg_bottom_warn.xml
+13
-0
shape_bg_common_btn.xml
...newscontent/src/main/res/drawable/shape_bg_common_btn.xml
+13
-0
shape_bg_merchant_center_card.xml
...t/src/main/res/drawable/shape_bg_merchant_center_card.xml
+9
-0
shape_bg_modify_auth_btn.xml
...ontent/src/main/res/drawable/shape_bg_modify_auth_btn.xml
+11
-0
shape_life_account_status_audit.xml
...src/main/res/drawable/shape_life_account_status_audit.xml
+9
-0
shape_life_account_status_auth.xml
.../src/main/res/drawable/shape_life_account_status_auth.xml
+9
-0
shape_life_account_status_reject.xml
...rc/main/res/drawable/shape_life_account_status_reject.xml
+9
-0
shape_life_account_status_unauth.xml
...rc/main/res/drawable/shape_life_account_status_unauth.xml
+9
-0
activity_life_account_enterprise_auth.xml
...main/res/layout/activity_life_account_enterprise_auth.xml
+1
-0
activity_life_account_personal_auth.xml
...c/main/res/layout/activity_life_account_personal_auth.xml
+1
-0
activity_merchant_center.xml
...scontent/src/main/res/layout/activity_merchant_center.xml
+82
-0
dialog_merchant_center_bottom_hint.xml
...rc/main/res/layout/dialog_merchant_center_bottom_hint.xml
+39
-0
item_merchant_service.xml
...newscontent/src/main/res/layout/item_merchant_service.xml
+26
-0
view_life_account_label.xml
...wscontent/src/main/res/layout/view_life_account_label.xml
+52
-0
view_merchant_asset.xml
...s/newscontent/src/main/res/layout/view_merchant_asset.xml
+67
-0
view_merchant_service.xml
...newscontent/src/main/res/layout/view_merchant_service.xml
+27
-0
bg_merchant_asset.png
...scontent/src/main/res/mipmap-xxhdpi/bg_merchant_asset.png
+0
-0
icon_enter_wallet.png
...scontent/src/main/res/mipmap-xxhdpi/icon_enter_wallet.png
+0
-0
colors.xml
Components/newscontent/src/main/res/values/colors.xml
+5
-0
strings.xml
Components/newscontent/src/main/res/values/strings.xml
+19
-0
styles.xml
Components/newscontent/src/main/res/values/styles.xml
+7
-0
No files found.
CommonLib/Common/src/main/java/com/yidian/common/XRouterPathConstants.kt
View file @
7a31e9e6
...
...
@@ -46,5 +46,8 @@ class XRouterPathConstants {
// 系统设置 —— 设置
const
val
SYSTEM_SETTING
=
"/setting/SettingActivity"
// 商户管理中心
const
val
MERCHANT_CENTER
=
"/merchantCenter"
}
}
Components/newscontent/src/main/AndroidManifest.xml
View file @
7a31e9e6
...
...
@@ -118,6 +118,10 @@
android:name=
".ui.setting.SystemSetting"
android:theme=
"@style/Transparent"
/>
<activity
android:name=
".ui.center.MerchantCenterActivity"
android:theme=
"@style/Transparent"
/>
</application>
</manifest>
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/adapter/MerchantServiceAdapter.kt
0 → 100644
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.adapter
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.recyclerview.widget.RecyclerView
import
com.bumptech.glide.Glide
import
com.yidian.shenghuoquan.newscontent.bean.MerchantServiceBean
import
com.yidian.shenghuoquan.newscontent.databinding.ItemMerchantServiceBinding
/**
* author: yinjiacheng
* date: 6/9/21 10:36 AM
* description: 商户服务adapter
*/
class
MerchantServiceAdapter
@JvmOverloads
constructor
(
val
context
:
Context
,
data
:
ArrayList
<
MerchantServiceBean
>?
=
null
,
val
listener
:
OnItemClickListener
?
=
null
)
:
RecyclerView
.
Adapter
<
MerchantServiceAdapter
.
MerchantServiceViewHolder
>()
{
/**
* 数据源
*/
private
val
serviceData
by
lazy
{
ArrayList
<
MerchantServiceBean
>()
}
private
lateinit
var
viewBinding
:
ItemMerchantServiceBinding
init
{
data
?.
let
{
serviceData
.
addAll
(
it
)
}
}
/**
* 更换数据
*/
fun
updateData
(
data
:
ArrayList
<
MerchantServiceBean
>?)
{
data
?.
let
{
serviceData
.
clear
()
serviceData
.
addAll
(
it
)
notifyDataSetChanged
()
}
}
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
MerchantServiceViewHolder
{
viewBinding
=
ItemMerchantServiceBinding
.
inflate
(
LayoutInflater
.
from
(
parent
.
context
),
parent
,
false
)
return
MerchantServiceViewHolder
(
viewBinding
.
root
,
viewBinding
)
}
override
fun
onBindViewHolder
(
holder
:
MerchantServiceViewHolder
,
position
:
Int
)
{
val
data
=
serviceData
[
position
]
if
(!
data
.
iconUrl
.
isNullOrEmpty
())
{
Glide
.
with
(
context
).
load
(
data
.
iconUrl
).
into
(
viewBinding
.
ivService
)
}
holder
.
viewBinding
.
tvService
.
text
=
data
.
name
holder
.
viewBinding
.
root
.
setOnClickListener
{
listener
?.
onItemClick
(
it
,
position
,
data
)
}
}
override
fun
getItemCount
():
Int
{
return
serviceData
.
size
}
class
MerchantServiceViewHolder
(
itemView
:
View
,
val
viewBinding
:
ItemMerchantServiceBinding
)
:
RecyclerView
.
ViewHolder
(
itemView
)
interface
OnItemClickListener
{
fun
onItemClick
(
view
:
View
,
position
:
Int
,
data
:
MerchantServiceBean
)
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/app/NewsContentApplication.kt
View file @
7a31e9e6
...
...
@@ -13,6 +13,7 @@ import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_IDENTITY
import
com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_PERSONAL_AUTH
import
com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE
import
com.yidian.common.XRouterPathConstants.Companion.LOGIN_LIFE_CIRCLE
import
com.yidian.common.XRouterPathConstants.Companion.MERCHANT_CENTER
import
com.yidian.common.XRouterPathConstants.Companion.NEWS_CONTENT
import
com.yidian.common.XRouterPathConstants.Companion.NEWS_MAIN
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_ADD_STAFF
...
...
@@ -25,12 +26,14 @@ import com.yidian.common.XRouterPathConstants.Companion.PROTOCOL
import
com.yidian.common.XRouterPathConstants.Companion.SUPPORT
import
com.yidian.common.XRouterPathConstants.Companion.SYSTEM_SETTING
import
com.yidian.common.YdBaseApplication
import
com.yidian.news.YdImageLoader
import
com.yidian.news.util.ProcessUtil
import
com.yidian.nightmode.util.NightModeUtil
import
com.yidian.shenghuoquan.newscontent.personnel.ui.*
import
com.yidian.shenghuoquan.newscontent.service.*
import
com.yidian.shenghuoquan.newscontent.ui.*
import
com.yidian.shenghuoquan.newscontent.ui.auth.*
import
com.yidian.shenghuoquan.newscontent.ui.center.MerchantCenterActivity
import
com.yidian.shenghuoquan.newscontent.ui.idcard.IDCardTestActivity
import
com.yidian.shenghuoquan.newscontent.ui.setting.SystemSetting
import
com.yidian.utils.DensityUtil
...
...
@@ -50,6 +53,7 @@ class NewsContentApplication : YdBaseApplication() {
initService
()
NightModeUtil
.
setContext
(
this
)
DensityUtil
.
init
(
this
)
YdImageLoader
.
init
(
this
)
}
}
...
...
@@ -309,8 +313,19 @@ class NewsContentApplication : YdBaseApplication() {
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
context
.
startActivity
(
intent
)
}
}),
XPageNode
(
MERCHANT_CENTER
,
XPageNodePageType
.
NATIVE
,
object
:
XPageHandler
{
override
fun
handler
(
params
:
Map
<
String
,
Any
?
>?)
{
val
intent
=
Intent
()
if
(
params
!=
null
)
{
intent
.
putExtra
(
XRouterPathConstants
.
ParamsKey
,
params
as
HashMap
)
}
intent
.
setClass
(
context
,
MerchantCenterActivity
::
class
.
java
)
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
context
.
startActivity
(
intent
)
}
})
)
)
)
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/bean/LifeAccountMerchantAuthData.kt
View file @
7a31e9e6
...
...
@@ -13,6 +13,7 @@ class LifeAccountMerchantAuthData {
var
registrationCode
:
String
=
""
var
authRecordId
:
Long
?
=
null
var
lifeAccountId
:
Long
?
=
null
var
isRecoverAuthProcess
:
Boolean
=
false
// 是否为恢复认证流程
// 营业执照相关信息
var
type
:
String
?
=
null
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/bean/LifeAccountPersonalAuthData.kt
View file @
7a31e9e6
...
...
@@ -6,10 +6,10 @@ package com.yidian.shenghuoquan.newscontent.bean
* description: 生活号个人认证数据集
*/
class
LifeAccountPersonalAuthData
{
var
realName
:
String
=
""
var
idCardNum
:
String
=
""
var
phoneNum
:
String
=
""
// 法人手机号
var
occupation
:
String
=
""
var
realName
:
String
?
=
null
var
idCardNum
:
String
?
=
null
var
phoneNum
:
String
?
=
null
// 法人手机号
var
occupation
:
String
?
=
null
var
idCardPortraitFaceObjectKey
:
String
?
=
null
var
idCardNationalEmblemFaceObjectKey
:
String
?
=
null
var
idCardPortraitFaceBucket
:
String
?
=
null
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/bean/MerchantServiceBean.kt
0 → 100644
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.bean
/**
* author: yinjiacheng
* date: 6/9/21 11:05 AM
* description: 商户服务bean
*/
data class
MerchantServiceBean
(
// 功能id
val
id
:
Long
,
// 功能名称
val
name
:
String
,
// 分组id
val
groupId
:
Long
,
// 分组名称
val
groupName
:
String
,
// h5 url
val
linkUrl
:
String
?,
// 图标url
val
iconUrl
:
String
?
)
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/constant/Constant.kt
View file @
7a31e9e6
...
...
@@ -57,4 +57,8 @@ object Constant {
const
val
DATA_FROM_C
=
1
// C端
const
val
DATA_FROM_B
=
2
// B端
const
val
DATA_FROM_OP
=
3
// OP后台
// 服务端标识
const
val
ALIVE_DETECT_SUCCESS
=
1
// 活体检测成功
const
val
ALIVE_DETECT_FAIL
=
2
// 活体检测未检测或失败
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/ApiService.kt
View file @
7a31e9e6
...
...
@@ -298,20 +298,20 @@ class ApiService {
}
// 103 认证完成后创建生活号
fun
authComplete
(
apiCallback
:
IAuth
CompleteCallback
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
fun
authComplete
(
apiCallback
Personal
:
IAuthPersonal
CompleteCallback
,
requestParams
:
HashMap
<
String
,
String
?
>)
{
val
timeStamp
=
System
.
currentTimeMillis
()
val
publicParamsMap
=
HttpParamsUtils
.
getPublicParamsMap
(
timeStamp
)
val
privateParamsMap
=
HttpParamsUtils
.
getPrivateParamsMap
(
requestParams
,
timeStamp
)
ServiceFactory
.
getInstance
().
createService
(
CommonService
::
class
.
java
)
.
authComplete
(
publicParamsMap
,
privateParamsMap
)
.
compose
(
TransformUtil
.
defaultSchedulers
())
.
subscribe
(
object
:
HttpResultSubscriber
<
A
ny
?>()
{
override
fun
onSuccess
(
result
:
HttpResult
<
A
ny
?
>?)
{
apiCallback
.
authCompleteSuccess
(
)
.
subscribe
(
object
:
HttpResultSubscriber
<
A
uthPersonalCompleteBean
.
Response
?>()
{
override
fun
onSuccess
(
result
:
HttpResult
<
A
uthPersonalCompleteBean
.
Response
?
>?)
{
apiCallback
Personal
.
authPersonalCompleteSuccess
(
result
?.
result
)
}
override
fun
onFailer
(
result
:
HttpResult
<
A
ny
?
>?)
{
apiCallback
.
auth
CompleteFailure
(
result
?.
reason
)
override
fun
onFailer
(
result
:
HttpResult
<
A
uthPersonalCompleteBean
.
Response
?
>?)
{
apiCallback
Personal
.
authPersonal
CompleteFailure
(
result
?.
reason
)
}
})
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/callback/IAuthCompleteCallback.kt
→
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/callback/IAuth
Personal
CompleteCallback.kt
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.http.callback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthPersonalCompleteBean
/**
* author: yinjiacheng
* date: 6/1/21 7:43 PM
* description: API /merchant/auth/complete
*/
interface
IAuthCompleteCallback
{
fun
auth
CompleteSuccess
(
)
fun
authCompleteFailure
(
message
:
String
?)
interface
IAuth
Personal
CompleteCallback
{
fun
auth
PersonalCompleteSuccess
(
result
:
AuthPersonalCompleteBean
.
Response
?
)
fun
auth
Personal
CompleteFailure
(
message
:
String
?)
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthAuthenticationBean.kt
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.http.httpbean
import
java.io.Serializable
/**
* author: yinjiacheng
* date: 6/1/21 7:54 PM
* description: API /merchant/auth/authentication
*/
class
AuthAuthenticationBean
(
val
response
:
Response
)
{
class
AuthAuthenticationBean
(
val
response
:
Response
)
:
Serializable
{
data class
Response
(
val
audit_status
:
Int
,
val
back_id_card
:
String
,
...
...
@@ -14,6 +17,8 @@ class AuthAuthenticationBean(val response: Response) {
val
full_name
:
String
,
val
id_card
:
String
,
val
live_identity_status
:
Int
,
val
occupation
:
String
)
val
occupation
:
String
,
val
auth
:
Int
)
:
Serializable
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthMerchantCheckBean.kt
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.http.httpbean
import
java.io.Serializable
/**
* author: yinjiacheng
* date: 6/3/21 6:05 PM
* description: API /merchant/enterprise/check
*/
class
AuthMerchantCheckBean
{
class
AuthMerchantCheckBean
:
Serializable
{
data class
Request
(
val
life_account_id
:
Long
?,
...
...
@@ -25,6 +27,6 @@ class AuthMerchantCheckBean {
val
live_identity_status
:
Int
,
val
mobile
:
String
,
val
name
:
String
)
)
:
Serializable
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/AuthCompleteBean.kt
→
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/http/httpbean/Auth
Personal
CompleteBean.kt
View file @
7a31e9e6
...
...
@@ -5,6 +5,7 @@ package com.yidian.shenghuoquan.newscontent.http.httpbean
* date: 6/1/21 7:40 PM
* description: API /merchant/auth/complete
*/
class
AuthCompleteBean
(
val
request
:
Request
)
{
data class
Request
(
val
mobile
:
String
)
class
AuthPersonalCompleteBean
(
val
request
:
Request
)
{
data class
Request
(
val
mobile
:
String
,
val
life_account_id
:
Long
?)
data class
Response
(
val
life_account_id
:
Long
)
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountAuthActivity.kt
View file @
7a31e9e6
...
...
@@ -11,8 +11,7 @@ import com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountAuthBi
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.shenghuoquan.newscontent.http.httpbean.*
import
com.yidian.xpage.XPageManager
/**
...
...
@@ -78,11 +77,13 @@ class LifeAccountAuthActivity : BaseActivity<ActivityLifeAccountAuthBinding>(),
}
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
)
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH
,
hashMapOf
(
Pair
(
LifeAccountPersonalAuthActivity
.
EXTRA_AUTH_DATA
,
result
))
)
}
override
fun
authAuthenticationFailure
(
message
:
String
?)
{
...
...
@@ -90,18 +91,16 @@ class LifeAccountAuthActivity : BaseActivity<ActivityLifeAccountAuthBinding>(),
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
)
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH
,
hashMapOf
(
Pair
(
LifeAccountEnterpriseAuthActivity
.
EXTRA_AUTH_DATA
,
result
))
)
}
override
fun
authMerchantCheckFailure
(
message
:
String
?)
{
...
...
@@ -109,9 +108,5 @@ class LifeAccountAuthActivity : BaseActivity<ActivityLifeAccountAuthBinding>(),
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
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountAuthDataManager.kt
View file @
7a31e9e6
...
...
@@ -20,16 +20,36 @@ object LifeAccountAuthDataManager {
* 将身份证OCR结果填入
*/
fun
generatePersonalAuthData
(
data
:
GetIDCardOCRBean
.
Response
)
{
personalAuthData
.
idCardPortraitFaceCompleteness
=
data
.
posit
.
completeness
personalAuthData
.
idCardNationalEmblemFaceCompleteness
=
data
.
back
.
completeness
personalAuthData
.
idCardNum
=
data
.
posit
.
idcard_number
personalAuthData
.
gender
=
data
.
posit
.
gender
personalAuthData
.
realName
=
data
.
posit
.
name
personalAuthData
.
address
=
data
.
posit
.
address
personalAuthData
.
nationality
=
data
.
posit
.
nationality
personalAuthData
.
validDateStart
=
data
.
back
.
valid_date_start
personalAuthData
.
validDateEnd
=
data
.
back
.
valid_date_end
personalAuthData
.
issuedBy
=
data
.
back
.
issued_by
if
(
data
.
posit
.
completeness
!=
-
1
)
{
personalAuthData
.
idCardPortraitFaceCompleteness
=
data
.
posit
.
completeness
}
if
(
data
.
back
.
completeness
!=
-
1
)
{
personalAuthData
.
idCardNationalEmblemFaceCompleteness
=
data
.
back
.
completeness
}
if
(
data
.
posit
.
idcard_number
.
isNotEmpty
())
{
personalAuthData
.
idCardNum
=
data
.
posit
.
idcard_number
}
if
(
data
.
posit
.
gender
.
isNotEmpty
())
{
personalAuthData
.
gender
=
data
.
posit
.
gender
}
if
(
data
.
posit
.
name
.
isNotEmpty
())
{
personalAuthData
.
realName
=
data
.
posit
.
name
}
if
(
data
.
posit
.
address
.
isNotEmpty
())
{
personalAuthData
.
address
=
data
.
posit
.
address
}
if
(
data
.
posit
.
nationality
.
isNotEmpty
())
{
personalAuthData
.
nationality
=
data
.
posit
.
nationality
}
if
(
data
.
back
.
valid_date_start
.
isNotEmpty
())
{
personalAuthData
.
validDateStart
=
data
.
back
.
valid_date_start
}
if
(
data
.
back
.
valid_date_end
.
isNotEmpty
())
{
personalAuthData
.
validDateEnd
=
data
.
back
.
valid_date_end
}
if
(
data
.
back
.
issued_by
.
isNotEmpty
())
{
personalAuthData
.
issuedBy
=
data
.
back
.
issued_by
}
}
/**
...
...
@@ -80,7 +100,6 @@ object LifeAccountAuthDataManager {
* 生成营业执照上传接口请求体
*/
fun
generateAuthBusinessLicenseCommitRequest
(
dataType
:
Int
,
lifeAccountId
:
Long
?
):
HashMap
<
String
,
String
?
>
{
val
requestMap
=
HashMap
<
String
,
String
?>()
...
...
@@ -101,7 +120,7 @@ object LifeAccountAuthDataManager {
requestMap
[
"issue_date"
]
=
merchantAuthData
.
date_issue
requestMap
[
"entterprise_image"
]
=
merchantAuthData
.
businessLicenseObjectKey
requestMap
[
"data_from"
]
=
Constant
.
DATA_FROM_B
.
toString
()
requestMap
[
"data_type"
]
=
data
Type
.
toString
()
requestMap
[
"data_type"
]
=
merchantAuthData
.
merchant
Type
.
toString
()
lifeAccountId
?.
let
{
requestMap
[
"life_account_id"
]
=
it
.
toString
()
}
...
...
@@ -159,4 +178,16 @@ object LifeAccountAuthDataManager {
}
return
requestMap
}
/**
* 生成个体工商户认证完成接口请求体
*/
fun
generateAuthIndividualBusinessCompleteRequest
(
lifeAccountId
:
Long
?):
HashMap
<
String
,
String
?
>
{
val
requestMap
=
HashMap
<
String
,
String
?>()
requestMap
[
"record_id"
]
=
merchantAuthData
.
authRecordId
.
toString
()
lifeAccountId
?.
let
{
requestMap
[
"life_account_id"
]
=
it
.
toString
()
}
return
requestMap
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountBusinessLicenseAuthFragment.kt
View file @
7a31e9e6
...
...
@@ -12,6 +12,7 @@ import android.view.View
import
android.view.ViewGroup
import
androidx.core.content.FileProvider
import
androidx.core.view.isVisible
import
com.bumptech.glide.Glide
import
com.yidian.common.base.BaseFragment
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.adapter.BottomSelectAdapter
...
...
@@ -19,6 +20,7 @@ import com.yidian.shenghuoquan.newscontent.bean.BottomSelectBean
import
com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.databinding.FragmentLifeAccountBusinessLicenseAuthBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthMerchantCheckBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.BusinessLicenseOCRBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.IBusinessLicenseOCRCallback
import
com.yidian.shenghuoquan.newscontent.ui.dialog.BottomSelectDialog
...
...
@@ -39,6 +41,11 @@ class LifeAccountBusinessLicenseAuthFragment :
IBusinessLicenseOCRCallback
,
LifeAccountAuthBusinessInfoEditView
.
OnLifeAccountAuthBusinessInfoEditViewCallback
{
companion
object
{
// 认证数据
const
val
EXTRA_AUTH_DATA
=
"authData"
}
/**
* sdcard/Android/data/package/cache
*/
...
...
@@ -60,6 +67,7 @@ class LifeAccountBusinessLicenseAuthFragment :
super
.
init
(
savedInstanceState
)
initView
()
initListener
()
initData
()
}
private
fun
initView
()
{
...
...
@@ -74,6 +82,41 @@ class LifeAccountBusinessLicenseAuthFragment :
viewBinding
.
evRegistrationCode
.
setOnLifeAccountAuthBusinessInfoEditViewCallback
(
this
)
}
private
fun
initData
()
{
// 还原认证数据
val
authData
=
arguments
?.
getSerializable
(
LifeAccountIDCardAuthFragment
.
EXTRA_AUTH_DATA
)
?:
return
fillAuthInfo
(
authData
as
AuthMerchantCheckBean
.
Response
)
}
/**
* 认证流程中断,下次进入认证流程时还原进度
*/
private
fun
fillAuthInfo
(
data
:
AuthMerchantCheckBean
.
Response
)
{
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationName
=
data
.
name
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationCode
=
data
.
code
LifeAccountAuthDataManager
.
merchantAuthData
.
isBusinessLicenseUpload
=
true
// UI
Glide
.
with
(
this
).
load
(
data
.
entterprise_image
).
into
(
viewBinding
.
ivBusinessLicense
)
// 填入注册名称和注册码
viewBinding
.
evRegistrationName
.
fillEditContent
(
data
.
name
)
viewBinding
.
evRegistrationCode
.
fillEditContent
(
data
.
code
)
// 检查下一步条件
(
activity
as
LifeAccountEnterpriseAuthActivity
).
checkNextCondition
()
lockAuthInfo
()
}
/**
* 锁定当前输入状态
*/
private
fun
lockAuthInfo
()
{
viewBinding
.
ivClear
.
isVisible
=
false
viewBinding
.
clBusinessLicenseUpload
.
isEnabled
=
false
viewBinding
.
evRegistrationName
.
disableModify
()
viewBinding
.
evRegistrationCode
.
disableModify
()
(
activity
as
LifeAccountEnterpriseAuthActivity
).
disableModifyMerchantType
()
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
cl_business_license_upload
->
{
...
...
@@ -90,18 +133,7 @@ class LifeAccountBusinessLicenseAuthFragment :
}
}
R
.
id
.
iv_clear
->
{
// 清除已上传的营业执照
viewBinding
.
ivBusinessLicense
.
setImageDrawable
(
null
)
LifeAccountAuthDataManager
.
merchantAuthData
.
isBusinessLicenseUpload
=
false
// 清除OCR或用户输入内容
viewBinding
.
evRegistrationName
.
clearEditContent
()
viewBinding
.
evRegistrationCode
.
clearEditContent
()
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationName
=
""
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationCode
=
""
// 设置上传区域可点击
viewBinding
.
clBusinessLicenseUpload
.
isEnabled
=
true
// 隐藏清除按钮
viewBinding
.
ivClear
.
visibility
=
View
.
GONE
clearBusinessLicenseInfo
()
// 检查下一步条件
(
activity
as
LifeAccountEnterpriseAuthActivity
).
checkNextCondition
()
}
...
...
@@ -212,12 +244,18 @@ class LifeAccountBusinessLicenseAuthFragment :
fun
clearBusinessLicenseInfo
()
{
// 清除已上传的营业执照
viewBinding
.
ivBusinessLicense
.
setImageDrawable
(
null
)
// 清除错误提示
viewBinding
.
tvUploadErrorTips
.
isVisible
=
false
viewBinding
.
ivClear
.
isVisible
=
false
// 清除OCR或用户输入内容
viewBinding
.
evRegistrationName
.
clearEditContent
()
viewBinding
.
evRegistrationCode
.
clearEditContent
()
// 设置上传区域可点击
viewBinding
.
clBusinessLicenseUpload
.
isEnabled
=
true
LifeAccountAuthDataManager
.
merchantAuthData
.
isBusinessLicenseUpload
=
false
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationName
=
""
LifeAccountAuthDataManager
.
merchantAuthData
.
registrationCode
=
""
}
override
fun
onTaskStart
()
{
...
...
@@ -263,6 +301,10 @@ class LifeAccountBusinessLicenseAuthFragment :
Constant
.
LIFE_ACCOUNT_AUTH_TAG
,
"request business license ocr failure, message: $message"
)
// 营业执照OCR识别失败提示
viewBinding
.
tvUploadErrorTips
.
isVisible
=
true
viewBinding
.
tvUploadErrorTips
.
text
=
resources
.
getString
(
R
.
string
.
check_business_license_distinct
)
}
override
fun
onTextClear
(
from
:
LifeAccountAuthBusinessInfoEditView
)
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountEnterpriseAuthActivity.kt
View file @
7a31e9e6
...
...
@@ -15,9 +15,7 @@ import com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthBusinessLicenseCommitCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthIndividualBusinessCompleteCallback
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthEnterpriseLegalIdentityCommitCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthBusinessLicenseCommitBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthEnterpriseLegalIdentityCommitBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AuthIndividualBusinessCompleteBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.*
import
com.yidian.shenghuoquan.newscontent.ui.dialog.BottomSelectDialog
import
com.yidian.shenghuoquan.newscontent.widget.LifeAccountAuthProcessView
import
com.yidian.xpage.XPageManager
...
...
@@ -33,10 +31,12 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
IAuthIndividualBusinessCompleteCallback
{
companion
object
{
/**
* 生活号id 个人生活号主动升级企业生活号的认证流程传入
*/
const
val
EXTRA_LIFE_ACCOUNT_ID
=
"life_account_id"
// 生活号id 个人生活号主动升级企业生活号的认证流程传入
const
val
EXTRA_LIFE_ACCOUNT_ID
=
"lifeAccountId"
// 认证数据
const
val
EXTRA_AUTH_DATA
=
"authData"
}
private
val
fragmentList
:
ArrayList
<
Fragment
>
by
lazy
{
...
...
@@ -52,11 +52,24 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
private
var
curFragment
:
Fragment
?
=
null
/**
* 当前生活号id,个人生活号升级使用
* 个人生活号id 企业升级用
*/
private
val
personalLifeAccountId
by
lazy
{
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
(
it
as
HashMap
<*,
*>)[
EXTRA_LIFE_ACCOUNT_ID
]
?.
let
{
id
->
id
as
Long
}
}
}
/**
* 认证数据 还原认证流程用
*/
private
val
curLifeAccountId
by
lazy
{
private
val
authData
by
lazy
{
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
(
it
as
HashMap
<*,
*>)[
EXTRA_LIFE_ACCOUNT_ID
]
as
Long
(
it
as
HashMap
<*,
*>)[
EXTRA_AUTH_DATA
]
?.
let
{
data
->
data
as
AuthMerchantCheckBean
.
Response
}
}
}
...
...
@@ -74,7 +87,7 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
initListener
()
// 默认企业资质Fragment
viewBind
.
pvAuthProcess
.
setProcess
(
LifeAccountAuthProcessView
.
PROCESS_ENTERPRISE_QUALIFICATION
)
switchFragment
(
fragmentList
[
0
]
)
initFragment
(
)
}
private
fun
initView
()
{
...
...
@@ -109,9 +122,9 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
&&
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
==
Constant
.
TYPE_COMMON_ENTERPRISE
&&
LifeAccountAuthDataManager
.
personalAuthData
.
isIDCardPortraitFaceUpload
&&
LifeAccountAuthDataManager
.
personalAuthData
.
isIDCardNationalEmblemFaceUpload
&&
LifeAccountAuthDataManager
.
personalAuthData
.
realName
.
isNot
Empty
()
&&
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
.
isNot
Empty
()
&&
LifeAccountAuthDataManager
.
personalAuthData
.
phoneNum
.
isNot
Empty
()
&&
!
LifeAccountAuthDataManager
.
personalAuthData
.
realName
.
isNullOr
Empty
()
&&
!
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
.
isNullOr
Empty
()
&&
!
LifeAccountAuthDataManager
.
personalAuthData
.
phoneNum
.
isNullOr
Empty
()
)
{
viewBind
.
btnNext
.
alpha
=
1f
viewBind
.
btnNext
.
isEnabled
=
true
...
...
@@ -121,6 +134,39 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
}
}
/**
* 禁止修改商户类型
*/
fun
disableModifyMerchantType
()
{
viewBind
.
svMerchantType
.
enableSelect
(
false
)
}
private
fun
initFragment
()
{
if
(
authData
==
null
)
{
switchFragment
(
fragmentList
[
0
])
}
else
{
// 如果有已存在的认证流程则还原进度
viewBind
.
svMerchantType
.
setContentResult
(
if
(
authData
?.
data_type
==
Constant
.
TYPE_INDIVIDUAL_BUSINESS
)
{
Constant
.
ITEM_INDIVIDUAL_BUSINESSES
}
else
{
Constant
.
ITEM_COMMON_ENTERPRISE
}
)
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
=
if
(
authData
?.
data_type
==
Constant
.
TYPE_AUTH_INDIVIDUAL_BUSINESS
)
{
Constant
.
TYPE_INDIVIDUAL_BUSINESS
}
else
{
Constant
.
TYPE_COMMON_ENTERPRISE
}
val
bundle
=
Bundle
()
bundle
.
putSerializable
(
LifeAccountBusinessLicenseAuthFragment
.
EXTRA_AUTH_DATA
,
authData
)
fragmentList
[
0
].
arguments
=
bundle
switchFragment
(
fragmentList
[
0
])
LifeAccountAuthDataManager
.
merchantAuthData
.
isRecoverAuthProcess
=
true
}
}
/**
* fragment切换
*/
...
...
@@ -179,30 +225,43 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
}
R
.
id
.
btn_next
->
{
if
(
viewBind
.
pvAuthProcess
.
curProcess
==
LifeAccountAuthProcessView
.
PROCESS_ENTERPRISE_QUALIFICATION
)
{
// TODO: 6/4/21 判断是否为个人生活号升级
// personalLifeAccountId不为null则是由个人生活号升级为企业生活号情况
// personalLifeAccountId为null则是直接进行企业认证情况
if
(
LifeAccountAuthDataManager
.
merchantAuthData
.
isRecoverAuthProcess
)
{
viewBind
.
pvAuthProcess
.
setProcess
(++
viewBind
.
pvAuthProcess
.
curProcess
)
// 向身份信息fragment传参
val
fragment
=
fragmentList
[
viewBind
.
pvAuthProcess
.
curProcess
]
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
TYPE_AUTH
,
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
)
bundle
.
putSerializable
(
LifeAccountIDCardAuthFragment
.
EXTRA_AUTH_DATA
,
authData
)
fragment
.
arguments
=
bundle
switchFragment
(
fragment
)
}
ApiService
.
authBusinessLicenseCommit
(
this
,
LifeAccountAuthDataManager
.
generateAuthBusinessLicenseCommitRequest
(
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
,
curLifeAccountId
personalLifeAccountId
)
)
}
else
if
(
viewBind
.
pvAuthProcess
.
curProcess
==
LifeAccountAuthProcessView
.
PROCESS_ENTERPRISE_MANAGER
)
{
if
(
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
==
Constant
.
TYPE_INDIVIDUAL_BUSINESS
)
{
ApiService
.
authIndividualBusinessComplete
(
this
,
hashMapOf
(
Pair
(
"record_id"
,
LifeAccountAuthDataManager
.
merchantAuthData
.
authRecordId
.
toString
()
)
LifeAccountAuthDataManager
.
generateAuthIndividualBusinessCompleteRequest
(
personalLifeAccountId
)
)
}
else
if
(
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
==
Constant
.
TYPE_COMMON_ENTERPRISE
)
{
ApiService
.
authEnterpriseLegalIdentityCommit
(
this
,
LifeAccountAuthDataManager
.
generateAuthEnterpriseLegalIdentityCommitRequest
(
cur
LifeAccountId
personal
LifeAccountId
)
)
}
...
...
@@ -237,9 +296,9 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
Constant
.
TYPE_AUTH
,
LifeAccountAuthDataManager
.
merchantAuthData
.
merchantType
)
bundle
.
putSerializable
(
LifeAccountIDCardAuthFragment
.
EXTRA_AUTH_DATA
,
authData
)
fragment
.
arguments
=
bundle
switchFragment
(
fragment
)
checkNextCondition
()
}
override
fun
authBusinessLicenseCommitFailure
(
message
:
String
?)
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountIDCardAuthFragment.kt
View file @
7a31e9e6
This diff is collapsed.
Click to expand it.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthActivity.kt
View file @
7a31e9e6
...
...
@@ -12,7 +12,9 @@ import com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.constant.Constant
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountPersonalAuthBinding
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IAuthCompleteCallback
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.xpage.XPageManager
/**
...
...
@@ -20,8 +22,19 @@ import com.yidian.xpage.XPageManager
* date: 5/26/21 7:38 PM
* description: 生活号个人认证
*/
class
LifeAccountPersonalAuthActivity
:
BaseActivity
<
ActivityLifeAccountPersonalAuthBinding
>(),
View
.
OnClickListener
,
CompoundButton
.
OnCheckedChangeListener
,
IAuthCompleteCallback
{
class
LifeAccountPersonalAuthActivity
:
BaseActivity
<
ActivityLifeAccountPersonalAuthBinding
>(),
View
.
OnClickListener
,
CompoundButton
.
OnCheckedChangeListener
,
IAuthPersonalCompleteCallback
{
companion
object
{
// 认证数据
const
val
EXTRA_AUTH_DATA
=
"authData"
}
/**
* 当前fragment
*/
private
val
fragment
by
lazy
{
LifeAccountIDCardAuthFragment
()
}
override
fun
createViewBinding
():
ActivityLifeAccountPersonalAuthBinding
{
return
ActivityLifeAccountPersonalAuthBinding
.
inflate
(
layoutInflater
)
...
...
@@ -33,10 +46,9 @@ class LifeAccountPersonalAuthActivity : BaseActivity<ActivityLifeAccountPersonal
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
super
.
init
(
savedInstanceState
)
supportFragmentManager
.
beginTransaction
()
.
add
(
R
.
id
.
fragment_container
,
LifeAccountIDCardAuthFragment
()).
commit
()
initView
()
initListener
()
initFragment
()
}
private
fun
initView
()
{
...
...
@@ -50,12 +62,30 @@ class LifeAccountPersonalAuthActivity : BaseActivity<ActivityLifeAccountPersonal
viewBind
.
btnNext
.
setOnClickListener
(
this
)
}
private
fun
initFragment
()
{
val
authData
=
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
(
it
as
HashMap
<*,
*>)[
EXTRA_AUTH_DATA
]
?.
let
{
data
->
data
as
AuthAuthenticationBean
.
Response
}
}
// 如果有已存在的认证流程则还原进度
val
bundle
=
Bundle
()
bundle
.
putSerializable
(
LifeAccountIDCardAuthFragment
.
EXTRA_AUTH_DATA
,
authData
)
fragment
.
arguments
=
bundle
supportFragmentManager
.
beginTransaction
()
.
add
(
R
.
id
.
fragment_container
,
fragment
).
commit
()
authData
?.
occupation
?.
let
{
viewBind
.
svOccupation
.
setContentResult
(
it
)
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
=
it
}
}
/**
* 检查是否可以进行下一步
*/
fun
checkNextCondition
()
{
if
(
viewBind
.
cbProtocol
.
isChecked
&&
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
.
isNot
Empty
()
&&
!
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
.
isNullOr
Empty
()
&&
LifeAccountAuthDataManager
.
personalAuthData
.
isFaceAuthPass
)
{
viewBind
.
btnNext
.
alpha
=
1f
...
...
@@ -66,6 +96,13 @@ class LifeAccountPersonalAuthActivity : BaseActivity<ActivityLifeAccountPersonal
}
}
/**
* 禁止修改职业标签 用于人脸验证通过后
*/
fun
disableModifyOccupation
()
{
viewBind
.
svOccupation
.
enableSelect
(
false
)
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_back
->
XPageManager
.
pop
(
null
)
...
...
@@ -73,6 +110,7 @@ class LifeAccountPersonalAuthActivity : BaseActivity<ActivityLifeAccountPersonal
// TODO: 5/27/21 跳转职业标签选择 选择完成后进行下一步检查
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
=
"工程师"
viewBind
.
svOccupation
.
setContentResult
(
"工程师"
)
checkNextCondition
()
}
R
.
id
.
btn_next
->
{
// 个人认证 完成认证
...
...
@@ -91,11 +129,36 @@ class LifeAccountPersonalAuthActivity : BaseActivity<ActivityLifeAccountPersonal
checkNextCondition
()
}
override
fun
authCompleteSuccess
()
{
// TODO: 6/3/21 跳转个人认证成功页
override
fun
authPersonalCompleteSuccess
(
result
:
AuthPersonalCompleteBean
.
Response
?)
{
// 跳转个人认证成功页
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE
,
hashMapOf
(
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
OCCUPATION
,
LifeAccountAuthDataManager
.
personalAuthData
.
occupation
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
PHONE_NUM
,
Hawk
.
get
(
HawkConfig
.
Mobile
,
""
)
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
REAL_NAME
,
LifeAccountAuthDataManager
.
personalAuthData
.
realName
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
ID_CARD_NUM
,
LifeAccountAuthDataManager
.
personalAuthData
.
idCardNum
),
Pair
(
LifeAccountPersonalAuthCompleteActivity
.
LIFE_ACCOUNT_ID
,
result
?.
life_account_id
)
)
)
}
override
fun
authCompleteFailure
(
message
:
String
?)
{
override
fun
auth
Personal
CompleteFailure
(
message
:
String
?)
{
Log
.
e
(
Constant
.
LIFE_ACCOUNT_AUTH_TAG
,
"request auth complete failure: message: $message"
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthCompleteActivity.kt
View file @
7a31e9e6
...
...
@@ -21,6 +21,7 @@ class LifeAccountPersonalAuthCompleteActivity :
const
val
REAL_NAME
=
"realName"
const
val
ID_CARD_NUM
=
"idCardNum"
const
val
PHONE_NUM
=
"phoneNum"
const
val
LIFE_ACCOUNT_ID
=
"lifeAccountId"
// 个人生活号升级用
}
/**
...
...
@@ -57,10 +58,22 @@ class LifeAccountPersonalAuthCompleteActivity :
private
fun
initListener
()
{
viewBind
.
enterLifeAccount
.
setOnClickListener
{
// TODO: 2021/5/27 跳转生活号管理首页
// 跳转生活号管理首页
XPageManager
.
push
(
XRouterPathConstants
.
MERCHANT_CENTER
,
null
)
finish
()
}
viewBind
.
upgradeEnterpriseAuth
.
setOnClickListener
{
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH
,
null
)
// TODO: 6/10/21 传入生活号id
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH
,
hashMapOf
(
Pair
(
LifeAccountEnterpriseAuthActivity
.
EXTRA_LIFE_ACCOUNT_ID
,
params
[
LIFE_ACCOUNT_ID
]
as
Long
)
)
)
finish
()
}
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/MerchantCenterActivity.kt
0 → 100644
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.ui.center
import
android.os.Bundle
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.base.BaseActivity
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.bean.MerchantServiceBean
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityMerchantCenterBinding
import
com.yidian.shenghuoquan.newscontent.widget.LifeAccountLabelView
/**
* author: yinjiacheng
* date: 6/8/21 8:11 PM
* description: 商户管理中心
*/
class
MerchantCenterActivity
:
BaseActivity
<
ActivityMerchantCenterBinding
>()
{
override
fun
createViewBinding
():
ActivityMerchantCenterBinding
{
return
ActivityMerchantCenterBinding
.
inflate
(
layoutInflater
)
}
override
fun
getXPageName
():
String
{
return
XRouterPathConstants
.
MERCHANT_CENTER
}
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
super
.
init
(
savedInstanceState
)
initView
()
initListener
()
}
private
fun
initView
()
{
viewBind
.
viewCommonHeader
.
tvTitle
.
text
=
resources
.
getString
(
R
.
string
.
management_center
)
// Test
viewBind
.
lvLifeAccountLabel
.
setLifeAccountData
(
"一点资讯生活号"
,
LifeAccountLabelView
.
STATUS_LIFE_ACCOUNT_NOT_AUTH
,
null
)
// 本期需求无资产功能 仅做UI展示
viewBind
.
avMerchantAsset
.
setMerchantAssetData
(
8856.88
,
675.00
)
//Test
viewBind
.
svMerchantServicePublish
.
setTargetGroupServiceData
(
"我要发布"
,
arrayListOf
(
MerchantServiceBean
(
101
,
"优惠券"
,
11
,
"我要发布"
,
""
,
""
),
MerchantServiceBean
(
102
,
"招聘"
,
11
,
"我要发布"
,
""
,
""
)
)
)
viewBind
.
svMerchantServiceManagement
.
setTargetGroupServiceData
(
"管理服务"
,
arrayListOf
(
MerchantServiceBean
(
103
,
"权限管理"
,
12
,
"管理服务"
,
""
,
""
),
MerchantServiceBean
(
104
,
"人员管理"
,
12
,
"管理服务"
,
""
,
""
)
)
)
viewBind
.
svMerchantServiceOther
.
setTargetGroupServiceData
(
"其他服务"
,
arrayListOf
(
MerchantServiceBean
(
105
,
"优惠券管理"
,
13
,
"其他服务"
,
""
,
""
),
MerchantServiceBean
(
106
,
"职位招聘"
,
13
,
"其他服务"
,
""
,
""
),
MerchantServiceBean
(
107
,
"门店管理"
,
13
,
"其他服务"
,
""
,
""
),
MerchantServiceBean
(
108
,
"系统设置"
,
13
,
"其他服务"
,
""
,
""
)
)
)
}
private
fun
initListener
()
{
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/dialog/MerchantCenterBottomHintDialog.kt
0 → 100644
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.ui.dialog
import
android.content.Context
import
android.view.Gravity
import
android.view.View
import
android.view.WindowManager
import
com.yidian.common.base.BaseDialog
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.DialogMerchantCenterBottomHintBinding
import
com.yidian.utils.DensityUtil
/**
* author: yinjiacheng
* date: 6/9/21 8:56 PM
* description: 商户管理中心底部提示弹窗
*/
class
MerchantCenterBottomHintDialog
(
context
:
Context
,
val
type
:
Int
)
:
BaseDialog
<
DialogMerchantCenterBottomHintBinding
>(
context
,
R
.
style
.
merchant_center_bottom_hint_dialog
),
View
.
OnClickListener
{
companion
object
{
// 认证升级
const
val
TYPE_AUTH_UPGRADE
=
1
// 认证驳回
const
val
TYPE_AUTH_REJECT
=
2
}
override
fun
createViewBinding
():
DialogMerchantCenterBottomHintBinding
{
return
DialogMerchantCenterBottomHintBinding
.
inflate
(
layoutInflater
)
}
override
fun
initView
()
{
when
(
type
)
{
TYPE_AUTH_UPGRADE
->
{
viewBinding
.
root
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_bottom_hint
)
viewBinding
.
tvContent
.
text
=
context
.
resources
.
getString
(
R
.
string
.
upgrade_auth
)
viewBinding
.
tvSubContent
.
text
=
context
.
resources
.
getString
(
R
.
string
.
auth_merchant_description
)
viewBinding
.
tvNext
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_common_btn
)
viewBinding
.
tvNext
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_FFFFFFFF
))
viewBinding
.
tvNext
.
text
=
context
.
resources
.
getString
(
R
.
string
.
immediate_upgrade
)
}
TYPE_AUTH_REJECT
->
{
viewBinding
.
root
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_bottom_warn
)
viewBinding
.
tvContent
.
text
=
context
.
resources
.
getString
(
R
.
string
.
auth_apply_reject
)
viewBinding
.
tvSubContent
.
text
=
context
.
resources
.
getString
(
R
.
string
.
apply_auth_merchant_description
)
viewBinding
.
tvNext
.
setBackgroundResource
(
R
.
drawable
.
shape_bg_modify_auth_btn
)
viewBinding
.
tvNext
.
setTextColor
(
context
.
resources
.
getColor
(
R
.
color
.
color_FFFF3A3A
))
viewBinding
.
tvNext
.
text
=
context
.
resources
.
getString
(
R
.
string
.
modify_auth
)
}
}
}
override
fun
initListener
()
{
viewBinding
.
tvNext
.
setOnClickListener
(
this
)
}
override
fun
show
()
{
super
.
show
()
window
?.
setGravity
(
Gravity
.
BOTTOM
)
val
params
=
window
?.
attributes
params
?.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
params
?.
height
=
DensityUtil
.
dp2px
(
84f
)
window
?.
attributes
=
params
}
override
fun
onClick
(
v
:
View
?)
{
if
(
v
?.
id
==
R
.
id
.
tv_next
)
{
when
(
type
)
{
TYPE_AUTH_UPGRADE
->
{
// TODO: 6/9/21 开始企业认证
}
TYPE_AUTH_REJECT
->
{
// TODO: 6/9/21 修改企业认证
}
}
}
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountAuthBusinessInfoEditView.kt
View file @
7a31e9e6
...
...
@@ -94,7 +94,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
*/
fun
disableModify
()
{
viewBinding
.
ivClear
.
isVisible
=
false
isEnabled
=
false
viewBinding
.
etContent
.
keyListener
=
null
}
/**
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountAuthIdentityInfoEditView.kt
View file @
7a31e9e6
...
...
@@ -100,7 +100,7 @@ class LifeAccountAuthIdentityInfoEditView @JvmOverloads constructor(
*/
fun
disableModify
()
{
viewBinding
.
ivClear
.
visibility
=
View
.
GONE
isEnabled
=
false
viewBinding
.
etContent
.
keyListener
=
null
}
/**
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountAuthImageView.kt
View file @
7a31e9e6
...
...
@@ -5,6 +5,7 @@ import android.graphics.Bitmap
import
android.util.AttributeSet
import
android.view.View
import
androidx.core.view.isVisible
import
com.bumptech.glide.Glide
import
com.yidian.nightmode.widget.YdConstraintLayout
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountAuthImageBinding
...
...
@@ -63,6 +64,16 @@ class LifeAccountAuthImageView @JvmOverloads constructor(
viewBinding
.
ivClear
.
isVisible
=
true
}
/**
* 填充图片
* @param url 图片url
*/
fun
addImage
(
context
:
Context
,
url
:
String
)
{
Glide
.
with
(
context
).
load
(
url
).
into
(
viewBinding
.
ivContent
)
isEnabled
=
false
viewBinding
.
ivClear
.
isVisible
=
true
}
/**
* 清除图片
*/
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountLabelView.kt
0 → 100644
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.widget
import
android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
androidx.constraintlayout.widget.ConstraintLayout
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountLabelBinding
/**
* author: yinjiacheng
* date: 6/8/21 9:39 PM
* description: 管理中心-生活号标签
*/
class
LifeAccountLabelView
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
)
:
ConstraintLayout
(
context
,
attrs
,
defStyle
),
View
.
OnClickListener
{
companion
object
{
// 已认证
const
val
STATUS_LIFE_ACCOUNT_AUTH
=
11
// 未认证
const
val
STATUS_LIFE_ACCOUNT_NOT_AUTH
=
12
// 认证驳回
const
val
STATUS_LIFE_ACCOUNT_REJECT
=
13
// 审核中
const
val
STATUS_LIFE_ACCOUNT_AUDIT
=
14
// 个人
const
val
TYPE_LIFE_ACCOUNT_PERSONAL
=
20
// 个体工商户
const
val
TYPE_LIFE_ACCOUNT_INDIVIDUAL_BUSINESS
=
21
// 普通企业
const
val
TYPE_LIFE_ACCOUNT_COMMON_ENTERPRISE
=
22
}
private
val
viewBinding
=
ViewLifeAccountLabelBinding
.
bind
(
View
.
inflate
(
getContext
(),
R
.
layout
.
view_life_account_label
,
this
)
)
init
{
viewBinding
.
ivLifeAccountDetail
.
setOnClickListener
(
this
)
}
/**
* 设置生活号信息
* @param name 生活号名称
* @param status 生活号状态
* @param type 生活号类型
*/
fun
setLifeAccountData
(
name
:
String
,
status
:
Int
,
type
:
Int
?)
{
viewBinding
.
tvLifeAccountName
.
text
=
name
viewBinding
.
tvLifeAccountStatus
.
apply
{
when
(
status
)
{
STATUS_LIFE_ACCOUNT_AUTH
->
{
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_auth
)
text
=
when
(
type
)
{
TYPE_LIFE_ACCOUNT_INDIVIDUAL_BUSINESS
->
resources
.
getString
(
R
.
string
.
individual_business
)
TYPE_LIFE_ACCOUNT_COMMON_ENTERPRISE
->
resources
.
getString
(
R
.
string
.
common_enterprise
)
TYPE_LIFE_ACCOUNT_PERSONAL
->
resources
.
getString
(
R
.
string
.
personal_auth
)
else
->
""
}
}
STATUS_LIFE_ACCOUNT_AUDIT
->
{
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_audit
)
text
=
resources
.
getString
(
R
.
string
.
auth_audit
)
}
STATUS_LIFE_ACCOUNT_REJECT
->
{
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_reject
)
text
=
resources
.
getString
(
R
.
string
.
auth_reject
)
}
else
->
{
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_unauth
)
text
=
resources
.
getString
(
R
.
string
.
not_auth
)
}
}
}
}
override
fun
onClick
(
v
:
View
?)
{
if
(
v
?.
id
==
R
.
id
.
iv_life_account_detail
)
{
// TODO: 6/8/21 跳转生活号基本信息
}
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/MerchantAssetView.kt
0 → 100644
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.widget
import
android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
androidx.constraintlayout.widget.ConstraintLayout
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ViewMerchantAssetBinding
/**
* author: yinjiacheng
* date: 6/8/21 10:58 PM
* description: 商户资产
*/
class
MerchantAssetView
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
)
:
ConstraintLayout
(
context
,
attrs
,
defStyle
),
View
.
OnClickListener
{
private
val
viewBinding
=
ViewMerchantAssetBinding
.
bind
(
View
.
inflate
(
getContext
(),
R
.
layout
.
view_merchant_asset
,
this
)
)
init
{
viewBinding
.
tvWalletBalance
.
setOnClickListener
(
this
)
}
/**
* 数据填充
* @param income 当月收入
* @param balance 钱包yue
*/
fun
setMerchantAssetData
(
income
:
Double
,
balance
:
Double
)
{
viewBinding
.
tvMonthlyIncome
.
text
=
income
.
toString
()
viewBinding
.
tvWalletBalance
.
text
=
balance
.
toString
()
}
override
fun
onClick
(
v
:
View
?)
{
if
(
v
?.
id
==
R
.
id
.
tv_wallet_balance
)
{
// TODO: 6/8/21 跳转钱包
}
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/MerchantServiceView.kt
0 → 100644
View file @
7a31e9e6
package
com.yidian.shenghuoquan.newscontent.widget
import
android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
androidx.constraintlayout.widget.ConstraintLayout
import
androidx.recyclerview.widget.GridLayoutManager
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.adapter.MerchantServiceAdapter
import
com.yidian.shenghuoquan.newscontent.bean.MerchantServiceBean
import
com.yidian.shenghuoquan.newscontent.databinding.ViewMerchantServiceBinding
/**
* author: yinjiacheng
* date: 6/9/21 12:16 AM
* description: 商户服务
*/
class
MerchantServiceView
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
)
:
ConstraintLayout
(
context
,
attrs
,
defStyle
)
{
private
val
viewBinding
=
ViewMerchantServiceBinding
.
bind
(
View
.
inflate
(
getContext
(),
R
.
layout
.
view_merchant_service
,
this
)
)
init
{
initRecyclerView
()
}
/**
* 设置当前分组数据
*/
fun
setTargetGroupServiceData
(
groupName
:
String
,
data
:
ArrayList
<
MerchantServiceBean
>?)
{
viewBinding
.
tvTitle
.
text
=
groupName
((
viewBinding
.
rvService
.
adapter
)
as
MerchantServiceAdapter
).
updateData
(
data
)
}
private
fun
initRecyclerView
()
{
viewBinding
.
rvService
.
layoutManager
=
GridLayoutManager
(
context
,
4
)
viewBinding
.
rvService
.
adapter
=
MerchantServiceAdapter
(
context
)
}
}
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_bottom_hint.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_FFFFFFFF"
/>
<corners
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"0dp"
android:topLeftRadius=
"12dp"
android:topRightRadius=
"12dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_bottom_warn.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_FFFFEEEE"
/>
<corners
android:bottomLeftRadius=
"0dp"
android:bottomRightRadius=
"0dp"
android:topLeftRadius=
"12dp"
android:topRightRadius=
"12dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_common_btn.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"0"
android:endColor=
"@color/color_FF3693FF"
android:startColor=
"@color/color_FF1751F1"
android:type=
"linear"
/>
<corners
android:radius=
"21dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_merchant_center_card.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_FFFFFFFF"
/>
<corners
android:radius=
"12dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_modify_auth_btn.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"@color/color_FFFF3A3A"
/>
<corners
android:radius=
"21dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_life_account_status_audit.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#FFEBECEF"
/>
<corners
android:radius=
"21dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_life_account_status_auth.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#FFEBECEF"
/>
<corners
android:radius=
"21dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_life_account_status_reject.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#FFEBECEF"
/>
<corners
android:radius=
"21dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_life_account_status_unauth.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#FFEBECEF"
/>
<corners
android:radius=
"21dp"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/layout/activity_life_account_enterprise_auth.xml
View file @
7a31e9e6
...
...
@@ -57,6 +57,7 @@
android:layout_marginBottom=
"33dp"
android:alpha=
"0.32"
android:background=
"@drawable/bg_btn_auth"
android:enabled=
"false"
android:gravity=
"center"
android:text=
"@string/next_step"
android:textColor=
"#FFFFFFFF"
...
...
Components/newscontent/src/main/res/layout/activity_life_account_personal_auth.xml
View file @
7a31e9e6
...
...
@@ -81,6 +81,7 @@
android:layout_marginBottom=
"33dp"
android:alpha=
"0.32"
android:background=
"@drawable/bg_btn_auth"
android:enabled=
"false"
android:text=
"@string/auth_finish"
android:textColor=
"#FFFFFFFF"
android:textSize=
"17sp"
...
...
Components/newscontent/src/main/res/layout/activity_merchant_center.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#FFF5F6F7"
>
<include
android:id=
"@+id/view_common_header"
layout=
"@layout/layout_common_header"
/>
<TextView
android:id=
"@+id/tv_switch"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"19dp"
android:includeFontPadding=
"false"
android:text=
"@string/switch_life_account"
android:textColor=
"@color/color_FF1852F1"
android:textSize=
"13sp"
app:layout_constraintBottom_toBottomOf=
"@id/view_common_header"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/view_common_header"
/>
<com.yidian.shenghuoquan.newscontent.widget.LifeAccountLabelView
android:id=
"@+id/lv_life_account_label"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/view_common_header"
/>
<com.yidian.shenghuoquan.newscontent.widget.MerchantAssetView
android:id=
"@+id/av_merchant_asset"
android:layout_width=
"match_parent"
android:layout_height=
"125dp"
android:layout_marginStart=
"15dp"
android:layout_marginEnd=
"15dp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/lv_life_account_label"
/>
<androidx.core.widget.NestedScrollView
android:id=
"@+id/sv_merchant_service"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_marginTop=
"10dp"
android:paddingStart=
"15dp"
android:paddingEnd=
"15dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/av_merchant_asset"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<com.yidian.shenghuoquan.newscontent.widget.MerchantServiceView
android:id=
"@+id/sv_merchant_service_publish"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<com.yidian.shenghuoquan.newscontent.widget.MerchantServiceView
android:id=
"@+id/sv_merchant_service_management"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/sv_merchant_service_publish"
/>
<com.yidian.shenghuoquan.newscontent.widget.MerchantServiceView
android:id=
"@+id/sv_merchant_service_other"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/sv_merchant_service_management"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/dialog_merchant_center_bottom_hint.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingStart=
"19dp"
android:paddingTop=
"10dp"
android:paddingEnd=
"19dp"
>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_333333"
android:textSize=
"15sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_sub_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_999999"
android:textSize=
"12sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_content"
/>
<TextView
android:id=
"@+id/tv_next"
android:layout_width=
"69dp"
android:layout_height=
"27dp"
android:gravity=
"center"
android:textSize=
"12sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/item_merchant_service.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"72dp"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/iv_service"
android:layout_width=
"46dp"
android:layout_height=
"46dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_service"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"4dp"
android:textColor=
"@color/color_333333"
android:textSize=
"12sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/iv_service"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/view_life_account_label.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingStart=
"19dp"
android:paddingTop=
"17dp"
android:paddingEnd=
"12dp"
android:paddingBottom=
"17dp"
>
<TextView
android:id=
"@+id/tv_life_account_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxWidth=
"265dp"
android:ellipsize=
"end"
android:includeFontPadding=
"false"
android:maxLines=
"2"
android:textColor=
"@color/color_333333"
android:textSize=
"17sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_life_account_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:layout_marginEnd=
"12dp"
android:background=
"@drawable/shape_life_account_status_unauth"
android:includeFontPadding=
"false"
android:paddingStart=
"8dp"
android:paddingTop=
"2dp"
android:paddingEnd=
"8dp"
android:paddingBottom=
"2dp"
android:textColor=
"@color/color_333333"
android:textSize=
"12sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/tv_life_account_name"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/iv_life_account_detail"
android:layout_width=
"23dp"
android:layout_height=
"23dp"
android:src=
"@mipmap/icon_next"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/view_merchant_asset.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:foreground=
"@mipmap/bg_merchant_asset"
android:background=
"@drawable/shape_bg_merchant_center_card"
android:padding=
"19dp"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:text=
"@string/my_asset"
android:textColor=
"@color/color_333333"
android:textSize=
"15sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_monthly_income"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_FFF26E3D"
android:textSize=
"27sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_title"
/>
<TextView
android:id=
"@+id/tv_wallet_balance"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"146dp"
android:layout_marginTop=
"15dp"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_FFF26E3D"
android:textSize=
"27sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_title"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:includeFontPadding=
"false"
android:text=
"@string/monthly_income"
android:textColor=
"@color/color_999999"
android:textSize=
"12sp"
app:layout_constraintStart_toStartOf=
"@id/tv_monthly_income"
app:layout_constraintTop_toBottomOf=
"@id/tv_monthly_income"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:drawableEnd=
"@mipmap/icon_enter_wallet"
android:includeFontPadding=
"false"
android:text=
"@string/wallet_balance"
android:textColor=
"@color/color_999999"
android:textSize=
"12sp"
app:layout_constraintStart_toStartOf=
"@id/tv_wallet_balance"
app:layout_constraintTop_toBottomOf=
"@id/tv_wallet_balance"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/view_merchant_service.xml
0 → 100644
View file @
7a31e9e6
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_bg_merchant_center_card"
android:padding=
"19dp"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_333333"
android:textSize=
"15sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_service"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"13dp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_title"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Components/newscontent/src/main/res/mipmap-xxhdpi/bg_merchant_asset.png
0 → 100644
View file @
7a31e9e6
70.2 KB
Components/newscontent/src/main/res/mipmap-xxhdpi/icon_enter_wallet.png
0 → 100644
View file @
7a31e9e6
591 Bytes
Components/newscontent/src/main/res/values/colors.xml
View file @
7a31e9e6
...
...
@@ -48,4 +48,9 @@
<color
name=
"color_8F000000"
>
#8F000000
</color>
<color
name=
"color_FF1852F1"
>
#FF1852F1
</color>
<color
name=
"color_FFFFFFFF"
>
#FFFFFFFF
</color>
<color
name=
"color_FFF26E3D"
>
#FFF26E3D
</color>
<color
name=
"color_FFFFEEEE"
>
#FFFFEEEE
</color>
<color
name=
"color_FFFF3A3A"
>
#FFFF3A3A
</color>
<color
name=
"color_FF3693FF"
>
#FF3693FF
</color>
<color
name=
"color_FF1751F1"
>
#FF1751F1
</color>
</resources>
\ No newline at end of file
Components/newscontent/src/main/res/values/strings.xml
View file @
7a31e9e6
...
...
@@ -124,6 +124,25 @@
<string
name=
"enterprise_legal_name"
>
法人姓名
</string>
<string
name=
"enterprise_legal_mobile"
>
法人手机号
</string>
<string
name=
"individual_business_manager_name"
>
经营者姓名
</string>
<string
name=
"individual_business"
>
个体工商户
</string>
<string
name=
"common_enterprise"
>
普通企业
</string>
<string
name=
"switch_life_account"
>
切换主体
</string>
<string
name=
"not_auth"
>
未认证
</string>
<string
name=
"auth_reject"
>
认证驳回
</string>
<string
name=
"auth_audit"
>
审核中
</string>
<string
name=
"my_asset"
>
我的资产
</string>
<string
name=
"monthly_income"
>
当月收入
</string>
<string
name=
"wallet_balance"
>
钱包余额
</string>
<string
name=
"management_center"
>
管理中心
</string>
<string
name=
"go_publish"
>
我要发布
</string>
<string
name=
"management_service"
>
管理服务
</string>
<string
name=
"other_service"
>
其他服务
</string>
<string
name=
"upgrade_auth"
>
升级为认证商家
</string>
<string
name=
"auth_merchant_description"
>
更多曝光 · 权威认证 · 服务能力
</string>
<string
name=
"immediate_upgrade"
>
立即升级
</string>
<string
name=
"auth_apply_reject"
>
您的认证申请被驳回
</string>
<string
name=
"apply_auth_merchant_description"
>
通过即享更多曝光 · 权威认证 · 服务能力
</string>
<string
name=
"modify_auth"
>
修改认证
</string>
<string
name=
"my_staff"
>
我的员工
</string>
<string
name=
"manager_account_change_tips"
>
管理员账号替换后,原账户将无法操作生活号所有功能,同时将自动退出当前登录状态,新账号将继承原账号所有权益。
</string>
...
...
Components/newscontent/src/main/res/values/styles.xml
View file @
7a31e9e6
...
...
@@ -162,5 +162,12 @@
<style
name=
"protocol_checkboxBg"
parent=
"@android:style/Widget.CompoundButton.CheckBox"
>
<item
name=
"android:button"
>
@drawable/protocol_checkbox_bg
</item>
</style>
<style
name=
"merchant_center_bottom_hint_dialog"
parent=
"android:style/Theme.Dialog"
>
<item
name=
"android:windowBackground"
>
@android:color/transparent
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowFrame"
>
@null
</item>
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:backgroundDimEnabled"
>
false
</item>
</style>
</resources>
\ 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