| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | //todo B端不支持更改昵称 |
| | | HdlThreadLogic.toast(_mActivity, R.string.loading_not_supported); |
| | | return; |
| | | Intent intent = new Intent(); |
| | | intent.setClass(_mActivity, BPersonalDataActivity.class); |
| | | startActivity(intent); |
| | | } else { |
| | | Intent intent = new Intent(); |
| | | intent.setClass(_mActivity, CPersonalDataActivity.class); |
| | | if (mC_UserInfo == null) { |
| | | mC_UserInfo = new CUserInfo(); |
| | | } |
| | | intent.putExtra("memberHeadIcon", mC_UserInfo.getMemberHeadIcon()); |
| | | startActivityForResult(intent, 10); |
| | | } |
| | | } |
| | | }); |
| | | //员工管理(主账号才显示) |
| | | viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineRightIconClickIv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | Intent intent = new Intent(); |
| | | intent.setClass(_mActivity, PersonalDataActivity.class); |
| | | if (mC_UserInfo == null) { |
| | | mC_UserInfo = new CUserInfo(); |
| | | } |
| | | intent.putExtra("memberHeadIcon", mC_UserInfo.getMemberHeadIcon()); |
| | | startActivityForResult(intent, 10); |
| | | intent.setClass(_mActivity, SetActivity.class); |
| | | startActivity(intent); |
| | | } |
| | | }); |
| | | viewBinding.fragmentMeLineSetIl.fragmentMeLineRightIconClickIv.setOnClickListener(new View.OnClickListener() { |
| | |
| | | */ |
| | | private void initView() { |
| | | |
| | | viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.user_management); |
| | | viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineTitleIv.setText(R.string.staff_management); |
| | | viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineV.setVisibility(View.VISIBLE); |
| | | |
| | | viewBinding.fragmentMeLineSetIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.set); |
| | | viewBinding.fragmentMeLineSetIl.fragmentMeLineTitleIv.setText(R.string.me_set); |
| | |
| | | |
| | | public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { |
| | | super.onActivityResult(requestCode, resultCode, data); |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | //B端不需要更新 |
| | | return; |
| | | } |
| | | if (requestCode == 10 && resultCode == 10) { |
| | | if (data != null) { |
| | | String iconUrl = data.getStringExtra("memberHeadIcon"); |
| | |
| | | if (TextUtils.isEmpty(userName)) { |
| | | return; |
| | | } |
| | | viewBinding.fragmentMeUserNameIv.setText(userName); |
| | | viewBinding.fragmentMeUserNameTv.setText(userName); |
| | | UserConfigManage.getInstance().setUserName(userName); |
| | | UserConfigManage.getInstance().Save(); |
| | | |