From a1ac20d9cbe90b566bffe3ed39a6e07700c3248f Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 19 六月 2023 10:30:06 +0800
Subject: [PATCH] Merge branch 'wjc'

---
 app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java |  143 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 143 insertions(+), 0 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
new file mode 100644
index 0000000..f9a6b51
--- /dev/null
+++ b/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
@@ -0,0 +1,143 @@
+package com.hdl.photovoltaic.uni;
+
+
+import com.google.gson.Gson;
+
+import org.json.JSONObject;
+
+import java.io.Serializable;
+
+/**
+ * UniMP 鍘熺敓鍜屽皬绋嬪簭浜や簰鐩稿叧閰嶇疆鍙傛暟
+ */
+public class HDLUniMP {
+
+    /*********UniMP wgt id*********/
+    public final static String UNI_APP_ID = "__UNI__A2E7300";//鍏変紡wgt鍖呭皬绋嬪簭id
+
+    /*********UniMP Event 鍘熺敓鍜屽皬绋嬪簭浜や簰 鑷畾涔夐�氱煡浜嬩欢*********/
+    public final static String UNI_EVENT_uniMPOnClose = "uni_MPOnClose";//鑷畾涔夊皬绋嬪簭鍏抽棴浜嬩欢
+
+    public final static String UNI_EVENT_GetAppParams = "uni_GetAppParams";//鑾峰彇APP搴旂敤淇℃伅
+
+
+//    //銆愬皬绋嬪簭銆戝彂閫佸埌銆愬師鐢熴�� 鍔犲墠缂�:uni_
+//public final static String UNI_EVENT_HOME_MODEL = "uni_home_model";//浣忓畢妯″潡
+//    public final static String UNI_EVENT__DEVICE_MODEL = "uni_device_model";//璁惧妯″潡
+//    /*********浣忓畢銆愮數绔欍�戞ā鍧�*********/
+//    public final static String UNI_EVENT_HOME_LIST = "list";//鑾峰彇浣忓畢銆愮數绔欍�戝垪琛�
+//    public final static String UNI_EVENT_HOME_CREATION = "creation";//浣忓畢銆愮數绔欍�戝垱寤�
+//    public final static String UNI_EVENT_HOME_EDIT = "edit";//浣忓畢銆愮數绔欍�戠紪杈�
+//    public final static String UNI_EVENT_HOME_DETAILS = "details";//浣忓畢銆愮數绔欍�戣鎯�
+//    public final static String UNI_EVENT_Home_DEl = "del";//浣忓畢銆愮數绔欍�戝垹闄�
+//    /*********璁惧妯″潡*********/
+//    public final static String UNI_EVENT_DEVICE_LIST = "list";//閫嗗彉鍣ㄨ澶囧垪琛�
+//    public final static String UNI_EVENT_DEVICE_CHILD_LIST = "child_list";//閫嗗彉鍣ㄣ�愪笅鎸傘�戣澶囧垪琛�
+//    public final static String UNI_EVENT_DEVICE_ADD = "add";//璁惧娣诲姞
+//    public final static String UNI_EVENT_DEVICE_DEL = "del";//璁惧鍒犻櫎
+//    public final static String UNI_EVENT_DEVICE_OID = "oid";//璁惧銆愬寘鎷笅鎸傝澶囥�憃id鍒楄〃
+
+
+    //銆愬師鐢熴�戜富鍔ㄥ彂閫佸埌銆愬皬绋嬪簭銆� 鍔犲墠缂�:app_
+
+    //銆愬師鐢熴�戞墦寮�銆愬皬绋嬪簭銆戦〉闈㈣矾寰�(UNI_EVENT_HOME_CREATION+?key=value&key=鍙傛暟涓�)
+    /*********浣忓畢妯″潡*********/
+    public final static String UNI_EVENT_HOME_CREATION = "pages/powerStation/powerStationCreate";//浣忓畢銆愮數绔欍�戝垱寤�
+    public final static String UNI_EVENT_HOME_EDIT = "pages/powerStation/powerStationEdit";//浣忓畢銆愮數绔欍�戠紪杈�
+    public final static String UNI_EVENT_HOME_DETAILS = "pages/powerStationDetail/index";//浣忓畢銆愮數绔欍�戣鎯�
+//    public final static String UNI_EVENT_Home_DEl = "del";//浣忓畢銆愮數绔欍�戝垹闄�
+    /*********璁惧妯″潡*********/
+    //璁惧妯″潡鎵撳紑椤甸潰鍏ㄨ矾寰�
+
+
+    /**
+     * 灏忕▼搴忎笌鍘熺敓閫氳鏁版嵁鏍煎紡
+     * 鑷畾涔夋牸寮�
+     */
+    public static class UniCallBackBaseBean implements Serializable {
+
+
+        private String path;//鎵撳紑灏忕▼搴忚矾寰�(鏆傛椂鐢ㄤ笉涓�)
+        private String code;//鐘舵�佺爜
+        private String mes;//淇℃伅鎻忚堪
+        private String topic;//鏆傛椂鐢ㄤ笉涓�
+        private String type;//鍔熻兘绫诲瀷
+        private Object data;//闄勫姞json鏁版嵁
+
+        public UniCallBackBaseBean(String code, String mes) {
+            this.code = code;
+            this.mes = mes;
+        }
+
+        public UniCallBackBaseBean() {
+            this.code = "0";
+            this.mes = "鎴愬姛";
+        }
+
+
+        public String getCode() {
+            return code == null ? "" : code;
+        }
+
+        public void setCode(String code) {
+            this.code = code;
+        }
+
+
+        public String getMes() {
+            return mes == null ? "" : mes;
+        }
+
+        public void setMes(String mes) {
+            this.mes = mes;
+        }
+
+        public Object getData() {
+            return data;
+        }
+
+        public void setData(Object data) {
+            this.data = data;
+        }
+
+        public String getTopic() {
+            return topic;
+        }
+
+        public void setTopic(String topic) {
+            this.topic = topic;
+        }
+
+        public String getType() {
+            return type == null ? "" : type;
+        }
+
+        public void setType(String type) {
+            this.type = type;
+        }
+
+        public String getPath() {
+            return path == null ? "" : path;
+        }
+
+        public void setPath(String path) {
+            this.path = path;
+        }
+
+        /**
+         * 褰撳墠瀵硅薄杞� JSONObject
+         *
+         * @return JSONObject
+         */
+        public JSONObject getJSONObject() {
+            try {
+                String json = new Gson().toJson(this);
+                return new JSONObject(json);
+            } catch (Exception e) {
+                return new JSONObject();
+            }
+        }
+
+
+    }
+}

--
Gitblit v1.8.0