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
671cd560
Commit
671cd560
authored
Jul 29, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 管理中心区分B&C端功能
parent
c0e3e83f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
314 additions
and
138 deletions
+314
-138
XRouterPathConstants.kt
.../java/com/yidian/bcommon/constant/XRouterPathConstants.kt
+6
-0
GetCommonConfigBean.kt
.../java/com/yidian/bcommon/http/bean/GetCommonConfigBean.kt
+2
-2
ManagerCenterConfig.kt
...shenghuoquan/bmanagercenter/config/ManagerCenterConfig.kt
+291
-0
MerchantCenterActivity.kt
...uoquan/bmanagercenter/ui/center/MerchantCenterActivity.kt
+15
-136
No files found.
CommonLib/BCommon/src/main/java/com/yidian/bcommon/constant/XRouterPathConstants.kt
View file @
671cd560
...
...
@@ -141,5 +141,11 @@ class XRouterPathConstants {
// 商品 — 商品管理
const
val
COMMODITY_MANAGEMENT
=
"/b/goods/commodity_management"
/**
* C端页面
*/
// webView
const
val
C_WEB_VIEW
=
"/SimpleBorwser"
}
}
CommonLib/BCommon/src/main/java/com/yidian/bcommon/http/bean/GetCommonConfigBean.kt
View file @
671cd560
...
...
@@ -54,7 +54,7 @@ class GetCommonConfigBean {
@SerializedName
(
"disable_text"
)
val
disableText
:
String
,
@SerializedName
(
"disable_url"
)
val
disableUrl
:
String
?
,
val
disableUrl
:
String
,
@SerializedName
(
"items"
)
val
items
:
List
<
Item
>,
@SerializedName
(
"show"
)
...
...
@@ -82,7 +82,7 @@ class GetCommonConfigBean {
@SerializedName
(
"icon_url"
)
val
iconUrl
:
String
,
@SerializedName
(
"link_url"
)
val
linkUrl
:
String
?
,
val
linkUrl
:
String
,
@SerializedName
(
"show"
)
val
show
:
Int
)
:
Serializable
...
...
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/config/ManagerCenterConfig.kt
0 → 100644
View file @
671cd560
package
com.yidian.shenghuoquan.bmanagercenter.config
import
com.yidian.bcommon.bean.LifeAccountItemBean
import
com.yidian.bcommon.constant.IntentConstants
import
com.yidian.bcommon.constant.XBirdPageConstants
import
com.yidian.bcommon.constant.XRouterPathConstants
import
com.yidian.bcommon.http.bean.GetCommonConfigBean
import
com.yidian.bcommon.sdk.ClientType
import
com.yidian.shenghuoquan.bmanagercenter.constant.Constant
import
com.yidian.shenghuoquan.bmanagercenter.ui.center.MerchantAuthManagementActivity
/**
* author: yinjiacheng
* date: 7/28/21 8:32 PM
* description: 管理中心配置
*/
object
ManagerCenterConfig
{
/**
* FunctionId和XPage页面节点映射
*/
fun
getFunctionPageMap
(
data
:
List
<
GetCommonConfigBean
.
Item
>,
client
:
ClientType
):
HashMap
<
Int
,
String
>?
{
if
(
data
.
isEmpty
())
return
null
when
(
client
)
{
ClientType
.
MERCHANT_B
->
{
return
hashMapOf
(
// 我要发布-商品
data
[
0
].
functions
[
0
].
functionId
to
XRouterPathConstants
.
COMMON_WEB_VIEW_ACTIVITY
,
// 管理服务-人员管理
data
[
1
].
functions
[
1
].
functionId
to
XRouterPathConstants
.
PERSONAL_MY_STAFF
,
// 其他服务-商品管理
data
[
2
].
functions
[
0
].
functionId
to
XRouterPathConstants
.
COMMODITY_MANAGEMENT
,
// 其他服务-门店管理
data
[
2
].
functions
[
2
].
functionId
to
XRouterPathConstants
.
STORE_MANAGEMENT
,
// 其他服务-系统设置
data
[
2
].
functions
[
3
].
functionId
to
XRouterPathConstants
.
SYSTEM_SETTING
,
// 其他服务-认证管理
data
[
2
].
functions
[
4
].
functionId
to
XRouterPathConstants
.
AUTH_MANAGEMENT
)
}
ClientType
.
MERCHANT_C
->
{
return
hashMapOf
(
// 我要发布-商品
data
[
0
].
functions
[
0
].
functionId
to
XRouterPathConstants
.
C_WEB_VIEW
,
// 我要发布-招聘
data
[
0
].
functions
[
1
].
functionId
to
XRouterPathConstants
.
C_WEB_VIEW
,
// 管理服务-人员管理
data
[
1
].
functions
[
1
].
functionId
to
XRouterPathConstants
.
PERSONAL_MY_STAFF
,
// 其他服务-商品管理
data
[
2
].
functions
[
0
].
functionId
to
XRouterPathConstants
.
C_WEB_VIEW
,
// 其他服务-职位管理
data
[
2
].
functions
[
1
].
functionId
to
XRouterPathConstants
.
C_WEB_VIEW
,
// 其他服务-门店管理
data
[
2
].
functions
[
2
].
functionId
to
XRouterPathConstants
.
STORE_MANAGEMENT
,
// 其他服务-系统设置
data
[
2
].
functions
[
3
].
functionId
to
XRouterPathConstants
.
SYSTEM_SETTING
,
// 其他服务-认证管理
data
[
2
].
functions
[
4
].
functionId
to
XRouterPathConstants
.
AUTH_MANAGEMENT
)
}
}
}
/**
* FunctionId和跳转页面参数映射
*/
fun
getFunctionParamsMap
(
data
:
GetCommonConfigBean
.
Data
,
lifeAccount
:
LifeAccountItemBean
.
Response
,
client
:
ClientType
):
HashMap
<
Int
,
HashMap
<
String
,
Any
>>?
{
if
(
data
.
merchantManagerCenter
.
items
.
isEmpty
())
return
null
when
(
client
)
{
ClientType
.
MERCHANT_B
->
{
return
hashMapOf
(
// 发布商品传参url
data
.
merchantManagerCenter
.
items
[
0
].
functions
[
0
].
functionId
to
hashMapOf
(
XBirdPageConstants
.
PAGE_URL
to
XBirdPageConstants
.
COMMODITY_PUBLISH_COMMODITY
+
"?life_account_id=${lifeAccount.life_account_id}"
),
// 系统设置传参TowerPro配置数据
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
3
].
functionId
to
hashMapOf
(
IntentConstants
.
KEY_EXTRA_COMMON_CONFIG
to
data
),
// 认证管理传参生活号id和生活号key tag
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
4
].
functionId
to
hashMapOf
(
MerchantAuthManagementActivity
.
EXTRA_LIFE_ACCOUNT_ID
to
lifeAccount
.
life_account_id
,
MerchantAuthManagementActivity
.
EXTRA_LIFE_ACCOUNT_TAG_KEY
to
lifeAccount
.
tag
.
tag_key
)
)
}
ClientType
.
MERCHANT_C
->
{
return
hashMapOf
(
// 发布商品传参url
data
.
merchantManagerCenter
.
items
[
0
].
functions
[
0
].
functionId
to
hashMapOf
(
"url"
to
data
.
merchantManagerCenter
.
items
[
0
].
functions
[
0
].
linkUrl
),
// 发布招聘传参url
data
.
merchantManagerCenter
.
items
[
0
].
functions
[
1
].
functionId
to
hashMapOf
(
"url"
to
data
.
merchantManagerCenter
.
items
[
0
].
functions
[
1
].
linkUrl
),
// 商品管理传参url
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
0
].
functionId
to
hashMapOf
(
"url"
to
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
0
].
linkUrl
),
// 职位管理传参url
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
1
].
functionId
to
hashMapOf
(
"url"
to
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
1
].
linkUrl
),
// 认证管理传参生活号id和生活号key tag
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
4
].
functionId
to
hashMapOf
(
MerchantAuthManagementActivity
.
EXTRA_LIFE_ACCOUNT_ID
to
lifeAccount
.
life_account_id
,
MerchantAuthManagementActivity
.
EXTRA_LIFE_ACCOUNT_TAG_KEY
to
lifeAccount
.
tag
.
tag_key
)
)
}
}
}
/**
* 对应生活号权限下的功能集
* 不在功能集中即为仅展示
*/
fun
getFunctionPermissionMap
(
data
:
List
<
GetCommonConfigBean
.
Item
>,
lifeAccountLabel
:
Int
,
client
:
ClientType
):
ArrayList
<
Int
>?
{
if
(
data
.
isEmpty
())
return
null
when
(
client
)
{
ClientType
.
MERCHANT_B
->
{
when
(
lifeAccountLabel
)
{
Constant
.
LIFE_ACCOUNT_TAG_ENTERPRISE_AUTH
->
{
// 企业认证
// 所有服务都可用
return
arrayListOf
(
data
[
0
].
functions
[
0
].
functionId
,
data
[
0
].
functions
[
1
].
functionId
,
data
[
1
].
functions
[
0
].
functionId
,
data
[
1
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
0
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
2
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
->
{
// 普通企业认证
// 所有服务都可用
return
arrayListOf
(
data
[
0
].
functions
[
0
].
functionId
,
data
[
0
].
functions
[
1
].
functionId
,
data
[
1
].
functions
[
0
].
functionId
,
data
[
1
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
0
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
2
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_INDIVIDUAL_BUSINESS_AUTH
->
{
// 个体工商户认证
// 所有服务都可用
return
arrayListOf
(
data
[
0
].
functions
[
0
].
functionId
,
data
[
0
].
functions
[
1
].
functionId
,
data
[
1
].
functions
[
0
].
functionId
,
data
[
1
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
0
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
2
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_PERSONAL_AUTH
->
{
// 个人认证
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
return
arrayListOf
(
data
[
0
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_NOT_AUTH
->
{
// 未认证
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
return
arrayListOf
(
data
[
0
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_AUDIT_UNDER
->
{
// 审核中
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
return
arrayListOf
(
data
[
0
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_AUTH_REJECT
->
{
// 认证驳回
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
return
arrayListOf
(
data
[
0
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
}
}
ClientType
.
MERCHANT_C
->
{
when
(
lifeAccountLabel
)
{
Constant
.
LIFE_ACCOUNT_TAG_ENTERPRISE_AUTH
->
{
// 企业认证
// 所有服务都可用
return
arrayListOf
(
data
[
0
].
functions
[
0
].
functionId
,
data
[
0
].
functions
[
1
].
functionId
,
data
[
1
].
functions
[
0
].
functionId
,
data
[
1
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
0
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
2
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
->
{
// 普通企业认证
// 所有服务都可用
return
arrayListOf
(
data
[
0
].
functions
[
0
].
functionId
,
data
[
0
].
functions
[
1
].
functionId
,
data
[
1
].
functions
[
0
].
functionId
,
data
[
1
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
0
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
2
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_INDIVIDUAL_BUSINESS_AUTH
->
{
// 个体工商户认证
// 所有服务都可用
return
arrayListOf
(
data
[
0
].
functions
[
0
].
functionId
,
data
[
0
].
functions
[
1
].
functionId
,
data
[
1
].
functions
[
0
].
functionId
,
data
[
1
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
0
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
2
].
functionId
,
data
[
2
].
functions
[
3
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_PERSONAL_AUTH
->
{
// 个人认证
// 我要发布-招聘 其他服务-职位管理 其他服务-认证管理
return
arrayListOf
(
data
[
0
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_NOT_AUTH
->
{
// 未认证
// 我要发布-招聘 其他服务-职位管理 其他服务-认证管理
return
arrayListOf
(
data
[
0
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_AUDIT_UNDER
->
{
// 审核中
// 我要发布-招聘 其他服务-职位管理 其他服务-认证管理
return
arrayListOf
(
data
[
0
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_AUTH_REJECT
->
{
// 认证驳回
// 我要发布-招聘 其他服务-职位管理 其他服务-认证管理
return
arrayListOf
(
data
[
0
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
1
].
functionId
,
data
[
2
].
functions
[
4
].
functionId
)
}
}
}
}
return
null
}
}
Components/BManagerCenter/src/main/java/com/yidian/shenghuoquan/bmanagercenter/ui/center/MerchantCenterActivity.kt
View file @
671cd560
...
...
@@ -16,6 +16,7 @@ import com.yidian.bcommon.http.CommonDataSource
import
com.yidian.bcommon.http.bean.GetCommonConfigBean
import
com.yidian.bcommon.http.callback.IGetCommonConfigCallback
import
com.yidian.bcommon.sdk.BCommonManager
import
com.yidian.bcommon.sdk.JudgeClientUtils
import
com.yidian.bcommon.services.ZapServiceActionConstants
import
com.yidian.bcommon.services.ZapServiceNameConstants
import
com.yidian.bcommon.utils.StorageUtil
...
...
@@ -23,6 +24,7 @@ import com.yidian.bcommon.widget.dialog.HintDialog
import
com.yidian.shenghuoquan.bmanagercenter.R
import
com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceFunctionAdapter
import
com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceGroupAdapter
import
com.yidian.shenghuoquan.bmanagercenter.config.ManagerCenterConfig
import
com.yidian.shenghuoquan.bmanagercenter.constant.Constant
import
com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityMerchantCenterBinding
import
com.yidian.shenghuoquan.bmanagercenter.http.ApiService
...
...
@@ -72,17 +74,17 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
/**
* 功能入口-页面路由映射
*/
private
val
functionPageMap
by
lazy
{
HashMap
<
Int
,
String
?>()
}
private
lateinit
var
functionPageMap
:
HashMap
<
Int
,
String
>
/**
* 功能入口-页面参数映射
*/
private
val
functionParamsMap
by
lazy
{
HashMap
<
Int
,
HashMap
<
String
,
Any
?>>()
}
private
lateinit
var
functionParamsMap
:
HashMap
<
Int
,
HashMap
<
String
,
Any
>>
/**
* 当前生活号状态下功能集
*/
private
val
functionPermissionList
by
lazy
{
ArrayList
<
Int
>()
}
private
lateinit
var
functionPermissionList
:
ArrayList
<
Int
>
override
fun
createViewBinding
():
ActivityMerchantCenterBinding
{
return
ActivityMerchantCenterBinding
.
inflate
(
layoutInflater
)
...
...
@@ -160,11 +162,18 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
// 展示底部浮窗
showMerchantCenterBottomHint
(
lifeAccountData
)
// 生成FunctionId和XPage页面节点映射
generateFunctionPageMap
(
configData
.
merchantManagerCenter
.
items
)
ManagerCenterConfig
.
getFunctionPageMap
(
configData
.
merchantManagerCenter
.
items
,
JudgeClientUtils
.
judgeClient
(
packageName
))
?.
let
{
functionPageMap
=
it
}
// 生成FunctionId和跳转页面参数映射
generateFunctionParamsMap
(
configData
)
ManagerCenterConfig
.
getFunctionParamsMap
(
configData
,
curLifeAccount
,
JudgeClientUtils
.
judgeClient
(
packageName
))
?.
let
{
functionParamsMap
=
it
}
// 生成当前生活号状态下的功能集
generateFunctionPermissionMap
(
configData
.
merchantManagerCenter
.
items
)
ManagerCenterConfig
.
getFunctionPermissionMap
(
configData
.
merchantManagerCenter
.
items
,
getCurLifeAccountLabel
(),
JudgeClientUtils
.
judgeClient
(
packageName
)
)
?.
let
{
functionPermissionList
=
it
}
// 过滤商户服务数据
filterMerchantServiceData
(
configData
.
merchantManagerCenter
.
items
)
}
...
...
@@ -191,135 +200,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
}
}
/**
* 生成FunctionId和XPage页面节点映射
*/
private
fun
generateFunctionPageMap
(
data
:
List
<
GetCommonConfigBean
.
Item
>)
{
if
(
data
.
isEmpty
())
return
functionPageMap
.
clear
()
// 我要发布-优惠券
functionPageMap
[
data
[
0
].
functions
[
0
].
functionId
]
=
XRouterPathConstants
.
COMMON_WEB_VIEW_ACTIVITY
// 我要发布-招聘
functionPageMap
[
data
[
0
].
functions
[
1
].
functionId
]
=
null
// 管理服务-权限管理
functionPageMap
[
data
[
1
].
functions
[
0
].
functionId
]
=
null
// 管理服务-人员管理
functionPageMap
[
data
[
1
].
functions
[
1
].
functionId
]
=
XRouterPathConstants
.
PERSONAL_MY_STAFF
// 其他服务-优惠券管理
functionPageMap
[
data
[
2
].
functions
[
0
].
functionId
]
=
XRouterPathConstants
.
COMMODITY_MANAGEMENT
// 其他服务-职位管理
functionPageMap
[
data
[
2
].
functions
[
1
].
functionId
]
=
null
// 其他服务-门店管理
functionPageMap
[
data
[
2
].
functions
[
2
].
functionId
]
=
XRouterPathConstants
.
STORE_MANAGEMENT
// 其他服务-系统设置
functionPageMap
[
data
[
2
].
functions
[
3
].
functionId
]
=
XRouterPathConstants
.
SYSTEM_SETTING
// 其他服务-认证管理
functionPageMap
[
data
[
2
].
functions
[
4
].
functionId
]
=
XRouterPathConstants
.
AUTH_MANAGEMENT
}
/**
* 生成FunctionId和跳转页面参数映射
*/
private
fun
generateFunctionParamsMap
(
data
:
GetCommonConfigBean
.
Data
)
{
if
(
data
.
merchantManagerCenter
.
items
.
isEmpty
())
return
functionParamsMap
.
clear
()
// 进入发布商品的url
val
pageUrl
=
XBirdPageConstants
.
COMMODITY_PUBLISH_COMMODITY
+
"?life_account_id=${curLifeAccount.life_account_id}"
functionParamsMap
[
data
.
merchantManagerCenter
.
items
[
0
].
functions
[
0
].
functionId
]
=
hashMapOf
(
XBirdPageConstants
.
PAGE_URL
to
pageUrl
)
// 系统设置传参TowerPro配置数据
functionParamsMap
[
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
3
].
functionId
]
=
hashMapOf
(
IntentConstants
.
KEY_EXTRA_COMMON_CONFIG
to
data
)
// 认证管理传参生活号id和生活号key tag
functionParamsMap
[
data
.
merchantManagerCenter
.
items
[
2
].
functions
[
4
].
functionId
]
=
hashMapOf
(
MerchantAuthManagementActivity
.
EXTRA_LIFE_ACCOUNT_ID
to
curLifeAccount
.
life_account_id
,
MerchantAuthManagementActivity
.
EXTRA_LIFE_ACCOUNT_TAG_KEY
to
curLifeAccount
.
tag
.
tag_key
)
}
/**
* 对应生活号权限下的功能集
* 不在功能集中即为仅展示
*/
private
fun
generateFunctionPermissionMap
(
data
:
List
<
GetCommonConfigBean
.
Item
>)
{
if
(
data
.
isEmpty
())
return
functionPermissionList
.
clear
()
when
(
getCurLifeAccountLabel
())
{
Constant
.
LIFE_ACCOUNT_TAG_ENTERPRISE_AUTH
->
{
// 企业认证
// 所有服务都可用
functionPermissionList
.
add
(
data
[
0
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
0
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
1
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
1
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
2
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
3
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_COMMON_ENTERPRISE_AUTH
->
{
// 普通企业认证
// 所有服务都可用
functionPermissionList
.
add
(
data
[
0
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
0
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
1
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
1
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
2
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
3
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_INDIVIDUAL_BUSINESS_AUTH
->
{
// 个体工商户认证
// 所有服务都可用
functionPermissionList
.
add
(
data
[
0
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
0
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
1
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
1
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
0
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
2
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
3
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_PERSONAL_AUTH
->
{
// 个人认证
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
functionPermissionList
.
add
(
data
[
0
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
3
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_NOT_AUTH
->
{
// 未认证
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
functionPermissionList
.
add
(
data
[
0
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
3
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_AUDIT_UNDER
->
{
// 审核中
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
functionPermissionList
.
add
(
data
[
0
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
3
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
4
].
functionId
)
}
Constant
.
LIFE_ACCOUNT_TAG_AUTH_REJECT
->
{
// 认证驳回
// 我要发布-招聘 其他服务-职位管理 其他服务-系统设置 其他服务-认证管理
functionPermissionList
.
add
(
data
[
0
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
1
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
3
].
functionId
)
functionPermissionList
.
add
(
data
[
2
].
functions
[
4
].
functionId
)
}
}
}
/**
* 过滤商户服务数据
* 目前处理 1.个人认证状态下和企业员工角色下不展示管理服务
...
...
@@ -439,7 +319,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
// 若在当前权限功能集中则跳转指定页
if
(
functionPermissionList
.
contains
(
data
.
functionId
))
{
functionPageMap
[
data
.
functionId
]
?.
let
{
XPageManager
.
push
(
it
,
functionParamsMap
[
data
.
functionId
])
}
?:
ToastUtil
.
showToast
(
this
,
"正在建设中..."
)
}
else
{
// 若当前功能无权限 根据生活号类型做弹窗提示
if
(
curLifeAccount
.
enterprise_audit_status
==
Constant
.
STATUS_AUDIT_UNDER
)
{
...
...
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