From f7ad7bee1edf3f9ece0dab01479df57b4c4a5c6a Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期五, 28 六月 2024 10:28:21 +0800 Subject: [PATCH] 2024年06月28日10:28:11 --- app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java | 34 +++++++++++++++++++++++++++++++++- 1 files changed, 33 insertions(+), 1 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java index ede598c..e993851 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java @@ -31,6 +31,7 @@ import com.hdl.photovoltaic.config.UserConfigManage; import com.hdl.photovoltaic.databinding.ActivityMyPowerStationBinding; import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch; +import com.hdl.photovoltaic.enums.LowerTagType; import com.hdl.photovoltaic.enums.NetworkType; import com.hdl.photovoltaic.enums.PowerStationStatusType; import com.hdl.photovoltaic.listener.CloudCallBeak; @@ -308,6 +309,7 @@ currentFragmentIndex = 0; bottomViewChangeOfStyle(); showFragment(); + HdlCommonLogic.lowerTagType = LowerTagType.home; HdlCommonLogic.getInstance().postEventBusSticky(ConstantManage.homepage_title_tab_switch, HomepageTitleTabSwitch.homepage.toString()); } }); @@ -320,6 +322,7 @@ currentFragmentIndex = 1; bottomViewChangeOfStyle(); showFragment(); + HdlCommonLogic.lowerTagType = LowerTagType.power_station; HdlCommonLogic.getInstance().postEventBusSticky(ConstantManage.homepage_title_tab_switch, HomepageTitleTabSwitch.powerstation.toString()); } }); @@ -332,6 +335,7 @@ currentFragmentIndex = 2; bottomViewChangeOfStyle(); showFragment(); + HdlCommonLogic.lowerTagType = LowerTagType.message; HdlCommonLogic.getInstance().postEventBusSticky(ConstantManage.homepage_title_tab_switch, HomepageTitleTabSwitch.message.toString()); } }); @@ -344,6 +348,7 @@ currentFragmentIndex = 3; bottomViewChangeOfStyle(); showFragment(); + HdlCommonLogic.lowerTagType = LowerTagType.me; HdlCommonLogic.getInstance().postEventBusSticky(ConstantManage.homepage_title_tab_switch, HomepageTitleTabSwitch.me.toString()); } }); @@ -363,11 +368,14 @@ private void initView() { viewBinding.myPowerStationBottomIl0.titleTv.setText(R.string.power_shome_page); viewBinding.myPowerStationBottomIl1.titleTv.setText(R.string.power_station); - viewBinding.myMessageBottomIl2.titleTv.setText(R.string.message); + viewBinding.myMessageBottomIl2.titleTv.setText(R.string.alarm); viewBinding.myMeBottomIl3.titleTv.setText(R.string.power_station_me); this.bottomViewChangeOfStyle(); } + /** + * 搴曢儴妯″潡鏍峰紡鏀瑰彉 + */ private void bottomViewChangeOfStyle() { if (this.currentFragmentIndex == 0) { //棣栭〉鐣岄潰 @@ -515,6 +523,30 @@ uniCallBackBaseBean.setData(linkResponse.getData()); HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean); HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); + } else if (linkResponse.getTopic().endsWith("/app/thing/event/appHomeRemoveRefresh/up")) { + String[] topicArray = linkResponse.getTopic().split("/"); + //浣忓畢鍒犻櫎閫氱煡 + HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean(); + uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_home_remove_refresh); + uniCallBackBaseBean.setData(topicArray[1]); + HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean); + HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); + } else if (linkResponse.getTopic().endsWith("/app/thing/event/appHomeDebugRefresh/up")) { + String[] topicArray = linkResponse.getTopic().split("/"); + //浣忓畢浜屾璋冭瘯(鎺堟潈鐘舵��)鍒锋柊閫氱煡 + HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean(); + uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_home_debug_refresh); + uniCallBackBaseBean.setData(topicArray[1]); + HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean); + HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); + } else if (linkResponse.getTopic().endsWith("/app/thing/event/appHomeDeliverRefresh/up")) { + String[] topicArray = linkResponse.getTopic().split("/"); + //浣忓畢浜や粯鐘舵�佸彉鏇村埛鏂伴�氱煡 + HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean(); + uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_home_delivery_refresh); + uniCallBackBaseBean.setData(topicArray[1]); + HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean); + HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); } } } -- Gitblit v1.8.0