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
603713fd
Commit
603713fd
authored
Jun 07, 2021
by
shiyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add新建人员管理模块并搭建我的员工页面
parent
7a19c715
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
183 additions
and
38 deletions
+183
-38
XRouterPathConstants.kt
...n/src/main/java/com/yidian/common/XRouterPathConstants.kt
+3
-0
AndroidManifest.xml
Components/newscontent/src/main/AndroidManifest.xml
+4
-0
NewsContentApplication.kt
...an/shenghuoquan/newscontent/app/NewsContentApplication.kt
+14
-0
AccountListDto.kt
...shenghuoquan/newscontent/personnel/bean/AccountListDto.kt
+51
-0
MyStaffActivity.kt
.../shenghuoquan/newscontent/personnel/ui/MyStaffActivity.kt
+27
-0
LoginLifeCircleActivity.kt
...an/shenghuoquan/newscontent/ui/LoginLifeCircleActivity.kt
+7
-0
activity_login.xml
...onents/newscontent/src/main/res/layout/activity_login.xml
+46
-36
activity_my_staff.xml
...nts/newscontent/src/main/res/layout/activity_my_staff.xml
+23
-0
layout_common_header.xml
.../newscontent/src/main/res/layout/layout_common_header.xml
+2
-1
dimens.xml
Components/newscontent/src/main/res/values/dimens.xml
+3
-1
proguard-rules.pro
app/proguard-rules.pro
+3
-0
No files found.
CommonLib/Common/src/main/java/com/yidian/common/XRouterPathConstants.kt
View file @
603713fd
...
...
@@ -25,5 +25,8 @@ class XRouterPathConstants {
const
val
LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE
=
"/lifeAccountEnterpriseAuthComplete"
const
val
LIFE_ACCOUNT_ENTERPRISE_AUTH
=
"/lifeAccountEnterpriseAuth"
const
val
LIFE_NUMBER
=
"/lifeNumberActivity"
// 人员管理 —— 我的员工
const
val
PERSONAL_MY_STAFF
=
"/personal/myStaffActivity"
}
}
\ No newline at end of file
Components/newscontent/src/main/AndroidManifest.xml
View file @
603713fd
...
...
@@ -96,6 +96,10 @@
android:name=
".ui.auth.LifeAccountEnterpriseAuthActivity"
android:theme=
"@style/Transparent"
/>
<activity
android:name=
".personnel.ui.MyStaffActivity"
android:theme=
"@style/Transparent"
/>
</application>
</manifest>
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/app/NewsContentApplication.kt
View file @
603713fd
...
...
@@ -15,11 +15,13 @@ import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_PERSONAL_AU
import
com.yidian.common.XRouterPathConstants.Companion.LOGIN_LIFE_CIRCLE
import
com.yidian.common.XRouterPathConstants.Companion.NEWS_CONTENT
import
com.yidian.common.XRouterPathConstants.Companion.NEWS_MAIN
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MY_STAFF
import
com.yidian.common.XRouterPathConstants.Companion.PROTOCOL
import
com.yidian.common.XRouterPathConstants.Companion.SUPPORT
import
com.yidian.common.YdBaseApplication
import
com.yidian.news.util.ProcessUtil
import
com.yidian.nightmode.util.NightModeUtil
import
com.yidian.shenghuoquan.newscontent.personnel.ui.MyStaffActivity
import
com.yidian.shenghuoquan.newscontent.service.*
import
com.yidian.shenghuoquan.newscontent.ui.*
import
com.yidian.shenghuoquan.newscontent.ui.auth.*
...
...
@@ -220,6 +222,18 @@ class NewsContentApplication : YdBaseApplication() {
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
context
.
startActivity
(
intent
)
}
}),
// 人员管理 —— 我的员工
XPageNode
(
PERSONAL_MY_STAFF
,
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
,
MyStaffActivity
::
class
.
java
)
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
context
.
startActivity
(
intent
)
}
})
)
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/bean/AccountListDto.kt
0 → 100644
View file @
603713fd
package
com.yidian.shenghuoquan.newscontent.personnel.bean
import
com.google.gson.annotations.SerializedName
/**
* 账号列表数据类
*/
data class
AccountListDto
(
@SerializedName
(
"admin"
)
val
admin
:
List
<
Admin
>?
=
null
,
@SerializedName
(
"users"
)
val
users
:
List
<
User
>?
=
null
)
data class
Admin
(
@SerializedName
(
"life_account_id"
)
val
lifeAccountId
:
Long
?
=
null
,
@SerializedName
(
"merchant_id"
)
val
merchantId
:
Int
?
=
null
,
@SerializedName
(
"mobile"
)
val
mobile
:
String
?
=
null
,
@SerializedName
(
"nick_name"
)
val
nickName
:
String
?
=
null
,
@SerializedName
(
"role_list"
)
val
roleList
:
List
<
String
>?
=
null
,
@SerializedName
(
"role_type"
)
val
roleType
:
Int
?
=
null
,
@SerializedName
(
"show_button"
)
val
showButton
:
Int
?
=
null
,
@SerializedName
(
"user_id"
)
val
userId
:
Long
?
=
null
)
data class
User
(
@SerializedName
(
"life_account_id"
)
val
lifeAccountId
:
Long
?
=
null
,
@SerializedName
(
"merchant_id"
)
val
merchantId
:
Int
?
=
null
,
@SerializedName
(
"mobile"
)
val
mobile
:
String
?
=
null
,
@SerializedName
(
"nick_name"
)
val
nickName
:
String
?
=
null
,
@SerializedName
(
"role_list"
)
val
roleList
:
List
<
String
>?
=
null
,
@SerializedName
(
"role_type"
)
val
roleType
:
Int
?
=
null
,
@SerializedName
(
"show_button"
)
val
showButton
:
Int
?
=
null
,
@SerializedName
(
"user_id"
)
val
userId
:
Int
?
=
null
)
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/MyStaffActivity.kt
0 → 100644
View file @
603713fd
package
com.yidian.shenghuoquan.newscontent.personnel.ui
import
android.os.Bundle
import
com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MY_STAFF
import
com.yidian.common.base.BaseActivity
import
com.yidian.shenghuoquan.newscontent.databinding.ActivityMyStaffBinding
/**
* 人员管理 —— 我的员工页面
*/
class
MyStaffActivity
:
BaseActivity
<
ActivityMyStaffBinding
>()
{
override
fun
createViewBinding
():
ActivityMyStaffBinding
{
return
ActivityMyStaffBinding
.
inflate
(
layoutInflater
)
}
override
fun
getXPageName
():
String
{
return
PERSONAL_MY_STAFF
}
override
fun
init
(
savedInstanceState
:
Bundle
?)
{
super
.
init
(
savedInstanceState
)
// 请求账号列表
}
}
\ No newline at end of file
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/LoginLifeCircleActivity.kt
View file @
603713fd
package
com.yidian.shenghuoquan.newscontent.ui
import
android.os.Bundle
import
android.view.View
import
com.orhanobut.hawk.Hawk
import
com.yidian.common.HawkConfig
import
com.yidian.common.XRouterPathConstants
...
...
@@ -168,4 +169,10 @@ class LoginLifeCircleActivity : BaseActivity<ActivityLoginBinding>() {
}
}
}
// todo 测试人员管理的入口,后续删除
fun
testPersonalManagement
(
view
:
View
)
{
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_MY_STAFF
,
null
)
}
}
\ No newline at end of file
Components/newscontent/src/main/res/layout/activity_login.xml
View file @
603713fd
...
...
@@ -10,39 +10,39 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"99dp"
android:text
Size=
"28sp
"
android:text
=
"欢迎入驻生活圈商家版
"
android:textColor=
"#333333"
android:text
=
"欢迎入驻生活圈商家版"
/>
android:text
Size=
"28sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_marginTop=
"10dp"
android:layout_marginStart=
"40dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"40dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"16sp"
android:textColor=
"#333333"
android:layout_gravity=
"center_vertical"
android:text=
"手机号"
/>
android:text=
"手机号"
android:textColor=
"#333333"
android:textSize=
"16sp"
/>
<EditText
android:id=
"@+id/et_mobileNo"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginStart=
"17dp"
android:gravity=
"center_vertical"
android:background=
"@null"
android:gravity=
"center_vertical"
android:hint=
"请输入"
android:inputType=
"number"
android:maxLength=
"13"
android:textColor=
"#333333"
android:textSize=
"16sp"
tools:ignore=
"TextFields"
android:hint=
"请输入"
/>
tools:ignore=
"TextFields"
/>
</LinearLayout>
...
...
@@ -51,7 +51,7 @@
android:layout_height=
"2dp"
android:layout_marginStart=
"40dp"
android:layout_marginEnd=
"40dp"
android:background=
"#f2f2f2"
/>
android:background=
"#f2f2f2"
/>
<RelativeLayout
android:layout_width=
"match_parent"
...
...
@@ -63,38 +63,38 @@
android:id=
"@+id/tv_codeShow"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"16sp"
android:textColor=
"#333333"
android:layout_centerVertical=
"true"
android:text=
"验证码"
/>
android:text=
"验证码"
android:textColor=
"#333333"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_getCode"
android:layout_width=
"100dp"
android:layout_height=
"wrap_content"
android:textSize=
"14sp"
android:textColor=
"#1852f1"
android:gravity=
"end"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:text=
"获取验证码"
/>
android:gravity=
"end"
android:text=
"获取验证码"
android:textColor=
"#1852f1"
android:textSize=
"14sp"
/>
<EditText
android:id=
"@+id/et_code"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_toEndOf=
"@id/tv_codeShow"
android:layout_toStartOf=
"@id/tv_getCode"
android:layout_marginStart=
"17dp"
android:layout_marginEnd=
"20dp"
android:gravity=
"center_vertical"
android:layout_toStartOf=
"@id/tv_getCode"
android:layout_toEndOf=
"@id/tv_codeShow"
android:background=
"@null"
android:gravity=
"center_vertical"
android:hint=
"请输入"
android:inputType=
"number"
android:maxLength=
"6"
android:textColor=
"#333333"
android:textSize=
"16sp"
tools:ignore=
"TextFields"
android:hint=
"请输入"
/>
tools:ignore=
"TextFields"
/>
</RelativeLayout>
...
...
@@ -103,7 +103,7 @@
android:layout_height=
"2dp"
android:layout_marginStart=
"40dp"
android:layout_marginEnd=
"40dp"
android:background=
"#f2f2f2"
/>
android:background=
"#f2f2f2"
/>
<TextView
...
...
@@ -111,13 +111,13 @@
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_marginStart=
"40dp"
android:layout_marginEnd=
"40dp"
android:layout_marginTop=
"20dp"
android:layout_marginEnd=
"40dp"
android:background=
"@drawable/account_btn_gradient_bg"
android:gravity=
"center"
android:text
Size=
"18sp
"
android:text
=
"登 录
"
android:textColor=
"@color/white"
android:background=
"@drawable/account_btn_gradient_bg"
android:text=
"登 录"
/>
android:textSize=
"18sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -128,33 +128,43 @@
<CheckBox
android:id=
"@+id/cb_protocol"
style=
"@style/protocol_checkboxBg"
android:layout_width=
"25dp"
android:layout_height=
"23dp"
style=
"@style/protocol_checkboxBg"
/>
android:layout_height=
"23dp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:text
Size=
"14sp
"
android:text
=
"我同意
"
android:textColor=
"#999999"
android:text
=
"我同意"
/>
android:text
Size=
"14sp"
/>
<TextView
android:id=
"@+id/tv_protocol"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text
Size=
"14sp
"
android:text
=
"《用户协议》
"
android:textColor=
"#1852f1"
android:text
=
"《用户协议》"
/>
android:text
Size=
"14sp"
/>
<TextView
android:id=
"@+id/tv_privacy"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text
Size=
"14sp
"
android:text
=
"《隐私政策》
"
android:textColor=
"#1852f1"
android:text
=
"《隐私政策》"
/>
android:text
Size=
"14sp"
/>
</LinearLayout>
<Button
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"30dp"
android:text=
"测试人员管理"
android:onClick=
"testPersonalManagement"
android:textColor=
"@color/black"
android:textSize=
"18sp"
/>
</LinearLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/activity_my_staff.xml
0 → 100644
View file @
603713fd
<?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=
"match_parent"
android:orientation=
"vertical"
>
<include
android:id=
"@+id/layout_common_header"
layout=
"@layout/layout_common_header"
/>
<TextView
android:id=
"@+id/textView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:text=
"我的员工页面"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</LinearLayout>
\ No newline at end of file
Components/newscontent/src/main/res/layout/layout_common_header.xml
View file @
603713fd
...
...
@@ -2,7 +2,8 @@
<com.yidian.nightmode.widget.YdConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
'http://schemas.android.com/apk/res-auto'
android:layout_width=
"match_parent"
android:layout_height=
"42dp"
>
android:layout_height=
"@dimen/toolbar_height"
android:fitsSystemWindows=
"true"
>
<com.yidian.nightmode.widget.YdImageView
android:id=
"@+id/iv_back"
...
...
Components/newscontent/src/main/res/values/dimens.xml
View file @
603713fd
...
...
@@ -2,11 +2,13 @@
<dimen
name=
"fab_margin"
>
16dp
</dimen>
<dimen
name=
"headbar_text_size"
>
17dp
</dimen>
<dimen
name=
"headbar_button_text_size"
>
13sp
</dimen>
<dimen
name=
"toolbar_height"
>
44dp
</dimen>
<dimen
name=
"back_button_padding_left"
>
15dp
</dimen>
<dimen
name=
"back_button_padding_right"
>
10dp
</dimen>
<dimen
name=
"back_button_padding_vertical"
>
12dp
</dimen>
<dimen
name=
"tab_normal"
>
17sp
</dimen>
<dimen
name=
"tab_selected"
>
24sp
</dimen>
<!--全局toolbar高度-->
<dimen
name=
"toolbar_height"
>
50dp
</dimen>
</resources>
\ No newline at end of file
app/proguard-rules.pro
View file @
603713fd
...
...
@@ -283,6 +283,9 @@ public static final int *;
-keep class com.yidian.framework.mobile.xdiamond.SecretUtil{*;}
-keep class com.yidian.yac.pm.appupdate.*{*;}
#子模块中的实体类记得keep
-keep class com.yidian.shenghuoquan.newscontent.personnel.bean.
*
*{*;}
#极光
-dontoptimize
-dontpreverify
...
...
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