| | |
| | | import com.hdl.photovoltaic.bean.PageNumberObject; |
| | | import com.hdl.photovoltaic.config.AppConfigManage; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.internet.HttpClient; |
| | | import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpServer; |
| | | import com.hdl.photovoltaic.internet.TcpClient; |
| | | import com.hdl.photovoltaic.internet.api.TopicApi; |
| | |
| | | import com.hdl.photovoltaic.ui.bean.DeviceTimeBean; |
| | | import com.hdl.photovoltaic.ui.bean.Geolocation; |
| | | import com.hdl.photovoltaic.ui.bean.HouseIdBean; |
| | | import com.hdl.photovoltaic.ui.bean.HouseInfoBean; |
| | | import com.hdl.photovoltaic.ui.bean.LinkBean; |
| | | import com.hdl.photovoltaic.ui.bean.MemberBean; |
| | | import com.hdl.photovoltaic.ui.bean.NotRunBean; |
| | |
| | | } |
| | | break; |
| | | } |
| | | } else if (HDLUniMP.UNI_EVENT_REPLY_COMMON_MODEL.equals(topic)) { |
| | | //网络请求模块 |
| | | if (type.equals(HDLUniMP.UNI_EVENT_REPLY_UNI_SEND_TO_CLOUD)) { |
| | | String url = getKeyValue("url", getKeyValue("data", data)); |
| | | JsonObject jObject = new JsonObject(); |
| | | String body = getKeyValue("body", getKeyValue("data", data)); |
| | | if (!TextUtils.isEmpty(body)) { |
| | | try { |
| | | jObject = new Gson().fromJson(body, JsonObject.class); |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | | HttpClient.getInstance().requestHttp(url, jObject.toString(), new CloudCallBeak<String>() { |
| | | @Override |
| | | public void onSuccess(String jsonStr) { |
| | | uniSuccessCallback(mode_type, jsonStr, callback); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | uniExceptionCallback(mode_type, e, callback); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } catch (Exception e) { |