From d876842e13fccca41ddaf05e9ff8c58ce7e7444b Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期三, 03 七月 2024 10:53:55 +0800
Subject: [PATCH] 2024年07月03日10:52:29

---
 app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java |   43 ++++---------------------------------------
 1 files changed, 4 insertions(+), 39 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java b/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java
index 626e270..d36418e 100644
--- a/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java
+++ b/app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java
@@ -11,6 +11,7 @@
 import com.hdl.photovoltaic.HDLApp;
 import com.hdl.photovoltaic.R;
 import com.hdl.photovoltaic.config.AppConfigManage;
+import com.hdl.photovoltaic.enums.LowerTagType;
 import com.hdl.photovoltaic.other.HdlLogLogic;
 import com.hdl.photovoltaic.other.HdlThreadLogic;
 import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
@@ -119,7 +120,8 @@
 
                 //灏忕▼搴忚鍏抽棴浜嗛�氱煡缁欏師鐢�
                 BaseEventBus baseEventBus = new BaseEventBus();
-                baseEventBus.setType(HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE);
+                baseEventBus.setTopic(HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE);
+                baseEventBus.setType(LowerTagType.power_station.toString());
                 EventBus.getDefault().post(baseEventBus);
 
             }
@@ -256,16 +258,7 @@
         return true;
     }
 
-    /**
-     * 鎵撳紑灏忕▼搴�
-     *
-     * @param uniAppId   灏忕▼搴廔D
-     * @param path       鎸囧畾璺緞
-     *                   渚嬶細pages/component/scroll-view/scroll-view?a=1&b=2&c=3
-     * @param jsonObject 闄勫姞鏁版嵁
-     * @param callBack   鐩戝惉灏忕▼搴廜therUniMPEvent浜嬩欢
-     */
-    public void openUniMPDelay(String uniAppId, String path, JSONObject jsonObject, IOnOtherUniMPEventCallBack callBack) {
+    public void openUniMP(String uniAppId, String path, JSONObject jsonObject, IOnOtherUniMPEventCallBack callBack) {
         if (TextUtils.isEmpty(uniAppId)) {
             HdlThreadLogic.toast(mContext, "uni Id null");
             HdlLogLogic.print("灏忕▼搴廔D 涓嶈兘涓虹┖");
@@ -289,34 +282,6 @@
                     //绗竴娆$敤瑕佷紤鐪�
                     SystemClock.sleep(1000);
                 }
-            }
-            mCurrentAppId = uniAppId;//璁板綍褰撳墠灏忕▼搴�
-            mUniMPCaches.put(uniMP.getAppid(), uniMP);
-        } catch (Exception e) {
-            e.printStackTrace();
-            HdlThreadLogic.toast(HDLApp.getInstance(), R.string.uni_open_error);
-//            initDCUniMPSDK(HDLApp.getInstance());
-            HdlLogLogic.print("鎵撳紑澶辫触===" + e.getMessage());
-        }
-    }
-
-    public void openUniMP(String uniAppId, String path, JSONObject jsonObject, IOnOtherUniMPEventCallBack callBack) {
-        if (TextUtils.isEmpty(uniAppId)) {
-            HdlThreadLogic.toast(mContext, "uni Id null");
-            HdlLogLogic.print("灏忕▼搴廔D 涓嶈兘涓虹┖");
-            return;
-        }
-        try {
-            setOnOtherUniMPEventCallBack(callBack);
-            uniMP = null;
-            if (TextUtils.isEmpty(path)) {
-                uniMP = DCUniMPSDK.getInstance().openUniMP(mContext, uniAppId);
-            } else {
-                UniMPOpenConfiguration uniMPOpenConfiguration = new UniMPOpenConfiguration();
-                uniMPOpenConfiguration.path = path;
-                uniMPOpenConfiguration.extraData = jsonObject;
-                uniMPOpenConfiguration.splashClass=MySplashView.class;
-                uniMP = DCUniMPSDK.getInstance().openUniMP(mContext, uniAppId, uniMPOpenConfiguration);
             }
             mCurrentAppId = uniAppId;//璁板綍褰撳墠灏忕▼搴�
             mUniMPCaches.put(uniMP.getAppid(), uniMP);

--
Gitblit v1.8.0