Davin
2023-07-26 489d3bd60ad7dc2fecb398b09cf4c52df16f0fc2
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -86,7 +86,7 @@
                d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
                d.Add("deviceIds", functionIds);
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus, "刷新设备状态");
                if (!this.dataChecking(responsePackNew))
                if (!this.DataChecking(responsePackNew))
                {
                    return;
                }
@@ -123,7 +123,7 @@
                d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
                d.Add("deviceIds", new List<string> { music.deviceId });
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_PlayerList, "获取音乐列表");
                if (!this.dataChecking(responsePackNew))
                if (!this.DataChecking(responsePackNew))
                {
                    return;
                }
@@ -173,7 +173,7 @@
                }
                d.Add("deviceInfos", new List<Dictionary<string, object>> { deviceIds });
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupList, "获取列表名列表");
                if (!this.dataChecking(responsePackNew))
                if (!this.DataChecking(responsePackNew))
                {
                    return new List<GroupList>();
                }
@@ -238,7 +238,7 @@
                d.Add("sidGroups", new List<Dictionary<string, object>> { d1 });
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupPlayerList, "通过列表名获取歌曲列表");
                if (!this.dataChecking(responsePackNew))
                if (!this.DataChecking(responsePackNew))
                {
                    return new List<PalyerSongListInfo>();
                }
@@ -282,10 +282,11 @@
        /// </summary>
        /// <param name="responsePackNew">回复数据对象</param>
        /// <returns></returns>
        private bool dataChecking(ResponsePackNew responsePackNew)
        private bool DataChecking(ResponsePackNew responsePackNew)
        {
            if (responsePackNew.Code != "0" || responsePackNew.Data == null || responsePackNew.Data.ToString() == "")
            if (responsePackNew.Data == null||responsePackNew.Code != "0"  || responsePackNew.Data.ToString() == "")
            {
                return false;
            }
            return true;
@@ -298,7 +299,7 @@
        /// <param name="api_Url">请求地址(不是绝对地址)</param>
        /// <param name="tag">标记->描述接口(自定义)</param>
        /// <returns></returns>
        public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag, int mTimeout = 5)
        public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag, int mTimeout = 15)
        {
            JObject jobject = JObject.Parse(Newtonsoft.Json.JsonConvert.SerializeObject(o));
            return UI2.Intelligence.Automation.Send.Current.RequestServerhomeId(jobject, api_Url, tag, mTimeout);