JLChen
2020-12-03 321d2f007c7f85e933b3f90266af07e10c6b4658
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -359,7 +359,22 @@
        }
        /// <summary>
        /// 获取用户头像
        /// </summary>
        /// <param name="userId"></param>
        public void GetUserHeadImage(string userId)
        {
            var imageKey = ImageUtlis.Current.GetHeadImageKey(userId);
            var headImageBytes = ImageUtlis.Current.DownHeadImage(userId);
            if (headImageBytes != null && headImageBytes.Length > 0)
            {
                //UserInfo.Current.headImagePageBytes = headImageBytes;
                UserInfo.Current.headImagePagePath = imageKey;
            }
        }
        /// <summary>
        /// 更新用户昵称
@@ -942,15 +957,15 @@
                isProduce = false;
#endif
                if (string.IsNullOrEmpty(OnAppConfig.Instance.PushDeviceToken)) {
                if (string.IsNullOrEmpty(UserInfo.Current.PushDeviceToken)) {
                    Utlis.WriteLine("PushDeviceToken 为空");
                    return false;
                }
                var mAddpushinfoObj = new AddpushinfoObj()
                {
                    pushToken = OnAppConfig.Instance.PushDeviceToken,
                    deviceName = OnAppConfig.Instance.PhoneName,
                    pushToken = UserInfo.Current.PushDeviceToken,
                    deviceName = UserInfo.Current.PhoneName,
                    deviceType = deviceType,
                    produce = isProduce,
                };
@@ -965,8 +980,8 @@
                        var pushId = revertObj.Data.ToString();
                        if (!string.IsNullOrEmpty(pushId))
                        {
                            OnAppConfig.Instance.PushId = pushId;
                            OnAppConfig.Instance.SaveUserConfig();
                            UserInfo.Current.PushId = pushId;
                            UserInfo.Current.SaveUserInfo();
                           
                            return true;
                        }
@@ -1010,7 +1025,7 @@
            var requestJson = HttpUtil.GetSignRequestJson(new GetMessageListObj()
            {
                pushId = OnAppConfig.Instance.PushId,
                pushId = UserInfo.Current.PushId,
                pushType = pushType
            });
            return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist, requestJson);
@@ -1022,11 +1037,11 @@
        /// <returns></returns>
        public bool PushSerivceClearmessagelist()
        {
            if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false;
            if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false;
            var requestJson = HttpUtil.GetSignRequestJson(new PushIdObj()
            {
                pushId = OnAppConfig.Instance.PushId
                pushId = UserInfo.Current.PushId
            });
            var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Clearmessagelist, requestJson);
@@ -1047,11 +1062,11 @@
        /// <returns></returns>
        public bool PushSerivceSignOut()
        {
            if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false;
            if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false;
            try
            {
                var requestJson = HttpUtil.GetSignRequestJson(new PushIdObj() {
                    pushId = OnAppConfig.Instance.PushId
                    pushId = UserInfo.Current.PushId
                });
               
                var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_DeleteToken, requestJson);
@@ -1078,13 +1093,13 @@
        /// <returns></returns>
        public bool PushSerivceMarkAllMessageRead()
        {
            if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false;
            if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false;
            try
            {
                var requestJson = HttpUtil.GetSignRequestJson(new PushIdObj()
                {
                    pushId = OnAppConfig.Instance.PushId
                    pushId = UserInfo.Current.PushId
                });
                var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_ALLMarkread, requestJson);
                if (revertObj.Code == StateCode.SUCCESS)
@@ -1110,7 +1125,7 @@
        /// <returns></returns>
        public bool PushSerivceMarkMessageRead(string msgId)
        {
            if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false;
            if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false;
            try
            {
@@ -1143,7 +1158,7 @@
        /// <returns></returns>
        public bool PushSerivceDeleteMessage(string msgId)
        {
            if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false;
            if (string.IsNullOrEmpty(UserInfo.Current.PushId)) return false;
            try
            {