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
50692b84
Commit
50692b84
authored
Jun 11, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 商户管理中心当前生活号UI
parent
d9b511e1
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
96 additions
and
49 deletions
+96
-49
FlashActivity.kt
...a/com/yidian/shenghuoquan/newscontent/ui/FlashActivity.kt
+6
-2
LoginLifeCircleActivity.kt
...an/shenghuoquan/newscontent/ui/LoginLifeCircleActivity.kt
+4
-2
LifeAccountIdentityActivity.kt
...uoquan/newscontent/ui/auth/LifeAccountIdentityActivity.kt
+4
-1
LifeAccountPersonalAuthCompleteActivity.kt
...ontent/ui/auth/LifeAccountPersonalAuthCompleteActivity.kt
+1
-1
MerchantCenterActivity.kt
...nghuoquan/newscontent/ui/center/MerchantCenterActivity.kt
+45
-23
LifeAccountLabelView.kt
...n/shenghuoquan/newscontent/widget/LifeAccountLabelView.kt
+29
-16
shape_life_account_status_audit.xml
...src/main/res/drawable/shape_life_account_status_audit.xml
+1
-1
shape_life_account_status_auth.xml
.../src/main/res/drawable/shape_life_account_status_auth.xml
+1
-1
shape_life_account_status_reject.xml
...rc/main/res/drawable/shape_life_account_status_reject.xml
+1
-1
shape_life_account_status_unauth.xml
...rc/main/res/drawable/shape_life_account_status_unauth.xml
+1
-1
colors.xml
Components/newscontent/src/main/res/values/colors.xml
+3
-0
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/FlashActivity.kt
View file @
50692b84
...
...
@@ -78,7 +78,10 @@ class FlashActivity : BaseActivity<ActivityFlashBinding>(), IGetLifeAccountListC
// 关联一个生活号 进入商户管理中心
XPageManager
.
push
(
XRouterPathConstants
.
MERCHANT_CENTER
,
hashMapOf
(
Pair
(
MerchantCenterActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
result
[
0
]))
hashMapOf
(
Pair
(
MerchantCenterActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
result
[
0
]),
Pair
(
MerchantCenterActivity
.
EXTRA_IS_MULTI
,
false
)
)
)
}
else
->
{
...
...
@@ -93,6 +96,7 @@ class FlashActivity : BaseActivity<ActivityFlashBinding>(), IGetLifeAccountListC
}
override
fun
getLifeAccountListFailure
(
message
:
String
?)
{
// TODO: 6/12/21 处理请求失败情况
finish
()
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/LoginLifeCircleActivity.kt
View file @
50692b84
...
...
@@ -146,7 +146,8 @@ class LoginLifeCircleActivity : BaseActivity<ActivityLoginBinding>(), IGetLifeAc
// 关联一个生活号 进入商户管理中心
XPageManager
.
push
(
XRouterPathConstants
.
MERCHANT_CENTER
,
hashMapOf
(
Pair
(
MerchantCenterActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
result
[
0
]))
hashMapOf
(
Pair
(
MerchantCenterActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
result
[
0
]),
Pair
(
MerchantCenterActivity
.
EXTRA_IS_MULTI
,
false
))
)
}
else
->
{
...
...
@@ -161,7 +162,8 @@ class LoginLifeCircleActivity : BaseActivity<ActivityLoginBinding>(), IGetLifeAc
}
override
fun
getLifeAccountListFailure
(
message
:
String
?)
{
// TODO: 6/12/21 处理请求失败情况
finish
()
}
override
fun
sendSmsCodeCallBack
(
t
:
HttpResult
<
Any
?
>?)
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountIdentityActivity.kt
View file @
50692b84
...
...
@@ -75,7 +75,10 @@ class LifeAccountIdentityActivity : BaseActivity<ActivityLifeAccountIdentityBind
// 进入商户管理中心页
XPageManager
.
push
(
XRouterPathConstants
.
MERCHANT_CENTER
,
hashMapOf
(
Pair
(
MerchantCenterActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
curSelectedItem
))
hashMapOf
(
Pair
(
MerchantCenterActivity
.
EXTRA_LIFE_ACCOUNT_INFO
,
curSelectedItem
),
Pair
(
MerchantCenterActivity
.
EXTRA_IS_MULTI
,
true
)
)
)
finish
()
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountPersonalAuthCompleteActivity.kt
View file @
50692b84
...
...
@@ -63,7 +63,7 @@ class LifeAccountPersonalAuthCompleteActivity :
finish
()
}
viewBind
.
upgradeEnterpriseAuth
.
setOnClickListener
{
//
TODO: 6/10/21 传入生活号id
//
传入生活号id 请求企业认证升级相关接口用
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_ENTERPRISE_AUTH
,
hashMapOf
(
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/MerchantCenterActivity.kt
View file @
50692b84
package
com.yidian.shenghuoquan.newscontent.ui.center
import
android.os.Bundle
import
androidx.core.view.isVisible
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.base.BaseActivity
...
...
@@ -10,20 +11,29 @@ import com.yidian.shenghuoquan.newscontent.databinding.ActivityMerchantCenterBin
import
com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.callback.IGetConfigListCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.GetConfigListBean
import
com.yidian.shenghuoquan.newscontent.
widget.LifeAccountLabelView
import
com.yidian.shenghuoquan.newscontent.
http.httpbean.LifeAccountItemBean
/**
* author: yinjiacheng
* date: 6/8/21 8:11 PM
* description: 商户管理中心
*/
class
MerchantCenterActivity
:
BaseActivity
<
ActivityMerchantCenterBinding
>()
{
class
MerchantCenterActivity
:
BaseActivity
<
ActivityMerchantCenterBinding
>(),
IGetConfigListCallback
{
companion
object
{
// 传递的生活号信息
const
val
EXTRA_LIFE_ACCOUNT_INFO
=
"lifeAccountInfo"
// 是否有多个生活号
const
val
EXTRA_IS_MULTI
=
"isMulti"
}
/**
* 当前生活号
*/
private
lateinit
var
curLifeAccount
:
LifeAccountItemBean
.
Response
override
fun
createViewBinding
():
ActivityMerchantCenterBinding
{
return
ActivityMerchantCenterBinding
.
inflate
(
layoutInflater
)
}
...
...
@@ -36,39 +46,51 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>() {
super
.
init
(
savedInstanceState
)
initView
()
initListener
()
initData
()
}
private
fun
initView
()
{
viewBind
.
viewCommonHeader
.
tvTitle
.
text
=
resources
.
getString
(
R
.
string
.
management_center
)
// Test
viewBind
.
lvLifeAccountLabel
.
setLifeAccountData
(
"一点资讯生活号"
,
LifeAccountLabelView
.
STATUS_LIFE_ACCOUNT_NOT_AUTH
,
null
)
// 本期需求无资产功能 仅做UI展示
viewBind
.
avMerchantAsset
.
setMerchantAssetData
(
8856.88
,
675.00
)
}
private
fun
initListener
()
{
}
private
fun
initData
()
{
val
params
=
intent
.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
?.
let
{
it
as
HashMap
<*,
*>
}
// 切换主体入口判断
viewBind
.
tvSwitch
.
isVisible
=
params
?.
get
(
EXTRA_IS_MULTI
)
as
Boolean
curLifeAccount
=
params
[
EXTRA_LIFE_ACCOUNT_INFO
]
?.
let
{
it
as
LifeAccountItemBean
.
Response
}
?:
return
// 设置当前生活号信息
viewBind
.
lvLifeAccountLabel
.
setLifeAccountData
(
curLifeAccount
.
life_account_name
,
curLifeAccount
.
life_account_auth_status
,
curLifeAccount
.
life_account_type
,
curLifeAccount
.
enterprise_audit_status
)
// 请求功能入口配置清单
ApiService
.
getConfigList
(
this
)
}
// Test
ApiService
.
getConfigList
(
object
:
IGetConfigListCallback
{
override
fun
getConfigListSuccess
(
result
:
GetConfigListBean
.
Response
?)
{
viewBind
.
rvServiceGroup
.
layoutManager
=
LinearLayoutManager
(
this
@MerchantCenterActivity
)
LinearLayoutManager
(
this
)
viewBind
.
rvServiceGroup
.
addItemDecoration
(
MerchantServiceGroupAdapter
.
MerchantServiceGroupItemDecorator
())
viewBind
.
rvServiceGroup
.
adapter
=
MerchantServiceGroupAdapter
(
this
@MerchantCenterActivity
,
this
,
result
?.
merchant_manager_center
?.
items
)
}
override
fun
getConfigListFailure
(
message
:
String
?)
{
}
})
}
private
fun
initListener
()
{
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountLabelView.kt
View file @
50692b84
...
...
@@ -4,6 +4,7 @@ import android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
androidx.constraintlayout.widget.ConstraintLayout
import
androidx.core.content.ContextCompat
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountLabelBinding
...
...
@@ -19,26 +20,26 @@ class LifeAccountLabelView @JvmOverloads constructor(
)
:
ConstraintLayout
(
context
,
attrs
,
defStyle
),
View
.
OnClickListener
{
companion
object
{
// 已认证
const
val
STATUS_LIFE_ACCOUNT_AUTH
=
11
// 未认证
const
val
STATUS_LIFE_ACCOUNT_NOT_AUTH
=
1
2
const
val
STATUS_LIFE_ACCOUNT_NOT_AUTH
=
1
//
认证驳回
const
val
STATUS_LIFE_ACCOUNT_
REJECT
=
13
//
已认证
const
val
STATUS_LIFE_ACCOUNT_
AUTH
=
2
// 审核中
const
val
STATUS_LIFE_ACCOUNT_AUDIT
=
14
const
val
STATUS_LIFE_ACCOUNT_AUDIT
=
10
// 认证驳回
const
val
STATUS_LIFE_ACCOUNT_REJECT
=
30
// 个人
const
val
TYPE_LIFE_ACCOUNT_PERSONAL
=
20
const
val
TYPE_LIFE_ACCOUNT_PERSONAL
=
1
// 个体工商户
const
val
TYPE_LIFE_ACCOUNT_INDIVIDUAL_BUSINESS
=
2
1
const
val
TYPE_LIFE_ACCOUNT_INDIVIDUAL_BUSINESS
=
2
// 普通企业
const
val
TYPE_LIFE_ACCOUNT_COMMON_ENTERPRISE
=
22
const
val
TYPE_LIFE_ACCOUNT_COMMON_ENTERPRISE
=
3
}
private
val
viewBinding
=
ViewLifeAccountLabelBinding
.
bind
(
...
...
@@ -55,16 +56,26 @@ class LifeAccountLabelView @JvmOverloads constructor(
/**
* 设置生活号信息
* 先判断认证状态 再判断审核状态 即审核中和审核驳回状态可覆盖认证状态
* @param name 生活号名称
* @param status 生活号状态
* @param status 生活号
认证
状态
* @param type 生活号类型
* @param audit 生活号审核状态
*/
fun
setLifeAccountData
(
name
:
String
,
status
:
Int
,
type
:
Int
?)
{
fun
setLifeAccountData
(
name
:
String
?,
status
:
Int
?,
type
:
Int
?,
audit
:
Int
?)
{
viewBinding
.
tvLifeAccountName
.
text
=
name
viewBinding
.
tvLifeAccountStatus
.
apply
{
when
(
status
)
{
STATUS_LIFE_ACCOUNT_NOT_AUTH
->
{
// 未认证
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_unauth
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
text
=
resources
.
getString
(
R
.
string
.
not_auth
)
}
STATUS_LIFE_ACCOUNT_AUTH
->
{
// 已认证
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_auth
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FF1852F1
))
text
=
when
(
type
)
{
TYPE_LIFE_ACCOUNT_INDIVIDUAL_BUSINESS
->
resources
.
getString
(
R
.
string
.
individual_business
)
TYPE_LIFE_ACCOUNT_COMMON_ENTERPRISE
->
resources
.
getString
(
R
.
string
.
common_enterprise
)
...
...
@@ -72,18 +83,20 @@ class LifeAccountLabelView @JvmOverloads constructor(
else
->
""
}
}
}
when
(
audit
)
{
STATUS_LIFE_ACCOUNT_AUDIT
->
{
// 审核中
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_audit
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFF26E3D
))
text
=
resources
.
getString
(
R
.
string
.
auth_audit
)
}
STATUS_LIFE_ACCOUNT_REJECT
->
{
// 审核驳回
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_reject
)
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFFF3A3A
))
text
=
resources
.
getString
(
R
.
string
.
auth_reject
)
}
else
->
{
setBackgroundResource
(
R
.
drawable
.
shape_life_account_status_unauth
)
text
=
resources
.
getString
(
R
.
string
.
not_auth
)
}
}
}
}
...
...
Components/newscontent/src/main/res/drawable/shape_life_account_status_audit.xml
View file @
50692b84
...
...
@@ -2,7 +2,7 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"
#FFEBECEF
"
/>
<solid
android:color=
"
@color/color_FFFFF3EE
"
/>
<corners
android:radius=
"21dp"
/>
...
...
Components/newscontent/src/main/res/drawable/shape_life_account_status_auth.xml
View file @
50692b84
...
...
@@ -2,7 +2,7 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"
#FFEBECE
F"
/>
<solid
android:color=
"
@color/color_FFE9EFF
F"
/>
<corners
android:radius=
"21dp"
/>
...
...
Components/newscontent/src/main/res/drawable/shape_life_account_status_reject.xml
View file @
50692b84
...
...
@@ -2,7 +2,7 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"
#FFEBECEF
"
/>
<solid
android:color=
"
@color/color_FFFFEEEE
"
/>
<corners
android:radius=
"21dp"
/>
...
...
Components/newscontent/src/main/res/drawable/shape_life_account_status_unauth.xml
View file @
50692b84
...
...
@@ -2,7 +2,7 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"
#
FFEBECEF"
/>
<solid
android:color=
"
@color/color_
FFEBECEF"
/>
<corners
android:radius=
"21dp"
/>
...
...
Components/newscontent/src/main/res/values/colors.xml
View file @
50692b84
...
...
@@ -55,4 +55,7 @@
<color
name=
"color_FF3693FF"
>
#FF3693FF
</color>
<color
name=
"color_FF1751F1"
>
#FF1751F1
</color>
<color
name=
"color_FFF2F2F2"
>
#FFF2F2F2
</color>
<color
name=
"color_FFEBECEF"
>
#FFEBECEF
</color>
<color
name=
"color_FFE9EFFF"
>
#FFE9EFFF
</color>
<color
name=
"color_FFFFF3EE"
>
#FFFFF3EE
</color>
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment