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
96bc9bd8
Commit
96bc9bd8
authored
Jun 09, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理员信息页面搭建
parent
9f9c4b02
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
901 additions
and
152 deletions
+901
-152
ActivityExt.kt
...src/main/java/com/yidian/common/extensions/ActivityExt.kt
+36
-0
ViewExt.kt
...mon/src/main/java/com/yidian/common/extensions/ViewExt.kt
+61
-0
icon_back.png
CommonLib/Common/src/main/res/drawable-xxhdpi/icon_back.png
+0
-0
layout_common_toolbar.xml
...nLib/Common/src/main/res/layout/layout_common_toolbar.xml
+40
-0
layout_toolbar_menu.xml
CommonLib/Common/src/main/res/layout/layout_toolbar_menu.xml
+45
-0
dimens.xml
CommonLib/Common/src/main/res/values/dimens.xml
+420
-0
AccountListDto.kt
...shenghuoquan/newscontent/personnel/bean/AccountListDto.kt
+4
-1
ManagerInfoActivity.kt
...nghuoquan/newscontent/personnel/ui/ManagerInfoActivity.kt
+52
-1
MyStaffActivity.kt
.../shenghuoquan/newscontent/personnel/ui/MyStaffActivity.kt
+9
-8
LoginLifeCircleActivity.kt
...an/shenghuoquan/newscontent/ui/LoginLifeCircleActivity.kt
+134
-130
SensitiveInfoUtil.kt
...idian/shenghuoquan/newscontent/utils/SensitiveInfoUtil.kt
+2
-2
NumberWithBorderEditText.kt
...enghuoquan/newscontent/widget/NumberWithBorderEditText.kt
+2
-2
activity_manager_info.xml
...newscontent/src/main/res/layout/activity_manager_info.xml
+83
-4
activity_my_staff.xml
...nts/newscontent/src/main/res/layout/activity_my_staff.xml
+2
-2
layout_common_header.xml
.../newscontent/src/main/res/layout/layout_common_header.xml
+1
-1
menu_manager_change.xml
...nts/newscontent/src/main/res/menu/menu_manager_change.xml
+9
-0
colors.xml
Components/newscontent/src/main/res/values/colors.xml
+1
-1
No files found.
CommonLib/Common/src/main/java/com/yidian/common/extensions/ActivityExt.kt
0 → 100644
View file @
96bc9bd8
package
com.yidian.common.extensions
import
android.app.Activity
import
android.view.inputmethod.InputMethodManager
import
android.widget.TextView
import
androidx.appcompat.app.AppCompatActivity
import
androidx.appcompat.widget.Toolbar
import
com.yidian.common.R
import
com.yidian.xpage.XPageManager
fun
Activity
.
hideKeyBoard
():
Boolean
{
val
mInputMethodManager
=
getSystemService
(
Activity
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
return
if
(
currentFocus
!=
null
)
{
mInputMethodManager
.
hideSoftInputFromWindow
(
currentFocus
!!
.
windowToken
,
0
)
}
else
{
false
}
}
fun
AppCompatActivity
.
initTitleBar
(
toolbar
:
Toolbar
,
textView
:
TextView
,
title
:
String
)
{
toolbar
.
title
=
""
setSupportActionBar
(
toolbar
)
supportActionBar
?.
let
{
it
.
setDisplayHomeAsUpEnabled
(
true
)
it
.
setDisplayShowHomeEnabled
(
true
)
}
toolbar
.
setNavigationIcon
(
R
.
drawable
.
icon_back
)
toolbar
.
setNavigationOnClickListener
{
onBackPressed
()
// 在XPage服务中pop
XPageManager
.
pop
(
null
)
}
// 设置title
textView
.
text
=
title
}
CommonLib/Common/src/main/java/com/yidian/common/extensions/ViewExt.kt
0 → 100644
View file @
96bc9bd8
package
com.yidian.common.extensions
import
android.os.SystemClock
import
android.view.View
import
android.widget.TextView
import
androidx.annotation.ColorRes
import
androidx.core.content.ContextCompat
/**
* 按钮点击防抖
*/
fun
View
?.
clickAntiShake
(
intervalMillis
:
Long
=
300
,
listener
:
(
View
)
->
Unit
)
{
// 最近一次点击的时间
var
lastClickTime
:
Long
=
0
this
?.
setOnClickListener
{
// 自启动以来的毫秒数,包括在睡眠中花费的时间
val
currentTime
=
SystemClock
.
elapsedRealtime
()
if
(
currentTime
-
lastClickTime
>=
intervalMillis
)
{
listener
.
invoke
(
it
)
lastClickTime
=
currentTime
}
}
}
fun
View
.
hide
()
{
this
.
visibility
=
View
.
GONE
}
fun
View
.
show
()
{
this
.
visibility
=
View
.
VISIBLE
}
fun
View
.
toggleVisibility
()
{
if
(
this
.
visibility
==
View
.
GONE
)
{
this
.
show
()
}
else
{
this
.
hide
()
}
}
fun
View
.
toggleVisibility
(
show
:
Boolean
)
{
if
(
show
)
{
this
.
show
()
}
else
{
this
.
hide
()
}
}
fun
View
.
setBgColor
(
@ColorRes
colorId
:
Int
)
{
val
colorInt
=
ContextCompat
.
getColor
(
context
,
colorId
)
setBackgroundColor
(
colorInt
)
}
fun
TextView
.
setFgColor
(
@ColorRes
colorId
:
Int
)
{
val
colorInt
=
ContextCompat
.
getColor
(
context
,
colorId
)
setTextColor
(
colorInt
)
}
fun
TextView
.
clearDrawable
()
{
setCompoundDrawables
(
null
,
null
,
null
,
null
)
}
Com
ponents/newscontent/src/main/res/mipmap
-xxhdpi/icon_back.png
→
Com
monLib/Common/src/main/res/drawable
-xxhdpi/icon_back.png
View file @
96bc9bd8
File moved
CommonLib/Common/src/main/res/layout/layout_common_toolbar.xml
0 → 100644
View file @
96bc9bd8
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"?attr/colorPrimary"
android:fitsSystemWindows=
"true"
android:minHeight=
"50dp"
android:paddingStart=
"@dimen/dp15"
android:paddingEnd=
"@dimen/dp15"
app:layout_scrollFlags=
"scroll|enterAlways"
app:navigationIcon=
"@drawable/icon_back"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:textColor=
"#FF333333"
android:textSize=
"18sp"
tools:text=
"标题"
/>
<TextView
android:id=
"@+id/tv_menu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"#FF333333"
android:textSize=
"16sp"
/>
</androidx.appcompat.widget.Toolbar>
</LinearLayout>
\ No newline at end of file
CommonLib/Common/src/main/res/layout/layout_toolbar_menu.xml
0 → 100644
View file @
96bc9bd8
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp50"
android:background=
"@color/white"
android:fitsSystemWindows=
"true"
android:paddingStart=
"@dimen/dp15"
android:paddingEnd=
"@dimen/dp15"
>
<ImageView
android:id=
"@+id/iv_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp5"
android:src=
"@drawable/icon_back"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"#333333"
android:textSize=
"18sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"标题"
/>
<TextView
android:id=
"@+id/tv_menu"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/dp10"
android:textColor=
"#333333"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"菜单"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
CommonLib/Common/src/main/res/values/dimens.xml
0 → 100755
View file @
96bc9bd8
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--全局toolbar高度-->
<dimen
name=
"toolbar_height"
>
50dp
</dimen>
<!--全局字号-->
<dimen
name=
"sp12"
>
12sp
</dimen>
<dimen
name=
"sp14"
>
14sp
</dimen>
<dimen
name=
"sp15"
>
15sp
</dimen>
<dimen
name=
"sp16"
>
16sp
</dimen>
<dimen
name=
"sp18"
>
18sp
</dimen>
<dimen
name=
"sp20"
>
20sp
</dimen>
<dimen
name=
"sp24"
>
24sp
</dimen>
<dimen
name=
"sp40"
>
40sp
</dimen>
<!--全局间距-->
<dimen
name=
"dp1"
>
1.0dp
</dimen>
<dimen
name=
"dp2"
>
2.0dp
</dimen>
<dimen
name=
"dp3"
>
3.0dp
</dimen>
<dimen
name=
"dp4"
>
4.0dp
</dimen>
<dimen
name=
"dp5"
>
5.0dp
</dimen>
<dimen
name=
"dp6"
>
6.0dp
</dimen>
<dimen
name=
"dp7"
>
7.0dp
</dimen>
<dimen
name=
"dp8"
>
8.0dp
</dimen>
<dimen
name=
"dp9"
>
9.0dp
</dimen>
<dimen
name=
"dp10"
>
10.0dp
</dimen>
<dimen
name=
"dp11"
>
11.0dp
</dimen>
<dimen
name=
"dp12"
>
12.0dp
</dimen>
<dimen
name=
"dp13"
>
13.0dp
</dimen>
<dimen
name=
"dp14"
>
14.0dp
</dimen>
<dimen
name=
"dp15"
>
15.0dp
</dimen>
<dimen
name=
"dp16"
>
16.0dp
</dimen>
<dimen
name=
"dp17"
>
17.0dp
</dimen>
<dimen
name=
"dp18"
>
18.0dp
</dimen>
<dimen
name=
"dp19"
>
19.0dp
</dimen>
<dimen
name=
"dp20"
>
20.0dp
</dimen>
<dimen
name=
"dp21"
>
21.0dp
</dimen>
<dimen
name=
"dp22"
>
22.0dp
</dimen>
<dimen
name=
"dp23"
>
23.0dp
</dimen>
<dimen
name=
"dp24"
>
24.0dp
</dimen>
<dimen
name=
"dp25"
>
25.0dp
</dimen>
<dimen
name=
"dp26"
>
26.0dp
</dimen>
<dimen
name=
"dp27"
>
27.0dp
</dimen>
<dimen
name=
"dp28"
>
28.0dp
</dimen>
<dimen
name=
"dp29"
>
29.0dp
</dimen>
<dimen
name=
"dp30"
>
30.0dp
</dimen>
<dimen
name=
"dp31"
>
31.0dp
</dimen>
<dimen
name=
"dp32"
>
32.0dp
</dimen>
<dimen
name=
"dp33"
>
33.0dp
</dimen>
<dimen
name=
"dp34"
>
34.0dp
</dimen>
<dimen
name=
"dp35"
>
35.0dp
</dimen>
<dimen
name=
"dp36"
>
36.0dp
</dimen>
<dimen
name=
"dp37"
>
37.0dp
</dimen>
<dimen
name=
"dp38"
>
38.0dp
</dimen>
<dimen
name=
"dp39"
>
39.0dp
</dimen>
<dimen
name=
"dp40"
>
40.0dp
</dimen>
<dimen
name=
"dp41"
>
41.0dp
</dimen>
<dimen
name=
"dp42"
>
42.0dp
</dimen>
<dimen
name=
"dp43"
>
43.0dp
</dimen>
<dimen
name=
"dp44"
>
44.0dp
</dimen>
<dimen
name=
"dp45"
>
45.0dp
</dimen>
<dimen
name=
"dp46"
>
46.0dp
</dimen>
<dimen
name=
"dp47"
>
47.0dp
</dimen>
<dimen
name=
"dp48"
>
48.0dp
</dimen>
<dimen
name=
"dp49"
>
49.0dp
</dimen>
<dimen
name=
"dp50"
>
50.0dp
</dimen>
<dimen
name=
"dp51"
>
51.0dp
</dimen>
<dimen
name=
"dp52"
>
52.0dp
</dimen>
<dimen
name=
"dp53"
>
53.0dp
</dimen>
<dimen
name=
"dp54"
>
54.0dp
</dimen>
<dimen
name=
"dp55"
>
55.0dp
</dimen>
<dimen
name=
"dp56"
>
56.0dp
</dimen>
<dimen
name=
"dp57"
>
57.0dp
</dimen>
<dimen
name=
"dp58"
>
58.0dp
</dimen>
<dimen
name=
"dp59"
>
59.0dp
</dimen>
<dimen
name=
"dp60"
>
60.0dp
</dimen>
<dimen
name=
"dp61"
>
61.0dp
</dimen>
<dimen
name=
"dp62"
>
62.0dp
</dimen>
<dimen
name=
"dp63"
>
63.0dp
</dimen>
<dimen
name=
"dp64"
>
64.0dp
</dimen>
<dimen
name=
"dp65"
>
65.0dp
</dimen>
<dimen
name=
"dp66"
>
66.0dp
</dimen>
<dimen
name=
"dp67"
>
67.0dp
</dimen>
<dimen
name=
"dp68"
>
68.0dp
</dimen>
<dimen
name=
"dp69"
>
69.0dp
</dimen>
<dimen
name=
"dp70"
>
70.0dp
</dimen>
<dimen
name=
"dp71"
>
71.0dp
</dimen>
<dimen
name=
"dp72"
>
72.0dp
</dimen>
<dimen
name=
"dp73"
>
73.0dp
</dimen>
<dimen
name=
"dp74"
>
74.0dp
</dimen>
<dimen
name=
"dp75"
>
75.0dp
</dimen>
<dimen
name=
"dp76"
>
76.0dp
</dimen>
<dimen
name=
"dp77"
>
77.0dp
</dimen>
<dimen
name=
"dp78"
>
78.0dp
</dimen>
<dimen
name=
"dp79"
>
79.0dp
</dimen>
<dimen
name=
"dp80"
>
80.0dp
</dimen>
<dimen
name=
"dp81"
>
81.0dp
</dimen>
<dimen
name=
"dp82"
>
82.0dp
</dimen>
<dimen
name=
"dp83"
>
83.0dp
</dimen>
<dimen
name=
"dp84"
>
84.0dp
</dimen>
<dimen
name=
"dp85"
>
85.0dp
</dimen>
<dimen
name=
"dp86"
>
86.0dp
</dimen>
<dimen
name=
"dp87"
>
87.0dp
</dimen>
<dimen
name=
"dp88"
>
88.0dp
</dimen>
<dimen
name=
"dp89"
>
89.0dp
</dimen>
<dimen
name=
"dp90"
>
90.0dp
</dimen>
<dimen
name=
"dp91"
>
91.0dp
</dimen>
<dimen
name=
"dp92"
>
92.0dp
</dimen>
<dimen
name=
"dp93"
>
93.0dp
</dimen>
<dimen
name=
"dp94"
>
94.0dp
</dimen>
<dimen
name=
"dp95"
>
95.0dp
</dimen>
<dimen
name=
"dp96"
>
96.0dp
</dimen>
<dimen
name=
"dp97"
>
97.0dp
</dimen>
<dimen
name=
"dp98"
>
98.0dp
</dimen>
<dimen
name=
"dp99"
>
99.0dp
</dimen>
<dimen
name=
"dp100"
>
100.0dp
</dimen>
<dimen
name=
"dp101"
>
101.0dp
</dimen>
<dimen
name=
"dp102"
>
102.0dp
</dimen>
<dimen
name=
"dp103"
>
103.0dp
</dimen>
<dimen
name=
"dp104"
>
104.0dp
</dimen>
<dimen
name=
"dp105"
>
105.0dp
</dimen>
<dimen
name=
"dp106"
>
106.0dp
</dimen>
<dimen
name=
"dp107"
>
107.0dp
</dimen>
<dimen
name=
"dp108"
>
108.0dp
</dimen>
<dimen
name=
"dp109"
>
109.0dp
</dimen>
<dimen
name=
"dp110"
>
110.0dp
</dimen>
<dimen
name=
"dp111"
>
111.0dp
</dimen>
<dimen
name=
"dp112"
>
112.0dp
</dimen>
<dimen
name=
"dp113"
>
113.0dp
</dimen>
<dimen
name=
"dp114"
>
114.0dp
</dimen>
<dimen
name=
"dp115"
>
115.0dp
</dimen>
<dimen
name=
"dp116"
>
116.0dp
</dimen>
<dimen
name=
"dp117"
>
117.0dp
</dimen>
<dimen
name=
"dp118"
>
118.0dp
</dimen>
<dimen
name=
"dp119"
>
119.0dp
</dimen>
<dimen
name=
"dp120"
>
120.0dp
</dimen>
<dimen
name=
"dp121"
>
121.0dp
</dimen>
<dimen
name=
"dp122"
>
122.0dp
</dimen>
<dimen
name=
"dp123"
>
123.0dp
</dimen>
<dimen
name=
"dp124"
>
124.0dp
</dimen>
<dimen
name=
"dp125"
>
125.0dp
</dimen>
<dimen
name=
"dp126"
>
126.0dp
</dimen>
<dimen
name=
"dp127"
>
127.0dp
</dimen>
<dimen
name=
"dp128"
>
128.0dp
</dimen>
<dimen
name=
"dp129"
>
129.0dp
</dimen>
<dimen
name=
"dp130"
>
130.0dp
</dimen>
<dimen
name=
"dp131"
>
131.0dp
</dimen>
<dimen
name=
"dp132"
>
132.0dp
</dimen>
<dimen
name=
"dp133"
>
133.0dp
</dimen>
<dimen
name=
"dp134"
>
134.0dp
</dimen>
<dimen
name=
"dp135"
>
135.0dp
</dimen>
<dimen
name=
"dp136"
>
136.0dp
</dimen>
<dimen
name=
"dp137"
>
137.0dp
</dimen>
<dimen
name=
"dp138"
>
138.0dp
</dimen>
<dimen
name=
"dp139"
>
139.0dp
</dimen>
<dimen
name=
"dp140"
>
140.0dp
</dimen>
<dimen
name=
"dp141"
>
141.0dp
</dimen>
<dimen
name=
"dp142"
>
142.0dp
</dimen>
<dimen
name=
"dp143"
>
143.0dp
</dimen>
<dimen
name=
"dp144"
>
144.0dp
</dimen>
<dimen
name=
"dp145"
>
145.0dp
</dimen>
<dimen
name=
"dp146"
>
146.0dp
</dimen>
<dimen
name=
"dp147"
>
147.0dp
</dimen>
<dimen
name=
"dp148"
>
148.0dp
</dimen>
<dimen
name=
"dp149"
>
149.0dp
</dimen>
<dimen
name=
"dp150"
>
150.0dp
</dimen>
<dimen
name=
"dp151"
>
151.0dp
</dimen>
<dimen
name=
"dp152"
>
152.0dp
</dimen>
<dimen
name=
"dp153"
>
153.0dp
</dimen>
<dimen
name=
"dp154"
>
154.0dp
</dimen>
<dimen
name=
"dp155"
>
155.0dp
</dimen>
<dimen
name=
"dp156"
>
156.0dp
</dimen>
<dimen
name=
"dp157"
>
157.0dp
</dimen>
<dimen
name=
"dp158"
>
158.0dp
</dimen>
<dimen
name=
"dp159"
>
159.0dp
</dimen>
<dimen
name=
"dp160"
>
160.0dp
</dimen>
<dimen
name=
"dp161"
>
161.0dp
</dimen>
<dimen
name=
"dp162"
>
162.0dp
</dimen>
<dimen
name=
"dp163"
>
163.0dp
</dimen>
<dimen
name=
"dp164"
>
164.0dp
</dimen>
<dimen
name=
"dp165"
>
165.0dp
</dimen>
<dimen
name=
"dp166"
>
166.0dp
</dimen>
<dimen
name=
"dp167"
>
167.0dp
</dimen>
<dimen
name=
"dp168"
>
168.0dp
</dimen>
<dimen
name=
"dp169"
>
169.0dp
</dimen>
<dimen
name=
"dp170"
>
170.0dp
</dimen>
<dimen
name=
"dp171"
>
171.0dp
</dimen>
<dimen
name=
"dp172"
>
172.0dp
</dimen>
<dimen
name=
"dp173"
>
173.0dp
</dimen>
<dimen
name=
"dp174"
>
174.0dp
</dimen>
<dimen
name=
"dp175"
>
175.0dp
</dimen>
<dimen
name=
"dp176"
>
176.0dp
</dimen>
<dimen
name=
"dp177"
>
177.0dp
</dimen>
<dimen
name=
"dp178"
>
178.0dp
</dimen>
<dimen
name=
"dp179"
>
179.0dp
</dimen>
<dimen
name=
"dp180"
>
180.0dp
</dimen>
<dimen
name=
"dp181"
>
181.0dp
</dimen>
<dimen
name=
"dp182"
>
182.0dp
</dimen>
<dimen
name=
"dp183"
>
183.0dp
</dimen>
<dimen
name=
"dp184"
>
184.0dp
</dimen>
<dimen
name=
"dp185"
>
185.0dp
</dimen>
<dimen
name=
"dp186"
>
186.0dp
</dimen>
<dimen
name=
"dp187"
>
187.0dp
</dimen>
<dimen
name=
"dp188"
>
188.0dp
</dimen>
<dimen
name=
"dp189"
>
189.0dp
</dimen>
<dimen
name=
"dp190"
>
190.0dp
</dimen>
<dimen
name=
"dp191"
>
191.0dp
</dimen>
<dimen
name=
"dp192"
>
192.0dp
</dimen>
<dimen
name=
"dp193"
>
193.0dp
</dimen>
<dimen
name=
"dp194"
>
194.0dp
</dimen>
<dimen
name=
"dp195"
>
195.0dp
</dimen>
<dimen
name=
"dp196"
>
196.0dp
</dimen>
<dimen
name=
"dp197"
>
197.0dp
</dimen>
<dimen
name=
"dp198"
>
198.0dp
</dimen>
<dimen
name=
"dp199"
>
199.0dp
</dimen>
<dimen
name=
"dp200"
>
200.0dp
</dimen>
<dimen
name=
"dp201"
>
201.0dp
</dimen>
<dimen
name=
"dp202"
>
202.0dp
</dimen>
<dimen
name=
"dp203"
>
203.0dp
</dimen>
<dimen
name=
"dp204"
>
204.0dp
</dimen>
<dimen
name=
"dp205"
>
205.0dp
</dimen>
<dimen
name=
"dp206"
>
206.0dp
</dimen>
<dimen
name=
"dp207"
>
207.0dp
</dimen>
<dimen
name=
"dp208"
>
208.0dp
</dimen>
<dimen
name=
"dp209"
>
209.0dp
</dimen>
<dimen
name=
"dp210"
>
210.0dp
</dimen>
<dimen
name=
"dp211"
>
211.0dp
</dimen>
<dimen
name=
"dp212"
>
212.0dp
</dimen>
<dimen
name=
"dp213"
>
213.0dp
</dimen>
<dimen
name=
"dp214"
>
214.0dp
</dimen>
<dimen
name=
"dp215"
>
215.0dp
</dimen>
<dimen
name=
"dp216"
>
216.0dp
</dimen>
<dimen
name=
"dp217"
>
217.0dp
</dimen>
<dimen
name=
"dp218"
>
218.0dp
</dimen>
<dimen
name=
"dp219"
>
219.0dp
</dimen>
<dimen
name=
"dp220"
>
220.0dp
</dimen>
<dimen
name=
"dp221"
>
221.0dp
</dimen>
<dimen
name=
"dp222"
>
222.0dp
</dimen>
<dimen
name=
"dp223"
>
223.0dp
</dimen>
<dimen
name=
"dp224"
>
224.0dp
</dimen>
<dimen
name=
"dp225"
>
225.0dp
</dimen>
<dimen
name=
"dp226"
>
226.0dp
</dimen>
<dimen
name=
"dp227"
>
227.0dp
</dimen>
<dimen
name=
"dp228"
>
228.0dp
</dimen>
<dimen
name=
"dp229"
>
229.0dp
</dimen>
<dimen
name=
"dp230"
>
230.0dp
</dimen>
<dimen
name=
"dp231"
>
231.0dp
</dimen>
<dimen
name=
"dp232"
>
232.0dp
</dimen>
<dimen
name=
"dp233"
>
233.0dp
</dimen>
<dimen
name=
"dp234"
>
234.0dp
</dimen>
<dimen
name=
"dp235"
>
235.0dp
</dimen>
<dimen
name=
"dp236"
>
236.0dp
</dimen>
<dimen
name=
"dp237"
>
237.0dp
</dimen>
<dimen
name=
"dp238"
>
238.0dp
</dimen>
<dimen
name=
"dp239"
>
239.0dp
</dimen>
<dimen
name=
"dp240"
>
240.0dp
</dimen>
<dimen
name=
"dp241"
>
241.0dp
</dimen>
<dimen
name=
"dp242"
>
242.0dp
</dimen>
<dimen
name=
"dp243"
>
243.0dp
</dimen>
<dimen
name=
"dp244"
>
244.0dp
</dimen>
<dimen
name=
"dp245"
>
245.0dp
</dimen>
<dimen
name=
"dp246"
>
246.0dp
</dimen>
<dimen
name=
"dp247"
>
247.0dp
</dimen>
<dimen
name=
"dp248"
>
248.0dp
</dimen>
<dimen
name=
"dp249"
>
249.0dp
</dimen>
<dimen
name=
"dp250"
>
250.0dp
</dimen>
<dimen
name=
"dp251"
>
251.0dp
</dimen>
<dimen
name=
"dp252"
>
252.0dp
</dimen>
<dimen
name=
"dp253"
>
253.0dp
</dimen>
<dimen
name=
"dp254"
>
254.0dp
</dimen>
<dimen
name=
"dp255"
>
255.0dp
</dimen>
<dimen
name=
"dp256"
>
256.0dp
</dimen>
<dimen
name=
"dp257"
>
257.0dp
</dimen>
<dimen
name=
"dp258"
>
258.0dp
</dimen>
<dimen
name=
"dp259"
>
259.0dp
</dimen>
<dimen
name=
"dp260"
>
260.0dp
</dimen>
<dimen
name=
"dp261"
>
261.0dp
</dimen>
<dimen
name=
"dp262"
>
262.0dp
</dimen>
<dimen
name=
"dp263"
>
263.0dp
</dimen>
<dimen
name=
"dp264"
>
264.0dp
</dimen>
<dimen
name=
"dp265"
>
265.0dp
</dimen>
<dimen
name=
"dp266"
>
266.0dp
</dimen>
<dimen
name=
"dp267"
>
267.0dp
</dimen>
<dimen
name=
"dp268"
>
268.0dp
</dimen>
<dimen
name=
"dp269"
>
269.0dp
</dimen>
<dimen
name=
"dp270"
>
270.0dp
</dimen>
<dimen
name=
"dp271"
>
271.0dp
</dimen>
<dimen
name=
"dp272"
>
272.0dp
</dimen>
<dimen
name=
"dp273"
>
273.0dp
</dimen>
<dimen
name=
"dp274"
>
274.0dp
</dimen>
<dimen
name=
"dp275"
>
275.0dp
</dimen>
<dimen
name=
"dp276"
>
276.0dp
</dimen>
<dimen
name=
"dp277"
>
277.0dp
</dimen>
<dimen
name=
"dp278"
>
278.0dp
</dimen>
<dimen
name=
"dp279"
>
279.0dp
</dimen>
<dimen
name=
"dp280"
>
280.0dp
</dimen>
<dimen
name=
"dp281"
>
281.0dp
</dimen>
<dimen
name=
"dp282"
>
282.0dp
</dimen>
<dimen
name=
"dp283"
>
283.0dp
</dimen>
<dimen
name=
"dp284"
>
284.0dp
</dimen>
<dimen
name=
"dp285"
>
285.0dp
</dimen>
<dimen
name=
"dp286"
>
286.0dp
</dimen>
<dimen
name=
"dp287"
>
287.0dp
</dimen>
<dimen
name=
"dp288"
>
288.0dp
</dimen>
<dimen
name=
"dp289"
>
289.0dp
</dimen>
<dimen
name=
"dp290"
>
290.0dp
</dimen>
<dimen
name=
"dp291"
>
291.0dp
</dimen>
<dimen
name=
"dp292"
>
292.0dp
</dimen>
<dimen
name=
"dp293"
>
293.0dp
</dimen>
<dimen
name=
"dp294"
>
294.0dp
</dimen>
<dimen
name=
"dp295"
>
295.0dp
</dimen>
<dimen
name=
"dp296"
>
296.0dp
</dimen>
<dimen
name=
"dp297"
>
297.0dp
</dimen>
<dimen
name=
"dp298"
>
298.0dp
</dimen>
<dimen
name=
"dp299"
>
299.0dp
</dimen>
<dimen
name=
"dp300"
>
300.0dp
</dimen>
<dimen
name=
"dp301"
>
301.0dp
</dimen>
<dimen
name=
"dp302"
>
302.0dp
</dimen>
<dimen
name=
"dp303"
>
303.0dp
</dimen>
<dimen
name=
"dp304"
>
304.0dp
</dimen>
<dimen
name=
"dp305"
>
305.0dp
</dimen>
<dimen
name=
"dp306"
>
306.0dp
</dimen>
<dimen
name=
"dp307"
>
307.0dp
</dimen>
<dimen
name=
"dp308"
>
308.0dp
</dimen>
<dimen
name=
"dp309"
>
309.0dp
</dimen>
<dimen
name=
"dp310"
>
310.0dp
</dimen>
<dimen
name=
"dp311"
>
311.0dp
</dimen>
<dimen
name=
"dp312"
>
312.0dp
</dimen>
<dimen
name=
"dp313"
>
313.0dp
</dimen>
<dimen
name=
"dp314"
>
314.0dp
</dimen>
<dimen
name=
"dp315"
>
315.0dp
</dimen>
<dimen
name=
"dp316"
>
316.0dp
</dimen>
<dimen
name=
"dp317"
>
317.0dp
</dimen>
<dimen
name=
"dp318"
>
318.0dp
</dimen>
<dimen
name=
"dp319"
>
319.0dp
</dimen>
<dimen
name=
"dp320"
>
320.0dp
</dimen>
<dimen
name=
"dp321"
>
321.0dp
</dimen>
<dimen
name=
"dp322"
>
322.0dp
</dimen>
<dimen
name=
"dp323"
>
323.0dp
</dimen>
<dimen
name=
"dp324"
>
324.0dp
</dimen>
<dimen
name=
"dp325"
>
325.0dp
</dimen>
<dimen
name=
"dp326"
>
326.0dp
</dimen>
<dimen
name=
"dp327"
>
327.0dp
</dimen>
<dimen
name=
"dp328"
>
328.0dp
</dimen>
<dimen
name=
"dp329"
>
329.0dp
</dimen>
<dimen
name=
"dp330"
>
330.0dp
</dimen>
<dimen
name=
"dp331"
>
331.0dp
</dimen>
<dimen
name=
"dp332"
>
332.0dp
</dimen>
<dimen
name=
"dp333"
>
333.0dp
</dimen>
<dimen
name=
"dp334"
>
334.0dp
</dimen>
<dimen
name=
"dp335"
>
335.0dp
</dimen>
<dimen
name=
"dp336"
>
336.0dp
</dimen>
<dimen
name=
"dp337"
>
337.0dp
</dimen>
<dimen
name=
"dp338"
>
338.0dp
</dimen>
<dimen
name=
"dp339"
>
339.0dp
</dimen>
<dimen
name=
"dp340"
>
340.0dp
</dimen>
<dimen
name=
"dp341"
>
341.0dp
</dimen>
<dimen
name=
"dp342"
>
342.0dp
</dimen>
<dimen
name=
"dp343"
>
343.0dp
</dimen>
<dimen
name=
"dp344"
>
344.0dp
</dimen>
<dimen
name=
"dp345"
>
345.0dp
</dimen>
<dimen
name=
"dp346"
>
346.0dp
</dimen>
<dimen
name=
"dp347"
>
347.0dp
</dimen>
<dimen
name=
"dp348"
>
348.0dp
</dimen>
<dimen
name=
"dp349"
>
349.0dp
</dimen>
<dimen
name=
"dp350"
>
350.0dp
</dimen>
<dimen
name=
"dp351"
>
351.0dp
</dimen>
<dimen
name=
"dp352"
>
352.0dp
</dimen>
<dimen
name=
"dp353"
>
353.0dp
</dimen>
<dimen
name=
"dp354"
>
354.0dp
</dimen>
<dimen
name=
"dp355"
>
355.0dp
</dimen>
<dimen
name=
"dp356"
>
356.0dp
</dimen>
<dimen
name=
"dp357"
>
357.0dp
</dimen>
<dimen
name=
"dp358"
>
358.0dp
</dimen>
<dimen
name=
"dp359"
>
359.0dp
</dimen>
<dimen
name=
"dp360"
>
360.0dp
</dimen>
<dimen
name=
"dp361"
>
361.0dp
</dimen>
<dimen
name=
"dp362"
>
362.0dp
</dimen>
<dimen
name=
"dp363"
>
363.0dp
</dimen>
<dimen
name=
"dp364"
>
364.0dp
</dimen>
<dimen
name=
"dp365"
>
365.0dp
</dimen>
<dimen
name=
"dp366"
>
366.0dp
</dimen>
<dimen
name=
"dp367"
>
367.0dp
</dimen>
<dimen
name=
"dp368"
>
368.0dp
</dimen>
<dimen
name=
"dp369"
>
369.0dp
</dimen>
<dimen
name=
"dp370"
>
370.0dp
</dimen>
<dimen
name=
"dp371"
>
371.0dp
</dimen>
<dimen
name=
"dp372"
>
372.0dp
</dimen>
<dimen
name=
"dp373"
>
373.0dp
</dimen>
<dimen
name=
"dp374"
>
374.0dp
</dimen>
<dimen
name=
"dp375"
>
375.0dp
</dimen>
<dimen
name=
"dp376"
>
376.0dp
</dimen>
<dimen
name=
"dp377"
>
377.0dp
</dimen>
<dimen
name=
"dp378"
>
378.0dp
</dimen>
<dimen
name=
"dp379"
>
379.0dp
</dimen>
<dimen
name=
"dp380"
>
380.0dp
</dimen>
<dimen
name=
"dp381"
>
381.0dp
</dimen>
<dimen
name=
"dp382"
>
382.0dp
</dimen>
<dimen
name=
"dp383"
>
383.0dp
</dimen>
<dimen
name=
"dp384"
>
384.0dp
</dimen>
<dimen
name=
"dp385"
>
385.0dp
</dimen>
<dimen
name=
"dp386"
>
386.0dp
</dimen>
<dimen
name=
"dp387"
>
387.0dp
</dimen>
<dimen
name=
"dp388"
>
388.0dp
</dimen>
<dimen
name=
"dp389"
>
389.0dp
</dimen>
<dimen
name=
"dp390"
>
390.0dp
</dimen>
<dimen
name=
"dp391"
>
391.0dp
</dimen>
<dimen
name=
"dp392"
>
392.0dp
</dimen>
<dimen
name=
"dp393"
>
393.0dp
</dimen>
<dimen
name=
"dp394"
>
394.0dp
</dimen>
<dimen
name=
"dp395"
>
395.0dp
</dimen>
<dimen
name=
"dp396"
>
396.0dp
</dimen>
<dimen
name=
"dp397"
>
397.0dp
</dimen>
<dimen
name=
"dp398"
>
398.0dp
</dimen>
<dimen
name=
"dp399"
>
399.0dp
</dimen>
<dimen
name=
"dp400"
>
400.0dp
</dimen>
</resources>
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/bean/AccountListDto.kt
View file @
96bc9bd8
package
com.yidian.shenghuoquan.newscontent.personnel.bean
package
com.yidian.shenghuoquan.newscontent.personnel.bean
import
android.os.Parcelable
import
com.google.gson.annotations.SerializedName
import
com.google.gson.annotations.SerializedName
import
kotlinx.android.parcel.Parcelize
/**
/**
* 账号列表数据类
* 账号列表数据类
...
@@ -12,6 +14,7 @@ data class AccountListDto(
...
@@ -12,6 +14,7 @@ data class AccountListDto(
val
users
:
List
<
AccountUser
>?
=
null
val
users
:
List
<
AccountUser
>?
=
null
)
)
@Parcelize
data class
AccountAdmin
(
data class
AccountAdmin
(
@SerializedName
(
"life_account_id"
)
@SerializedName
(
"life_account_id"
)
val
lifeAccountId
:
Long
?
=
null
,
val
lifeAccountId
:
Long
?
=
null
,
...
@@ -29,7 +32,7 @@ data class AccountAdmin(
...
@@ -29,7 +32,7 @@ data class AccountAdmin(
val
showButton
:
Int
?
=
null
,
val
showButton
:
Int
?
=
null
,
@SerializedName
(
"user_id"
)
@SerializedName
(
"user_id"
)
val
userId
:
Long
?
=
null
val
userId
:
Long
?
=
null
)
)
:
Parcelable
data class
AccountUser
(
data class
AccountUser
(
@SerializedName
(
"life_account_id"
)
@SerializedName
(
"life_account_id"
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/ManagerInfoActivity.kt
View file @
96bc9bd8
package
com.yidian.shenghuoquan.newscontent.personnel.ui
package
com.yidian.shenghuoquan.newscontent.personnel.ui
import
android.content.Intent
import
android.os.Bundle
import
androidx.core.content.ContextCompat
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MANAGER_INFO
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MANAGER_INFO
import
com.yidian.common.base.BaseActivity
import
com.yidian.common.base.BaseActivity
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityManagerInfoBinding
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityManagerInfoBinding
import
com.yidian.shenghuoquan.newscontent.personnel.bean.AccountAdmin
import
com.yidian.shenghuoquan.newscontent.utils.SensitiveInfoUtil
import
com.yidian.xpage.XPageManager
/**
/**
* 人员管理 —— 管理员信息
* 人员管理 —— 管理员信息
*/
*/
class
ManagerInfoActivity
:
BaseActivity
<
ActivityManagerInfoBinding
>()
{
class
ManagerInfoActivity
:
BaseActivity
<
ActivityManagerInfoBinding
>()
{
private
var
managerMobile
:
String
=
""
override
fun
createViewBinding
():
ActivityManagerInfoBinding
{
override
fun
createViewBinding
():
ActivityManagerInfoBinding
{
return
ActivityManagerInfoBinding
.
inflate
(
layoutInflater
)
return
ActivityManagerInfoBinding
.
inflate
(
layoutInflater
)
...
@@ -17,4 +27,45 @@ class ManagerInfoActivity: BaseActivity<ActivityManagerInfoBinding>() {
...
@@ -17,4 +27,45 @@ class ManagerInfoActivity: BaseActivity<ActivityManagerInfoBinding>() {
return
PERSONAL_MANAGER_INFO
return
PERSONAL_MANAGER_INFO
}
}
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
super
.
init
(
savedInstanceState
)
initTitle
()
getIntentData
(
intent
)
}
private
fun
initTitle
()
{
viewBind
.
include
.
tvTitle
.
text
=
"管理员信息"
viewBind
.
include
.
ivBack
.
setOnClickListener
{
XPageManager
.
pop
(
null
)
}
viewBind
.
include
.
tvMenu
.
text
=
"更换"
viewBind
.
include
.
tvMenu
.
setOnClickListener
{
val
hashMap
=
HashMap
<
String
,
String
?>()
hashMap
[
"mobile"
]
=
managerMobile
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_MANAGER_CHANGE
,
hashMap
)
}
viewBind
.
include
.
tvMenu
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_1852F1
))
}
private
fun
getIntentData
(
intent
:
Intent
?)
{
val
paramsMap
=
intent
?.
getSerializableExtra
(
XRouterPathConstants
.
ParamsKey
)
if
(
paramsMap
!=
null
)
{
paramsMap
as
HashMap
<*,
*>
val
managerInfo
=
paramsMap
[
"managerInfo"
]
as
AccountAdmin
viewBind
.
tvUserName
.
text
=
managerInfo
.
nickName
viewBind
.
tvLoginAccount
.
text
=
managerInfo
.
mobile
?.
let
{
managerMobile
=
it
SensitiveInfoUtil
.
mobileEncrypt
(
it
)
}
val
sb
=
StringBuilder
()
managerInfo
.
roleList
?.
forEachIndexed
{
index
,
s
->
sb
.
append
(
s
)
if
(
index
<
managerInfo
.
roleList
.
size
-
1
)
{
sb
.
append
(
"|"
)
}
}
viewBind
.
tvCurrentRole
.
text
=
sb
}
}
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/MyStaffActivity.kt
View file @
96bc9bd8
...
@@ -4,6 +4,7 @@ import android.os.Bundle
...
@@ -4,6 +4,7 @@ import android.os.Bundle
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.XRouterPathConstants
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MY_STAFF
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MY_STAFF
import
com.yidian.common.base.BaseActivity
import
com.yidian.common.base.BaseActivity
import
com.yidian.common.extensions.initTitleBar
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityMyStaffBinding
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityMyStaffBinding
import
com.yidian.shenghuoquan.newscontent.personnel.adapter.MyStaffListAdapter
import
com.yidian.shenghuoquan.newscontent.personnel.adapter.MyStaffListAdapter
...
@@ -44,14 +45,11 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
...
@@ -44,14 +45,11 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
}
}
private
fun
initView
()
{
private
fun
initView
()
{
viewBind
.
layoutCommonHeader
.
tvTitle
.
text
=
resources
.
getString
(
R
.
string
.
my_staff
)
initTitleBar
(
viewBind
.
include
.
toolbar
,
viewBind
.
include
.
tvTitle
,
resources
.
getString
(
R
.
string
.
my_staff
)
)
viewBind
.
rvStaffList
.
adapter
=
myStaffAdapter
viewBind
.
rvStaffList
.
adapter
=
myStaffAdapter
}
}
private
fun
initClick
()
{
private
fun
initClick
()
{
viewBind
.
layoutCommonHeader
.
ivBack
.
setOnClickListener
{
XPageManager
.
pop
(
null
)
}
// 管理员信息
// 管理员信息
viewBind
.
clManager
.
setOnClickListener
{
viewBind
.
clManager
.
setOnClickListener
{
managerInfo
?.
let
{
managerInfo
?.
let
{
...
@@ -87,11 +85,14 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
...
@@ -87,11 +85,14 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
private
fun
initManager
(
admin
:
AccountAdmin
)
{
private
fun
initManager
(
admin
:
AccountAdmin
)
{
viewBind
.
tvName
.
text
=
admin
.
nickName
viewBind
.
tvName
.
text
=
admin
.
nickName
viewBind
.
tvMobile
.
text
=
admin
.
mobile
viewBind
.
tvMobile
.
text
=
admin
.
mobile
val
stringBuilder
=
StringBuilder
()
val
sb
=
StringBuilder
()
admin
.
roleList
?.
forEach
{
admin
.
roleList
?.
forEachIndexed
{
index
,
s
->
stringBuilder
.
append
(
"$it|"
)
sb
.
append
(
s
)
if
(
index
<
admin
.
roleList
.
size
-
1
)
{
sb
.
append
(
"|"
)
}
}
}
viewBind
.
tvRole
.
text
=
s
tringBuilder
viewBind
.
tvRole
.
text
=
s
b
}
}
override
fun
getAccountListFailure
(
message
:
String
?)
{
override
fun
getAccountListFailure
(
message
:
String
?)
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/LoginLifeCircleActivity.kt
View file @
96bc9bd8
...
@@ -15,6 +15,7 @@ import com.yidian.shenghuoquan.newscontent.http.ApiService
...
@@ -15,6 +15,7 @@ import com.yidian.shenghuoquan.newscontent.http.ApiService
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AccountItemBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.AccountItemBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.IMobileLoginCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.IMobileLoginCallback
import
com.yidian.shenghuoquan.newscontent.http.httpbean.MobileLoginBean
import
com.yidian.shenghuoquan.newscontent.http.httpbean.MobileLoginBean
import
com.yidian.shenghuoquan.newscontent.personnel.bean.AccountAdmin
import
com.yidian.shenghuoquan.newscontent.utils.CountDownTimerUtils
import
com.yidian.shenghuoquan.newscontent.utils.CountDownTimerUtils
import
com.yidian.shenghuoquan.newscontent.utils.TextWatcherAdapter
import
com.yidian.shenghuoquan.newscontent.utils.TextWatcherAdapter
import
com.yidian.utils.ToastUtil
import
com.yidian.utils.ToastUtil
...
@@ -26,153 +27,156 @@ import com.yidian.xpage.XPageManager
...
@@ -26,153 +27,156 @@ import com.yidian.xpage.XPageManager
* Describe:短信登陆页面
* Describe:短信登陆页面
*/
*/
class
LoginLifeCircleActivity
:
BaseActivity
<
ActivityLoginBinding
>()
{
class
LoginLifeCircleActivity
:
BaseActivity
<
ActivityLoginBinding
>()
{
private
lateinit
var
mCountDownTimerUtils
:
CountDownTimerUtils
private
lateinit
var
mCountDownTimerUtils
:
CountDownTimerUtils
private
var
mobileFinish
=
false
private
var
mobileFinish
=
false
private
var
codeFinish
=
false
private
var
codeFinish
=
false
private
var
protocolAgree
=
false
private
var
protocolAgree
=
false
override
fun
createViewBinding
():
ActivityLoginBinding
{
override
fun
createViewBinding
():
ActivityLoginBinding
{
return
ActivityLoginBinding
.
inflate
(
layoutInflater
)
return
ActivityLoginBinding
.
inflate
(
layoutInflater
)
}
override
fun
getXPageName
():
String
{
return
LOGIN_LIFE_CIRCLE
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
initView
()
setOnListener
()
}
private
fun
initView
()
{
setLoginButtonStatus
(
false
)
mCountDownTimerUtils
=
CountDownTimerUtils
(
viewBind
.
tvGetCode
,
60000
,
1000
)
}
private
fun
setOnListener
()
{
viewBind
.
tvGetCode
.
setOnClickListener
{
val
mobile
=
viewBind
.
etMobileNo
.
text
.
toString
().
replace
(
" "
,
""
)
if
(
mobile
.
length
==
11
)
{
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"mobile"
]
=
mobile
ApiService
.
sendMsgCode
(
loginImpl
,
paramsMap
)
}
else
{
ToastUtil
.
showToast
(
this
,
"请输入11位手机号"
)
}
}
}
override
fun
getXPageName
():
String
{
viewBind
.
etMobileNo
.
addTextChangedListener
(
PhoneNumberTextWatcher
(
viewBind
.
etMobileNo
,
object
:
EditTextInputCallback
{
return
LOGIN_LIFE_CIRCLE
override
fun
inputCallback
(
s
:
String
)
{
if
(
s
.
length
==
13
)
{
mobileFinish
=
true
changeLoginButtonStatus
()
}
else
if
(
mobileFinish
)
{
mobileFinish
=
false
changeLoginButtonStatus
()
}
}
}))
viewBind
.
etCode
.
addTextChangedListener
(
object
:
TextWatcherAdapter
()
{
override
fun
onTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
before
:
Int
,
count
:
Int
)
{
if
(
s
?.
length
==
6
)
{
codeFinish
=
true
changeLoginButtonStatus
()
}
else
if
(
codeFinish
)
{
codeFinish
=
false
changeLoginButtonStatus
()
}
}
})
viewBind
.
tvLogin
.
setOnClickListener
{
val
mobile
=
viewBind
.
etMobileNo
.
text
.
toString
().
replace
(
" "
,
""
)
val
code
=
viewBind
.
etCode
.
text
.
toString
()
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"mobile"
]
=
mobile
paramsMap
[
"code"
]
=
code
ApiService
.
mobileLogin
(
loginImpl
,
paramsMap
)
}
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
viewBind
.
cbProtocol
.
setOnCheckedChangeListener
{
buttonView
,
isChecked
->
super
.
onCreate
(
savedInstanceState
)
protocolAgree
=
isChecked
initView
()
changeLoginButtonStatus
()
setOnListener
()
}
}
private
fun
initView
()
{
viewBind
.
tvProtocol
.
setOnClickListener
{
setLoginButtonStatus
(
false
)
ToastUtil
.
showToast
(
this
,
"用户协议"
)
mCountDownTimerUtils
=
CountDownTimerUtils
(
viewBind
.
tvGetCode
,
60000
,
1000
)
}
}
private
fun
setOnListener
()
{
viewBind
.
tvPrivacy
.
setOnClickListener
{
viewBind
.
tvGetCode
.
setOnClickListener
{
ToastUtil
.
showToast
(
this
,
"隐私政策"
)
val
mobile
=
viewBind
.
etMobileNo
.
text
.
toString
().
replace
(
" "
,
""
)
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_IDENTITY
,
null
)
if
(
mobile
.
length
==
11
){
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"mobile"
]
=
mobile
ApiService
.
sendMsgCode
(
loginImpl
,
paramsMap
)
}
else
{
ToastUtil
.
showToast
(
this
,
"请输入11位手机号"
)
}
}
viewBind
.
etMobileNo
.
addTextChangedListener
(
PhoneNumberTextWatcher
(
viewBind
.
etMobileNo
,
object
:
EditTextInputCallback
{
override
fun
inputCallback
(
s
:
String
)
{
if
(
s
.
length
==
13
){
mobileFinish
=
true
changeLoginButtonStatus
()
}
else
if
(
mobileFinish
){
mobileFinish
=
false
changeLoginButtonStatus
()
}
}
}))
viewBind
.
etCode
.
addTextChangedListener
(
object
:
TextWatcherAdapter
(){
override
fun
onTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
before
:
Int
,
count
:
Int
)
{
if
(
s
?.
length
==
6
){
codeFinish
=
true
changeLoginButtonStatus
()
}
else
if
(
codeFinish
){
codeFinish
=
false
changeLoginButtonStatus
()
}
}
})
viewBind
.
tvLogin
.
setOnClickListener
{
val
mobile
=
viewBind
.
etMobileNo
.
text
.
toString
().
replace
(
" "
,
""
)
val
code
=
viewBind
.
etCode
.
text
.
toString
()
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"mobile"
]
=
mobile
paramsMap
[
"code"
]
=
code
ApiService
.
mobileLogin
(
loginImpl
,
paramsMap
)
}
viewBind
.
cbProtocol
.
setOnCheckedChangeListener
{
buttonView
,
isChecked
->
protocolAgree
=
isChecked
changeLoginButtonStatus
()
}
viewBind
.
tvProtocol
.
setOnClickListener
{
ToastUtil
.
showToast
(
this
,
"用户协议"
)
}
viewBind
.
tvPrivacy
.
setOnClickListener
{
ToastUtil
.
showToast
(
this
,
"隐私政策"
)
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_IDENTITY
,
null
)
}
}
}
}
private
fun
changeLoginButtonStatus
(){
private
fun
changeLoginButtonStatus
()
{
if
(
mobileFinish
&&
codeFinish
&&
protocolAgree
){
if
(
mobileFinish
&&
codeFinish
&&
protocolAgree
)
{
setLoginButtonStatus
(
true
)
setLoginButtonStatus
(
true
)
}
else
{
}
else
{
setLoginButtonStatus
(
false
)
setLoginButtonStatus
(
false
)
}
}
}
}
private
fun
setLoginButtonStatus
(
flag
:
Boolean
){
if
(
flag
)
{
private
fun
setLoginButtonStatus
(
flag
:
Boolean
)
{
viewBind
.
tvLogin
.
alpha
=
1.0f
if
(
flag
)
{
viewBind
.
tvLogin
.
isEnabled
=
true
viewBind
.
tvLogin
.
alpha
=
1.0f
}
else
{
viewBind
.
tvLogin
.
isEnabled
=
true
viewBind
.
tvLogin
.
alpha
=
0.32f
}
else
{
viewBind
.
tvLogin
.
isEnabled
=
false
viewBind
.
tvLogin
.
alpha
=
0.32f
}
viewBind
.
tvLogin
.
isEnabled
=
false
}
}
}
private
fun
getAccountList
()
{
private
fun
getAccountList
()
{
ApiService
.
getAccountList
(
loginImpl
)
ApiService
.
getAccountList
(
loginImpl
)
}
}
private
val
loginImpl
=
object
:
IMobileLoginCallback
{
private
val
loginImpl
=
object
:
IMobileLoginCallback
{
override
fun
sendSmsCodeCallBack
(
t
:
HttpResult
<
Any
?
>?)
{
override
fun
sendSmsCodeCallBack
(
t
:
HttpResult
<
Any
?
>?)
{
if
(
t
?.
code
==
0
)
{
if
(
t
?.
code
==
0
)
{
mCountDownTimerUtils
.
start
()
mCountDownTimerUtils
.
start
()
}
}
}
}
override
fun
mobileLoginCallBack
(
t
:
HttpResult
<
MobileLoginBean
.
Response
?
>?)
{
override
fun
mobileLoginCallBack
(
t
:
HttpResult
<
MobileLoginBean
.
Response
?
>?)
{
val
loginResponse
=
t
?.
result
val
loginResponse
=
t
?.
result
Hawk
.
put
(
HawkConfig
.
LoginStatus
,
true
)
Hawk
.
put
(
HawkConfig
.
LoginStatus
,
true
)
Hawk
.
put
(
HawkConfig
.
UserId
,
loginResponse
?.
user_id
)
Hawk
.
put
(
HawkConfig
.
UserId
,
loginResponse
?.
user_id
)
Hawk
.
put
(
HawkConfig
.
Mobile
,
loginResponse
?.
mobile
)
Hawk
.
put
(
HawkConfig
.
Mobile
,
loginResponse
?.
mobile
)
Hawk
.
put
(
HawkConfig
.
Nickname
,
loginResponse
?.
nick_name
)
Hawk
.
put
(
HawkConfig
.
Nickname
,
loginResponse
?.
nick_name
)
Hawk
.
put
(
HawkConfig
.
Avatar
,
loginResponse
?.
avatar
)
Hawk
.
put
(
HawkConfig
.
Avatar
,
loginResponse
?.
avatar
)
getAccountList
()
getAccountList
()
}
}
override
fun
getAccountListCallBack
(
t
:
HttpResult
<
ArrayList
<
AccountItemBean
>?>?)
{
override
fun
getAccountListCallBack
(
t
:
HttpResult
<
ArrayList
<
AccountItemBean
>?>?)
{
val
accountList
=
t
?.
result
val
accountList
=
t
?.
result
if
(
accountList
!=
null
){
if
(
accountList
!=
null
)
{
when
(
accountList
.
size
){
when
(
accountList
.
size
)
{
0
->
{
//没有身份
0
->
{
//没有身份
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_AUTH
,
null
)
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_AUTH
,
null
)
}
}
1
->
{
//一个身份
1
->
{
//一个身份
val
paramsMap
=
HashMap
<
String
,
Any
?>()
val
paramsMap
=
HashMap
<
String
,
Any
?>()
paramsMap
[
"accountList"
]
=
accountList
paramsMap
[
"accountList"
]
=
accountList
}
}
else
->
{
//多个身份
else
->
{
//多个身份
val
paramsMap
=
HashMap
<
String
,
Any
?>()
val
paramsMap
=
HashMap
<
String
,
Any
?>()
paramsMap
[
"accountList"
]
=
accountList
paramsMap
[
"accountList"
]
=
accountList
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_IDENTITY
,
paramsMap
)
XPageManager
.
push
(
XRouterPathConstants
.
LIFE_ACCOUNT_IDENTITY
,
paramsMap
)
}
}
}
}
}
}
}
}
}
}
// todo 测试人员管理的入口,后续删除
// todo 测试人员管理的入口,后续删除
fun
testPersonalManagement
(
view
:
View
)
{
fun
testPersonalManagement
(
view
:
View
)
{
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_MY_STAFF
,
null
)
// XPageManager.push(XRouterPathConstants.PERSONAL_MY_STAFF, null)
}
val
hashMap
=
HashMap
<
String
,
Any
?>()
hashMap
[
"managerInfo"
]
=
AccountAdmin
(
nickName
=
"电视机厂你的烦恼"
,
mobile
=
"19936635225"
,
roleList
=
mutableListOf
(
"胸大"
,
"熊二"
))
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_MANAGER_INFO
,
hashMap
)
}
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/utils/SensitiveInfoUtil.kt
View file @
96bc9bd8
...
@@ -23,7 +23,7 @@ object SensitiveInfoUtil {
...
@@ -23,7 +23,7 @@ object SensitiveInfoUtil {
if
(
content
.
isBlank
()
||
content
.
length
<
18
)
{
if
(
content
.
isBlank
()
||
content
.
length
<
18
)
{
return
content
return
content
}
}
return
content
.
replace
(
"(?<=\\w{3})\\w(?=\\w{4})"
,
"*"
);
return
content
.
replace
(
(
"(?<=\\w{3})\\w(?=\\w{4})"
).
toRegex
()
,
"*"
);
}
}
/**
/**
...
@@ -33,7 +33,7 @@ object SensitiveInfoUtil {
...
@@ -33,7 +33,7 @@ object SensitiveInfoUtil {
if
(
mobile
.
isBlank
()
||
mobile
.
length
!=
11
)
{
if
(
mobile
.
isBlank
()
||
mobile
.
length
!=
11
)
{
return
mobile
return
mobile
}
}
return
mobile
.
replace
(
"(\\d{3})\\d{4}(\\d{4})"
,
"$1****$2"
)
return
mobile
.
replace
(
(
"(\\d{3})\\d{4}(\\d{4})"
).
toRegex
()
,
"$1****$2"
)
}
}
}
}
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/NumberWithBorderEditText.kt
View file @
96bc9bd8
...
@@ -37,7 +37,7 @@ class NumberWithBorderEditText @JvmOverloads constructor(
...
@@ -37,7 +37,7 @@ class NumberWithBorderEditText @JvmOverloads constructor(
private
var
textPaint
:
Paint
private
var
textPaint
:
Paint
private
val
textSizeReal
=
16
private
val
textSizeReal
=
16
private
var
borderStroke
=
3f
private
var
borderStroke
=
3f
private
val
selectedBorderColor
=
context
.
resources
.
getColor
(
R
.
color
.
edit_text_border_blue
)
private
val
selectedBorderColor
=
context
.
resources
.
getColor
(
R
.
color
.
color_1852F1
)
private
val
normalBorderColor
=
context
.
resources
.
getColor
(
R
.
color
.
edit_text_border_gray
)
private
val
normalBorderColor
=
context
.
resources
.
getColor
(
R
.
color
.
edit_text_border_gray
)
private
val
textColor
=
context
.
resources
.
getColor
(
R
.
color
.
gray_333
)
private
val
textColor
=
context
.
resources
.
getColor
(
R
.
color
.
gray_333
)
private
val
borderWidth
=
YdUiUtils
.
dip2px
(
24
,
context
)
private
val
borderWidth
=
YdUiUtils
.
dip2px
(
24
,
context
)
...
@@ -166,4 +166,4 @@ class NumberWithBorderEditText @JvmOverloads constructor(
...
@@ -166,4 +166,4 @@ class NumberWithBorderEditText @JvmOverloads constructor(
return
""
return
""
}
}
}
}
}
}
\ No newline at end of file
Components/newscontent/src/main/res/layout/activity_manager_info.xml
View file @
96bc9bd8
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_height=
"match_parent"
>
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:fitsSystemWindows=
"true"
android:orientation=
"vertical"
>
</androidx.constraintlayout.widget.ConstraintLayout>
<include
\ No newline at end of file
android:id=
"@+id/include"
layout=
"@layout/layout_toolbar_menu"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp60"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"@dimen/dp120"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:text=
"用户名"
android:textColor=
"@color/color_666666"
android:textSize=
"@dimen/sp16"
/>
<TextView
android:id=
"@+id/tv_user_name"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:textColor=
"@color/color_333333"
android:textSize=
"@dimen/sp16"
tools:text=
"店老大"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp60"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"@dimen/dp120"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:text=
"登录账号"
android:textColor=
"@color/color_666666"
android:textSize=
"@dimen/sp16"
/>
<TextView
android:id=
"@+id/tv_login_account"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:textColor=
"@color/color_333333"
android:textSize=
"@dimen/sp16"
tools:text=
"店老大"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp60"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"@dimen/dp120"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:text=
"当前角色"
android:textColor=
"@color/color_666666"
android:textSize=
"@dimen/sp16"
/>
<TextView
android:id=
"@+id/tv_current_role"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:textColor=
"@color/color_333333"
android:textSize=
"@dimen/sp16"
tools:text=
"超级管理员"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/activity_my_staff.xml
View file @
96bc9bd8
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
<include
android:id=
"@+id/
layout_common_header
"
android:id=
"@+id/
include
"
layout=
"@layout/layout_common_
heade
r"
/>
layout=
"@layout/layout_common_
toolba
r"
/>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
Components/newscontent/src/main/res/layout/layout_common_header.xml
View file @
96bc9bd8
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
android:layout_width=
"27dp"
android:layout_width=
"27dp"
android:layout_height=
"27dp"
android:layout_height=
"27dp"
android:layout_marginStart=
"19dp"
android:layout_marginStart=
"19dp"
android:src=
"@
mipmap
/icon_back"
android:src=
"@
drawable
/icon_back"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
Components/newscontent/src/main/res/menu/menu_manager_change.xml
0 → 100644
View file @
96bc9bd8
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/menu_manager_change"
android:title=
"更换"
android:orderInCategory=
"80"
app:showAsAction=
"ifRoom"
/>
</menu>
\ No newline at end of file
Components/newscontent/src/main/res/values/colors.xml
View file @
96bc9bd8
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<color
name=
"red_account_tips"
>
#FF3A3A
</color>
<color
name=
"red_account_tips"
>
#FF3A3A
</color>
<color
name=
"account_hint"
>
#c2c2c2
</color>
<color
name=
"account_hint"
>
#c2c2c2
</color>
<color
name=
"base"
>
#FF1852F1
</color>
<color
name=
"base"
>
#FF1852F1
</color>
<color
name=
"
edit_text_border_blue
"
>
#1852F1
</color>
<color
name=
"
color_1852F1
"
>
#1852F1
</color>
<color
name=
"edit_text_border_gray"
>
#cccccc
</color>
<color
name=
"edit_text_border_gray"
>
#cccccc
</color>
<color
name=
"color_F5F6F7"
>
#F5F5F5
</color>
<color
name=
"color_F5F6F7"
>
#F5F5F5
</color>
<color
name=
"color_1A000000"
>
#1A000000
</color>
<color
name=
"color_1A000000"
>
#1A000000
</color>
...
...
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