提交 80d688ac authored 作者: lgd's avatar lgd

1.我的主页面

2.//TODO erp用户激活,忘记密码测试,bat,mes,消息,我的,刷新token
上级 799bdfbb
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;
}
}
} }
...@@ -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();
......
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论