app/src/main/assets/data/dcloud_error.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/com/hdl/photovoltaic/uni/MySplashView.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
local.properties | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
app/src/main/assets/data/dcloud_error.html
@@ -8,8 +8,6 @@ <title>Error</title> <script type="text/javascript"> // H5 plus事件处理 <script type="text/javascript"> // H5 plus事件处理 window.onload = function(){ console.log("进入onload方法") //界面异常后,等1秒后尝试重新加载 @@ -18,7 +16,6 @@ plus.runtime.restart() },1000); }; </script> </script> <style> *{ app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -652,12 +652,6 @@ HdlLogLogic.print("uni---组装uni发送数据格式---" + json, false); } public void openUniMPDelay(String path, JSONObject jsonObject) { JSONObject json = this.createdJSONObject(jsonObject, true); HDLUniMPSDKManager.getInstance().openUniMPDelay(HDLUniMP.UNI_APP_ID, path, json, HdlUniLogic.this); HdlLogLogic.print("uni---组装uni发送数据格式---" + json, false); } /** * 原生【主动】向小程序发送通知事件 * 注意:需要提前小程序在运行才可成功 app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
@@ -211,11 +211,7 @@ List<HouseIdBean> HouseIdList = HdlResidenceLogic.getInstance().getHouseIdList(); if (HouseIdList.size() == 0) { String path = HDLUniMP.UNI_EVENT_OPEN_HOME_Null_C; if (delay) { HdlUniLogic.getInstance().openUniMPDelay(path, null); } else { HdlUniLogic.getInstance().openUniMP(path, null); } } else { int select_home = 0; for (int i = 0; i < HouseIdList.size(); i++) { @@ -227,11 +223,7 @@ HouseIdBean houseIdBean = HouseIdList.get(select_home); HdlResidenceLogic.getInstance().switchHouse(houseIdBean); String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS_C + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&powerStationStatus=" + houseIdBean.getPowerStationStatus(); if (delay) { HdlUniLogic.getInstance().openUniMPDelay(path, null); } else { HdlUniLogic.getInstance().openUniMP(path, null); } } } app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java
@@ -258,16 +258,7 @@ return true; } /** * 打开小程序 * * @param uniAppId 小程序ID * @param path 指定路径 * 例:pages/component/scroll-view/scroll-view?a=1&b=2&c=3 * @param jsonObject 附加数据 * @param callBack 监听小程序OtherUniMPEvent事件 */ 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("小程序ID 不能为空"); @@ -291,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("小程序ID 不能为空"); 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); app/src/main/java/com/hdl/photovoltaic/uni/MySplashView.java
@@ -2,6 +2,7 @@ import android.content.Context; import android.graphics.Color; import android.os.SystemClock; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; local.properties
@@ -5,4 +5,4 @@ # For customization when using a Version Control System, please read the # header note. #Fri Feb 23 16:45:51 CST 2024 sdk.dir=/Users/user/Library/Android/sdk sdk.dir=/Users/hdl/Library/Developer/Xamarin/android-sdk-macosx