Browse Source

上传录制时不再能选择全部

解决上传中文文件乱码问题
master
张剑 1 year ago
parent
commit
73f68029a4

+ 2
- 2
XHWK.WKTool/App.config View File

7
     <!--0正式 1测试-->
7
     <!--0正式 1测试-->
8
     <add key="IsDebug" value="1" />
8
     <add key="IsDebug" value="1" />
9
     <!--版本号-->
9
     <!--版本号-->
10
-    <add key="VersionCode" value="131" />
11
-    <add key="VersionName" value="3.13.4" />
10
+    <add key="VersionCode" value="132" />
11
+    <add key="VersionName" value="3.13.5" />
12
     <!--皮肤样式 0白 1蓝 2黑色 -->
12
     <!--皮肤样式 0白 1蓝 2黑色 -->
13
     <add key="SkinStyle" value="0" />
13
     <add key="SkinStyle" value="0" />
14
     <!--是否输出视频记录日志:0否-->
14
     <!--是否输出视频记录日志:0否-->

+ 18
- 15
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs View File

312
                     return;
312
                     return;
313
                 }
313
                 }
314
                 string url = App.apiUrl + "/sapi/apprecord/get_new";
314
                 string url = App.apiUrl + "/sapi/apprecord/get_new";
315
-                string result = ZHttpUtil.PostStr(url, "{}");
316
-                var resultObj = JsonHelper.JsonToObj<ResultVo<ModelApp>>(result);
317
-                if (result != null && resultObj.code == 0)
315
+                Console.WriteLine(url);
316
+                ResultVo<ModelApp> resultObj = ZHttpUtil.PostSignle<ResultVo<ModelApp>>(url, "{}");
317
+                if (resultObj == null || resultObj.code != 0)
318
                 {
318
                 {
319
-                    if (resultObj.obj != null)
319
+                    return;
320
+                }
321
+                if (resultObj.obj != null)
322
+                {
323
+                    try
320
                     {
324
                     {
321
-                        try
325
+                        int versionCode = resultObj.obj.versioncode;
326
+                        if (versionThis < versionCode)
322
                         {
327
                         {
323
-                            int versionCode = resultObj.obj.versioncode;
324
-                            if (versionThis < versionCode)
325
-                            {
326
-                                Dispatcher.Invoke(() =>
328
+                            Dispatcher.Invoke(
329
+                                () =>
327
                                 {
330
                                 {
328
                                     string pathTemp = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
331
                                     string pathTemp = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
329
                                     FileToolsCommon.CreateDirectory(pathTemp);
332
                                     FileToolsCommon.CreateDirectory(pathTemp);
330
                                     AppUpdateShow(resultObj.obj);
333
                                     AppUpdateShow(resultObj.obj);
331
-                                });
332
-                            }
333
-                        }
334
-                        catch (Exception ex)
335
-                        {
336
-                            LogHelper.Logerror.Error("【检查更新】(getNewApp)版本号错误:" + ex.Message, ex);
334
+                                }
335
+                            );
337
                         }
336
                         }
338
                     }
337
                     }
338
+                    catch (Exception ex)
339
+                    {
340
+                        LogHelper.Logerror.Error("【检查更新】(getNewApp)版本号错误:" + ex.Message, ex);
341
+                    }
339
                 }
342
                 }
340
             }).Start();
343
             }).Start();
341
         }
344
         }

+ 1
- 2
XHWK.WKTool/Utils/JsonHelper.cs View File

46
         /// <returns></returns>
46
         /// <returns></returns>
47
         public static T JsonToObj<T>(string strJson) where T : class
47
         public static T JsonToObj<T>(string strJson) where T : class
48
         {
48
         {
49
-            if (strJson != null && strJson != "") { return JsonConvert.DeserializeObject<T>(strJson); }
50
-
49
+            if (!string.IsNullOrEmpty(strJson)) { return JsonConvert.DeserializeObject<T>(strJson); }
51
             return null;
50
             return null;
52
         }
51
         }
53
 
52
 

+ 6
- 4
XHWK.WKTool/Utils/ZHttpUtil.cs View File

117
                 webRequest.Method = "POST";
117
                 webRequest.Method = "POST";
118
                 webRequest.Accept = "text/html,application/xhtml+xml,*/*";
118
                 webRequest.Accept = "text/html,application/xhtml+xml,*/*";
119
                 webRequest.ContentType = contentType + ";" + "UTF-8";
119
                 webRequest.ContentType = contentType + ";" + "UTF-8";
120
-                Console.WriteLine(@"postData:" + postData);
120
+                // Console.WriteLine(@"postData:" + postData);
121
                 string aesPostData = postData;
121
                 string aesPostData = postData;
122
                 if (jm)
122
                 if (jm)
123
                 {
123
                 {
124
                     if (isSt)
124
                     if (isSt)
125
                     {
125
                     {
126
                         aesPostData = AesHelper.AesEncrypt(postData, "XINGHUOLIAOYUAN7");
126
                         aesPostData = AesHelper.AesEncrypt(postData, "XINGHUOLIAOYUAN7");
127
+                        // Console.WriteLine(@"加密再解密后:" + AesHelper.AesDecrypt(aesPostData, "XINGHUOLIAOYUAN7"));
127
                     }
128
                     }
128
                     AddHeader(webRequest);
129
                     AddHeader(webRequest);
129
-                    Console.WriteLine(@"加密再解密后:" + AesHelper.AesDecrypt(aesPostData, "XINGHUOLIAOYUAN7"));
130
                 }
130
                 }
131
                 byte[] buffer = Encoding.UTF8.GetBytes(aesPostData);
131
                 byte[] buffer = Encoding.UTF8.GetBytes(aesPostData);
132
                 webRequest.ContentLength = buffer.Length;
132
                 webRequest.ContentLength = buffer.Length;
144
                     return reader.ReadToEnd();
144
                     return reader.ReadToEnd();
145
                 }
145
                 }
146
             }
146
             }
147
-            catch (Exception)
147
+            catch (Exception ex)
148
             {
148
             {
149
+                Console.WriteLine(ex.Message);
149
                 return "";
150
                 return "";
150
             }
151
             }
151
             finally
152
             finally
189
                     );
190
                     );
190
                     return JsonHelper.JsonToObj<T>(respstr);
191
                     return JsonHelper.JsonToObj<T>(respstr);
191
                 }
192
                 }
192
-                catch (Exception)
193
+                catch (Exception ex)
193
                 {
194
                 {
195
+                    Console.WriteLine(ex.ToString());
194
                     // ignored
196
                     // ignored
195
                 }
197
                 }
196
             }
198
             }

+ 1
- 1
星火微课/星火微课-测试.iss View File

3
 
3
 
4
 #define MyAppName "星火微课测试版"  
4
 #define MyAppName "星火微课测试版"  
5
 #define MyAppDir "xhwk_test"
5
 #define MyAppDir "xhwk_test"
6
-#define MyAppVersion "3.13.4"
6
+#define MyAppVersion "3.13.5"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8
 #define MyAppURL "http://www.xhkjedu.com/"
8
 #define MyAppURL "http://www.xhkjedu.com/"
9
 #define MySourcePath "D:\Project\CSharp\xh-wkclient\XHWK.WKTool\bin\x86\Debug\"
9
 #define MySourcePath "D:\Project\CSharp\xh-wkclient\XHWK.WKTool\bin\x86\Debug\"

Loading…
Cancel
Save