Skip to content
项目
Groups
代码片段
帮助
正在加载...
Sign in / Register
Toggle navigation
W
workoffice
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图表
统计图
Create a new issue
作业
提交
议题看板
Open sidebar
冷广德
workoffice
Commits
80d688ac
提交
80d688ac
authored
3月 19, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.我的主页面
2.//TODO erp用户激活,忘记密码测试,bat,mes,消息,我的,刷新token
上级
799bdfbb
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
59 行增加
和
29 行删除
+59
-29
MyFragment.java
app/src/main/java/com/wd/workoffice/ui/fg/MyFragment.java
+26
-21
UserKeeper.java
app/src/main/java/com/wd/workoffice/util/UserKeeper.java
+20
-0
fg_my.xml
app/src/main/res/layout/fg_my.xml
+13
-8
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/fg/MyFragment.java
浏览文件 @
80d688ac
package
com
.
wd
.
workoffice
.
ui
.
fg
;
package
com
.
wd
.
workoffice
.
ui
.
fg
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkBaseFg
;
import
com.wd.workoffice.app.WorkBaseFg
;
import
com.wd.workoffice.bean.vo.BatLayoutVo
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.bat.StoreCrucibleActivity
;
import
com.wd.workoffice.ui.activity.bat.StoreOutsourcingActivity
;
import
com.wd.workoffice.ui.activity.bat.StoreSaleActivity
;
import
com.wd.workoffice.ui.activity.bat.StoreSupplierActivity
;
import
com.wd.workoffice.ui.activity.bat.StoreTradingActivity
;
import
com.wd.workoffice.ui.adapter.BatLayoutAdapter
;
import
com.wd.workoffice.util.UserKeeper
;
import
com.wd.workoffice.util.UserKeeper
;
import
java.util.ArrayList
;
import
java.util.List
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.disposables.Disposable
;
/**
/**
...
@@ -37,12 +19,24 @@ import io.reactivex.disposables.Disposable;
...
@@ -37,12 +19,24 @@ import io.reactivex.disposables.Disposable;
**/
**/
public
class
MyFragment
extends
WorkBaseFg
{
public
class
MyFragment
extends
WorkBaseFg
{
@BindView
(
R
.
id
.
tv_name
)
TextView
tvName
;
@BindView
(
R
.
id
.
tv_no
)
TextView
tvNo
;
@BindView
(
R
.
id
.
ll_role
)
LinearLayout
llRole
;
@BindView
(
R
.
id
.
ll_info
)
LinearLayout
llInfo
;
@BindView
(
R
.
id
.
ll_setting
)
LinearLayout
llSetting
;
@Override
@Override
protected
void
initView
()
{
protected
void
initView
()
{
tvNo
.
setText
(
"员工编号:"
+
UserKeeper
.
getInstance
().
getUserErpId
());
tvName
.
setText
(
UserKeeper
.
getInstance
().
getUserNickName
());
}
}
@Override
@Override
protected
void
initData
()
{
protected
void
initData
()
{
}
}
...
@@ -58,4 +52,15 @@ public class MyFragment extends WorkBaseFg {
...
@@ -58,4 +52,15 @@ public class MyFragment extends WorkBaseFg {
}
}
@OnClick
({
R
.
id
.
ll_role
,
R
.
id
.
ll_info
,
R
.
id
.
ll_setting
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
ll_role
:
break
;
case
R
.
id
.
ll_info
:
break
;
case
R
.
id
.
ll_setting
:
break
;
}
}
}
}
app/src/main/java/com/wd/workoffice/util/UserKeeper.java
浏览文件 @
80d688ac
...
@@ -91,7 +91,27 @@ public class UserKeeper {
...
@@ -91,7 +91,27 @@ public class UserKeeper {
}
}
return
infoBean
.
getOfDept
().
getId
()
+
""
;
return
infoBean
.
getOfDept
().
getId
()
+
""
;
}
}
public
String
getUserErpId
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
USER_INFO
)))
{
return
""
;
}
UserInfoBean
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
USER_INFO
),
UserInfoBean
.
class
);
if
(
infoBean
==
null
||
infoBean
.
getErpId
()
==
null
)
{
return
""
;
}
return
infoBean
.
getErpId
();
}
public
String
getUserNickName
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
USER_INFO
)))
{
return
""
;
}
UserInfoBean
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
USER_INFO
),
UserInfoBean
.
class
);
if
(
infoBean
==
null
||
infoBean
.
getNickName
()
==
null
)
{
return
""
;
}
return
infoBean
.
getNickName
();
}
public
void
clearAll
()
{
public
void
clearAll
()
{
clearLoginInfo
();
clearLoginInfo
();
clearUserInfo
();
clearUserInfo
();
...
...
app/src/main/res/layout/fg_my.xml
浏览文件 @
80d688ac
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
android:paddingBottom=
"20mm"
>
android:paddingBottom=
"20mm"
>
<ImageView
<ImageView
android:id=
"@+id/my_image"
android:layout_width=
"70mm"
android:layout_width=
"70mm"
android:layout_height=
"70mm"
android:layout_height=
"70mm"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
...
@@ -25,6 +24,7 @@
...
@@ -25,6 +24,7 @@
android:background=
"@mipmap/ic_launcher_round"
/>
android:background=
"@mipmap/ic_launcher_round"
/>
<TextView
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8mm"
android:layout_marginTop=
"8mm"
...
@@ -32,15 +32,17 @@
...
@@ -32,15 +32,17 @@
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"18sp"
/>
android:textSize=
"18sp"
/>
<TextView
<!--<TextView-->
android:layout_width=
"wrap_content"
<!--android:id="@+id/tv_name"-->
android:layout_height=
"wrap_content"
<!--android:layout_width="wrap_content"-->
android:layout_marginTop=
"2mm"
<!--android:layout_height="wrap_content"-->
android:text=
"销售一部门/管理员"
<!--android:layout_marginTop="2mm"-->
android:textColor=
"#ffdde2e6"
<!--android:text="销售一部门/管理员"-->
android:textSize=
"13sp"
/>
<!--android:textColor="#ffdde2e6"-->
<!--android:textSize="13sp" />-->
<TextView
<TextView
android:id=
"@+id/tv_no"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2mm"
android:layout_marginTop=
"2mm"
...
@@ -58,6 +60,7 @@
...
@@ -58,6 +60,7 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_role"
style=
"@style/llStyle"
style=
"@style/llStyle"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -90,6 +93,7 @@
...
@@ -90,6 +93,7 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_info"
style=
"@style/llStyle"
style=
"@style/llStyle"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -122,6 +126,7 @@
...
@@ -122,6 +126,7 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_setting"
style=
"@style/llStyle"
style=
"@style/llStyle"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论