| | |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.FragmentMeBinding; |
| | | import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch; |
| | | import com.hdl.photovoltaic.enums.UserRightType; |
| | | import com.hdl.photovoltaic.enums.LogoutType; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | import com.hdl.photovoltaic.other.HdlAccountLogic; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | |
| | | import com.hdl.photovoltaic.ui.bean.BUserInfo; |
| | | import com.hdl.photovoltaic.ui.bean.CUserInfo; |
| | | import com.hdl.photovoltaic.ui.bean.UserRightTypeBean; |
| | | import com.hdl.photovoltaic.ui.test.TestMainActivity; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.utils.GlideUtils; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | import org.greenrobot.eventbus.Subscribe; |
| | | import org.greenrobot.eventbus.ThreadMode; |
| | | |
| | | |
| | | /** |
| | | * 我的-界面 |
| | |
| | | */ |
| | | private void initEvent() { |
| | | |
| | | viewBinding.exitTv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | HdlAccountLogic.getInstance().logout(LogoutType.NormalLogout); |
| | | } |
| | | }); |
| | | |
| | | viewBinding.fragmentMeIconParentCl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | |
| | | if (UserConfigManage.getInstance().isTourist_mode()) { |
| | | return; |
| | | } |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | Intent intent = new Intent(); |
| | | intent.setClass(_mActivity, BPersonalDataActivity.class); |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(AsRegardsActivity.class); |
| | | |
| | | } |
| | | }); |
| | | //帮助 |
| | | viewBinding.fragmentMeLineHelpIl.fragmentMeLineCl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(HelpWebActivity.class); |
| | | } |
| | | }); |
| | | |
| | |
| | | * 初始化界面 |
| | | */ |
| | | private void initView() { |
| | | if (UserConfigManage.getInstance().isTourist_mode()) { |
| | | viewBinding.exitTv.setVisibility(View.VISIBLE); |
| | | } else { |
| | | viewBinding.exitTv.setVisibility(View.GONE); |
| | | } |
| | | //设备调试 |
| | | viewBinding.fragmentMeLineDeviceDebugIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.device_debug); |
| | | viewBinding.fragmentMeLineDeviceDebugIl.fragmentMeLineTitleIv.setText(R.string.device_debugging); |
| | |
| | | viewBinding.fragmentMeLineAsregardsIl.fragmentMeLineTitleIv.setText(R.string.me_regard); |
| | | // viewBinding.fragmentMeLineAsregardsIl.fragmentMeLineV.setVisibility(View.VISIBLE); |
| | | |
| | | //帮助 |
| | | viewBinding.fragmentMeLineHelpIl.fragmentMeLineCl.setVisibility(View.GONE);//胡彬说先隐藏 |
| | | viewBinding.fragmentMeLineHelpIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.help); |
| | | viewBinding.fragmentMeLineHelpIl.fragmentMeLineTitleIv.setText(R.string.help); |
| | | |
| | | |
| | | setMemberName(UserConfigManage.getInstance().getUserName()); |
| | | setMemberAccount(UserConfigManage.getInstance().getAccount()); |
| | | // setMemberHeadIcon(UserConfigManage.getInstance().getUserImageUrl()); |
| | | |
| | | |
| | | if (UserConfigManage.getInstance().isTourist_mode()) { |
| | | viewBinding.fragmentMeUserNameNextIv.setVisibility(View.GONE); |
| | | } else { |
| | | viewBinding.fragmentMeUserNameNextIv.setVisibility(View.VISIBLE); |
| | | } |
| | | } |
| | | |
| | | public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |