Commit 9d08009c authored by yinjiacheng's avatar yinjiacheng

update 认证流程

parent 78608c60
...@@ -23,5 +23,6 @@ class HawkConfig { ...@@ -23,5 +23,6 @@ class HawkConfig {
const val Mobile = "mobile" const val Mobile = "mobile"
const val Nickname = "nickname" const val Nickname = "nickname"
const val Avatar = "avatar" const val Avatar = "avatar"
const val LifeAccountId = "lifeAccountId"
} }
} }
\ No newline at end of file
...@@ -20,7 +20,7 @@ class XRouterPathConstants { ...@@ -20,7 +20,7 @@ class XRouterPathConstants {
const val ID_CARD_TEST = "/idCardTest" const val ID_CARD_TEST = "/idCardTest"
const val LIFE_ACCOUNT_ENTERPRISE_CERTIFICATION = "/lifeAccountEnterpriseCertification" const val LIFE_ACCOUNT_ENTERPRISE_CERTIFICATION = "/lifeAccountEnterpriseCertification"
const val LIFE_ACCOUNT_PERSONAL_AUTH = "/lifeAccountPersonalAuth" const val LIFE_ACCOUNT_PERSONAL_AUTH = "/lifeAccountPersonalAuth"
const val LIFE_ACCOUNT_CREATE = "/createLiveAccountActivity" const val LIFE_ACCOUNT_CREATE = "/lifeAccountCreate"
const val LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE = "/lifeAccountPersonalAuthComplete" const val LIFE_ACCOUNT_PERSONAL_AUTH_COMPLETE = "/lifeAccountPersonalAuthComplete"
const val LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE = "/lifeAccountEnterpriseAuthComplete" const val LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE = "/lifeAccountEnterpriseAuthComplete"
const val LIFE_ACCOUNT_ENTERPRISE_AUTH = "/lifeAccountEnterpriseAuth" const val LIFE_ACCOUNT_ENTERPRISE_AUTH = "/lifeAccountEnterpriseAuth"
......
...@@ -33,7 +33,7 @@ class URLs { ...@@ -33,7 +33,7 @@ class URLs {
const val sendMsgCode = "/user/user/send_sms_code" const val sendMsgCode = "/user/user/send_sms_code"
const val mobileLogin = "/user/user/login" const val mobileLogin = "/user/user/login"
const val accountList = "/merchant/auth/account_list" const val accountList = "/merchant/auth/account_list"
const val createLifeAccount = "/merchant/enterprise/create_life" const val createLifeAccount = "/merchant/enterprise/check_life"
const val authPersonalCheck = "/merchant/auth/personal_check" const val authPersonalCheck = "/merchant/auth/personal_check"
const val authLiveIdentity = "/merchant/auth/live_identity" const val authLiveIdentity = "/merchant/auth/live_identity"
const val authComplete = "/merchant/auth/complete" const val authComplete = "/merchant/auth/complete"
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
android:name=".ui.LifeAccountEnterpriseCertificationActivity" android:name=".ui.LifeAccountEnterpriseCertificationActivity"
android:theme="@style/Transparent" /> android:theme="@style/Transparent" />
<activity <activity
android:name=".ui.auth.LiveAccountCreateActivity" android:name=".ui.auth.LifeAccountCreateActivity"
android:theme="@style/Transparent" android:theme="@style/Transparent"
android:windowSoftInputMode="stateHidden|adjustResize" /> android:windowSoftInputMode="stateHidden|adjustResize" />
......
...@@ -6,6 +6,7 @@ import com.yidian.common.XRouterPathConstants.Companion.FLASH ...@@ -6,6 +6,7 @@ import com.yidian.common.XRouterPathConstants.Companion.FLASH
import com.yidian.common.XRouterPathConstants.Companion.GALLERY import com.yidian.common.XRouterPathConstants.Companion.GALLERY
import com.yidian.common.XRouterPathConstants.Companion.ID_CARD_TEST import com.yidian.common.XRouterPathConstants.Companion.ID_CARD_TEST
import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_AUTH import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_AUTH
import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_CREATE
import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_ENTERPRISE_AUTH import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_ENTERPRISE_AUTH
import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_ENTERPRISE_CERTIFICATION import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_ENTERPRISE_CERTIFICATION
...@@ -191,6 +192,18 @@ class NewsContentApplication : YdBaseApplication() { ...@@ -191,6 +192,18 @@ class NewsContentApplication : YdBaseApplication() {
} }
}), }),
XPageNode(LIFE_ACCOUNT_CREATE, 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, LifeAccountCreateActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
context.startActivity(intent)
}
}),
XPageNode(NEWS_CONTENT, XPageNodePageType.NATIVE, object : XPageHandler { XPageNode(NEWS_CONTENT, XPageNodePageType.NATIVE, object : XPageHandler {
override fun handler(params: Map<String, Any?>?) { override fun handler(params: Map<String, Any?>?) {
val intent = Intent() val intent = Intent()
......
package com.yidian.shenghuoquan.newscontent.bean
class CreateLifeAccountBean {
/**
* life_account_name 是 str 生活号名称
* code 是 str 企业社会统一识别码
* user_id 是 str 用id
*/
data class Request(
var life_account_name: String,
var code: String,
var user_id: String
)
}
\ No newline at end of file
...@@ -8,9 +8,9 @@ package com.yidian.shenghuoquan.newscontent.bean ...@@ -8,9 +8,9 @@ package com.yidian.shenghuoquan.newscontent.bean
class LifeAccountMerchantAuthData { class LifeAccountMerchantAuthData {
var merchantType: Int = 0 var merchantType: Int = 0
var isBusinessLicenseUpload: Boolean = false var isBusinessLicenseUpload: Boolean = false
var businessLicenseObjectKey: String = "" var businessLicenseObjectKey: String? = null
var registrationName: String = "" var registrationName: String? = null
var registrationCode: String = "" var registrationCode: String? = null
var authRecordId: Long? = null var authRecordId: Long? = null
var lifeAccountId: Long? = null var lifeAccountId: Long? = null
var isRecoverAuthProcess: Boolean = false // 是否为恢复认证流程 var isRecoverAuthProcess: Boolean = false // 是否为恢复认证流程
......
...@@ -18,13 +18,13 @@ class LifeAccountPersonalAuthData { ...@@ -18,13 +18,13 @@ class LifeAccountPersonalAuthData {
var isIDCardNationalEmblemFaceUpload: Boolean = false var isIDCardNationalEmblemFaceUpload: Boolean = false
var idCardPortraitFaceCompleteness: Int = -1 var idCardPortraitFaceCompleteness: Int = -1
var idCardNationalEmblemFaceCompleteness: Int = -1 var idCardNationalEmblemFaceCompleteness: Int = -1
var liveDetectBizToken: String = "" var liveDetectBizToken: String? = null
var liveDetectObjectKey: String = "" var liveDetectObjectKey: String? = null
var liveDetectBucket: String = "" var liveDetectBucket: String? = null
var isFaceAuthPass: Boolean = false var isFaceAuthPass: Boolean = false
// 身份证相关信息 // 身份证相关信息
var gender: String = "" var gender: String? = null
var address: String? = null var address: String? = null
var nationality: String? = null var nationality: String? = null
var validDateStart: String? = null var validDateStart: String? = null
......
...@@ -242,24 +242,6 @@ class ApiService { ...@@ -242,24 +242,6 @@ class ApiService {
}) })
} }
fun createLifeAccount(callback:ICreateLifeAccountCallback, 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)
.createLifeAccount(publicParamsMap, privateParamsMap)
.compose(TransformUtil.defaultSchedulers())
.subscribe(object :HttpResultSubscriber<Any?>(){
override fun onSuccess(result: HttpResult<Any?>?) {
callback.createLifeAccountCallback(true)
}
override fun onFailer(result: HttpResult<Any?>?) {
callback.createLifeAccountCallback(false)
}
})
}
// 101 身份信息校验接口 // 101 身份信息校验接口
fun authPersonalCheck(apiCallback: IAuthPersonalCheckCallback, requestParams: HashMap<String, String?>) { fun authPersonalCheck(apiCallback: IAuthPersonalCheckCallback, requestParams: HashMap<String, String?>) {
val timeStamp = System.currentTimeMillis() val timeStamp = System.currentTimeMillis()
...@@ -447,5 +429,24 @@ class ApiService { ...@@ -447,5 +429,24 @@ class ApiService {
} }
}) })
} }
// 407 生活号名检查与修改
fun createLifeAccount(callback:ICreateLifeAccountCallback, 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)
.createLifeAccount(publicParamsMap, privateParamsMap)
.compose(TransformUtil.defaultSchedulers())
.subscribe(object :HttpResultSubscriber<Any?>(){
override fun onSuccess(result: HttpResult<Any?>?) {
callback.createLifeAccountCallback(true)
}
override fun onFailer(result: HttpResult<Any?>?) {
callback.createLifeAccountCallback(false)
}
})
}
} }
} }
...@@ -2,8 +2,6 @@ package com.yidian.shenghuoquan.newscontent.http ...@@ -2,8 +2,6 @@ package com.yidian.shenghuoquan.newscontent.http
import com.yidian.common.http.HttpResult import com.yidian.common.http.HttpResult
import com.yidian.common.http.URLs import com.yidian.common.http.URLs
import com.yidian.shenghuoquan.newscontent.bean.CreateLifeAccountBean
import com.yidian.shenghuoquan.newscontent.http.httpbean.*
import io.reactivex.rxjava3.core.Observable import io.reactivex.rxjava3.core.Observable
import okhttp3.MultipartBody import okhttp3.MultipartBody
import retrofit2.Call import retrofit2.Call
...@@ -22,9 +20,6 @@ interface CommonService { ...@@ -22,9 +20,6 @@ interface CommonService {
@POST(URLs.authPersonalGetToken) @POST(URLs.authPersonalGetToken)
fun authPersonalGetToken(@QueryMap commonParams: Map<String, String>, @Body requestParams: Map<String, String?>): Observable<HttpResult<Any?>> fun authPersonalGetToken(@QueryMap commonParams: Map<String, String>, @Body requestParams: Map<String, String?>): Observable<HttpResult<Any?>>
// @(URLs.authPersonalGetToken)
// fun authPersonalGetToken(@QueryMap commonParams: Map<String, String>, @QueryMap requestParams: Map<String, String>): Observable<HttpResult<Any?>>
@Headers("Content-Type: application/json") @Headers("Content-Type: application/json")
@POST(URLs.getKSYunToken) @POST(URLs.getKSYunToken)
fun getKSYunToken(@QueryMap commonParams: Map<String, String>, @Body requestParams: Map<String, String?>): Call<HttpResult<Any?>> fun getKSYunToken(@QueryMap commonParams: Map<String, String>, @Body requestParams: Map<String, String?>): Call<HttpResult<Any?>>
......
...@@ -18,7 +18,7 @@ class AuthMerchantCheckBean : Serializable{ ...@@ -18,7 +18,7 @@ class AuthMerchantCheckBean : Serializable{
val audit_status: Int, val audit_status: Int,
val code: String, val code: String,
val data_type: Int, val data_type: Int,
val enterprise_auth_record_id: Int, val enterprise_auth_record_id: Long,
val entterprise_image: String, val entterprise_image: String,
val legal_back_id_card: String, val legal_back_id_card: String,
val legal_front_id_card: String, val legal_front_id_card: String,
......
package com.yidian.shenghuoquan.newscontent.http.httpbean
/**
* API /merchant/enterprise/check_life
*/
class LifeAccountCreateBean {
data class Request(
var life_account_id: Long,
var life_account_name: String
)
}
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.yidian.shenghuoquan.newscontent.ui.auth ...@@ -3,6 +3,8 @@ package com.yidian.shenghuoquan.newscontent.ui.auth
import com.yidian.shenghuoquan.newscontent.bean.LifeAccountMerchantAuthData import com.yidian.shenghuoquan.newscontent.bean.LifeAccountMerchantAuthData
import com.yidian.shenghuoquan.newscontent.bean.LifeAccountPersonalAuthData import com.yidian.shenghuoquan.newscontent.bean.LifeAccountPersonalAuthData
import com.yidian.shenghuoquan.newscontent.constant.Constant import com.yidian.shenghuoquan.newscontent.constant.Constant
import com.yidian.shenghuoquan.newscontent.http.httpbean.AuthAuthenticationBean
import com.yidian.shenghuoquan.newscontent.http.httpbean.AuthMerchantCheckBean
import com.yidian.shenghuoquan.newscontent.http.httpbean.BusinessLicenseOCRBean import com.yidian.shenghuoquan.newscontent.http.httpbean.BusinessLicenseOCRBean
import com.yidian.shenghuoquan.newscontent.http.httpbean.GetIDCardOCRBean import com.yidian.shenghuoquan.newscontent.http.httpbean.GetIDCardOCRBean
...@@ -52,6 +54,17 @@ object LifeAccountAuthDataManager { ...@@ -52,6 +54,17 @@ object LifeAccountAuthDataManager {
} }
} }
/**
* 填入个人认证流程回显数据
*/
// TODO: 6/10/21 完善数据
fun generatePersonalAuthData(data: AuthAuthenticationBean.Response) {
personalAuthData.isFaceAuthPass = data.live_identity_status == Constant.ALIVE_DETECT_SUCCESS
personalAuthData.realName = data.full_name
personalAuthData.idCardNum = data.id_card
personalAuthData.occupation = data.occupation
}
/** /**
* 生成身份信息校验接口请求体 * 生成身份信息校验接口请求体
*/ */
...@@ -96,6 +109,22 @@ object LifeAccountAuthDataManager { ...@@ -96,6 +109,22 @@ object LifeAccountAuthDataManager {
merchantAuthData.date_issue = data.date_issue merchantAuthData.date_issue = data.date_issue
} }
/**
* 填入企业认证回显数据
*/
// TODO: 6/10/21 完善数据
fun generateMerchantAuthData(data: AuthMerchantCheckBean.Response) {
merchantAuthData.authRecordId = data.enterprise_auth_record_id
merchantAuthData.registrationName = data.name
merchantAuthData.registrationCode = data.code
personalAuthData.realName = data.legal_person
personalAuthData.idCardNum = data.legal_id_card
personalAuthData.phoneNum = data.mobile
merchantAuthData.merchantType = data.data_type
personalAuthData.isFaceAuthPass = data.live_identity_status == Constant.ALIVE_DETECT_SUCCESS
merchantAuthData.isBusinessLicenseUpload = true
}
/** /**
* 生成营业执照上传接口请求体 * 生成营业执照上传接口请求体
*/ */
......
...@@ -85,7 +85,7 @@ class LifeAccountBusinessLicenseAuthFragment : ...@@ -85,7 +85,7 @@ class LifeAccountBusinessLicenseAuthFragment :
private fun initData() { private fun initData() {
// 还原认证数据 // 还原认证数据
val authData = val authData =
arguments?.getSerializable(LifeAccountIDCardAuthFragment.EXTRA_AUTH_DATA) ?: return arguments?.getSerializable(EXTRA_AUTH_DATA) ?: return
fillAuthInfo(authData as AuthMerchantCheckBean.Response) fillAuthInfo(authData as AuthMerchantCheckBean.Response)
} }
...@@ -93,28 +93,15 @@ class LifeAccountBusinessLicenseAuthFragment : ...@@ -93,28 +93,15 @@ class LifeAccountBusinessLicenseAuthFragment :
* 认证流程中断,下次进入认证流程时还原进度 * 认证流程中断,下次进入认证流程时还原进度
*/ */
private fun fillAuthInfo(data: 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) Glide.with(this).load(data.entterprise_image).into(viewBinding.ivBusinessLicense)
viewBinding.ivClear.isVisible = true
viewBinding.clBusinessLicenseUpload.isEnabled = false
// 填入注册名称和注册码 // 填入注册名称和注册码
viewBinding.evRegistrationName.fillEditContent(data.name) viewBinding.evRegistrationName.fillEditContent(data.name)
viewBinding.evRegistrationCode.fillEditContent(data.code) viewBinding.evRegistrationCode.fillEditContent(data.code)
// 检查下一步条件 // 检查下一步条件
(activity as LifeAccountEnterpriseAuthActivity).checkNextCondition() (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?) { override fun onClick(v: View?) {
...@@ -276,7 +263,7 @@ class LifeAccountBusinessLicenseAuthFragment : ...@@ -276,7 +263,7 @@ class LifeAccountBusinessLicenseAuthFragment :
override fun onTaskSuccess(bucket: String?, objectKey: String?) { override fun onTaskSuccess(bucket: String?, objectKey: String?) {
LifeAccountAuthDataManager.merchantAuthData.isBusinessLicenseUpload = true LifeAccountAuthDataManager.merchantAuthData.isBusinessLicenseUpload = true
objectKey?.let { LifeAccountAuthDataManager.merchantAuthData.businessLicenseObjectKey = it } LifeAccountAuthDataManager.merchantAuthData.businessLicenseObjectKey = objectKey
// 执行营业执照OCR // 执行营业执照OCR
startBusinessLicenseOCR(objectKey, bucket) startBusinessLicenseOCR(objectKey, bucket)
} }
......
...@@ -3,7 +3,6 @@ package com.yidian.shenghuoquan.newscontent.ui.auth ...@@ -3,7 +3,6 @@ package com.yidian.shenghuoquan.newscontent.ui.auth
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.os.Bundle import android.os.Bundle
import android.text.Editable import android.text.Editable
import android.util.Log
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.orhanobut.hawk.Hawk import com.orhanobut.hawk.Hawk
import com.yidian.common.HawkConfig import com.yidian.common.HawkConfig
...@@ -11,34 +10,33 @@ import com.yidian.common.XRouterPathConstants ...@@ -11,34 +10,33 @@ import com.yidian.common.XRouterPathConstants
import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_CREATE import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_CREATE
import com.yidian.common.base.BaseActivity import com.yidian.common.base.BaseActivity
import com.yidian.shenghuoquan.newscontent.R import com.yidian.shenghuoquan.newscontent.R
import com.yidian.shenghuoquan.newscontent.bean.CreateLifeAccountBean
import com.yidian.shenghuoquan.newscontent.bean.ICreateLifeAccountCallback import com.yidian.shenghuoquan.newscontent.bean.ICreateLifeAccountCallback
import com.yidian.shenghuoquan.newscontent.databinding.ActivityCreateAccountBinding import com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountCreateBinding
import com.yidian.shenghuoquan.newscontent.http.ApiService import com.yidian.shenghuoquan.newscontent.http.ApiService
import com.yidian.shenghuoquan.newscontent.utils.TextWatcherAdapter import com.yidian.shenghuoquan.newscontent.utils.TextWatcherAdapter
import com.yidian.utils.ToastUtil import com.yidian.utils.ToastUtil
import com.yidian.xpage.XPageManager import com.yidian.xpage.XPageManager
class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(), class LifeAccountCreateActivity : BaseActivity<ActivityLifeAccountCreateBinding>(),
ICreateLifeAccountCallback { ICreateLifeAccountCallback {
companion object { companion object {
private const val TAG = "LiveAccountCreate" private const val TAG = "LifeAccountCreate"
const val ENTERPRISE_CODE = "enterprise_code" const val LIFE_ACCOUNT_ID = "life_account_id"
const val ACCOUNT_NAME = "account_name" const val LIFE_ACCOUNT_NAME = "life_account_name"
} }
override fun createViewBinding(): ActivityCreateAccountBinding { override fun createViewBinding(): ActivityLifeAccountCreateBinding {
return ActivityCreateAccountBinding.inflate(layoutInflater) return ActivityLifeAccountCreateBinding.inflate(layoutInflater)
} }
override fun getXPageName(): String { override fun getXPageName(): String {
return LIFE_ACCOUNT_CREATE return LIFE_ACCOUNT_CREATE
} }
private val accountMaxLength = 40 private val accountMaxLength = 20
private var accountName = "" private var lifeAccountId: Long = 0
private var enterpriseCode = "" private var lifeAccountName: String = ""
private var userId = ""
override fun init(savedInstanceState: Bundle?) { override fun init(savedInstanceState: Bundle?) {
super.init(savedInstanceState) super.init(savedInstanceState)
initView() initView()
...@@ -49,17 +47,11 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(), ...@@ -49,17 +47,11 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(),
private fun initData() { private fun initData() {
val params = intent.getSerializableExtra(XRouterPathConstants.ParamsKey) val params = intent.getSerializableExtra(XRouterPathConstants.ParamsKey)
if (params != null && params is HashMap<*, *>) { if (params != null && params is HashMap<*, *>) {
try { lifeAccountId = params[LIFE_ACCOUNT_ID] as Long
accountName = params[ACCOUNT_NAME] as String? ?: ""
enterpriseCode = params[ENTERPRISE_CODE] as String? ?: ""
} catch (e: Exception) {
Log.e(TAG, "LiveAccountCreateActivity: $e" )
}
} }
viewBind.etAccount.setText(accountName) // 设置管理员信息
val name = Hawk.get<String>(HawkConfig.Nickname) ?: "" val name = Hawk.get(HawkConfig.Nickname, "")
val phone = Hawk.get<String>(HawkConfig.Mobile) ?: "" val phone = Hawk.get(HawkConfig.Mobile, "")
userId = Hawk.get<String>(HawkConfig.UserId) ?: ""
setUserName(name, phone) setUserName(name, phone)
} }
...@@ -67,8 +59,6 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(), ...@@ -67,8 +59,6 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(),
private fun initView() { private fun initView() {
viewBind.btnCreateAccount.alpha = 0.32f viewBind.btnCreateAccount.alpha = 0.32f
viewBind.btnCreateAccount.isEnabled = false viewBind.btnCreateAccount.isEnabled = false
//设置最大的名称限制
viewBind.etAccount.maxHeight = accountMaxLength + 1
} }
private fun initListener() { private fun initListener() {
...@@ -80,27 +70,26 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(), ...@@ -80,27 +70,26 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(),
} }
}) })
viewBind.btnCreateAccount.setOnClickListener { viewBind.btnCreateAccount.setOnClickListener {
createNewAccount() createLifeAccount()
} }
} }
private fun createNewAccount() { /**
//模拟网络请求成功 * 请求接口创建生活号
accountName = viewBind.etAccount.text.toString() */
private fun createLifeAccount() {
if (accountName.isEmpty()){ lifeAccountName = viewBind.etAccount.text.toString()
ToastUtil.showToast(this,"生活号不能为空") if (lifeAccountName.isEmpty()) {
ToastUtil.showToast(this, "生活号名称不能为空")
return return
} }
if (enterpriseCode.isEmpty() || userId.isEmpty()){ ApiService.createLifeAccount(
ToastUtil.showToast(this,"生活号信息异常,请退出重试!") this,
return hashMapOf(
} Pair(LIFE_ACCOUNT_ID, lifeAccountId.toString()),
val requestParams = HashMap<String, String?>() Pair(LIFE_ACCOUNT_NAME, lifeAccountName)
requestParams["life_account_name"] = accountName )
requestParams["code"] = enterpriseCode )
requestParams["user_id"] = userId
ApiService.createLifeAccount(this, requestParams)
} }
...@@ -113,6 +102,7 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(), ...@@ -113,6 +102,7 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(),
private fun formatNumber(number: String): String { private fun formatNumber(number: String): String {
return number.replace("(\\d{3})\\d{4}(\\d{4})".toRegex(), "$1****$2") return number.replace("(\\d{3})\\d{4}(\\d{4})".toRegex(), "$1****$2")
} }
@Suppress("DEPRECATION") @Suppress("DEPRECATION")
private fun checkAccount(s: String) { private fun checkAccount(s: String) {
if (s.isEmpty()) { if (s.isEmpty()) {
...@@ -140,11 +130,11 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(), ...@@ -140,11 +130,11 @@ class LiveAccountCreateActivity : BaseActivity<ActivityCreateAccountBinding>(),
override fun createLifeAccountCallback(result: Boolean) { override fun createLifeAccountCallback(result: Boolean) {
//创建生活号的回调 //创建生活号的回调
if (result) { if (result) {
XPageManager.push(
val params = hashMapOf(Pair(LifeNumberActivity.ACCOUNT_NAME, accountName)) XRouterPathConstants.LIFE_NUMBER,
XPageManager.push(XRouterPathConstants.LIFE_NUMBER, params) hashMapOf(Pair(LifeNumberActivity.ACCOUNT_NAME, lifeAccountName))
)
} else { } else {
// todo 创建失败,失败逻辑
ToastUtil.showToast(this, "生活号创建失败") ToastUtil.showToast(this, "生活号创建失败")
} }
} }
......
...@@ -4,6 +4,8 @@ import android.os.Bundle ...@@ -4,6 +4,8 @@ import android.os.Bundle
import android.util.Log import android.util.Log
import android.view.View import android.view.View
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.orhanobut.hawk.Hawk
import com.yidian.common.HawkConfig
import com.yidian.common.XRouterPathConstants import com.yidian.common.XRouterPathConstants
import com.yidian.common.base.BaseActivity import com.yidian.common.base.BaseActivity
import com.yidian.shenghuoquan.newscontent.R import com.yidian.shenghuoquan.newscontent.R
...@@ -13,9 +15,12 @@ import com.yidian.shenghuoquan.newscontent.constant.Constant ...@@ -13,9 +15,12 @@ import com.yidian.shenghuoquan.newscontent.constant.Constant
import com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountEnterpriseAuthBinding import com.yidian.shenghuoquan.newscontent.databinding.ActivityLifeAccountEnterpriseAuthBinding
import com.yidian.shenghuoquan.newscontent.http.ApiService import com.yidian.shenghuoquan.newscontent.http.ApiService
import com.yidian.shenghuoquan.newscontent.http.callback.IAuthBusinessLicenseCommitCallback 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.callback.IAuthEnterpriseLegalIdentityCommitCallback
import com.yidian.shenghuoquan.newscontent.http.httpbean.* import com.yidian.shenghuoquan.newscontent.http.callback.IAuthIndividualBusinessCompleteCallback
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.AuthMerchantCheckBean
import com.yidian.shenghuoquan.newscontent.ui.dialog.BottomSelectDialog import com.yidian.shenghuoquan.newscontent.ui.dialog.BottomSelectDialog
import com.yidian.shenghuoquan.newscontent.widget.LifeAccountAuthProcessView import com.yidian.shenghuoquan.newscontent.widget.LifeAccountAuthProcessView
import com.yidian.xpage.XPageManager import com.yidian.xpage.XPageManager
...@@ -85,13 +90,12 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp ...@@ -85,13 +90,12 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
super.init(savedInstanceState) super.init(savedInstanceState)
initView() initView()
initListener() initListener()
// 默认企业资质Fragment initData()
viewBind.pvAuthProcess.setProcess(LifeAccountAuthProcessView.PROCESS_ENTERPRISE_QUALIFICATION)
initFragment()
} }
private fun initView() { private fun initView() {
viewBind.viewCommonHeader.tvTitle.text = resources.getString(R.string.enterprise_auth) viewBind.viewCommonHeader.tvTitle.text = resources.getString(R.string.enterprise_auth)
viewBind.pvAuthProcess.setProcess(LifeAccountAuthProcessView.PROCESS_ENTERPRISE_QUALIFICATION)
} }
private fun initListener() { private fun initListener() {
...@@ -107,8 +111,8 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp ...@@ -107,8 +111,8 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
if (viewBind.pvAuthProcess.curProcess == LifeAccountAuthProcessView.PROCESS_ENTERPRISE_QUALIFICATION if (viewBind.pvAuthProcess.curProcess == LifeAccountAuthProcessView.PROCESS_ENTERPRISE_QUALIFICATION
&& LifeAccountAuthDataManager.merchantAuthData.merchantType != 0 && LifeAccountAuthDataManager.merchantAuthData.merchantType != 0
&& LifeAccountAuthDataManager.merchantAuthData.isBusinessLicenseUpload && LifeAccountAuthDataManager.merchantAuthData.isBusinessLicenseUpload
&& LifeAccountAuthDataManager.merchantAuthData.registrationName.isNotEmpty() && !LifeAccountAuthDataManager.merchantAuthData.registrationName.isNullOrEmpty()
&& LifeAccountAuthDataManager.merchantAuthData.registrationCode.isNotEmpty() && !LifeAccountAuthDataManager.merchantAuthData.registrationCode.isNullOrEmpty()
) { ) {
viewBind.btnNext.alpha = 1f viewBind.btnNext.alpha = 1f
viewBind.btnNext.isEnabled = true viewBind.btnNext.isEnabled = true
...@@ -141,30 +145,22 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp ...@@ -141,30 +145,22 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
viewBind.svMerchantType.enableSelect(false) viewBind.svMerchantType.enableSelect(false)
} }
private fun initFragment() { private fun initData() {
if (authData == null) {
switchFragment(fragmentList[0])
} else {
// 如果有已存在的认证流程则还原进度 // 如果有已存在的认证流程则还原进度
authData?.let { LifeAccountAuthDataManager.generateMerchantAuthData(it) }
authData?.data_type?.let {
viewBind.svMerchantType.setContentResult( viewBind.svMerchantType.setContentResult(
if (authData?.data_type == Constant.TYPE_INDIVIDUAL_BUSINESS) { if (it == Constant.TYPE_INDIVIDUAL_BUSINESS) {
Constant.ITEM_INDIVIDUAL_BUSINESSES Constant.ITEM_INDIVIDUAL_BUSINESSES
} else { } else {
Constant.ITEM_COMMON_ENTERPRISE 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() val bundle = Bundle()
bundle.putSerializable(LifeAccountBusinessLicenseAuthFragment.EXTRA_AUTH_DATA, authData) bundle.putSerializable(LifeAccountBusinessLicenseAuthFragment.EXTRA_AUTH_DATA, authData)
fragmentList[0].arguments = bundle fragmentList[0].arguments = bundle
switchFragment(fragmentList[0]) switchFragment(fragmentList[0])
LifeAccountAuthDataManager.merchantAuthData.isRecoverAuthProcess = true
}
} }
/** /**
...@@ -227,22 +223,6 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp ...@@ -227,22 +223,6 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
if (viewBind.pvAuthProcess.curProcess == LifeAccountAuthProcessView.PROCESS_ENTERPRISE_QUALIFICATION) { if (viewBind.pvAuthProcess.curProcess == LifeAccountAuthProcessView.PROCESS_ENTERPRISE_QUALIFICATION) {
// personalLifeAccountId不为null则是由个人生活号升级为企业生活号情况 // personalLifeAccountId不为null则是由个人生活号升级为企业生活号情况
// 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( ApiService.authBusinessLicenseCommit(
this, this,
LifeAccountAuthDataManager.generateAuthBusinessLicenseCommitRequest( LifeAccountAuthDataManager.generateAuthBusinessLicenseCommitRequest(
...@@ -309,8 +289,34 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp ...@@ -309,8 +289,34 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
} }
override fun authEnterpriseLegalIdentityCommitSuccess(result: AuthEnterpriseLegalIdentityCommitBean.Response?) { override fun authEnterpriseLegalIdentityCommitSuccess(result: AuthEnterpriseLegalIdentityCommitBean.Response?) {
// 本地保存生活号id
Hawk.put(HawkConfig.LifeAccountId, result?.life_account_id)
// 普通企业法人身份信息提交成功 // 普通企业法人身份信息提交成功
// TODO: 6/6/21 跳转提交成功页面 XPageManager.push(
XRouterPathConstants.LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE,
hashMapOf(
Pair(
LifeAccountEnterpriseAuthCompleteActivity.REGISTRATION_NAME,
LifeAccountAuthDataManager.merchantAuthData.registrationName
),
Pair(
LifeAccountEnterpriseAuthCompleteActivity.REGISTRATION_CODE,
LifeAccountAuthDataManager.merchantAuthData.registrationCode
),
Pair(
LifeAccountEnterpriseAuthCompleteActivity.ID_CARD_NAME,
LifeAccountAuthDataManager.personalAuthData.realName
),
Pair(
LifeAccountEnterpriseAuthCompleteActivity.ID_CARD_NUM,
LifeAccountAuthDataManager.personalAuthData.idCardNum
),
Pair(
LifeAccountEnterpriseAuthCompleteActivity.LIFE_ACCOUNT_ID,
result?.life_account_id
)
)
)
} }
override fun authEnterpriseLegalIdentityCommitFailure(message: String?) { override fun authEnterpriseLegalIdentityCommitFailure(message: String?) {
...@@ -321,8 +327,34 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp ...@@ -321,8 +327,34 @@ class LifeAccountEnterpriseAuthActivity : BaseActivity<ActivityLifeAccountEnterp
} }
override fun authIndividualBusinessCompleteSuccess(result: AuthIndividualBusinessCompleteBean.Response?) { override fun authIndividualBusinessCompleteSuccess(result: AuthIndividualBusinessCompleteBean.Response?) {
// 本地保存生活号id
Hawk.put(HawkConfig.LifeAccountId, result?.life_account_id)
// 个体工商户认证完成 // 个体工商户认证完成
// TODO: 6/6/21 跳转提交成功页面 XPageManager.push(
XRouterPathConstants.LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE,
hashMapOf(
Pair(
LifeAccountEnterpriseAuthCompleteActivity.REGISTRATION_NAME,
LifeAccountAuthDataManager.merchantAuthData.registrationName
),
Pair(
LifeAccountEnterpriseAuthCompleteActivity.REGISTRATION_CODE,
LifeAccountAuthDataManager.merchantAuthData.registrationCode
),
Pair(
LifeAccountEnterpriseAuthCompleteActivity.ID_CARD_NAME,
LifeAccountAuthDataManager.personalAuthData.realName
),
Pair(
LifeAccountEnterpriseAuthCompleteActivity.ID_CARD_NUM,
LifeAccountAuthDataManager.personalAuthData.idCardNum
),
Pair(
LifeAccountEnterpriseAuthCompleteActivity.LIFE_ACCOUNT_ID,
result?.life_account_id
)
)
)
} }
override fun authIndividualBusinessCompleteFailure(message: String?) { override fun authIndividualBusinessCompleteFailure(message: String?) {
......
...@@ -22,6 +22,7 @@ class LifeAccountEnterpriseAuthCompleteActivity : ...@@ -22,6 +22,7 @@ class LifeAccountEnterpriseAuthCompleteActivity :
const val REGISTRATION_CODE = "registrationCode" const val REGISTRATION_CODE = "registrationCode"
const val ID_CARD_NAME = "idCardName" const val ID_CARD_NAME = "idCardName"
const val ID_CARD_NUM = "idCardNum" const val ID_CARD_NUM = "idCardNum"
const val LIFE_ACCOUNT_ID = "lifeAccountId"
} }
/** /**
...@@ -55,8 +56,8 @@ class LifeAccountEnterpriseAuthCompleteActivity : ...@@ -55,8 +56,8 @@ class LifeAccountEnterpriseAuthCompleteActivity :
XRouterPathConstants.LIFE_ACCOUNT_CREATE, XRouterPathConstants.LIFE_ACCOUNT_CREATE,
hashMapOf( hashMapOf(
Pair( Pair(
LiveAccountCreateActivity.ENTERPRISE_CODE, LifeAccountCreateActivity.LIFE_ACCOUNT_ID,
params[REGISTRATION_CODE] params[LIFE_ACCOUNT_ID]
) )
) )
) )
......
...@@ -36,6 +36,17 @@ class LifeAccountPersonalAuthActivity : ...@@ -36,6 +36,17 @@ class LifeAccountPersonalAuthActivity :
*/ */
private val fragment by lazy { LifeAccountIDCardAuthFragment() } private val fragment by lazy { LifeAccountIDCardAuthFragment() }
/**
* 认证数据 还原认证流程用
*/
private val authData by lazy {
intent.getSerializableExtra(XRouterPathConstants.ParamsKey)?.let {
(it as HashMap<*, *>)[EXTRA_AUTH_DATA]?.let { data ->
data as AuthAuthenticationBean.Response
}
}
}
override fun createViewBinding(): ActivityLifeAccountPersonalAuthBinding { override fun createViewBinding(): ActivityLifeAccountPersonalAuthBinding {
return ActivityLifeAccountPersonalAuthBinding.inflate(layoutInflater) return ActivityLifeAccountPersonalAuthBinding.inflate(layoutInflater)
} }
...@@ -48,7 +59,7 @@ class LifeAccountPersonalAuthActivity : ...@@ -48,7 +59,7 @@ class LifeAccountPersonalAuthActivity :
super.init(savedInstanceState) super.init(savedInstanceState)
initView() initView()
initListener() initListener()
initFragment() initData()
} }
private fun initView() { private fun initView() {
...@@ -62,22 +73,15 @@ class LifeAccountPersonalAuthActivity : ...@@ -62,22 +73,15 @@ class LifeAccountPersonalAuthActivity :
viewBind.btnNext.setOnClickListener(this) viewBind.btnNext.setOnClickListener(this)
} }
private fun initFragment() { private fun initData() {
val authData = intent.getSerializableExtra(XRouterPathConstants.ParamsKey)?.let {
(it as HashMap<*, *>)[EXTRA_AUTH_DATA]?.let { data ->
data as AuthAuthenticationBean.Response
}
}
// 如果有已存在的认证流程则还原进度 // 如果有已存在的认证流程则还原进度
authData?.let { LifeAccountAuthDataManager.generatePersonalAuthData(it) }
authData?.occupation?.let { viewBind.svOccupation.setContentResult(it) }
val bundle = Bundle() val bundle = Bundle()
bundle.putSerializable(LifeAccountIDCardAuthFragment.EXTRA_AUTH_DATA, authData) bundle.putSerializable(LifeAccountIDCardAuthFragment.EXTRA_AUTH_DATA, authData)
fragment.arguments = bundle fragment.arguments = bundle
supportFragmentManager.beginTransaction() supportFragmentManager.beginTransaction()
.add(R.id.fragment_container, fragment).commit() .add(R.id.fragment_container, fragment).commit()
authData?.occupation?.let {
viewBind.svOccupation.setContentResult(it)
LifeAccountAuthDataManager.personalAuthData.occupation = it
}
} }
/** /**
......
...@@ -68,7 +68,7 @@ class LifeAccountAuthImageView @JvmOverloads constructor( ...@@ -68,7 +68,7 @@ class LifeAccountAuthImageView @JvmOverloads constructor(
* 填充图片 * 填充图片
* @param url 图片url * @param url 图片url
*/ */
fun addImage(context: Context, url: String) { fun addImage(url: String) {
Glide.with(context).load(url).into(viewBinding.ivContent) Glide.with(context).load(url).into(viewBinding.ivContent)
isEnabled = false isEnabled = false
viewBinding.ivClear.isVisible = true viewBinding.ivClear.isVisible = true
......
...@@ -20,14 +20,15 @@ ...@@ -20,14 +20,15 @@
android:id="@+id/iv_back" android:id="@+id/iv_back"
android:layout_width="28dp" android:layout_width="28dp"
android:layout_height="28dp" android:layout_height="28dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingEnd="10dp"
android:paddingTop="5dp" android:paddingTop="5dp"
android:paddingEnd="10dp"
android:paddingBottom="5dp" android:paddingBottom="5dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/big_back" android:src="@drawable/big_back"
android:visibility="gone"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
<TextView <TextView
...@@ -50,33 +51,37 @@ ...@@ -50,33 +51,37 @@
android:textColor="@color/gray_333" android:textColor="@color/gray_333"
android:textSize="16sp" android:textSize="16sp"
tools:ignore="RtlSymmetry" /> tools:ignore="RtlSymmetry" />
<androidx.appcompat.widget.AppCompatEditText <androidx.appcompat.widget.AppCompatEditText
android:id="@+id/et_account" android:id="@+id/et_account"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_marginEnd="20dp"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:background="@null" android:background="@null"
android:textSize="16sp"
android:textCursorDrawable="@drawable/comment_dialog_cursor"
android:textColorHint="@color/account_hint"
android:textColor="@color/gray_333"
android:gravity="center_vertical" android:gravity="center_vertical"
android:hint="@string/account_create_tips" /> android:hint="@string/account_create_tips"
android:maxLength="21"
android:textColor="@color/gray_333"
android:textColorHint="@color/account_hint"
android:textCursorDrawable="@drawable/comment_dialog_cursor"
android:textSize="16sp" />
<View <View
android:id="@+id/v_divider" android:id="@+id/v_divider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginEnd="20dp"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:background="@color/divider_white" /> android:background="@color/divider_white" />
<TextView <TextView
android:id="@+id/tv_error_tips" android:id="@+id/tv_error_tips"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:paddingBottom="6dp"
android:paddingTop="6dp" android:paddingTop="6dp"
android:paddingBottom="6dp"
android:text="@string/account_error_tips" android:text="@string/account_error_tips"
android:textColor="@color/red_account_tips" android:textColor="@color/red_account_tips"
android:textSize="12sp" android:textSize="12sp"
...@@ -100,39 +105,41 @@ ...@@ -100,39 +105,41 @@
android:layout_height="60dp" android:layout_height="60dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingStart="20dp" android:paddingStart="20dp"
tools:text="蓝小花15800000001"
android:textColor="@color/gray_333" android:textColor="@color/gray_333"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" tools:ignore="RtlSymmetry"
tools:ignore="RtlSymmetry" /> tools:text="蓝小花15800000001" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginEnd="20dp"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:background="@color/divider_white" /> android:background="@color/divider_white" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingEnd="20dp"
android:paddingStart="20dp" android:paddingStart="20dp"
android:paddingEnd="20dp"
android:text="@string/account_create_desc" android:text="@string/account_create_desc"
android:textColor="@color/content_other_text" android:textColor="@color/content_other_text"
android:textSize="12sp" android:textSize="12sp"
tools:ignore="RtlSymmetry" /> tools:ignore="RtlSymmetry" />
</LinearLayout> </LinearLayout>
<androidx.appcompat.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_create_account" android:id="@+id/btn_create_account"
android:layout_width="315dp"
android:layout_height="44dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="34dp" android:layout_marginBottom="34dp"
android:textSize="18sp"
android:gravity="center"
android:alpha="0.32" android:alpha="0.32"
android:textColor="@color/white"
android:text="@string/create_account"
android:layout_gravity="center_horizontal|bottom"
android:background="@drawable/account_btn_gradient_bg" android:background="@drawable/account_btn_gradient_bg"
android:layout_width="315dp" android:gravity="center"
android:layout_height="44dp"/> android:text="@string/create_account"
android:textColor="@color/white"
android:textSize="18sp" />
</FrameLayout> </FrameLayout>
\ No newline at end of file
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<string name="create_account">确认创建</string> <string name="create_account">确认创建</string>
<string name="account_create_tips">同企业下生活号名称不可复用</string> <string name="account_create_tips">同企业下生活号名称不可复用</string>
<string name="account_create_desc">生活号作为企业服务管理载体,请正确使用生活号权益,新申请生活号默认当前申请人作为默认管理员,申请成功 后可在销售APP内进行更改</string> <string name="account_create_desc">生活号作为企业服务管理载体,请正确使用生活号权益,新申请生活号默认当前申请人作为默认管理员,申请成功 后可在销售APP内进行更改</string>
<string name="account_error_tips">名称超限,最多40个字符</string> <string name="account_error_tips">名称超限,最多20个字符</string>
<string name="account_manager">管理员</string> <string name="account_manager">管理员</string>
<string name="account_name">生活号名称</string> <string name="account_name">生活号名称</string>
<string name="account_title">创建生活号</string> <string name="account_title">创建生活号</string>
......
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