From 162ca0f6633f3aa246a40e8ba3d3e9a54f3a4cb5 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期六, 11 五月 2024 14:45:21 +0800
Subject: [PATCH] 依赖1.0.21 sdk,解决数据乱的问题
---
app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java | 121 +++++++++++++++++++++++++++++----------
1 files changed, 89 insertions(+), 32 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java b/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
index ed79307..af95a5a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
+++ b/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
@@ -1,10 +1,6 @@
package com.hdl.photovoltaic.uni;
-import com.google.gson.Gson;
-
-import org.json.JSONObject;
-
import java.io.Serializable;
/**
@@ -18,43 +14,114 @@
public final static String UNI_EVENT_uniMPOnClose = "uni_MPOnClose";//鑷畾涔夊皬绋嬪簭鍏抽棴浜嬩欢
public final static String UNI_EVENT_GetAppParams = "uni_GetAppParams";//鑾峰彇APP搴旂敤淇℃伅
- //region --------銆愬皬绋嬪簭銆戝彂閫佸埌銆愬師鐢熴��(鍔犲墠缂�:uni_)--------
+ //region --------銆愬皬绋嬪簭銆戝彂閫佸埌銆愬師鐢熴��--------
+
+
+ /*********鐢ㄦ埛 妯″潡*********/
+ public final static String UNI_EVENT_REPLY_USER_MODEL = "uni_user_model";//鐢ㄦ埛妯″潡(澶х被)
+ public final static String UNI_EVENT_REPLY_USER_INFO = "user_info";//鐢ㄦ埛淇℃伅
+ public final static String UNI_EVENT_REPLY_USER_LOCAL_INFO = "user_local_info";//鐢ㄦ埛鏈湴缂撳瓨淇℃伅
+ public final static String UNI_EVENT_REPLY_USER_IMAGE = "user_image";//鐢ㄦ埛澶村儚
+
+
/*********浣忓畢銆愮數绔欍�戞ā鍧�*********/
- public final static String UNI_EVENT_REPLY_HOME_MODEL = "uni_home_model";//浣忓畢妯″潡
+ public final static String UNI_EVENT_REPLY_HOME_MODEL = "uni_home_model";//浣忓畢妯″潡(澶х被)
public final static String UNI_EVENT_REPLY_HOME_LIST = "list";//鑾峰彇浣忓畢銆愮數绔欍�戝垪琛�
public final static String UNI_EVENT_REPLY_HOME_CREATION = "creation";//浣忓畢銆愮數绔欍�戝垱寤�
public final static String UNI_EVENT_REPLY_HOME_EDIT = "edit";//浣忓畢銆愮數绔欍�戠紪杈�
public final static String UNI_EVENT_REPLY_HOME_DETAILS = "details";//浣忓畢銆愮數绔欍�戣鎯�
- public final static String UNI_EVENT_REPLY_Home_DEl = "del";//浣忓畢銆愮數绔欍�戝垹闄�
+ public final static String UNI_EVENT_REPLY_HOME_DEl = "del";//浣忓畢銆愮數绔欍�戝垹闄�
+
+ public final static String UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE = "close_home_details_page";//鍏抽棴璇︽儏椤�
/*********璁惧妯″潡*********/
- public final static String UNI_EVENT_REPLY_DEVICE_MODEL = "uni_device_model";//璁惧妯″潡
- public final static String UNI_EVENT_REPLY_DEVICE_LIST = "list";//閫嗗彉鍣ㄨ澶囧垪琛�
+ public final static String UNI_EVENT_REPLY_DEVICE_MODEL = "uni_device_model";//璁惧妯″潡(澶х被)
+ public final static String UNI_EVENT_REPLY_DEVICE_LIST = "list";//鏈湴閫嗗彉鍣ㄨ澶囧垪琛�
+ public final static String UNI_EVENT_REPLY_DEVICE_NET_LIST = "net_list";//缃戠粶閫嗗彉鍣ㄨ澶囧垪琛�
public final static String UNI_EVENT_REPLY_DEVICE_CHILD_LIST = "child_list";//閫嗗彉鍣ㄣ�愪笅鎸傘�戣澶囧垪琛�
public final static String UNI_EVENT_REPLY_DEVICE_ADD = "add";//璁惧娣诲姞
+ public final static String UNI_EVENT_REPLY_DEVICE_ADD_All = "add_all";//娣诲姞澶氫釜璁惧
public final static String UNI_EVENT_REPLY_DEVICE_DEL = "del";//璁惧鍒犻櫎
public final static String UNI_EVENT_REPLY_DEVICE_OID = "oid";//璁惧銆愬寘鎷笅鎸傝澶囥�憃id鍒楄〃
+ public final static String UNI_EVENT_REPLY_DEVICE_TIME = "time";//璁惧鏃堕棿璇诲彇
+ public final static String UNI_EVENT_REPLY_DEVICE_TIME_EDIT = "time_edit";//璁惧鏃堕棿缂栬緫
+ public final static String UNI_EVENT_REPLY_DEVICE_CLEAR_DATA = "clear_data";//璁惧娓呯┖浣忓畢id
+ public final static String UNI_EVENT_REPLY_DEVICE_UPLOADING_DATA = "uploading_data";//璁惧涓婁紶鏁版嵁
+ public final static String UNI_EVENT_REPLY_DEVICE_MODBUS_SEND = "modbus_send";//modbus鍗忚
+ public final static String UNI_EVENT_REPLY_DEVICE_Link_edit_SEND = "link_property_edit";//link鍗忚灞炴�х紪杈�
+ public final static String UNI_EVENT_REPLY_DEVICE_Link_read_SEND = "link_property_read";//link鍗忚灞炴�ц鍙�
+ public final static String UNI_EVENT_REPLY_DEVICE_MESSAGE_NUMBER = "message_number";//娑堟伅鎬绘暟閲�
+ public final static String UNI_EVENT_REPLY_DEVICE_DELETE_OID = "delete_Oid";//鍒犻櫎璁惧oid
+
+
+ /*********OTA妯″潡*********/
+ public final static String UNI_EVENT_REPLY_OTA_MODEL = "uni_ota_model";//鍗囩骇妯″潡(澶х被)
+ public final static String UNI_EVENT_REPLY_OTA_CLOUD_OID_LIST = "cloud_oid_list";//鍚戜簯绔幏鍙杘id鍒楄〃
+ public final static String UNI_EVENT_REPLY_OTA_FIRMWARES_LIST = "firmwares_current_list";//褰撳墠璁惧鍥轰欢鍒楄〃
+ public final static String UNI_EVENT_REPLY_OTA_FIRMWARES_NEW_LIST = "firmwares_new_list";//璁惧鏂板浐浠跺垪琛�
+ public final static String UNI_EVENT_REPLY_OTA_FIRMWARES_LOCAL = "firmwares_local_list";//璁惧鏈湴鍥轰欢鍒楄〃
+ public final static String UNI_EVENT_REPLY_OTA_FIRMWARES_DOWNLOAD = "firmwares_download";//璁惧鍥轰欢涓嬭浇
+ public final static String UNI_EVENT_REPLY_OTA_FIRMWARES_UPGRADE = "firmwares_upgrade";//璁惧鍥轰欢鍗囩骇
+ public final static String UNI_EVENT_REPLY_OTA_DRIVER_LIST = "driver_current_list";//褰撳墠璁惧椹卞姩鍒楄〃
+ public final static String UNI_EVENT_REPLY_OTA_DRIVER_NEW = "driver_new_list";//璁惧鏂伴┍鍔ㄥ垪琛�
+ public final static String UNI_EVENT_REPLY_OTA_DRIVER_LOCAL = "driver_local_list";//璁惧鏈湴椹卞姩鍒楄〃
+ public final static String UNI_EVENT_REPLY_OTA_DRIVER_DOWNLOAD = "driver_download";//璁惧椹卞姩涓嬭浇
+ public final static String UNI_EVENT_REPLY_OTA_DRIVER_UPGRADE = "driver_upgrade";//璁惧椹卞姩鍗囩骇
+ public final static String UNI_EVENT_REPLY_OTA_CANCEL_UPGRADE = "cancel_upgrade";//璁惧椹卞姩,鍥轰欢鍙栨秷鍗囩骇
+ public final static String UNI_EVENT_REPLY_OTA_DRIVER_CANCEL_DOWNLOAD = "cancel_download";//璁惧鍙栨秷涓嬭浇鍗囩骇鏂囦欢
+ public final static String UNI_EVENT_REPLY_OTA_OPEN_SERVICE = "open_service";//鎵撳紑鏈嶅姟
+ public final static String UNI_EVENT_REPLY_OTA_CLOSE_SERVICE = "close_service";//鍏抽棴鏈嶅姟
+
+ /*********鍏跺畠妯″潡*********/
+ public final static String UNI_EVENT_REPLY_OTHER_MODEL = "uni_other_model";//鍏跺畠妯″潡(澶х被)
+ public final static String UNI_EVENT_REPLY_OTHER_UNIT = "temperature_unit";//鑾峰彇娓╁害鍗曚綅
+ public final static String UNI_EVENT_REPLY_OTHER_APP_LANGUAGE = "app_language";//鑾峰彇app璇█
+ public final static String UNI_EVENT_REPLY_OTHER_LOCATION_INFO = "location_info";//鑾峰彇app浣嶇疆淇℃伅
+ public final static String UNI_EVENT_REPLY_OTHER_UNI_LOG = "uni_log";//鏀堕泦uni鏃ュ織
+ public final static String UNI_EVENT_REPLY_OTHER_BACK = "back";//棣栭〉杩斿洖
+ public final static String UNI_EVENT_REPLY_OTHER_APPLICATION_CONFLICT = "application_conflict";//搴旂敤鍐茬獊
+
+
+
+ /*********C绔�愭垜鐨勩�戞ā鍧�*********/
+ public final static String UNI_EVENT_REPLY_MINE_MODEL = "uni_mine_model";//鎴戠殑妯″潡(澶х被)
+ public final static String UNI_EVENT_REPLY_MINE_USER_INFO = "get_user_info";//涓汉淇℃伅鑾峰彇锛�
+ public final static String UNI_EVENT_REPLY_MINE_EDIT_AVATAR = "edit_avatar";//澶村儚鏇存柊
+ public final static String UNI_EVENT_REPLY_MINE_EDIT_USER_INFO = "edit_user_info";//璧勬枡缂栬緫
+ public final static String UNI_EVENT_REPLY_MINE_SELECTED_POWERSTATION = "selected_powerstation";//鐢电珯閫夋嫨
+ public final static String UNI_EVENT_REPLY_MINE_MESSAGE_CENTER = "message_center";//娑堟伅涓績
+ public final static String UNI_EVENT_REPLY_MINE_USER_MANAGER = "user_manager";//鐢ㄦ埛绠$悊
+ public final static String UNI_EVENT_REPLY_MINE_ABOUT = "about";//鍏充簬
+ public final static String UNI_EVENT_REPLY_MINE_SETTING = "setting";//璁剧疆
+
/*********Wifi妯″潡*********/ //鍗敠瀹氫箟
- public final static String UNI_EVENT_REPLY_WIFI_MODEL = "uni_wifi_model";//wifi妯″潡
+ public final static String UNI_EVENT_REPLY_WIFI_MODEL = "uni_wifi_model";//wifi妯″潡(澶х被)
public final static String UNI_EVENT_REPLY_WIFI_LIST = "list";//鑾峰彇wifi鍒楄〃
public final static String UNI_EVENT_REPLY_WIFI_INFO = "info";//鑾峰彇褰撳墠wifi淇℃伅
public final static String UNI_EVENT_REPLY_WIFI_CONNECT = "connect";//杩炴帴wifi
//endregion
//region --------銆愬師鐢熴�戜富鍔ㄥ彂閫佸埌銆愬皬绋嬪簭銆�--------
- public final static String UNI_EVENT_NOTIFICATION_DEVICE_MODEL = "uni_notification_model";//閫氱煡妯″潡
- public final static String UNI_EVENT_NOTIFICATION_DEVICE_LIST = "list";//閫嗗彉鍣ㄨ澶囧垪琛�
- public final static String UNI_EVENT_NOTIFICATION_DEVICE_CHILD_LIST = "child_list";//閫嗗彉鍣ㄣ�愪笅鎸傘�戣澶囧垪琛�
+ public final static String UNI_EVENT_NOTIFICATION_DEVICE_MODEL = "uni_notification_model";//閫氱煡妯″潡(澶х被)
+ public final static String UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_DETAILS = "refresh_details";//鍒锋柊鐢电珯璇︽儏
+ public final static String UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_USERINFO = "refresh_userinfo";//鍒锋柊鐢ㄦ埛淇℃伅
+ public final static String UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_TEMPERATURE = "temperature_format_changed";//鍒锋柊鍗曚綅娓╁害
+ public final static String UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_REFRESH_UNREAD_NUMBER = "refresh_unread_messages_number";//鍒锋柊鏈娑堟伅鏁伴噺
+ public final static String UNI_EVENT_NOTIFICATION_REMOVE_VIEW = "remove_view";//閫氱煡uni绉婚櫎鐣岄潰
public final static String UNI_EVENT_NOTIFICATION_DEVICE_ADD = "add";//璁惧娣诲姞
public final static String UNI_EVENT_NOTIFICATION_DEVICE_DEL = "del";//璁惧鍒犻櫎
- public final static String UNI_EVENT_NOTIFICATION_DEVICE_OID = "oid";//璁惧銆愬寘鎷笅鎸傝澶囥�憃id鍒楄〃
+ public final static String UNI_EVENT_NOTIFICATION_DEVICE_OID = "oid";//璁惧銆愬寘鎷笅鎸傝澶囥�憃id鍒楄〃Remove interface
//endregion
- //region --------銆愬師鐢熴�戞墦寮�銆愬皬绋嬪簭銆戦〉闈㈣矾寰�(UNI_EVENT_OPEN_HOME_CREATION+?key=value&key=鍙傛暟涓�)--------
+ //region --------銆愬師鐢熴�戞墦寮�銆愬皬绋嬪簭銆�--------
/*********浣忓畢妯″潡*********/
- public final static String UNI_EVENT_OPEN_HOME_CREATION = "pages/powerStation/powerStationCreate";//浣忓畢銆愮數绔欍�戝垱寤�
+ //椤甸潰璺緞甯﹀弬鏁拌鍒�->(UNI_EVENT_OPEN_HOME_CREATION+?key=value&key=鍙傛暟涓�)
+ public final static String UNI_EVENT_OPEN_HOME_CREATION = "pages/powerStation/powerStationQuickConfig";//"pages/powerStation/powerStationCreate";//浣忓畢銆愮數绔欍�戝垱寤�
public final static String UNI_EVENT_OPEN_HOME_EDIT = "pages/powerStation/powerStationEdit";//浣忓畢銆愮數绔欍�戠紪杈�
public final static String UNI_EVENT_OPEN_HOME_DETAILS = "pages/powerStationDetail/index";//浣忓畢銆愮數绔欍�戣鎯�
+
+ public final static String UNI_EVENT_OPEN_HOME_DETAILS_C = "pages/powerStationDetail/tabbarPage";//C绔墦寮�銆愮數绔欍�戣鎯�
+ public final static String UNI_EVENT_OPEN_HOME_Null_C = "pages/powerStationDetail/tabbarPage";//鏃犵數绔欐椂锛堜笉闇�瑕佷紶鍙傛暟锛�
public final static String UNI_EVENT_OPEN_HOME_DEl = "del";//浣忓畢銆愮數绔欍�戝垹闄�
/*********璁惧妯″潡*********/
//璁惧妯″潡鎵撳紑椤甸潰鍏ㄨ矾寰�
@@ -67,29 +134,27 @@
*/
public static class UniCallBackBaseBean implements Serializable {
-
- private String path;//鎵撳紑灏忕▼搴忚矾寰�(鏆傛椂鐢ㄤ笉涓�)
- private String code;//鐘舵�佺爜
+ private int code;//鐘舵�佺爜
private String mes;//淇℃伅鎻忚堪
private String type;//鍔熻兘绫诲瀷
private Object data;//闄勫姞json鏁版嵁
- public UniCallBackBaseBean(String code, String mes) {
+ public UniCallBackBaseBean(int code, String mes) {
this.code = code;
this.mes = mes;
}
public UniCallBackBaseBean() {
- this.code = "0";
+ this.code = 0;
this.mes = "鎴愬姛";
}
- public String getCode() {
- return code == null ? "" : code;
+ public int getCode() {
+ return code;
}
- public void setCode(String code) {
+ public void setCode(int code) {
this.code = code;
}
@@ -116,14 +181,6 @@
public void setType(String type) {
this.type = type;
- }
-
- public String getPath() {
- return path == null ? "" : path;
- }
-
- public void setPath(String path) {
- this.path = path;
}
--
Gitblit v1.8.0