修改买手单号状态

This commit is contained in:
wule committed 2026-06-27 00:11:07 +08:00
1 parent 1e27c0b1e1
commit adde7e6fca
22 files changed
+6451 -514

No files matched your search

+69 -6
View File
@@ -1,17 +1,18 @@
using System;
using AllBase;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Text;
using System.IO;
using System.Management;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using AllBase;
using System.Drawing.Text;
using System.Drawing;
using System.Runtime.InteropServices;
using Work.Api;
namespace Work
@@ -34,6 +35,7 @@ namespace Work
BaseClass.IsMainCompany = true;
}
BaseClass.IsBuyer = FileBase.Exists(Application.StartupPath + "\\buyer.ini");
Task.Run(() => { CheckUpdate(); });
//new Thread(Update).Start();//--------检查更新
//new Thread(GetAuthConfig).Start();
//new Thread(new JumpUpProductNew().Ini).Start();
@@ -182,6 +184,67 @@ namespace Work
Process.GetCurrentProcess().Kill();
}
public static void CheckUpdate()
{
try
{
// while (true)
{
string updatefilepath = System.Environment.CurrentDirectory + "\\Update.exe";
var url = BaseClass.BuildDefaultObjString("update/get_wx_finder_order_update");
//url = BaseClass.BuildDefaultObjString("update/get_update");
var data = UserLogin.GetSignaturex();
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
return;
var updateExeChk = BaseRegex.GetStringJson(ref html, "exe_check").ParseToString();
var updateExeAddress = BaseRegex.GetStringJson(ref html, "exe_address");
var newVersion = BaseRegex.GetIntJson(ref html, "next_version").ParseToInt();
var updateFileAddress = BaseRegex.GetStringJson(ref html, "file_address");
//updateFileAddress = updateFileAddress.Replace(newVersion.ParseToString(), BaseClass.MainPath + newVersion);
if (File.Exists(updatefilepath))
{
string fc = BaseClass.GetFileMd5(updatefilepath);
if (fc != updateExeChk)
{
NaiBa.Util.Helper.HttpHelper.DownloadFile(updateExeAddress, updatefilepath);
}
}
else // 如果自动更新exe文件不存在,则强制更新exe文件
NaiBa.Util.Helper.HttpHelper.DownloadFile(updateExeAddress, updatefilepath);
if (newVersion > BaseClass.VersionCount)
{
try
{
if (File.Exists(updatefilepath))
{
string fileName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
string arguments = "-" + fileName + "\r\n" + BaseClass.VersionCount + "\r\n" + newVersion + "\r\n" + updateFileAddress;
//File.WriteAllText(System.Environment.CurrentDirectory + "\\UpdateConfig.ini", arguments);
Process.Start(updatefilepath, arguments);
}
}
catch (Exception ex)
{
//BaseMsgForm.ShowError(ex.Message);
}
}
//Thread.Sleep(1000 * 60 * 60);
}
}
catch (Exception ex)
{
//BaseMsgForm.ShowError(ex.Message);
}
}
/// <summary>
/// 获取文件MD5值
/// </summary>