Commit 8813a0a8 authored by shiyl's avatar shiyl

Merge branch 'feature/dev_order' of...

Merge branch 'feature/dev_order' of https://git.yidian-inc.com:8021/bp/ShenghuoquanBusiness into feature/dev_order

# Conflicts:
#	CommonLib/BCommon/src/main/java/com/yidian/bcommon/http/CommonDataSource.kt
parents 812ba198 7aca77ab
...@@ -141,5 +141,11 @@ class XRouterPathConstants { ...@@ -141,5 +141,11 @@ class XRouterPathConstants {
// 商品 — 商品管理 // 商品 — 商品管理
const val COMMODITY_MANAGEMENT = "/b/goods/commodity_management" const val COMMODITY_MANAGEMENT = "/b/goods/commodity_management"
/**
* C端页面
*/
// webView
const val C_WEB_VIEW = "/SimpleBorwser"
} }
} }
package com.yidian.bcommon.http package com.yidian.bcommon.http
import com.google.gson.reflect.TypeToken import com.google.gson.reflect.TypeToken
import com.yidian.bcommon.constant.AppConfig
import com.yidian.bcommon.BuildConfig
import com.yidian.bcommon.app.YdBaseApplication import com.yidian.bcommon.app.YdBaseApplication
import com.yidian.bcommon.constant.RunConfig import com.yidian.bcommon.constant.RunConfig
import com.yidian.bcommon.constant.AppConfig
import com.yidian.bcommon.http.bean.CommitFeedbackBean import com.yidian.bcommon.http.bean.CommitFeedbackBean
import com.yidian.bcommon.http.bean.GetCommonConfigBean import com.yidian.bcommon.http.bean.GetCommonConfigBean
import com.yidian.bcommon.http.bean.GetKSYunObjectIdBean import com.yidian.bcommon.http.bean.GetKSYunObjectIdBean
...@@ -36,7 +35,7 @@ object CommonDataSource { ...@@ -36,7 +35,7 @@ object CommonDataSource {
} }
private val ydJiraApi by lazy { private val ydJiraApi by lazy {
ServiceFactory.getInstance().createService(CommonService::class.java, CommonService.SCHEME_HTTP + CommonService.DOMAIN_YD_JIRA) ServiceFactory.getInstance().createService(CommonService::class.java, CommonService.SCHEME_HTTPS + CommonService.DOMAIN_YD_JIRA)
} }
// 301 获取金山云token接口 // 301 获取金山云token接口
...@@ -91,6 +90,10 @@ object CommonDataSource { ...@@ -91,6 +90,10 @@ object CommonDataSource {
override fun onFailure(result: HttpResult<GetCommonConfigBean.GetCommonConfigResponse>?) { override fun onFailure(result: HttpResult<GetCommonConfigBean.GetCommonConfigResponse>?) {
apiCallback.getCommonConfigFailure(result?.status) apiCallback.getCommonConfigFailure(result?.status)
} }
override fun onNetworkFailure(result: HttpResult<GetCommonConfigBean.GetCommonConfigResponse>?) {
apiCallback.getCommonConfigFailure(result?.status)
}
}) })
} }
......
...@@ -22,13 +22,13 @@ interface CommonService { ...@@ -22,13 +22,13 @@ interface CommonService {
const val DOMAIN_TOWER_API_PRO = "open-tower-api.go2yd.com" const val DOMAIN_TOWER_API_PRO = "open-tower-api.go2yd.com"
// 一点jira域名定义 // 一点jira域名定义
const val DOMAIN_YD_JIRA = "ydjira.yidian-inc.com" const val DOMAIN_YD_JIRA = "hub.go2yd.com"
// tower-api 获取配置数据 // tower-api 获取配置数据
private const val getCommonConfig = "/api/resource" private const val getCommonConfig = "/api/resource"
// 用户反馈提交 // 用户反馈提交
private const val commitFeedback = "/rest/api/2/issue" private const val commitFeedback = "/feedback/save"
} }
@Headers("Content-Type: application/json") @Headers("Content-Type: application/json")
...@@ -44,7 +44,7 @@ interface CommonService { ...@@ -44,7 +44,7 @@ interface CommonService {
@GET(getCommonConfig) @GET(getCommonConfig)
fun getCommonConfig(@QueryMap requestParams: Map<String, String>): Observable<HttpResult<GetCommonConfigBean.GetCommonConfigResponse>> fun getCommonConfig(@QueryMap requestParams: Map<String, String>): Observable<HttpResult<GetCommonConfigBean.GetCommonConfigResponse>>
@Headers("Content-Type: application/json", "Authorization: Basic Y2xpZW50LXVwbG9hZDpUZXN0MTIzNCU=") @Headers("Content-Type: application/json")
@POST(commitFeedback) @POST(commitFeedback)
fun commitFeedback(@Body requestParams: CommitFeedbackBean.CommitFeedbackRequest): Observable<HttpResult<CommitFeedbackBean.CommitFeedbackResponse>> fun commitFeedback(@Body requestParams: CommitFeedbackBean.CommitFeedbackRequest): Observable<HttpResult<CommitFeedbackBean.CommitFeedbackResponse>>
} }
...@@ -40,6 +40,8 @@ class HttpParamsUtils { ...@@ -40,6 +40,8 @@ class HttpParamsUtils {
Timber.tag(BCommonManager.TAG_HTTP).d("request private params: ${gson.toJson(paramsMap)}") Timber.tag(BCommonManager.TAG_HTTP).d("request private params: ${gson.toJson(paramsMap)}")
hashMapOf("tok" to BCommonManager.getEncryptIml().rsaEncrypt(gson.toJson(paramsMap))) hashMapOf("tok" to BCommonManager.getEncryptIml().rsaEncrypt(gson.toJson(paramsMap)))
} else { } else {
// C端身份请求加uid
BCommonManager.getUid()?.let { paramsMap["user_id"] = it }
Timber.tag(BCommonManager.TAG_HTTP).d("request private params: ${gson.toJson(paramsMap)}") Timber.tag(BCommonManager.TAG_HTTP).d("request private params: ${gson.toJson(paramsMap)}")
paramsMap paramsMap
} }
......
...@@ -38,7 +38,7 @@ abstract class HttpResultObserver<T> : Observer<HttpResult<T>> { ...@@ -38,7 +38,7 @@ abstract class HttpResultObserver<T> : Observer<HttpResult<T>> {
} }
} else { } else {
if (isShowErrorMsg) { if (isShowErrorMsg) {
ToastUtil.showToast(YdBaseApplication.context, "网络请求异常") ToastUtil.showToast(YdBaseApplication.context, "网络请求失败,请检查您的网络设置")
} }
} }
onRequestFailure(Exception(e.toString())) onRequestFailure(Exception(e.toString()))
...@@ -49,19 +49,24 @@ abstract class HttpResultObserver<T> : Observer<HttpResult<T>> { ...@@ -49,19 +49,24 @@ abstract class HttpResultObserver<T> : Observer<HttpResult<T>> {
onRequestSuccess(result) onRequestSuccess(result)
} else { } else {
onFailure(result) onFailure(result)
ToastUtil.showToast(YdBaseApplication.context, result.reason) ToastUtil.showToast(YdBaseApplication.context, result.reason ?: "网络请求失败")
} }
} }
abstract fun onSuccess(result: HttpResult<T>?) abstract fun onSuccess(result: HttpResult<T>?)
abstract fun onFailure(result: HttpResult<T>?) abstract fun onFailure(result: HttpResult<T>?)
/**
* 可根据实际情况选择是否复写此方法
*/
open fun onNetworkFailure(result: HttpResult<T>?) {}
private fun onRequestFailure(e: Throwable?) { private fun onRequestFailure(e: Throwable?) {
val result: HttpResult<T> = HttpResult() val result: HttpResult<T> = HttpResult()
result.code = -100 result.code = -100
result.reason = e?.message result.reason = e?.message
result.status = "failed" result.status = "failed"
onFailure(result) onNetworkFailure(result)
} }
private fun onRequestSuccess(result: HttpResult<T>) { private fun onRequestSuccess(result: HttpResult<T>) {
......
...@@ -54,7 +54,7 @@ class GetCommonConfigBean { ...@@ -54,7 +54,7 @@ class GetCommonConfigBean {
@SerializedName("disable_text") @SerializedName("disable_text")
val disableText: String, val disableText: String,
@SerializedName("disable_url") @SerializedName("disable_url")
val disableUrl: String?, val disableUrl: String,
@SerializedName("items") @SerializedName("items")
val items: List<Item>, val items: List<Item>,
@SerializedName("show") @SerializedName("show")
...@@ -82,7 +82,7 @@ class GetCommonConfigBean { ...@@ -82,7 +82,7 @@ class GetCommonConfigBean {
@SerializedName("icon_url") @SerializedName("icon_url")
val iconUrl: String, val iconUrl: String,
@SerializedName("link_url") @SerializedName("link_url")
val linkUrl: String?, val linkUrl: String,
@SerializedName("show") @SerializedName("show")
val show: Int val show: Int
) : Serializable ) : Serializable
......
...@@ -9,14 +9,19 @@ class ZapServiceNameConstants { ...@@ -9,14 +9,19 @@ class ZapServiceNameConstants {
companion object { companion object {
// BSetting组件中的设置相关服务 // BSetting组件中的设置相关服务
const val SettingService = "SettingService" const val SettingService = "SettingService"
// 生活号列表服务名称 // 生活号列表服务名称
const val LifeNumberListService = "LifeNumberListService" const val LifeNumberListService = "LifeNumberListService"
// BGeneralBusiness组件中提供的通用服务 // BGeneralBusiness组件中提供的通用服务
const val GeneralAbilityService = "GeneralAbilityService" const val GeneralAbilityService = "GeneralAbilityService"
// BGeneralBusiness组件中给H5提供的通用网络请求服务(名称需要和H5同步的) // BGeneralBusiness组件中给H5提供的通用网络请求服务(名称需要和H5同步的)
const val BNAHttpReq = "BNAHttpReq" const val BNAHttpReq = "BNAHttpReq"
// BOrder组件中给H5提供的支付服务(名称需要和H5同步的) // BOrder组件中给H5提供的支付服务(名称需要和H5同步的)
const val BPayService = "bPayService" const val BPayService = "bPayService"
// BRoot组件中加解密服务 // BRoot组件中加解密服务
const val EncryptService = "EncryptService" const val EncryptService = "EncryptService"
} }
......
package com.yidian.bcommon.utils
import okhttp3.internal.and
import java.security.MessageDigest
import java.security.NoSuchAlgorithmException
class EncryptUtil {
companion object{
fun getMD5(info: String): String{
val md5: MessageDigest = MessageDigest.getInstance("MD5")
md5.update(info.toByteArray())
val m = md5.digest()
return byte2hex(m)
}
fun encryptToSHA(info: String): String{
val digesta: ByteArray
var rs = ""
try {
val alga: MessageDigest = MessageDigest.getInstance("SHA-1")
alga.update(info.toByteArray())
digesta = alga.digest()
rs = byte2hex(digesta)
} catch (e: NoSuchAlgorithmException) {
e.printStackTrace()
}
return rs
}
private fun byte2hex(b: ByteArray): String{
var hs = ""
var stmp: String
repeat(b.size){
stmp = Integer.toHexString(b[it] and 0XFF)
hs = if(stmp.length == 1){
hs + "0" + stmp
}else{
hs + stmp
}
}
return hs
}
}
}
package com.yidian.shenghuoquan.bmanagercenter.utils package com.yidian.bcommon.utils
import android.text.InputFilter import android.text.InputFilter
import java.util.regex.Pattern import java.util.regex.Pattern
......
...@@ -3,6 +3,7 @@ package com.yidian.shenghuoquan.bgeneralbusiness.app ...@@ -3,6 +3,7 @@ package com.yidian.shenghuoquan.bgeneralbusiness.app
import com.yidian.bcommon.app.YdBaseApplication import com.yidian.bcommon.app.YdBaseApplication
import com.yidian.bcommon.services.ZapServiceNameConstants import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.news.util.ProcessUtil import com.yidian.news.util.ProcessUtil
import com.yidian.shenghuoquan.bgeneralbusiness.service.EncryptService
import com.yidian.shenghuoquan.bgeneralbusiness.service.GeneralAbilityService import com.yidian.shenghuoquan.bgeneralbusiness.service.GeneralAbilityService
import com.yidian.shenghuoquan.bgeneralbusiness.service.net.BNAHttpReqService import com.yidian.shenghuoquan.bgeneralbusiness.service.net.BNAHttpReqService
import com.yidian.yac.core.core.YacModuleSpec import com.yidian.yac.core.core.YacModuleSpec
...@@ -21,5 +22,6 @@ class BGeneralBusinessApplication : YdBaseApplication() { ...@@ -21,5 +22,6 @@ class BGeneralBusinessApplication : YdBaseApplication() {
private fun initService() { private fun initService() {
Zap.addService(ZapServiceNameConstants.BNAHttpReq, BNAHttpReqService()) Zap.addService(ZapServiceNameConstants.BNAHttpReq, BNAHttpReqService())
Zap.addService(ZapServiceNameConstants.GeneralAbilityService, GeneralAbilityService()) Zap.addService(ZapServiceNameConstants.GeneralAbilityService, GeneralAbilityService())
Zap.addService(ZapServiceNameConstants.EncryptService, EncryptService())
} }
} }
package com.yidian.shenghuoquan.broot.service package com.yidian.shenghuoquan.bgeneralbusiness.service
import com.yidian.bcommon.sdk.BCommonManager import com.yidian.bcommon.sdk.BCommonManager
import com.yidian.bcommon.sdk.IEncryptService import com.yidian.bcommon.sdk.IEncryptService
......
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
}
}
package com.yidian.shenghuoquan.bmanagercenter.service package com.yidian.shenghuoquan.bmanagercenter.service
import com.yidian.bcommon.constant.XRouterPathConstants
import com.yidian.bcommon.bean.LifeAccountItemBean import com.yidian.bcommon.bean.LifeAccountItemBean
import com.yidian.bcommon.constant.XRouterPathConstants
import com.yidian.bcommon.services.AppUpgradeService import com.yidian.bcommon.services.AppUpgradeService
import com.yidian.bcommon.services.ZapServiceActionConstants import com.yidian.bcommon.services.ZapServiceActionConstants
import com.yidian.bcommon.utils.StorageUtil
import com.yidian.bcommon.utils.ToastUtils import com.yidian.bcommon.utils.ToastUtils
import com.yidian.shenghuoquan.bmanagercenter.http.ApiService import com.yidian.shenghuoquan.bmanagercenter.http.ApiService
import com.yidian.shenghuoquan.bmanagercenter.http.callback.IGetLifeAccountListCallback import com.yidian.shenghuoquan.bmanagercenter.http.callback.IGetLifeAccountListCallback
import com.yidian.shenghuoquan.bmanagercenter.ui.auth.LifeAccountAuthDataManagerV2
import com.yidian.shenghuoquan.bmanagercenter.ui.auth.LifeAccountIdentityActivity import com.yidian.shenghuoquan.bmanagercenter.ui.auth.LifeAccountIdentityActivity
import com.yidian.shenghuoquan.bmanagercenter.ui.center.MerchantCenterActivity import com.yidian.shenghuoquan.bmanagercenter.ui.center.MerchantCenterActivity
import com.yidian.bcommon.utils.StorageUtil
import com.yidian.shenghuoquan.bmanagercenter.ui.auth.LifeAccountAuthDataManagerV2
import com.yidian.xarc.xrouter.ResultResolver import com.yidian.xarc.xrouter.ResultResolver
import com.yidian.xpage.XPageManager import com.yidian.xpage.XPageManager
import com.yidian.yac.core.zap.ZapService import com.yidian.yac.core.zap.ZapService
import com.yidian.yac.core.zap.ZapTicket import com.yidian.yac.core.zap.ZapTicket
import org.json.JSONObject import org.json.JSONObject
import timber.log.Timber import timber.log.Timber
import kotlin.collections.ArrayList
/** /**
* 生活号列表服务 * 生活号列表服务
...@@ -57,6 +56,8 @@ class LifeNumberListService : ZapService() { ...@@ -57,6 +56,8 @@ class LifeNumberListService : ZapService() {
XPageManager.push(XRouterPathConstants.LIFE_ACCOUNT_AUTH, null) XPageManager.push(XRouterPathConstants.LIFE_ACCOUNT_AUTH, null)
} }
1 -> { 1 -> {
// 此处处理用户已经关联一个生活号但本地无存储/app数据被清除的情况
StorageUtil.putLifeAccountId(result[0].life_account_id)
// 关联一个生活号 进入商户管理中心 // 关联一个生活号 进入商户管理中心
XPageManager.push( XPageManager.push(
XRouterPathConstants.MERCHANT_CENTER, XRouterPathConstants.MERCHANT_CENTER,
......
...@@ -3,8 +3,10 @@ package com.yidian.shenghuoquan.bmanagercenter.ui.auth ...@@ -3,8 +3,10 @@ package com.yidian.shenghuoquan.bmanagercenter.ui.auth
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.yidian.bcommon.constant.XRouterPathConstants
import com.yidian.bcommon.base.BaseActivity import com.yidian.bcommon.base.BaseActivity
import com.yidian.bcommon.constant.XRouterPathConstants
import com.yidian.bcommon.sdk.ClientType
import com.yidian.bcommon.sdk.JudgeClientUtils
import com.yidian.bcommon.services.ZapServiceActionConstants import com.yidian.bcommon.services.ZapServiceActionConstants
import com.yidian.bcommon.services.ZapServiceNameConstants import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.shenghuoquan.bmanagercenter.R import com.yidian.shenghuoquan.bmanagercenter.R
...@@ -74,10 +76,15 @@ class LifeAccountAuthActivity : BaseActivity<ActivityLifeAccountAuthBinding>(), ...@@ -74,10 +76,15 @@ class LifeAccountAuthActivity : BaseActivity<ActivityLifeAccountAuthBinding>(),
resources.getString(R.string.enterprise_auth_description), resources.getString(R.string.enterprise_auth_description),
false false
) )
if (JudgeClientUtils.judgeClient(packageName) == ClientType.MERCHANT_C) {
// C端进入此页面可返回且隐藏退出登录按钮
viewBind.bvTopBar.setBackVisibility(true)
viewBind.btnLogout.isVisible = false
return
}
if (intent.getSerializableExtra(XRouterPathConstants.ParamsKey) != null) { if (intent.getSerializableExtra(XRouterPathConstants.ParamsKey) != null) {
val paramsMap = intent.getSerializableExtra(XRouterPathConstants.ParamsKey) as HashMap<*, *> val paramsMap = intent.getSerializableExtra(XRouterPathConstants.ParamsKey) as HashMap<*, *>
val fromTag = paramsMap[EXTRA_PAGE_FROM] as String if (paramsMap[EXTRA_PAGE_FROM] as String == FROM_AUTH) {
if (fromTag == FROM_AUTH) {
// 如果由商户基本信息跳转至此页面 则此页面可返回 // 如果由商户基本信息跳转至此页面 则此页面可返回
viewBind.bvTopBar.setBackVisibility(true) viewBind.bvTopBar.setBackVisibility(true)
// 退出登录按钮隐藏 // 退出登录按钮隐藏
......
...@@ -31,7 +31,7 @@ import com.yidian.shenghuoquan.bmanagercenter.http.callback.IBusinessLicenseOCRC ...@@ -31,7 +31,7 @@ import com.yidian.shenghuoquan.bmanagercenter.http.callback.IBusinessLicenseOCRC
import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.BottomSelectDialog import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.BottomSelectDialog
import com.yidian.shenghuoquan.bmanagercenter.utils.BitmapUtil import com.yidian.shenghuoquan.bmanagercenter.utils.BitmapUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.FileUtil import com.yidian.shenghuoquan.bmanagercenter.utils.FileUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.InputFilterUtil import com.yidian.bcommon.utils.InputFilterUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.KS3Core import com.yidian.shenghuoquan.bmanagercenter.utils.KS3Core
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthBusinessInfoEditView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthBusinessInfoEditView
import com.yidian.utils.ToastUtil import com.yidian.utils.ToastUtil
......
...@@ -33,7 +33,7 @@ import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthMerchantCheckBea ...@@ -33,7 +33,7 @@ import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthMerchantCheckBea
import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.BottomSelectDialog import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.BottomSelectDialog
import com.yidian.shenghuoquan.bmanagercenter.utils.BitmapUtil import com.yidian.shenghuoquan.bmanagercenter.utils.BitmapUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.FileUtil import com.yidian.shenghuoquan.bmanagercenter.utils.FileUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.InputFilterUtil import com.yidian.bcommon.utils.InputFilterUtil
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthBusinessInfoEditView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthBusinessInfoEditView
import com.yidian.utils.ToastUtil import com.yidian.utils.ToastUtil
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
......
...@@ -15,7 +15,7 @@ import com.yidian.shenghuoquan.bmanagercenter.http.callback.ICreateLifeAccountCa ...@@ -15,7 +15,7 @@ import com.yidian.shenghuoquan.bmanagercenter.http.callback.ICreateLifeAccountCa
import com.yidian.shenghuoquan.bmanagercenter.constant.Constant import com.yidian.shenghuoquan.bmanagercenter.constant.Constant
import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityLifeAccountCreateBinding import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityLifeAccountCreateBinding
import com.yidian.shenghuoquan.bmanagercenter.http.ApiService import com.yidian.shenghuoquan.bmanagercenter.http.ApiService
import com.yidian.shenghuoquan.bmanagercenter.utils.InputFilterUtil import com.yidian.bcommon.utils.InputFilterUtil
import com.yidian.bcommon.utils.SensitiveInfoUtil import com.yidian.bcommon.utils.SensitiveInfoUtil
import com.yidian.bcommon.utils.TextWatcherAdapter import com.yidian.bcommon.utils.TextWatcherAdapter
import com.yidian.utils.ToastUtil import com.yidian.utils.ToastUtil
......
...@@ -36,7 +36,7 @@ import com.yidian.bcommon.widget.dialog.HintDialog ...@@ -36,7 +36,7 @@ import com.yidian.bcommon.widget.dialog.HintDialog
import com.yidian.shenghuoquan.bmanagercenter.http.callback.* import com.yidian.shenghuoquan.bmanagercenter.http.callback.*
import com.yidian.shenghuoquan.bmanagercenter.utils.BitmapUtil import com.yidian.shenghuoquan.bmanagercenter.utils.BitmapUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.FileUtil import com.yidian.shenghuoquan.bmanagercenter.utils.FileUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.InputFilterUtil import com.yidian.bcommon.utils.InputFilterUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.KS3Core import com.yidian.shenghuoquan.bmanagercenter.utils.KS3Core
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthIdentityInfoEditView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthIdentityInfoEditView
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthImageView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthImageView
......
...@@ -40,7 +40,7 @@ import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.BottomSelectDialog ...@@ -40,7 +40,7 @@ import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.BottomSelectDialog
import com.yidian.bcommon.widget.dialog.HintDialog import com.yidian.bcommon.widget.dialog.HintDialog
import com.yidian.shenghuoquan.bmanagercenter.utils.BitmapUtil import com.yidian.shenghuoquan.bmanagercenter.utils.BitmapUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.FileUtil import com.yidian.shenghuoquan.bmanagercenter.utils.FileUtil
import com.yidian.shenghuoquan.bmanagercenter.utils.InputFilterUtil import com.yidian.bcommon.utils.InputFilterUtil
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthIdentityInfoEditView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthIdentityInfoEditView
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthImageView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthImageView
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountFaceAuthView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountFaceAuthView
......
...@@ -9,7 +9,7 @@ import com.yidian.shenghuoquan.bmanagercenter.http.callback.ICreateLifeAccountCa ...@@ -9,7 +9,7 @@ import com.yidian.shenghuoquan.bmanagercenter.http.callback.ICreateLifeAccountCa
import com.yidian.shenghuoquan.bmanagercenter.constant.Constant import com.yidian.shenghuoquan.bmanagercenter.constant.Constant
import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityLifeAccountModifyNameBinding import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityLifeAccountModifyNameBinding
import com.yidian.shenghuoquan.bmanagercenter.http.ApiService import com.yidian.shenghuoquan.bmanagercenter.http.ApiService
import com.yidian.shenghuoquan.bmanagercenter.utils.InputFilterUtil import com.yidian.bcommon.utils.InputFilterUtil
import com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView import com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthIdentityInfoEditView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthIdentityInfoEditView
import com.yidian.xarc.xevent.XBaseEvent import com.yidian.xarc.xevent.XBaseEvent
......
...@@ -16,6 +16,7 @@ import com.yidian.bcommon.http.CommonDataSource ...@@ -16,6 +16,7 @@ import com.yidian.bcommon.http.CommonDataSource
import com.yidian.bcommon.http.bean.GetCommonConfigBean import com.yidian.bcommon.http.bean.GetCommonConfigBean
import com.yidian.bcommon.http.callback.IGetCommonConfigCallback import com.yidian.bcommon.http.callback.IGetCommonConfigCallback
import com.yidian.bcommon.sdk.BCommonManager import com.yidian.bcommon.sdk.BCommonManager
import com.yidian.bcommon.sdk.JudgeClientUtils
import com.yidian.bcommon.services.ZapServiceActionConstants import com.yidian.bcommon.services.ZapServiceActionConstants
import com.yidian.bcommon.services.ZapServiceNameConstants import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.bcommon.utils.StorageUtil import com.yidian.bcommon.utils.StorageUtil
...@@ -23,6 +24,7 @@ import com.yidian.bcommon.widget.dialog.HintDialog ...@@ -23,6 +24,7 @@ import com.yidian.bcommon.widget.dialog.HintDialog
import com.yidian.shenghuoquan.bmanagercenter.R import com.yidian.shenghuoquan.bmanagercenter.R
import com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceFunctionAdapter import com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceFunctionAdapter
import com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceGroupAdapter 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.constant.Constant
import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityMerchantCenterBinding import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityMerchantCenterBinding
import com.yidian.shenghuoquan.bmanagercenter.http.ApiService import com.yidian.shenghuoquan.bmanagercenter.http.ApiService
...@@ -72,17 +74,17 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me ...@@ -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 { override fun createViewBinding(): ActivityMerchantCenterBinding {
return ActivityMerchantCenterBinding.inflate(layoutInflater) return ActivityMerchantCenterBinding.inflate(layoutInflater)
...@@ -160,11 +162,18 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me ...@@ -160,11 +162,18 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
// 展示底部浮窗 // 展示底部浮窗
showMerchantCenterBottomHint(lifeAccountData) showMerchantCenterBottomHint(lifeAccountData)
// 生成FunctionId和XPage页面节点映射 // 生成FunctionId和XPage页面节点映射
generateFunctionPageMap(configData.merchantManagerCenter.items) ManagerCenterConfig.getFunctionPageMap(configData.merchantManagerCenter.items, JudgeClientUtils.judgeClient(packageName))
?.let { functionPageMap = it }
// 生成FunctionId和跳转页面参数映射 // 生成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) filterMerchantServiceData(configData.merchantManagerCenter.items)
} }
...@@ -191,135 +200,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me ...@@ -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.个人认证状态下和企业员工角色下不展示管理服务 * 目前处理 1.个人认证状态下和企业员工角色下不展示管理服务
...@@ -439,7 +319,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me ...@@ -439,7 +319,6 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(), Me
// 若在当前权限功能集中则跳转指定页 // 若在当前权限功能集中则跳转指定页
if (functionPermissionList.contains(data.functionId)) { if (functionPermissionList.contains(data.functionId)) {
functionPageMap[data.functionId]?.let { XPageManager.push(it, functionParamsMap[data.functionId]) } functionPageMap[data.functionId]?.let { XPageManager.push(it, functionParamsMap[data.functionId]) }
?: ToastUtil.showToast(this, "正在建设中...")
} else { } else {
// 若当前功能无权限 根据生活号类型做弹窗提示 // 若当前功能无权限 根据生活号类型做弹窗提示
if (curLifeAccount.enterprise_audit_status == Constant.STATUS_AUDIT_UNDER) { if (curLifeAccount.enterprise_audit_status == Constant.STATUS_AUDIT_UNDER) {
......
...@@ -3,15 +3,12 @@ package com.yidian.shenghuoquan.broot.app ...@@ -3,15 +3,12 @@ package com.yidian.shenghuoquan.broot.app
import android.content.Intent import android.content.Intent
import com.yidian.bcommon.app.YdBaseApplication import com.yidian.bcommon.app.YdBaseApplication
import com.yidian.bcommon.constant.XRouterPathConstants import com.yidian.bcommon.constant.XRouterPathConstants
import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.news.util.ProcessUtil import com.yidian.news.util.ProcessUtil
import com.yidian.shenghuoquan.broot.service.EncryptService
import com.yidian.xpage.XPageManager import com.yidian.xpage.XPageManager
import com.yidian.xpage.node.XPageHandler import com.yidian.xpage.node.XPageHandler
import com.yidian.xpage.node.XPageNode import com.yidian.xpage.node.XPageNode
import com.yidian.xpage.node.XPageNodePageType import com.yidian.xpage.node.XPageNodePageType
import com.yidian.yac.core.core.YacModuleSpec import com.yidian.yac.core.core.YacModuleSpec
import com.yidian.yac.core.zap.Zap
@YacModuleSpec @YacModuleSpec
...@@ -43,6 +40,6 @@ class BRootApplication : YdBaseApplication() { ...@@ -43,6 +40,6 @@ class BRootApplication : YdBaseApplication() {
} }
private fun initService() { private fun initService() {
Zap.addService(ZapServiceNameConstants.EncryptService, EncryptService())
} }
} }
...@@ -5,6 +5,7 @@ import android.text.InputFilter ...@@ -5,6 +5,7 @@ import android.text.InputFilter
import android.text.TextWatcher import android.text.TextWatcher
import androidx.activity.viewModels import androidx.activity.viewModels
import com.yidian.bcommon.mvvm.BaseMvvmActivity import com.yidian.bcommon.mvvm.BaseMvvmActivity
import com.yidian.bcommon.utils.InputFilterUtil
import com.yidian.bcommon.utils.ToastUtils import com.yidian.bcommon.utils.ToastUtils
import com.yidian.shenghuoquan.bsetting.R import com.yidian.shenghuoquan.bsetting.R
import com.yidian.shenghuoquan.bsetting.databinding.ActivityFeedbackBinding import com.yidian.shenghuoquan.bsetting.databinding.ActivityFeedbackBinding
...@@ -20,8 +21,8 @@ class FeedbackActivity : BaseMvvmActivity<ActivityFeedbackBinding, FeedbackViewM ...@@ -20,8 +21,8 @@ class FeedbackActivity : BaseMvvmActivity<ActivityFeedbackBinding, FeedbackViewM
override val vm: FeedbackViewModel by viewModels() override val vm: FeedbackViewModel by viewModels()
override fun initView() { override fun initView() {
// 限制最多输入100字 // 限制最多输入100字 禁止输入Emoji
binding.etInput.filters = arrayOf(InputFilter.LengthFilter(100)) binding.etInput.filters = arrayOf(InputFilter.LengthFilter(100), InputFilterUtil.getEmojiFilter())
binding.etInput.addTextChangedListener(this) binding.etInput.addTextChangedListener(this)
subscribeData() subscribeData()
} }
...@@ -45,7 +46,7 @@ class FeedbackActivity : BaseMvvmActivity<ActivityFeedbackBinding, FeedbackViewM ...@@ -45,7 +46,7 @@ class FeedbackActivity : BaseMvvmActivity<ActivityFeedbackBinding, FeedbackViewM
finish() finish()
}) })
vm.commitFailureEvent.observe(this, { vm.commitFailureEvent.observe(this, {
ToastUtils.showShort("提交失败,请稍后重试")
}) })
vm.feedbackContentEmptyEvent.observe(this, { vm.feedbackContentEmptyEvent.observe(this, {
ToastUtils.showShort("您还没有填写反馈意见呦") ToastUtils.showShort("您还没有填写反馈意见呦")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment