From 6c4f16b89794b35c50374080f19a704608926787 Mon Sep 17 00:00:00 2001 From: wule_5900x Date: Sun, 12 Apr 2026 23:42:44 +0800 Subject: [PATCH] =?UTF-8?q?1=E5=BE=AE=E5=BA=97=E6=8E=A5=E5=8F=A3=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E7=BD=91=E7=AB=99=20=202=E5=BE=AE=E5=BA=97=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E7=AE=A1=E7=90=86=E5=92=8C=E4=B8=8A=E8=B4=A7=E7=A7=BB?= =?UTF-8?q?=E6=A4=8D=2040%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/AllBase.csproj | 7 +- AllBase/BaseClass.cs | 6 +- AllBase/Helper/GlobalConfig.cs | 38 +- AllBase/HelperXiaoNaimao/DebugHelper.cs | 21 - AllBase/HelperXiaoNaimao/FileHelper.cs | 283 ---- AllBase/HelperXiaoNaimao/HtmlHelper.cs | 214 --- AllBase/HelperXiaoNaimao/HttpHelper.cs | 1108 ---------------- AllBase/HelperXiaoNaimao/LogHelper.cs | 145 -- AllBase/HelperXiaoNaimao/NaiBaGlobalConfig.cs | 89 -- .../VDianManage/VDianUploadSettingParam.cs | 54 + AllBase/Model/Result/VDianShopLoginInfo.cs | 2 + .../BLL/BXX/BXXProductManage.cs | 18 +- SignWeb/SignWeb.sln | 25 + SignWeb/SignWeb/692130.aspx | 17 + SignWeb/SignWeb/692130.aspx.cs | 17 + SignWeb/SignWeb/692130.aspx.designer.cs | 26 + SignWeb/SignWeb/Global.asax | 1 + SignWeb/SignWeb/Global.asax.cs | 16 + SignWeb/SignWeb/Properties/AssemblyInfo.cs | 35 + .../PublishProfiles/FolderProfile.pubxml | 16 + .../PublishProfiles/FolderProfile.pubxml.user | 180 +++ SignWeb/SignWeb/SignWeb.csproj | 146 ++ SignWeb/SignWeb/SignWeb.csproj.user | 39 + SignWeb/SignWeb/VDianAuth.aspx | 17 + SignWeb/SignWeb/VDianAuth.aspx.cs | 17 + SignWeb/SignWeb/VDianAuth.aspx.designer.cs | 26 + SignWeb/SignWeb/Web.Debug.config | 31 + SignWeb/SignWeb/Web.Release.config | 32 + SignWeb/SignWeb/Web.config | 17 + SignWeb/SignWeb/packages.config | 4 + TEMUKJD/BLL/VDian/VDianProductBLL.cs | 434 ++++++ ...nApiBLL.cs => VDianUpProdMappingApiBLL.cs} | 2 +- ...ngVDianBLL.cs => VDianUpProdMappingBLL.cs} | 8 +- TEMUKJD/KJD.csproj | 32 +- .../AdminForms/PDDAdminForm.Designer.cs | 14 +- TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs | 5 + .../ProductSelectForms/PDDDBProdListForm.cs | 2 +- .../PDDGetChanceProdForm.Designer.cs | 364 ++--- .../PDDGetChanceProdForm.cs | 6 +- .../PDDGetChanceProdForm.resx | 6 +- TEMUKJD/VDianForms/VDianShopListForm.cs | 900 +++++++++++++ .../VDianForms/VDianShopListForm.designer.cs | 492 +++++++ TEMUKJD/VDianForms/VDianShopListForm.resx | 334 +++++ .../VDianForms/VDianShopLoginForm.Designer.cs | 305 +++++ TEMUKJD/VDianForms/VDianShopLoginForm.cs | 576 ++++++++ TEMUKJD/VDianForms/VDianShopLoginForm.resx | 298 +++++ TEMUKJD/VDianForms/VDianUploadProductForm.cs | 1178 +++++++++++++++++ .../VDianUploadProductForm.designer.cs | 929 +++++++++++++ .../VDianForms/VDianUploadProductForm.resx | 177 +++ .../ProductForms/WXDBProdUploadForm.cs | 5 +- Work/CollectClass/JingXiCollect.cs | 6 +- 51 files changed, 6640 insertions(+), 2080 deletions(-) delete mode 100644 AllBase/HelperXiaoNaimao/DebugHelper.cs delete mode 100644 AllBase/HelperXiaoNaimao/FileHelper.cs delete mode 100644 AllBase/HelperXiaoNaimao/HtmlHelper.cs delete mode 100644 AllBase/HelperXiaoNaimao/HttpHelper.cs delete mode 100644 AllBase/HelperXiaoNaimao/LogHelper.cs delete mode 100644 AllBase/HelperXiaoNaimao/NaiBaGlobalConfig.cs create mode 100644 AllBase/Model/Param/VDianManage/VDianUploadSettingParam.cs create mode 100644 SignWeb/SignWeb.sln create mode 100644 SignWeb/SignWeb/692130.aspx create mode 100644 SignWeb/SignWeb/692130.aspx.cs create mode 100644 SignWeb/SignWeb/692130.aspx.designer.cs create mode 100644 SignWeb/SignWeb/Global.asax create mode 100644 SignWeb/SignWeb/Global.asax.cs create mode 100644 SignWeb/SignWeb/Properties/AssemblyInfo.cs create mode 100644 SignWeb/SignWeb/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 SignWeb/SignWeb/Properties/PublishProfiles/FolderProfile.pubxml.user create mode 100644 SignWeb/SignWeb/SignWeb.csproj create mode 100644 SignWeb/SignWeb/SignWeb.csproj.user create mode 100644 SignWeb/SignWeb/VDianAuth.aspx create mode 100644 SignWeb/SignWeb/VDianAuth.aspx.cs create mode 100644 SignWeb/SignWeb/VDianAuth.aspx.designer.cs create mode 100644 SignWeb/SignWeb/Web.Debug.config create mode 100644 SignWeb/SignWeb/Web.Release.config create mode 100644 SignWeb/SignWeb/Web.config create mode 100644 SignWeb/SignWeb/packages.config create mode 100644 TEMUKJD/BLL/VDian/VDianProductBLL.cs rename TEMUKJD/BLL/VDian/{MappingVDianApiBLL.cs => VDianUpProdMappingApiBLL.cs} (97%) rename TEMUKJD/BLL/VDian/{MappingVDianBLL.cs => VDianUpProdMappingBLL.cs} (99%) create mode 100644 TEMUKJD/VDianForms/VDianShopListForm.cs create mode 100644 TEMUKJD/VDianForms/VDianShopListForm.designer.cs create mode 100644 TEMUKJD/VDianForms/VDianShopListForm.resx create mode 100644 TEMUKJD/VDianForms/VDianShopLoginForm.Designer.cs create mode 100644 TEMUKJD/VDianForms/VDianShopLoginForm.cs create mode 100644 TEMUKJD/VDianForms/VDianShopLoginForm.resx create mode 100644 TEMUKJD/VDianForms/VDianUploadProductForm.cs create mode 100644 TEMUKJD/VDianForms/VDianUploadProductForm.designer.cs create mode 100644 TEMUKJD/VDianForms/VDianUploadProductForm.resx diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index 3484139..82d9a8d 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -165,12 +165,6 @@ - - - - - - @@ -207,6 +201,7 @@ + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 6768ab1..11cf140 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 976; + public static int VersionCount = 979; //public static int VersionCount = 613; /// @@ -49,6 +49,10 @@ namespace AllBase public static bool GroupMarket = false; public static bool IsLoginSuccess = false; /// + /// 微店Api地址 + /// + public static string VDianApi = "https://api.vdian.com/"; + /// /// IP地址和名称 /// public static string IPAddress = ""; diff --git a/AllBase/Helper/GlobalConfig.cs b/AllBase/Helper/GlobalConfig.cs index 59746b3..69ed406 100644 --- a/AllBase/Helper/GlobalConfig.cs +++ b/AllBase/Helper/GlobalConfig.cs @@ -4,9 +4,11 @@ using AllBase.Model.Param.ShopManage; using AllBase.Model.Param.TemuProductManage; using AllBase.Model.Result; using AllBase.Model.Result.WXResult; +using LittleCow.Model.Param.WeiDianManage; using NaiBa.Util; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -19,11 +21,10 @@ namespace AllBase.Helper /// 店铺列表 /// public static ConcurrentList ShopLoginList { get; set; } = new ConcurrentList(); - public static ConcurrentList BuyerLoginList { get; set; } = new ConcurrentList(); /// - /// 微店店铺列表 + /// 拼多多买手列表 /// - public static ConcurrentList WeiDianShopLoginList { get; set; } = new ConcurrentList(); + public static ConcurrentList BuyerLoginList { get; set; } = new ConcurrentList(); public static ConcurrentList WxTokenList { get; set; } = new ConcurrentList(); public static ConcurrentList WxCatList { get; set; } = new ConcurrentList(); @@ -42,5 +43,36 @@ namespace AllBase.Helper //public static string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"; public static string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + + + /// + /// 微店店铺列表 + /// + public static ConcurrentList VDianShopLoginList { get; set; } = new ConcurrentList(); + /// + /// 微店上货参数 + /// + public static WeiDianSettingParam WeiDianUploadParam { get; set; } + } + + public enum ShopPlatform + { + [Description("淘宝")] + TaoBao = 1, + + [Description("拼多多")] + PinDuoDuo = 2, + + [Description("爆单王")] + BaoDanWang = 3, + + [Description("苏宁")] + SuNing = 4, + + [Description("微店")] + WeiDian = 5, + + [Description("阿里巴巴")] + Alibaba = 6, } } diff --git a/AllBase/HelperXiaoNaimao/DebugHelper.cs b/AllBase/HelperXiaoNaimao/DebugHelper.cs deleted file mode 100644 index 3249a33..0000000 --- a/AllBase/HelperXiaoNaimao/DebugHelper.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AllBase.Helper -{ - public class DebugHelper - { - public static void WriteLine(string message, bool all = false) - { - Debug.WriteLine(message); - if (all) - { - Console.WriteLine(message); - } - } - } -} diff --git a/AllBase/HelperXiaoNaimao/FileHelper.cs b/AllBase/HelperXiaoNaimao/FileHelper.cs deleted file mode 100644 index d7f1362..0000000 --- a/AllBase/HelperXiaoNaimao/FileHelper.cs +++ /dev/null @@ -1,283 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; - -namespace AllBase.Helper -{ - public class FileHelper - { - /// - /// 删除文件夹及子文件内文件 - /// - /// - public static void DeleteFolder(string path) - { - try - { - if (Directory.Exists(path)) //如果存在这个文件夹删除之 - { - foreach (string d in Directory.GetFileSystemEntries(path)) - { - if (File.Exists(d)) - File.Delete(d); //直接删除其中的文件 - else - DeleteFolder(d); //递归删除子文件夹 - } - Directory.Delete(path, true); //删除已空文件夹 - } - } - catch (Exception ex) - { - LogHelper.WriteWithTime(ex); - } - } - - public static void DeleteFile(string filePath) - { - try - { - if (File.Exists(filePath)) - { - File.Delete(filePath); - } - } - catch (Exception ex) - { - LogHelper.WriteWithTime(ex); - } - } - - public static void CopyFolder(string sourceFolder, string destFolder) - { - CreateDirectory(destFolder); - string[] files = Directory.GetFiles(sourceFolder); - foreach (string file in files) - { - string name = Path.GetFileName(file); - string dest = Path.Combine(destFolder, name); - File.Copy(file, dest); - } - string[] folders = Directory.GetDirectories(sourceFolder); - foreach (string folder in folders) - { - string name = Path.GetFileName(folder); - string dest = Path.Combine(destFolder, name); - CopyFolder(folder, dest); - } - } - - public static void MoveFolder(string sourceFolder, string destFolder) - { - CreateDirectory(destFolder); - string[] files = Directory.GetFiles(sourceFolder); - foreach (string file in files) - { - string name = Path.GetFileName(file); - string dest = Path.Combine(destFolder, name); - if (File.Exists(dest)) - { - File.Delete(dest); - } - File.Move(file, dest); - } - string[] folders = Directory.GetDirectories(sourceFolder); - foreach (string folder in folders) - { - string name = Path.GetFileName(folder); - string dest = Path.Combine(destFolder, name); - if (File.Exists(dest)) - { - File.Delete(dest); - } - MoveFolder(folder, dest); - } - } - - public static string Execute(string command, int seconds) - { - string output = string.Empty; //输出字符串 - if (command != null && !command.Equals(string.Empty)) - { - Process process = new Process();//创建进程对象 - ProcessStartInfo startInfo = new ProcessStartInfo(); - startInfo.FileName = "cmd.exe";//设定需要执行的命令 - startInfo.Arguments = "/C " + command;//“/C”表示执行完命令后马上退出 - startInfo.UseShellExecute = false;//不使用系统外壳程序启动 - startInfo.RedirectStandardInput = false;//不重定向输入 - startInfo.RedirectStandardOutput = true; //重定向输出 - startInfo.CreateNoWindow = true;//不创建窗口 - process.StartInfo = startInfo; - try - { - if (process.Start())//开始进程 - { - if (seconds == 0) - { - process.WaitForExit();//这里无限等待进程结束 - } - else - { - process.WaitForExit(seconds); //等待进程结束,等待时间为指定的毫秒 - } - output = process.StandardOutput.ReadToEnd();//读取进程的输出 - } - } - catch (Exception ex) - { - Console.WriteLine(ex.Message);//捕获异常,输出异常信息 - } - finally - { - if (process != null) - { - process.Close(); - } - } - } - return output; - } - - public static void CreateDirectory(string dir) - { - if (Path.HasExtension(dir)) - { - dir = Path.GetDirectoryName(dir); - } - if (!Directory.Exists(dir)) - { - Directory.CreateDirectory(dir); - } - } - - public static string ReadAllText(string filePath, Encoding encoding = null) - { - if (encoding == null) - { - return File.ReadAllText(filePath, Encoding.UTF8); - } - else - { - return File.ReadAllText(filePath, encoding); - } - } - - public static void WriteAllText(string filePathOrName, string content, Encoding encoding = null) - { - string path = Path.Combine(GetApplicationDir(), filePathOrName); - CreateDirectory(path); - if (encoding == null) - { - File.WriteAllText(path, content, Encoding.UTF8); - } - else - { - File.WriteAllText(path, content, encoding); - } - } - - public static void AppendAllText(string filePathOrName, string content, Encoding encoding = null) - { - string path = Path.Combine(GetApplicationDir(), filePathOrName); - CreateDirectory(path); - List contentList = new List { content }; - if (encoding == null) - { - File.AppendAllLines(path, contentList, Encoding.UTF8); - } - else - { - File.AppendAllLines(path, contentList, encoding); - } - } - - #region 获取软件所在目录 - public static string GetApplicationDir() - { - return AppDomain.CurrentDomain.BaseDirectory; - } - #endregion - - public static string GetParentDir(string dir) - { - dir = dir.Trim(Path.DirectorySeparatorChar); - int last = dir.LastIndexOf(Path.DirectorySeparatorChar); - if (last > 0) - { - return dir.Substring(0, last); - } - return dir; - } - - public static string GetResourceFileContent(Assembly assembly, string resourceName) - { - using (Stream stream = assembly.GetManifestResourceStream(resourceName)) - { - using (StreamReader reader = new StreamReader(stream)) - { - string result = reader.ReadToEnd(); - return result; - } - } - } - - public static Stream GetResourceFileStream(Assembly assembly, string resourceName) - { - // 调用之后要释放 stream - Stream stream = assembly.GetManifestResourceStream(assembly.GetCustomAttribute().Title + "." + resourceName); - return stream; - } - - public static void SaveStream(Stream stream, string destPath) - { - CreateDirectory(destPath); - using (var fileStream = new FileStream(destPath, FileMode.Create, FileAccess.Write)) - { - stream.CopyTo(fileStream); - } - } - - public static long GetDirectorySize(string folderPath) - { - DirectoryInfo di = new DirectoryInfo(folderPath); - if (!di.Exists) - { - return 0; - } - return di.EnumerateFiles("*", SearchOption.AllDirectories).Sum(fi => fi.Length); - } - - public static void OpenUrl(string url) - { - try - { - Process.Start(url); - } - catch (Exception ex) - { - LogHelper.WriteWithTime(ex); - } - } - - public static void OpenDirectory(string dir) - { - Process.Start("explorer.exe", dir); - } - - public static string GetFileName(string dir) - { - string fileName = Path.GetFileName(dir); - int questionMark = fileName.IndexOf("?"); - if (questionMark > 0) - { - fileName = fileName.Substring(0, questionMark); - } - return fileName; - } - } -} diff --git a/AllBase/HelperXiaoNaimao/HtmlHelper.cs b/AllBase/HelperXiaoNaimao/HtmlHelper.cs deleted file mode 100644 index 47ba4e1..0000000 --- a/AllBase/HelperXiaoNaimao/HtmlHelper.cs +++ /dev/null @@ -1,214 +0,0 @@ -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Net; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; - -namespace AllBase.Helper -{ - public class HtmlHelper - { - public static string HtmlEncode(string html) - { - if (string.IsNullOrEmpty(html)) - { - return string.Empty; - } - else - { - return HttpUtility.HtmlEncode(html); - } - } - - public static string HtmlDecode(string url) - { - if (string.IsNullOrEmpty(url)) - { - return string.Empty; - } - else - { - return HttpUtility.HtmlDecode(url); - } - } - - /// - /// Unicode解码 - /// - /// - /// - public static string UnicodeDecode(string html) - { - html = WebUtility.HtmlDecode(html); - - Regex reUnicode = new Regex(@"\\u([0-9a-fA-F]{4})", RegexOptions.Compiled); - return reUnicode.Replace(html, m => - { - short c; - if (short.TryParse(m.Groups[1].Value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out c)) - { - return "" + (char)c; - } - return m.Value; - }); - } - - #region Resove - public static string Resove(string html, string prefix, string subfix) - { - int inl = html.IndexOf(prefix); - if (inl == -1) - { - prefix = prefix.Replace("\"", "'"); - subfix = subfix.Replace("\"", "'"); - inl = html.IndexOf(prefix); - } - if (inl == -1) - { - return null; - } - inl += prefix.Length; - if (!string.IsNullOrEmpty(subfix)) - { - int inl2 = html.IndexOf(subfix, inl); - if (inl2 == -1) - { - return null; - } - string result = html.Substring(inl, inl2 - inl); - return result; - } - else - { - string result = html.Substring(inl); - return result; - } - } - #endregion - - #region ResoveReverse - public static string ResoveReverse(string html, string subfix, string prefix) - { - int inl = html.IndexOf(subfix); - if (inl == -1) - { - return null; - } - string subString = html.Substring(0, inl); - int inl2 = subString.LastIndexOf(prefix); - if (inl2 == -1) - { - return null; - } - string s = subString.Substring(inl2 + prefix.Length, subString.Length - inl2 - prefix.Length); - return s; - } - #endregion - - #region ResoveList - public static List ResoveList(string html, string prefix, string subfix) - { - List list = new List(); - int index = 0; - do - { - index = html.IndexOf(prefix, index); - if (index == -1) - { - break; - } - index += prefix.Length; - int indexEnd = html.IndexOf(subfix, index); - if (indexEnd > 0) - { - string content = html.Substring(index, indexEnd - index); - list.Add(content); - } - index = indexEnd; - } - while (index > -1); - return list; - } - #endregion - - #region ResoveListByAT - public static List ResoveListByAT(string html) - { - List list = new List(); - - int index = html.IndexOf('@'); - while (index > 0) - { - int indexx = html.LastIndexOf("'", index); //向前一个单引号 - int indexy = html.IndexOf("'", index + 1); //向后一个单引号 - string s78 = html.Substring(indexx, indexy - indexx); - s78 = s78.Replace("'", ""); - list.Add(s78); - index = html.IndexOf('@', indexy); - } - return list; - } - #endregion - - /// - /// 清除HTML代码 - /// - /// - public static string ClearHtml(string html) - { - html = html.ParseToString(); - html = Regex.Replace(html, @"(|||)", string.Empty); - html = Regex.Replace(html, @"()", string.Empty); - html = Regex.Replace(html, "(<[^>]*?>)", string.Empty); - return html; - } - - public static string GetHtmlText(string html) - { - html = html.ParseToString(); - html = Regex.Replace(html, "<.*?>", string.Empty); - return html; - } - - /// - /// 清除HTML代码A标签 - /// - /// - /// - public static string ClearHtmlA(string html) - { - html = html.ParseToString(); - html = Regex.Replace(html, "(]*>)", "", RegexOptions.IgnoreCase); - return html.Trim(); - } - - public static string AddEscapeCharacter(string html) - { - html = html.ParseToString(); - html = html.Replace("\"", "\\\""); - html = html.Replace("'", "\\'"); - return html; - } - - public static string TrimBOM(string html) - { - html = html.Trim(new char[] { '\uFEFF' }); - return html; - } - - public static string TrimJsonp(string json) - { - int start = json.IndexOf("{"); - int end = json.LastIndexOf("}"); - if (start > 0 && end > 0) - { - return json.Substring(start, end - start + 1); - } - return json; - } - } -} diff --git a/AllBase/HelperXiaoNaimao/HttpHelper.cs b/AllBase/HelperXiaoNaimao/HttpHelper.cs deleted file mode 100644 index fcb12d3..0000000 --- a/AllBase/HelperXiaoNaimao/HttpHelper.cs +++ /dev/null @@ -1,1108 +0,0 @@ -using AllBase.Extension; -using NaiBa.Util.Extension; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Net; -using System.Net.Security; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; - -namespace AllBase.Helper -{ - public class HttpHelper - { - private const int RequestTimeout = 60 * 1000; - private const int DownloadTimeout = 300 * 1000; - - static HttpHelper() - { - InitHttpsCertificate(); - } - - public static string UrlDecode(string url) - { - if (string.IsNullOrEmpty(url)) - { - return string.Empty; - } - else - { - return HttpUtility.UrlDecode(url); - } - } - - public static string UrlDecode(string url, Encoding encoding) - { - if (string.IsNullOrEmpty(url)) - { - return string.Empty; - } - else - { - return System.Web.HttpUtility.UrlDecode(url, encoding); - } - } - - public static string UrlEncode(string url, bool isUppercase = false) - { - if (string.IsNullOrEmpty(url)) - { - return string.Empty; - } - else - { - string encodeUrl = HttpUtility.UrlEncode(url, Encoding.UTF8); - if (isUppercase) - { - Regex reg = new Regex(@"%[a-f0-9]{2}"); - encodeUrl = reg.Replace(encodeUrl, m => m.Value.ToUpperInvariant()); - } - return encodeUrl; - } - } - - public static string UrlEncode(string url, Encoding encoding) - { - if (string.IsNullOrEmpty(url)) - { - return string.Empty; - } - else - { - string encodeUrl = HttpUtility.UrlEncode(url, encoding); - return encodeUrl; - } - } - - public static string UnicodeToASCII(string unicode) - { - string result = string.Empty; - if (!string.IsNullOrEmpty(unicode)) - { - Encoding utf8 = Encoding.UTF8; - Encoding ascii = Encoding.ASCII; - - string input = unicode; - result = ascii.GetString(Encoding.Convert(utf8, ascii, utf8.GetBytes(input))); - result = result.Trim('?'); - } - return result; - } - - public static string UnicodeToString(string html) - { - return new Regex(@"\\u([0-9A-F]{4})", RegexOptions.IgnoreCase | RegexOptions.Compiled).Replace(html, x => string.Empty + Convert.ToChar(Convert.ToUInt16(x.Result("$1"), 16))); - } - - public static string StringToUnicode(string html) - { - byte[] bytes = Encoding.Unicode.GetBytes(html); - StringBuilder builder = new StringBuilder(); - for (int i = 0; i < bytes.Length; i += 2) - { - builder.AppendFormat("\\u{0}{1}", bytes[i + 1].ToString("x").PadLeft(2, '0'), bytes[i].ToString("x").PadLeft(2, '0')); - } - return builder.ToString(); - } - - public static string FilterCookie(string url, string cookieListJson) - { - var uri = new Uri(url); - var domainList = new List(); - string domain = uri.Host; - int index = 0; - while (true) - { - domainList.Add(domain); - index = domain.IndexOf('.', 0); - if (index > 0) - { - domain = domain.Substring(index + 1); - } - else - { - break; - } - if (domain == "com" || domain == "cn" || domain == "com.cn") - { - break; - } - } - string cookie = string.Empty; - JArray jArr = JArray.Parse(cookieListJson); - foreach (var item in jArr) - { - string name = item["Name"].ParseToString(); - string value = item["Value"].ParseToString(); - domain = item["Domain"].ParseToString(); - if (!domainList.Contains(domain.Trim('.'))) - { - continue; - } - cookie += $"{name}={value};"; - } - return cookie; - } - - public static string ParseCookieJsonToString(string cookieListJson) - { - string cookie = string.Empty; - JArray jArr = JArray.Parse(cookieListJson); - foreach (var item in jArr) - { - string name = item["Name"].ParseToString(); - string value = item["Value"].ParseToString(); - cookie += $"{name}={value};"; - } - return cookie; - } - - public static Dictionary ParseCookieJsonToDictionary(string cookieListJson) - { - Dictionary dict = new Dictionary(); - JArray jArr = JArray.Parse(cookieListJson); - foreach (var item in jArr) - { - string name = item["Name"].ParseToString(); - string value = item["Value"].ParseToString(); - if (!dict.ContainsKey(name)) - { - dict.Add(name, value); - } - } - return dict; - } - - public static Dictionary ParseCookieStringToDictionary(string cookie) - { - Dictionary dict = new Dictionary(); - var cookieArr = cookie.SplitToArray(";"); - foreach (string line in cookieArr) - { - int index = line.IndexOf('='); - if (index > 0) - { - string key = line.Substring(0, index).Trim(); - string value = line.Substring(index + 1); - if (!dict.ContainsKey(key)) - { - dict.Add(key, value); - } - } - } - return dict; - } - - public static void AddHeader(HttpParam httpParam, string key, string value) - { - if (httpParam.Header == null) - { - httpParam.Header = new Dictionary(); - } - httpParam.Header.Remove(key); - httpParam.Header.Add(key, value); - } - - public static string AddHttps(string url) - { - if (url.StartsWith("//")) - { - url = "https:" + url; - } - return url; - } - - #region 是否是网址 - public static bool IsUrl(string url) - { - url = url.ParseToString().ToLower(); - if (url.StartsWith("http://") || url.StartsWith("https://")) - { - return true; - } - else - { - return false; - } - } - #endregion - - /// - /// 支持解析的url - /// https://shopee.co.th/--i.141607853.2809189585 or a=1&b=2 - /// - /// - /// - public static Dictionary ResolveUrlParamToDictionary(string url) - { - if (string.IsNullOrEmpty(url)) - { - return new Dictionary(); - } - Dictionary dict = new Dictionary(); - string partOne = string.Empty; - string partTwo = string.Empty; - - int questionMark = url.IndexOf('?'); - if (questionMark > 0) - { - partOne = url.Substring(0, questionMark); - partTwo = url.Substring(questionMark + 1); - } - else - { - int slashMark = url.IndexOf('/'); - int firstEqualSign = url.IndexOf('='); - if (firstEqualSign == -1) - { - partOne = url; - } - else - { - if (firstEqualSign > slashMark) - { - partTwo = url; - } - else - { - if (slashMark > 0) - { - partOne = url.Substring(0, slashMark); - partTwo = url.Substring(slashMark + 1); - } - else - { - partOne = url; - } - } - } - } - dict.Add("[url]", partOne); - if (!string.IsNullOrEmpty(partTwo)) - { - string[] queryParams = partTwo.Split('&').OrderBy(p => p).ToArray(); - foreach (string query in queryParams) - { - if (query.Contains("=")) - { - string[] single = query.Split('='); - if (!dict.Keys.Contains(single[0])) - { - dict.Add(single[0], HttpHelper.UrlDecode(single[1])); - } - } - else - { - dict.Add(query, string.Empty); - } - } - } - return dict; - } - - public static bool CheckNetworkAvailable() - { - return System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); - } - - #region Get请求 - public static string Get(HttpParam httpParam, bool throwException = false) - { - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "GET"; - SetHttpWebRequest(request, httpParam); - return ReadResponse(httpParam, (HttpWebResponse)request.GetResponse()); - } - catch (Exception ex) - { - return GetHttpContentWhenException(httpParam, ex, throwException); - } - } - - public static async Task GetAsync(HttpParam httpParam, bool throwException = false) - { - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "GET"; - SetHttpWebRequest(request, httpParam); - return await ReadResponseAsync(httpParam, (HttpWebResponse)request.GetResponse()); - } - catch (Exception ex) - { - return GetHttpContentWhenException(httpParam, ex, throwException); - } - } - - public static byte[] GetByte(HttpParam httpParam, bool throwException = false) - { - if (string.IsNullOrEmpty(httpParam.Url)) - { - return default(byte[]); - } - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "GET"; - SetHttpWebRequest(request, httpParam); - return ReadResponseByte(request); - } - catch (Exception ex) - { - GetHttpContentWhenException(httpParam, ex, throwException); - } - return default(byte[]); - } - - public static async Task GetByteAsync(HttpParam httpParam, bool throwException = false) - { - if (string.IsNullOrEmpty(httpParam.Url)) - { - return default(byte[]); - } - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "GET"; - SetHttpWebRequest(request, httpParam); - return await ReadResponseByteAsync(request); - } - catch (Exception ex) - { - GetHttpContentWhenException(httpParam, ex, throwException); - } - return default(byte[]); - } - - public static HttpResult GetHttpResult(HttpParam httpParam, bool throwException = false) - { - HttpResult httpResult = new HttpResult(); - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "GET"; - SetHttpWebRequest(request, httpParam); - ReadResponse(httpParam, httpResult, (HttpWebResponse)request.GetResponse()); - UpdateCookie(httpParam, httpResult); - } - catch (Exception ex) - { - GetHttpContentWhenException(httpParam, ex, throwException); - } - return httpResult; - } - - public static async Task GetHttpResultAsync(HttpParam httpParam, bool throwException = false) - { - HttpResult httpResult = new HttpResult(); - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "GET"; - SetHttpWebRequest(request, httpParam); - await ReadResponseAsync(httpParam, httpResult, (HttpWebResponse)request.GetResponse()); - } - catch (Exception ex) - { - GetHttpContentWhenException(httpParam, ex, throwException); - } - return httpResult; - } - #endregion - - #region Post请求 - public static string Post(HttpParam httpParam, bool throwException = false) - { - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - if (string.IsNullOrEmpty(httpParam.Method)) - { - request.Method = "POST"; - } - else - { - request.Method = httpParam.Method; - } - SetHttpWebRequest(request, httpParam); - SetPostData(request, httpParam.PostData); - return ReadResponse(httpParam, (HttpWebResponse)request.GetResponse()); - } - catch (Exception ex) - { - return GetHttpContentWhenException(httpParam, ex, throwException); - } - } - - public static async Task PostAsync(HttpParam httpParam, bool throwException = false) - { - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "POST"; - SetHttpWebRequest(request, httpParam); - SetPostData(request, httpParam.PostData); - return await ReadResponseAsync(httpParam, (HttpWebResponse)request.GetResponse()); - } - catch (Exception ex) - { - return GetHttpContentWhenException(httpParam, ex, throwException); - } - } - - public static byte[] PostByte(HttpParam httpParam, bool throwException = false) - { - if (string.IsNullOrEmpty(httpParam.Url)) - { - return default(byte[]); - } - try - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "POST"; - SetHttpWebRequest(request, httpParam); - SetPostData(request, httpParam.PostData); - return ReadResponseByte(request); - } - catch (Exception ex) - { - GetHttpContentWhenException(httpParam, ex, throwException); - } - return default(byte[]); - } - - /// - /// Post表单、文件或者二者都有 - /// - /// - /// - /// - public static string PostForm(HttpParam httpParam, List postDataList, bool throwException = false) - { - try - { - string html = string.Empty; - using (MemoryStream memoryStream = new MemoryStream()) - { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(httpParam.Url); - request.Method = "POST"; - request.Headers.Remove("Cookie"); - if (!string.IsNullOrEmpty(httpParam.Cookie)) - { - request.Headers.Add("Cookie", httpParam.Cookie); - } - // 边界符 - var boundary = "----WebKitFormBoundary" + DateTime.Now.Ticks.ToString("x"); - // 边界符 - var beginBoundary = Encoding.ASCII.GetBytes("--" + boundary + "\r\n"); - // 最后的结束符 - var endBoundary = Encoding.ASCII.GetBytes("--" + boundary + "--\r\n"); - memoryStream.Write(beginBoundary, 0, beginBoundary.Length); - // 设置属性 - request.ContentType = "multipart/form-data; boundary=" + boundary; - for (int i = 0; i < postDataList.Count; i++) - { - PostDataParam postData = postDataList[i]; - string header = string.Empty; - byte[] headerBytes = null; - string contentType = "application/octet-stream"; - string fileName = "blob"; - if (!string.IsNullOrEmpty(postData.ContentType)) - { - contentType = postData.ContentType; - } - if (!string.IsNullOrEmpty(postData.FileName)) - { - fileName = postData.FileName; - } - switch (postData.Type) - { - case PostDataTypeEnum.String: - // 写入字符串的Key - var stringKeyHeader = "Content-Disposition: form-data; name=\"{0}\"" + "\r\n\r\n{1}\r\n"; - header = string.Format(stringKeyHeader, postData.FieldName, postData.Value); - headerBytes = Encoding.UTF8.GetBytes(header); - memoryStream.Write(headerBytes, 0, headerBytes.Length); - break; - - case PostDataTypeEnum.FileByteOrFilePath: - // 写入文件 - string filePartHeader = "Content-Disposition: form-data; name=\"{0}\"; filename=\"{1}\"\r\n" + "Content-Type: " + contentType + "\r\n\r\n"; - header = string.Format(filePartHeader, postData.FieldName, fileName); - headerBytes = Encoding.UTF8.GetBytes(header); - memoryStream.Write(headerBytes, 0, headerBytes.Length); - if (postData.Value.GetType().IsArray) - { - headerBytes = postData.Value as byte[]; - memoryStream.Write(headerBytes, 0, headerBytes.Length); - } - else - { - byte[] buffer = File.ReadAllBytes(postData.Value.ParseToString()); - memoryStream.Write(buffer, 0, buffer.Length); - } - string end = "\r\n"; - headerBytes = Encoding.UTF8.GetBytes(end); - memoryStream.Write(headerBytes, 0, headerBytes.Length); - break; - } - if (i != postDataList.Count - 1) - { - memoryStream.Write(beginBoundary, 0, beginBoundary.Length); - } - else - { - // 写入最后的结束边界符 - memoryStream.Write(endBoundary, 0, endBoundary.Length); - } - } - request.ContentLength = memoryStream.Length; - using (Stream requestStream = request.GetRequestStream()) - { - memoryStream.Position = 0; - byte[] tempBuffer = new byte[memoryStream.Length]; - memoryStream.Read(tempBuffer, 0, tempBuffer.Length); - requestStream.Write(tempBuffer, 0, tempBuffer.Length); - - using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) - { - using (Stream responseStream = response.GetResponseStream()) - { - byte[] buffer = new byte[1024]; - int read; - while ((read = responseStream.Read(buffer, 0, buffer.Length)) > 0) - { - html += Encoding.UTF8.GetString(buffer, 0, read); - } - } - response.Close(); - } - } - } - return html; - } - catch (Exception ex) - { - return GetHttpContentWhenException(httpParam, ex, throwException); - } - } - #endregion - - #region 下载文件 - - #endregion - - public static void SetHttpWebRequest(HttpWebRequest request, HttpParam param) - { - if (param.Proxy != null) - { - request.Proxy = param.Proxy; - } - else - { - //request.Proxy = NaiBaGlobalConfig.GetDevelopProxy(param.Url); - } - if (!string.IsNullOrEmpty(param.UserAgent)) - { - request.UserAgent = param.UserAgent; - } - else - { - request.UserAgent = GlobalConfig.UserAgent; - } - if (!string.IsNullOrEmpty(param.Accept)) - { - request.Accept = param.Accept; - } - else - { - request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; - } - if (string.IsNullOrEmpty(param.AcceptLanguage)) - { - request.Headers.Add("Accept-Language", "zh-CN,zh;q=0.9,en;q=0.8"); - } - else - { - request.Headers.Add("Accept-Language", param.AcceptLanguage); - } - if (request.Method.ToUpper() != "GET") - { - if (!string.IsNullOrEmpty(param.ContentType)) - { - request.ContentType = param.ContentType; - } - else - { - request.ContentType = "application/x-www-form-urlencoded;charset=UTF-8"; - } - } - if (!string.IsNullOrEmpty(param.Referer)) - { - request.Referer = param.Referer; - } - request.Headers.Remove("Cookie"); - if (!string.IsNullOrEmpty(param.Cookie)) - { - request.Headers.Add("Cookie", param.Cookie); - } - if (param.Header == null) - { - param.Header = new Dictionary(); - } - if (!param.Header.Where(p => p.Key.ToLower() == "Accept-Encoding".ToLower()).Any()) - { - param.Header.Add("Accept-Encoding", "gzip, deflate"); - } - if (param.Header != null) - { - foreach (KeyValuePair header in param.Header) - { - request.Headers.Add(header.Key, header.Value); - } - } - if (param.Timeout > 0) - { - request.Timeout = param.Timeout * 1000; - } - else - { - request.Timeout = RequestTimeout; - } - } - - public static void SetPostData(HttpWebRequest request, string postData) - { - request.ServicePoint.Expect100Continue = false; - byte[] postDataByte = Encoding.UTF8.GetBytes(postData ?? string.Empty); - request.ContentLength = postDataByte.Length; - request.AllowAutoRedirect = false; - using (Stream requestStream = request.GetRequestStream()) - { - requestStream.Write(postDataByte, 0, postDataByte.Length); - } - } - - private static Encoding GetResponseEncoding(HttpParam httpParam, HttpWebResponse response) - { - if (!string.IsNullOrEmpty(response.CharacterSet)) - { - Encoding encoding = Encoding.GetEncoding(response.CharacterSet); - return encoding; - } - else - { - return httpParam.ResponseEncoding; - } - } - - public static string ReadResponse(HttpParam httpParam, HttpWebResponse response) - { - using (Stream stream = DecompressStream(response)) - { - using (StreamReader streamReader = new StreamReader(stream, GetResponseEncoding(httpParam, response))) - { - return streamReader.ReadToEnd(); - } - } - } - - public static void ReadResponse(HttpParam httpParam, HttpResult httpResult, HttpWebResponse response) - { - httpResult.CookieCollection = GetCookieFromResponse(string.Empty, response); - using (Stream stream = DecompressStream(response)) - { - using (StreamReader streamReader = new StreamReader(stream, GetResponseEncoding(httpParam, response))) - { - httpResult.Html = streamReader.ReadToEnd(); - } - } - } - - public static async Task ReadResponseAsync(HttpParam httpParam, HttpWebResponse response) - { - using (Stream stream = DecompressStream(response)) - { - using (StreamReader streamReader = new StreamReader(stream, GetResponseEncoding(httpParam, response))) - { - return await streamReader.ReadToEndAsync(); - } - } - } - - public static async Task ReadResponseAsync(HttpParam httpParam, HttpResult httpResult, HttpWebResponse response) - { - httpResult.CookieCollection = GetCookieFromResponse(string.Empty, response); - using (Stream stream = DecompressStream(response)) - { - using (StreamReader streamReader = new StreamReader(stream, GetResponseEncoding(httpParam, response))) - { - httpResult.Html = await streamReader.ReadToEndAsync(); - } - } - } - - public static Stream DecompressStream(HttpWebResponse response) - { - Stream responseStream = response.GetResponseStream(); - Stream stream = null; - if (response.ContentEncoding.ToLower().Contains("gzip")) - { - stream = new GZipStream(responseStream, CompressionMode.Decompress); - } - else if (response.ContentEncoding.ToLower().Contains("deflate")) - { - stream = new DeflateStream(responseStream, CompressionMode.Decompress); - } - if (stream == null) - { - return responseStream; - } - else - { - return stream; - } - } - - public static byte[] ReadResponseByte(HttpWebRequest request) - { - using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) - { - using (BinaryReader binaryReader = new BinaryReader(response.GetResponseStream())) - { - using (MemoryStream ms = new MemoryStream()) - { - byte[] buffer = binaryReader.ReadBytes(1024); - while (buffer.Length > 0) - { - ms.Write(buffer, 0, buffer.Length); - buffer = binaryReader.ReadBytes(1024); - } - byte[] fileByte = new byte[ms.Length]; - ms.Position = 0; - ms.Read(fileByte, 0, fileByte.Length); - return fileByte; - } - } - } - } - - public static async Task ReadResponseByteAsync(HttpWebRequest request) - { - using (HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync()) - { - using (BinaryReader binaryReader = new BinaryReader(response.GetResponseStream())) - { - using (MemoryStream ms = new MemoryStream()) - { - byte[] buffer = binaryReader.ReadBytes(1024); - while (buffer.Length > 0) - { - ms.Write(buffer, 0, buffer.Length); - buffer = binaryReader.ReadBytes(1024); - } - byte[] fileByte = new byte[ms.Length]; - ms.Position = 0; - ms.Read(fileByte, 0, fileByte.Length); - return fileByte; - } - } - } - } - - #region 请求异常处理 - private static string GetHttpContentWhenException(HttpParam httpParam, Exception ex, bool throwException = false) - { - TestProxyLog(httpParam, ex); - LogHelper.WriteWithTime(ex); - if (throwException) - { - throw ex; - } - else - { - WebException webException = ex as WebException; - if (webException != null && webException.Response != null) - { - return ReadResponse(httpParam, (HttpWebResponse)webException.Response); - } - } - return string.Empty; - } - - private static void TestProxyLog(HttpParam httpParam, Exception ex) - { - if (httpParam.Proxy != null) - { - Debug.WriteLine("代理ip:" + httpParam.Proxy?.Address.ParseToString() + " 请求Url:" + httpParam.Url + " 错误信息:" + ex.GetOriginalException().Message); - } - else - { - DebugHelper.WriteLine("请求Url:" + httpParam.Url + " 错误信息:" + ex.GetOriginalException().Message); - } - } - #endregion - - #region 解析Response Cookie - private static CookieCollection GetCookieFromResponse(string host, HttpWebResponse response) - { - string setCookie = string.Empty; - if (response.Headers.AllKeys.Contains("Set-Cookie")) - { - setCookie = response.Headers["Set-Cookie"]; - } - if (response.Headers.AllKeys.Contains("set-cookie")) - { - setCookie = response.Headers["set-cookie"]; - } - ArrayList al = new ArrayList(); - CookieCollection cc = new CookieCollection(); - if (!string.IsNullOrEmpty(setCookie)) - { - al = ConvertCookieToArrayList(setCookie); - cc = ConvertCookieArraysToCookieCollection(al, host); - } - return cc; - } - private static ArrayList ConvertCookieToArrayList(string setCookie) - { - setCookie = setCookie.Replace("\r", ""); - setCookie = setCookie.Replace("\n", ""); - string[] strCookTemp = setCookie.Split(','); - ArrayList al = new ArrayList(); - int i = 0; - int n = strCookTemp.Length; - while (i < n) - { - if (strCookTemp[i].IndexOf("expires=", StringComparison.OrdinalIgnoreCase) > 0) - { - al.Add(strCookTemp[i] + "," + strCookTemp[i + 1]); - i = i + 1; - } - else - { - al.Add(strCookTemp[i]); - } - i = i + 1; - } - return al; - } - private static CookieCollection ConvertCookieArraysToCookieCollection(ArrayList al, string host) - { - CookieCollection cc = new CookieCollection(); - - int alcount = al.Count; - string strEachCook; - string[] strEachCookParts; - for (int i = 0; i < alcount; i++) - { - strEachCook = al[i].ToString(); - strEachCookParts = strEachCook.Split(';'); - int intEachCookPartsCount = strEachCookParts.Length; - string strCNameAndCValue = string.Empty; - string strPNameAndPValue = string.Empty; - string strDNameAndDValue = string.Empty; - string[] NameValuePairTemp; - Cookie cookTemp = new Cookie(); - - for (int j = 0; j < intEachCookPartsCount; j++) - { - if (j == 0) - { - strCNameAndCValue = strEachCookParts[j]; - if (strCNameAndCValue != string.Empty) - { - int firstEqual = strCNameAndCValue.IndexOf("="); - string firstName = strCNameAndCValue.Substring(0, firstEqual); - string allValue = strCNameAndCValue.Substring(firstEqual + 1, strCNameAndCValue.Length - (firstEqual + 1)); - cookTemp.Name = firstName; - cookTemp.Value = allValue; - } - continue; - } - if (strEachCookParts[j].IndexOf("path", StringComparison.OrdinalIgnoreCase) >= 0) - { - strPNameAndPValue = strEachCookParts[j]; - if (strPNameAndPValue != string.Empty) - { - NameValuePairTemp = strPNameAndPValue.Split('='); - if (NameValuePairTemp[1] != string.Empty) - { - cookTemp.Path = NameValuePairTemp[1]; - } - else - { - cookTemp.Path = "/"; - } - } - continue; - } - - if (strEachCookParts[j].IndexOf("domain", StringComparison.OrdinalIgnoreCase) >= 0) - { - strPNameAndPValue = strEachCookParts[j]; - if (strPNameAndPValue != string.Empty) - { - NameValuePairTemp = strPNameAndPValue.Split('='); - - if (NameValuePairTemp[1] != string.Empty) - { - cookTemp.Domain = NameValuePairTemp[1]; - } - else - { - cookTemp.Domain = host; - } - } - continue; - } - } - - if (cookTemp.Path == string.Empty) - { - cookTemp.Path = "/"; - } - if (cookTemp.Domain == string.Empty) - { - cookTemp.Domain = host; - } - cc.Add(cookTemp); - } - return cc; - } - private static void UpdateCookie(HttpParam httpParam, HttpResult httpResult) - { - List rawCookieList = new List(); - if (!string.IsNullOrEmpty(httpParam.Cookie)) - { - rawCookieList = httpParam.Cookie.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries).Select(p => p.Trim()).ToList(); - } - foreach (Cookie cookie in httpResult.CookieCollection) - { - string newCookie = cookie.Name + "=" + cookie.Value; - if (rawCookieList.Where(p => p.StartsWith(cookie.Name + "=")).Any()) - { - rawCookieList.RemoveAll(p => p.StartsWith(cookie.Name + "=")); - rawCookieList.Add(newCookie); - } - else - { - rawCookieList.Add(newCookie); - } - } - if (rawCookieList.Any()) - { - httpParam.Cookie = string.Join(";", rawCookieList); - } - } - #endregion - - #region 设置Https - public static void InitHttpsCertificate() - { - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; - ServicePointManager.ServerCertificateValidationCallback += ValidateRemoteCertificate; - } - - /// - /// Certificate validation callback. - /// - private static bool ValidateRemoteCertificate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) - { - // If the certificate is a valid, signed certificate, return true. - if (error == SslPolicyErrors.None) - { - return true; - } - Console.WriteLine("X509Certificate [{0}] Policy Error: '{1}'", cert.Subject, error.ToString()); - return false; - } - #endregion - } - - public class HttpParam - { - public HttpParam() - { - ResponseEncoding = Encoding.UTF8; - } - public string Url { get; set; } - public string Method { get; set; } - public string PostData { get; set; } - public string ContentType { get; set; } - public string Cookie { get; set; } - public string Referer { get; set; } - public string UserAgent { get; set; } - public UserAgentTypeEnum UserAgentType { get; set; } - public string AcceptLanguage { get; set; } - public string Accept { get; set; } - [JsonIgnore] - public WebProxy Proxy { get; set; } - /// - /// 秒 - /// - public int Timeout { get; set; } - public Dictionary Header { get; set; } - public int ProxySleep { get; set; } - public int TryTimes { get; set; } - public int ActualTryTimes { get; set; } - [JsonIgnore] - public CancellationTokenSource CancellationTokenSource { get; set; } - [JsonIgnore] - public Encoding ResponseEncoding { get; set; } - public HttpResultTypeEnum ResultType { get; set; } - } - - public class PostDataParam - { - public PostDataTypeEnum Type { get; set; } - /// - /// 字段名 - /// - public string FieldName { get; set; } - /// - /// 文件名 - /// - public string FileName { get; set; } - /// - /// 可以是 string 或者 byte[] - /// - public object Value { get; set; } - public string ContentType { get; set; } - } - - public class HttpResult - { - public CookieCollection CookieCollection { get; set; } - public string Html { get; set; } - public byte[] Byte { get; set; } - } - - public enum PostDataTypeEnum - { - [Description("字符串")] - String, - - [Description("文件流或者文件路径")] - FileByteOrFilePath - } - - public enum HttpResultTypeEnum - { - String, //表示只返回字符串 - Byte //表示返回字符串和字节流 - } -} diff --git a/AllBase/HelperXiaoNaimao/LogHelper.cs b/AllBase/HelperXiaoNaimao/LogHelper.cs deleted file mode 100644 index fdfbb79..0000000 --- a/AllBase/HelperXiaoNaimao/LogHelper.cs +++ /dev/null @@ -1,145 +0,0 @@ -using AllBase.Extension; -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AllBase.Helper -{ - public class LogHelper - { - private static object lockHelper = new object(); - - #region 写文本日志 - /// - /// 写日志 异步 - /// 默认路径:根目录/Log/yyyy-MM/ - /// 默认文件:yyyy-MM-dd.log - /// - /// 日志内容 自动附加时间 - public static void Write(string logContent) - { - string logPath = DateTime.Now.ToString("yyyy-MM"); - Write(logPath, logContent); - } - - public static void WriteWithTime(string logContent) - { - string logPath = DateTime.Now.ToString("yyyy-MM"); - logContent = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + Environment.NewLine + logContent; - Write(logPath, logContent); - } - #endregion - - #region 写异常日志 - /// - /// 写异常日志 - /// - /// - public static void Write(Exception ex) - { - string logContent = string.Empty; - string logPath = DateTime.Now.ToString("yyyy-MM"); - logContent += GetExceptionMessage(ex); - Write(logPath, logContent); - } - - public static void WriteWithTime(Exception ex, string messageExtend = "") - { - string logContent = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + Environment.NewLine; - string logPath = DateTime.Now.ToString("yyyy-MM"); - logContent += GetExceptionMessage(ex, messageExtend); - Write(logPath, logContent); - } - - private static string GetExceptionMessage(Exception ex, string messageExtend = "") - { - string message = string.Empty; - if (ex != null) - { - message += ex.Message; - message += Environment.NewLine; - if (!string.IsNullOrEmpty(messageExtend)) - { - message += messageExtend; - message += Environment.NewLine; - } - Exception originalException = ex.GetOriginalException(); - if (originalException != null) - { - if (originalException.Message != ex.Message) - { - message += originalException.Message; - message += Environment.NewLine; - } - } - message += ex.StackTrace; - message += Environment.NewLine; - } - return message; - } - #endregion - - #region 写日志到指定路径 - /// - /// 写日志 异步 - /// 默认文件:yyyy-MM-dd.log - /// - /// 日志目录[默认程序根目录\Log\下添加,故使用相对路径,如:营销任务] - /// 日志内容 自动附加时间 - public static void Write(string logPath, string logContent) - { - string logFileName = DateTime.Now.ToString("yyyy-MM-dd") + ".log"; - Write(logPath, logFileName, logContent); - } - - /// - /// 写日志 异步 - /// - /// 日志目录 - /// 日志文件名 - /// 日志内容 自动附加时间 - public static void Write(string logPath, string logFileName, string logContent) - { - if (string.IsNullOrWhiteSpace(logContent)) - { - return; - } - if (string.IsNullOrWhiteSpace(logPath)) - { - logPath = Path.Combine(FileHelper.GetApplicationDir(), NaiBaGlobalConfig.Log, DateTime.Now.ToString("yyyy-MM")); - } - else - { - logPath = Path.Combine(FileHelper.GetApplicationDir(), NaiBaGlobalConfig.Log, logPath.Trim('\\')); - } - if (string.IsNullOrWhiteSpace(logFileName)) - { - logFileName = DateTime.Now.ToString("yyyy-MM-dd") + ".log"; - } - if (!Directory.Exists(logPath)) - { - Directory.CreateDirectory(logPath); - } - string fileName = Path.Combine(logPath, logFileName); - Action taskAction = () => - { - lock (lockHelper) - { - using (StreamWriter sw = File.AppendText(fileName)) - { - sw.WriteLine(logContent + Environment.NewLine); - sw.Flush(); - sw.Close(); - } - } - }; - Task task = new Task(taskAction); - task.Start(); - } - #endregion - } -} diff --git a/AllBase/HelperXiaoNaimao/NaiBaGlobalConfig.cs b/AllBase/HelperXiaoNaimao/NaiBaGlobalConfig.cs deleted file mode 100644 index 84545b5..0000000 --- a/AllBase/HelperXiaoNaimao/NaiBaGlobalConfig.cs +++ /dev/null @@ -1,89 +0,0 @@ -using NaiBa.Util.Extension; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Tasks; - -namespace AllBase.Helper -{ - public class NaiBaGlobalConfig - { - public static bool IsDevelopment { get; set; } // 判断是否是开发环境 - public static bool IsNewFeature { get; set; } - public static bool IsNotNeedLogin = false; - public static DateTime DefaultDateTime = "2000-01-01 00:00:00".ParseToDateTime(); - public static string Proxy = "127.0.0.1:8888"; // 请求Fiddler代理,仅做开发测试使用 - public static string VersionUrl = "https://update.qixiaoke.com/updatex/kingdragorse.php"; - public static string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"; - public static List NoProxyDomainList = new List(); // 不走系统代理的域名 - public static string ResourcesFileRelativeDir = @"Resources\file\"; - public static string ResourcesFileAbsolutePath = Path.Combine(FileHelper.GetApplicationDir(), ResourcesFileRelativeDir); - - public const string Data = "data"; // data 文件目录 - public const string Config = "config"; // config 文件目录 - public const string Image = "image"; // image 文件目录 - public const string Log = "log"; - public const string Cache = "cache"; // cache 文件目录 - public const int MillisecondsClose = 3000; // 默认3秒钟自动关闭信息弹出框 - public const string DefaultDateFormat = "yyyy-MM-dd"; - public const string DefaultTimeFormat = "HH:mm:ss"; - public const string DefaultDateTimeFormat = "yyyy-MM-dd HH:mm:ss"; - public const string NoYearDateTimeFormat = "MM-dd HH:mm:ss"; - public const string HtmlBR = "
"; - - public const string ConfirmDeleteText = "确认删除[{0}]条数据吗?"; - public const string ConfirmClearText = "确认清空吗?"; - public const string NoSelectDataText = "您还未选择任何数据"; - public const string NoDataText = "没有需要处理的数据"; - public const string ProcessingText = "正在{0}..."; - - public const string ChinaCountryCode = "cn"; - - public const char NumberSignSplitChar = '#'; - public const char SplitChar = '♯'; - public const char Tab = '\t'; - - public static List UserAgentList { get; set; } // https://developers.whatismybrowser.com/useragents/explore/software_name/chrome/ $(".useragent").each(function(){console.log($(this).text()+'\r\n')}); - - #region 全局委托 - public static Func EvaluateScript; // 执行 JavaScript - #endregion - - - #region 开发代理 - public static IWebProxy GetDevelopProxy(string url = "") - { - // 请求Fiddler代理,仅做开发测试使用 - if (IsDevelopment && !string.IsNullOrEmpty(Proxy) && Process.GetProcessesByName("FF").Length > 0) - { - var proxyArr = Proxy.Split(':'); - return new WebProxy(proxyArr[0], proxyArr[1].ParseToInt()); - } - else - { - if (!string.IsNullOrEmpty(url)) - { - string host = new Uri(url).Host; - if (NoProxyDomainList.Contains(host)) - { - return null; - } - } - return WebRequest.DefaultWebProxy; - } - } - #endregion - - #region 计算软件版本 - public static string GetVersionString(int major, int minor) - { - string versionNo = major + "." + minor.ToString().PadLeft(2, '0'); - return versionNo; - } - #endregion - } -} diff --git a/AllBase/Model/Param/VDianManage/VDianUploadSettingParam.cs b/AllBase/Model/Param/VDianManage/VDianUploadSettingParam.cs new file mode 100644 index 0000000..8e5f5c2 --- /dev/null +++ b/AllBase/Model/Param/VDianManage/VDianUploadSettingParam.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LittleCow.Model.Param.WeiDianManage +{ + public class WeiDianSettingParam + { + /// + /// 微店上货加价比例 + /// + public string AddPercent { get; set; } + /// + /// 微店上货额外加价 + /// + public string AddPrice { get; set; } + /// + /// 是否设置推广金 + /// + public bool IsSetCps { get; set; } + /// + /// 推广金比例 + /// + public string CpsPercent { get; set; } + /// + /// 线程数量 + /// + public string ThreadCount { get; set; } + + /// + /// 全店推广金基础比例 + /// + public string ShopCpsCount { get; set; } + + /// + /// 商品上下架等操作的搜索关键字 + /// + public string ProductKeywords { get; set; } + /// + /// 最近几天的不清理 + /// + public string NotClearDays { get; set; } + /// + /// 不清理下架有销量商品 + /// + public bool IsNotClearHasSales { get; set; } + /// + /// 操作的商品数量 + /// + public string ProductCount { get; set; } + } +} diff --git a/AllBase/Model/Result/VDianShopLoginInfo.cs b/AllBase/Model/Result/VDianShopLoginInfo.cs index 11fe3c8..c86d497 100644 --- a/AllBase/Model/Result/VDianShopLoginInfo.cs +++ b/AllBase/Model/Result/VDianShopLoginInfo.cs @@ -8,6 +8,8 @@ namespace AllBase.Model.Result { public class VDianShopLoginInfo { + public string user_name { get; set; } + public string ShopName { get; set; } public string ShopId { get; set; } public string Cookies { get; set; } diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs index 11aed81..07ebd15 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs @@ -450,7 +450,7 @@ namespace KJD_Web.BLL.BXX var wx_cat_3 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_3")?.Replace("'", "\\'"); var wx_cat_leaf = RegexUtils.GetStringQuery(ref inputData, "wx_cat_leaf")?.Replace("'", "\\'"); var search_ext_code = RegexUtils.GetStringQuery(ref inputData, "search_ext_code")?.Replace("'", "\\'"); - var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'"); + var search_prod_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'")); var search_group = RegexUtils.GetStringQuery(ref inputData, "search_group")?.Replace("'", "\\'"); var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'"); var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'"); @@ -480,6 +480,8 @@ namespace KJD_Web.BLL.BXX string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; MysqlUtils mySql = new MysqlUtils(conn); + List paramLst = new List(); + string sql = "select count(*) from bxx.product p FORCE INDEX (f_wx_safe_status) where p.is_del=0"; string where = ""; @@ -526,11 +528,17 @@ namespace KJD_Web.BLL.BXX where += " and p.ext_code like '%" + search_ext_code + "%'"; if (!string.IsNullOrWhiteSpace(search_prod_name)) { - var searchProdNameWords = search_prod_name.Split(new string[] { ",", ",", ";", ";", " ", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries); + var searchProdNameWords = search_prod_name.Split(new string[] { ",", ",", ";", ";", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries); var multi_search_prod_name = ""; + var index = 0; foreach (var word in searchProdNameWords) { - multi_search_prod_name += " or p.product_name like '%" + word + "%'"; + index++; + string parameName = "@prodNameWords" + index; + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = parameName, Value = word/*.Replace("&", "&").Replace("'", "\\'")*/, }); + //multi_search_prod_name += " or p.product_name like '%" + parameName + "%'"; + multi_search_prod_name += " or p.product_name like CONCAT('%'," + parameName + ",'%')"; + } where += " and (" + multi_search_prod_name.Substring(4) + ")"; } @@ -601,7 +609,7 @@ namespace KJD_Web.BLL.BXX if (isDetail) count = 1; else - count = mySql.ExecuteRowCount(sql); + count = mySql.ExecuteRowCount(sql, paramLst.ToArray()); DataTable dt; if (count == 0) @@ -645,7 +653,7 @@ namespace KJD_Web.BLL.BXX else sql += " order by p.id desc"; sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; - dt = mySql.ExecuteDataTable(sql); + dt = mySql.ExecuteDataTable(sql, paramLst.ToArray()); } mySql.Close(); diff --git a/SignWeb/SignWeb.sln b/SignWeb/SignWeb.sln new file mode 100644 index 0000000..6941416 --- /dev/null +++ b/SignWeb/SignWeb.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.32802.440 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignWeb", "SignWeb\SignWeb.csproj", "{1D6B6CD6-55AB-4986-9460-CFEF89627BBE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1D6B6CD6-55AB-4986-9460-CFEF89627BBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D6B6CD6-55AB-4986-9460-CFEF89627BBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D6B6CD6-55AB-4986-9460-CFEF89627BBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D6B6CD6-55AB-4986-9460-CFEF89627BBE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3BD7C166-ED87-432C-867E-04E8D6BAB679} + EndGlobalSection +EndGlobal diff --git a/SignWeb/SignWeb/692130.aspx b/SignWeb/SignWeb/692130.aspx new file mode 100644 index 0000000..00ac76e --- /dev/null +++ b/SignWeb/SignWeb/692130.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="692130.aspx.cs" Inherits="SignWeb._692130" %> + + + + + + + + + +
+
+ World +
+
+ + diff --git a/SignWeb/SignWeb/692130.aspx.cs b/SignWeb/SignWeb/692130.aspx.cs new file mode 100644 index 0000000..701b55c --- /dev/null +++ b/SignWeb/SignWeb/692130.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace SignWeb +{ + public partial class _692130 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/SignWeb/SignWeb/692130.aspx.designer.cs b/SignWeb/SignWeb/692130.aspx.designer.cs new file mode 100644 index 0000000..d22dd6a --- /dev/null +++ b/SignWeb/SignWeb/692130.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace SignWeb +{ + + + public partial class _692130 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/SignWeb/SignWeb/Global.asax b/SignWeb/SignWeb/Global.asax new file mode 100644 index 0000000..8deadaa --- /dev/null +++ b/SignWeb/SignWeb/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="SignWeb.Global" Language="C#" %> diff --git a/SignWeb/SignWeb/Global.asax.cs b/SignWeb/SignWeb/Global.asax.cs new file mode 100644 index 0000000..127cde4 --- /dev/null +++ b/SignWeb/SignWeb/Global.asax.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Security; +using System.Web.SessionState; + +namespace SignWeb +{ + public class Global : System.Web.HttpApplication + { + protected void Application_Start(object sender, EventArgs e) + { + } + } +} \ No newline at end of file diff --git a/SignWeb/SignWeb/Properties/AssemblyInfo.cs b/SignWeb/SignWeb/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6bb7d5c --- /dev/null +++ b/SignWeb/SignWeb/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过下列特性集 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SignWeb")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SignWeb")] +[assembly: AssemblyCopyright("Copyright © 2026")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +// 对 COM 组件不可见。如果需要 +// 从 COM 访问此程序集中的某个类型,请针对该类型将 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID +[assembly: Guid("1d6b6cd6-55ab-4986-9460-cfef89627bbe")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订版本 +// +// 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值, +// 方法是按如下所示使用 "*": +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SignWeb/SignWeb/Properties/PublishProfiles/FolderProfile.pubxml b/SignWeb/SignWeb/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 0000000..019d357 --- /dev/null +++ b/SignWeb/SignWeb/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,16 @@ + + + + + False + False + True + Release + Any CPU + FileSystem + bin\app.publish\ + FileSystem + + \ No newline at end of file diff --git a/SignWeb/SignWeb/Properties/PublishProfiles/FolderProfile.pubxml.user b/SignWeb/SignWeb/Properties/PublishProfiles/FolderProfile.pubxml.user new file mode 100644 index 0000000..2eb08aa --- /dev/null +++ b/SignWeb/SignWeb/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -0,0 +1,180 @@ + + + + + <_PublishTargetUrl>D:\Work&Projects\TEMU跨境达后台管理\KJD Cef138\SignWeb\SignWeb\bin\app.publish\ + True|2026-04-12T04:02:18.4413094Z;True|2026-04-12T11:44:24.2206861+08:00; + + + + 04/12/2026 12:02:06 + + + 09/05/2018 16:10:50 + + + 08/08/2018 05:38:48 + + + 08/08/2018 12:18:12 + + + 08/08/2018 12:09:42 + + + 08/08/2018 05:38:48 + + + 08/08/2018 12:18:34 + + + 08/08/2018 12:09:56 + + + 08/08/2018 05:38:48 + + + 08/08/2018 05:38:48 + + + 08/08/2018 05:38:48 + + + 08/08/2018 05:38:48 + + + 08/08/2018 05:38:48 + + + 08/08/2018 05:38:48 + + + 08/08/2018 12:09:42 + + + 12/05/2017 09:36:44 + + + 12/05/2017 09:36:44 + + + 08/08/2018 12:09:42 + + + 08/08/2018 12:09:42 + + + 11/05/2016 18:55:32 + + + 11/05/2016 18:55:34 + + + 05/16/2018 03:29:34 + + + 11/05/2016 18:55:48 + + + 11/05/2016 18:55:52 + + + 11/05/2016 18:55:56 + + + 11/05/2016 18:55:52 + + + 11/05/2016 18:56:02 + + + 11/05/2016 18:56:08 + + + 11/05/2016 18:56:04 + + + 11/05/2016 18:56:08 + + + 11/05/2016 18:56:08 + + + 11/05/2016 18:56:30 + + + 11/05/2016 18:56:34 + + + 05/16/2018 03:29:44 + + + 11/05/2016 18:57:00 + + + 11/05/2016 18:57:14 + + + 11/05/2016 18:57:08 + + + 11/05/2016 18:57:18 + + + 11/05/2016 18:57:18 + + + 11/05/2016 18:57:20 + + + 11/05/2016 18:57:24 + + + 11/05/2016 18:57:30 + + + 11/05/2016 18:57:36 + + + 11/05/2016 18:57:34 + + + 11/05/2016 18:57:40 + + + 11/05/2016 18:57:34 + + + 08/08/2018 05:38:48 + + + 08/08/2018 12:18:18 + + + 08/08/2018 12:09:46 + + + 08/08/2018 05:38:48 + + + 08/08/2018 12:18:16 + + + 04/12/2026 12:02:18 + + + 04/12/2026 12:02:18 + + + 04/12/2026 11:40:36 + + + 04/12/2026 11:41:37 + + + 04/12/2026 11:44:23 + + + \ No newline at end of file diff --git a/SignWeb/SignWeb/SignWeb.csproj b/SignWeb/SignWeb/SignWeb.csproj new file mode 100644 index 0000000..4be6157 --- /dev/null +++ b/SignWeb/SignWeb/SignWeb.csproj @@ -0,0 +1,146 @@ + + + + + Debug + AnyCPU + + + 2.0 + {1D6B6CD6-55AB-4986-9460-CFEF89627BBE} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + SignWeb + SignWeb + v4.6.2 + true + + 44369 + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + true + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + + + + + + + + + + + 692130.aspx + ASPXCodeBehind + + + 692130.aspx + + + Global.asax + + + + VDianAuth.aspx + ASPXCodeBehind + + + VDianAuth.aspx + + + + + + Web.config + + + Web.config + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 51805 + / + https://localhost:44369/ + False + False + + + False + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + + \ No newline at end of file diff --git a/SignWeb/SignWeb/SignWeb.csproj.user b/SignWeb/SignWeb/SignWeb.csproj.user new file mode 100644 index 0000000..eb7aebe --- /dev/null +++ b/SignWeb/SignWeb/SignWeb.csproj.user @@ -0,0 +1,39 @@ + + + + true + + 44369 + + + + + Debug|Any CPU + D:\Work&Projects\TEMU跨境达后台管理\KJD Cef138\SignWeb\SignWeb\Properties\PublishProfiles\FolderProfile.pubxml + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + True + False + + + + + \ No newline at end of file diff --git a/SignWeb/SignWeb/VDianAuth.aspx b/SignWeb/SignWeb/VDianAuth.aspx new file mode 100644 index 0000000..c808f9c --- /dev/null +++ b/SignWeb/SignWeb/VDianAuth.aspx @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VDianAuth.aspx.cs" Inherits="SignWeb.VDianAuth" %> + + + + + + + + + +
+
+ Hello +
+
+ + diff --git a/SignWeb/SignWeb/VDianAuth.aspx.cs b/SignWeb/SignWeb/VDianAuth.aspx.cs new file mode 100644 index 0000000..afef920 --- /dev/null +++ b/SignWeb/SignWeb/VDianAuth.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace SignWeb +{ + public partial class VDianAuth : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/SignWeb/SignWeb/VDianAuth.aspx.designer.cs b/SignWeb/SignWeb/VDianAuth.aspx.designer.cs new file mode 100644 index 0000000..d3be361 --- /dev/null +++ b/SignWeb/SignWeb/VDianAuth.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace SignWeb +{ + + + public partial class VDianAuth + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/SignWeb/SignWeb/Web.Debug.config b/SignWeb/SignWeb/Web.Debug.config new file mode 100644 index 0000000..b9a9fde --- /dev/null +++ b/SignWeb/SignWeb/Web.Debug.config @@ -0,0 +1,31 @@ + + + + + + + + + + \ No newline at end of file diff --git a/SignWeb/SignWeb/Web.Release.config b/SignWeb/SignWeb/Web.Release.config new file mode 100644 index 0000000..755e745 --- /dev/null +++ b/SignWeb/SignWeb/Web.Release.config @@ -0,0 +1,32 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/SignWeb/SignWeb/Web.config b/SignWeb/SignWeb/Web.config new file mode 100644 index 0000000..033e5a7 --- /dev/null +++ b/SignWeb/SignWeb/Web.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SignWeb/SignWeb/packages.config b/SignWeb/SignWeb/packages.config new file mode 100644 index 0000000..82ecffe --- /dev/null +++ b/SignWeb/SignWeb/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/TEMUKJD/BLL/VDian/VDianProductBLL.cs b/TEMUKJD/BLL/VDian/VDianProductBLL.cs new file mode 100644 index 0000000..6761da6 --- /dev/null +++ b/TEMUKJD/BLL/VDian/VDianProductBLL.cs @@ -0,0 +1,434 @@ +using AllBase; +using AllBase.Model.Param.VDianManage; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace TemuKJD.BLL.VDian +{ + public class WeiDianProductBLL + { + public static int upLoadThreadCount = 0; + + /// + /// 上传产品后设置产品佣金 + /// + /// + /// + /// 佣金比例 + /// + public string UpdateCommission(string prodIds, VDianShopLoginInfo vDianShop, string commissionRate = "5") + { + //{"itemIds":"3318304304","isDownPrice":false,"isUpPrice":false,"priceUpLimit":200,"commissionRate":"{\"L1\":\"5\",\"L2\":\"5\",\"L3\":\"5\",\"L4\":\"5\",\"L5\":\"5\"}","specifyRetailSellerIds":"","specifyCommissionRate":"5"} + VDianParam.VDianCommission comm = new VDianParam.VDianCommission() + { + itemIds = prodIds, + isDownPrice = false, + isUpPrice = false, + priceUpLimit = 200, + commissionRate = new VDianParam.VDianCommissionRate() { L1 = commissionRate, L2 = commissionRate, L3 = commissionRate, L4 = commissionRate, L5 = commissionRate }, + specifyRetailSellerIds = "", + specifyCommissionRate = commissionRate, + }; + + return Request_weidian_Commission(vDianShop, HttpUtility.UrlEncode(JsonHelper.SerializeObject(comm), Encoding.UTF8)); + } + + public string UpdateCps(string prodIds, VDianShopLoginInfo vDianShop, string commissionRate = "5") + { + var idArr = prodIds.Split(','); + var rate = (commissionRate.ParseToDecimal() / 100).ToString(); + string url = "https://thor.weidian.com/cpnserver/cps.operateConfig/1.0?param="; + var dataStr = "{\"item\":{\"cpsItemConfigReqList\":["; + foreach (string id in idArr) + { + dataStr += "{\"itemId\":\"" + id + "\",\"itemRatioStr\":" + rate + "},"; + } + dataStr = dataStr.TrimEnd(','); + dataStr += "]}}"; + + return Request_weidian_cps(vDianShop, url, HttpUtility.UrlEncode(dataStr, Encoding.UTF8)); + } + + /// + /// 设置店铺分成推广全店佣金比例 + /// + /// + /// + /// + public string UpdateShopCps(VDianShopLoginInfo vDianShop, string commissionRate = "5") + { + //{"shop":{"pushMode":0,"cpsRatioStr":0.11},"item":{"pushMode":0,"cpsItemConfigReqList":[]}} + var rate = (commissionRate.ParseToDecimal() / 100).ToString(); + string url = "https://thor.weidian.com/cpnserver/cps.operateConfig/1.0?param="; + var dataStr = "{\"shop\":{\"pushMode\":0,\"cpsRatioStr\":" + rate + "},\"item\":{\"pushMode\":0,\"cpsItemConfigReqList\":[]}}"; + return Request_weidian_cps(vDianShop, url, HttpUtility.UrlEncode(dataStr, Encoding.UTF8)); + } + + /// + /// 查询店铺分成推广全店佣金比例 + /// + /// + /// + public string GetShopCps(VDianShopLoginInfo vDianShop) + { + string url = "https://thor.weidian.com/cpnserver/cps.queryItemConfig/1.0?param="; + var dataStr = "{\"needQueryRange\":\"true\",\"pageIndex\":1,\"pageSize\":1}"; + return Request_weidian_cps(vDianShop, url, HttpUtility.UrlEncode(dataStr, Encoding.UTF8)); + } + + /// + /// 查询分成推广首推商品列表 + /// + /// + /// + /// + /// + public string GetShopCpsProduct(VDianShopLoginInfo vDianShop, int page = 1, int pageSize = 10) + { + string url = "https://thor.weidian.com/cpnserver/cps.queryItemConfig/1.0?param="; + var dataStr = "{\"needQueryRange\":\"true\",\"pageIndex\":" + page + ",\"pageSize\":" + pageSize + "}"; + return Request_weidian_cps(vDianShop, url, HttpUtility.UrlEncode(dataStr, Encoding.UTF8)); + } + + public string GetShopProductIds(VDianShopLoginInfo vDianShop, int page = 1, int pageSize = 40, bool? isOnSale = true, DateTime? timeEnd = null) + { + // 获取商品列表优先使用开箱小店接口 + var vDianApiToken = GetVDianApiTokenCanUse(vDianShop); + if (vDianApiToken == null) + vDianApiToken = vDianShop.LstWdApiToken[0]; + if (vDianApiToken == null) + { + return "error,商品获取频次超过上限"; + } + + if (isOnSale == true) + { + var result = GetVDianProductListOnSale(vDianApiToken.ApiAccessToken, page, pageSize, timeEnd); + return result; + } + else if (isOnSale == false) + { + var result = GetVDianProductListOffSale(vDianApiToken.ApiAccessToken, page, pageSize, timeEnd); + return result; + } + else + { + var result = GetVDianProductListAll(vDianApiToken.ApiAccessToken, page, pageSize, timeEnd); + return result; + } + } + + /// + /// 网页模拟接口调用设置佣金 + /// + /// + /// + /// + private string Request_weidian_Commission(VDianShopLoginInfo vDianShop, string data) + { + HttpWebResponse response = null; + string responseText = ""; + + try + { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://thor.weidian.com/fenxiao/supplyItem.updateItemSetting/1.0?wdtoken=" + + vDianShop.Wdtoken + "&_=" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now)); + + request.KeepAlive = true; + request.Accept = "application/json, */*"; + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"; + request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"; + request.Headers.Add("Origin", @"https://d.weidian.com"); + request.Headers.Add("Sec-Fetch-Site", @"same-site"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Referer = "https://d.weidian.com/weidian-pc/pc-vue-item/index.html?spider_token=76b8"; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + request.Headers.Set(HttpRequestHeader.Cookie, vDianShop.Cookies); + + request.Method = "POST"; + request.ServicePoint.Expect100Continue = false; + + string body = @"param=" + data; + byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body); + request.ContentLength = postBytes.Length; + Stream stream = request.GetRequestStream(); + stream.Write(postBytes, 0, postBytes.Length); + stream.Close(); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException e) + { + if (e.Status == WebExceptionStatus.ProtocolError) response = (HttpWebResponse)e.Response; + else responseText = "error," + e.Message; + } + catch (Exception ex) + { + responseText = "error," + ex.Message; + } + if (response != null) + { + if (string.IsNullOrEmpty(responseText)) + responseText = GetHtml.ReadResponse(response); + response.Close(); + } + + Thread.Sleep(25 + Randomx.GetId(50)); + return responseText; + } + + /// + /// 全民推广设置 + /// + /// + /// + /// + private string Request_weidian_cps(VDianShopLoginInfo vDianShop, string url, string data) + { + HttpWebResponse response = null; + string responseText = ""; + + try + { + //https://thor.weidian.com/cpnserver/cps.operateConfig/1.0?param={"item":{"cpsItemConfigReqList":[{"itemId":"3242678219","itemRatioStr":0.22}]}} + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url + data); + + request.KeepAlive = true; + request.Headers.Set(HttpRequestHeader.Pragma, "no-cache"); + request.Headers.Set(HttpRequestHeader.CacheControl, "no-cache"); + request.Accept = "application/json, text/plain, */*"; + request.Headers.Add("Origin", @"https://weidian.com"); + request.UserAgent = "Mozilla/5.0 (Linux; Android 9; COR-AL00 Build/HUAWEICOR-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 WDAPP(WD/9.0.80) appid/com.koudai.weishop KDJSBridge2/1.1.0 platform/android apiv/9083 NetType/WIFI"; + request.Referer = "https://weidian.com/new-cps/"; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"); + request.Headers.Set(HttpRequestHeader.Cookie, vDianShop.Cookies); + request.Headers.Add("X-Requested-With", @"com.koudai.weishop"); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException e) + { + if (e.Status == WebExceptionStatus.ProtocolError) response = (HttpWebResponse)e.Response; + else responseText = "error," + e.Message; + } + catch (Exception ex) + { + responseText = "error," + ex.Message; + } + if (response != null) + { + if (string.IsNullOrEmpty(responseText)) + responseText = GetHtml.ReadResponse(response); + response.Close(); + } + + Thread.Sleep(25 + Randomx.GetId(50)); + return responseText; + } + + /// + /// 微店读取店铺所有上架商品 + /// + /// + /// + /// + /// + public static string GetVDianProductListOnSale(string accessToken, int pageNumber = 1, int pageSize = 40, DateTime? timeEnd = null) + { + return GetVDianProductList(accessToken, pageNumber, pageSize, 1, timeEnd); + } + + /// + /// 微店读取店铺所有下架商品 + /// + /// + /// + /// + /// + public static string GetVDianProductListOffSale(string accessToken, int pageNumber = 1, int pageSize = 40, DateTime? timeEnd = null) + { + return GetVDianProductList(accessToken, pageNumber, pageSize, 2, timeEnd); + } + + /// + /// 读取所有上架和下架商品 + /// + /// + /// + /// + /// + /// + public static string GetVDianProductListAll(string accessToken, int pageNumber = 1, int pageSize = 40, DateTime? timeEnd = null) + { + return GetVDianProductList(accessToken, pageNumber, pageSize, 4, timeEnd); + } + + /// + /// 读取微店所有商品 + /// + /// + /// + /// + /// 1表示上架,2表示下架,4表示上架和下架一起 + /// + public static string GetVDianProductList(string accessToken, int pageNumber = 1, int pageSize = 40, int status = 1, DateTime? timeEnd = null) + { + if (timeEnd == null) + timeEnd = DateTime.Now; + string url = BaseClass.VDianApi + "api?"; + string data = "param=" + GetHtml.UrlEncodeUtf8("{\"page_size\":\"" + pageSize + "\",\"status\":" + status + ",\"orderby\":\"1\",\"page_num\":\"" + pageNumber + + "\",\"update_start\":\"2000-1-1 00:00:00\",\"update_end\":\"" + timeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss") + "\"}"); + string _public = "&public=" + GetHtml.UrlEncodeUtf8("{\"method\":\"vdian.item.list.get\",\"access_token\":\"" + accessToken + + "\",\"version\":\"1.1\",\"format\":\"json\"}"); + var result = Request_api_vdian_com(url, data + _public, true); + return result; + } + + /// + /// 商品上下架 + /// + /// + /// + /// 1表示商品上架,2表示商品下架 + /// + public static string VDianOnSale(string itemId, VDianShopLoginInfo vDianShop, int opt = 1) + { + // 获取商品列表优先使用开箱小店接口 + var vDianApiToken = GetVDianApiTokenCanUse(vDianShop); + if (vDianApiToken == null) + vDianApiToken = vDianShop.LstWdApiToken[0]; + if (vDianApiToken == null) + { + return "error,商品获取频次超过上限"; + } + + string url = BaseClass.VDianApi + "api?"; + string data = "param=" + GetHtml.UrlEncodeUtf8("{\"itemid\":\"" + itemId + "\",\"opt\":\"" + opt + "\"}"); + string _public = "&public=" + GetHtml.UrlEncodeUtf8("{\"method\":\"weidian.item.onSale\",\"access_token\":\"" + vDianApiToken.ApiAccessToken + + "\",\"version\":\"1.0\",\"format\":\"json\"}"); + var result = Request_api_vdian_com(url, data + _public, true); + return result; + } + + public static string VDianProductDel(string itemId, VDianShopLoginInfo vDianShop) + { + // 获取商品列表优先使用开箱小店接口 + var vDianApiToken = GetVDianApiTokenCanUse(vDianShop); + if (vDianApiToken == null) + vDianApiToken = vDianShop.LstWdApiToken[0]; + if (vDianApiToken == null) + { + return "error,商品获取频次超过上限"; + } + + string url = BaseClass.VDianApi + "api?"; + string data = "param=" + GetHtml.UrlEncodeUtf8("{\"itemid\":\"" + itemId + "\"}"); + string _public = "&public=" + GetHtml.UrlEncodeUtf8("{\"method\":\"vdian.item.delete\",\"access_token\":\"" + vDianApiToken.ApiAccessToken + + "\",\"version\":\"1.0\",\"format\":\"json\"}"); + var result = Request_api_vdian_com(url, data + _public, true); + return result; + } + + public static string VDianProductDel(List itemIds, VDianShopLoginInfo vDianShop) + { + // 获取商品列表优先使用开箱小店接口 + var vDianApiToken = GetVDianApiTokenCanUse(vDianShop); + if (vDianApiToken == null) + { + return "error,商品获取频次超过上限"; + } + + string itemIdStr = ""; + foreach (var item in itemIds) + { + itemIdStr += item + ","; + } + string url = BaseClass.VDianApi + "api?"; + string data = "param=" + GetHtml.UrlEncodeUtf8("{\"itemids\":\"" + itemIdStr.TrimEnd(',') + "\"}"); + string _public = "&public=" + GetHtml.UrlEncodeUtf8("{\"method\":\"vdian.item.batchDelete\",\"access_token\":\"" + vDianApiToken.ApiAccessToken + + "\",\"version\":\"1.0\",\"format\":\"json\"}"); + var result = Request_api_vdian_com(url, data + _public, true); + return result; + } + + /// + /// 获取可用的微店ApiToken + /// + /// + /// + public static VDianApiToken GetVDianApiTokenCanUse(VDianShopLoginInfo vDianShop) + { + // 获取商品列表优先使用开箱小店接口 + var vDianApiToken = vDianShop.LstWdApiToken.FirstOrDefault(t => t.AppKey.AppKey == "691402" && t.AppKey.Status == "ok"); + if (vDianApiToken == null) + vDianApiToken = vDianShop.LstWdApiToken.FirstOrDefault(t => t.AppKey.Status == "ok"); + return vDianApiToken; + } + + /// + /// 调用微店Api + /// + /// + /// + public static string Request_api_vdian_com(string url, string bodyData, bool isPost = true) + { + while (upLoadThreadCount >= 3) + Thread.Sleep(Randomx.GetId(100)); + upLoadThreadCount++; + + HttpWebResponse response = null; + var responseText = ""; + + try + { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.ContentType = "application/x-www-form-urlencoded;charset=utf-8"; + if (isPost) + request.Method = "POST"; + else + request.Method = "GET"; + + request.ServicePoint.Expect100Continue = false; + + byte[] postBytes = Encoding.UTF8.GetBytes(bodyData); + request.ContentLength = postBytes.Length; + Stream stream = request.GetRequestStream(); + stream.Write(postBytes, 0, postBytes.Length); + stream.Close(); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException e) + { + if (e.Status == WebExceptionStatus.ProtocolError) response = (HttpWebResponse)e.Response; + else responseText = "error," + e.Message; + } + catch (Exception ex) + { + responseText = "error," + ex.Message; + } + if (response != null) + { + if (string.IsNullOrEmpty(responseText)) + responseText = GetHtml.ReadResponse(response); + response.Close(); + } + + Thread.Sleep(50 + Randomx.GetId(100)); + upLoadThreadCount--; + + return responseText; + } + } +} diff --git a/TEMUKJD/BLL/VDian/MappingVDianApiBLL.cs b/TEMUKJD/BLL/VDian/VDianUpProdMappingApiBLL.cs similarity index 97% rename from TEMUKJD/BLL/VDian/MappingVDianApiBLL.cs rename to TEMUKJD/BLL/VDian/VDianUpProdMappingApiBLL.cs index 307c3c9..3fc3eaf 100644 --- a/TEMUKJD/BLL/VDian/MappingVDianApiBLL.cs +++ b/TEMUKJD/BLL/VDian/VDianUpProdMappingApiBLL.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace TemuKJD.BLL.VDian { - public class MappingVDianApiBLL + public class VDianUpProdMappingApiBLL { public static string GetFormattedImgFileName(string oldName) { diff --git a/TEMUKJD/BLL/VDian/MappingVDianBLL.cs b/TEMUKJD/BLL/VDian/VDianUpProdMappingBLL.cs similarity index 99% rename from TEMUKJD/BLL/VDian/MappingVDianBLL.cs rename to TEMUKJD/BLL/VDian/VDianUpProdMappingBLL.cs index 3ff383b..91deb9a 100644 --- a/TEMUKJD/BLL/VDian/MappingVDianBLL.cs +++ b/TEMUKJD/BLL/VDian/VDianUpProdMappingBLL.cs @@ -18,7 +18,7 @@ using System.Threading.Tasks; namespace TemuKJD.BLL.VDian { - public class MappingVDianBLL + public class VDianUpProdMappingBLL { string vDCookie = ""; string vDToken = ""; @@ -38,7 +38,7 @@ namespace TemuKJD.BLL.VDian /// decimal reduceRate = 0.96M; - public MappingVDianBLL() + public VDianUpProdMappingBLL() { spider_token = BaseClass.GetMd5(DateTime.Now.ToString()).Substring(0, 4).ToLower(); } @@ -533,7 +533,7 @@ namespace TemuKJD.BLL.VDian break; var imgStr = imgBaseStr; - imgStr = MappingVDianApiBLL.GetFormattedImgFileName(imgStr); + imgStr = VDianUpProdMappingApiBLL.GetFormattedImgFileName(imgStr); if (string.IsNullOrEmpty(imgStr)) continue; var imgMod = Math.Abs(BaseClass.GetLong(imgStr)); @@ -557,7 +557,7 @@ namespace TemuKJD.BLL.VDian if (string.IsNullOrEmpty(imgBaseStr)) continue; var imgStr = imgBaseStr; - imgStr = MappingVDianApiBLL.GetFormattedImgFileName(imgStr); + imgStr = VDianUpProdMappingApiBLL.GetFormattedImgFileName(imgStr); if (string.IsNullOrEmpty(imgStr)) continue; diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 571f4ca..0d9497a 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -129,8 +129,9 @@ - - + + + @@ -218,6 +219,24 @@ GetAddressForm.cs + + Form + + + VDianShopLoginForm.cs + + + Form + + + VDianShopListForm.cs + + + Form + + + VDianUploadProductForm.cs + Form @@ -1215,6 +1234,15 @@ DataGridViewEx.cs + + VDianShopLoginForm.cs + + + VDianShopListForm.cs + + + VDianUploadProductForm.cs + WXAdminAddressSyncForm.cs diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.Designer.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.Designer.cs index 2aa0791..b6bcde0 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.Designer.cs +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.Designer.cs @@ -40,7 +40,8 @@ System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("库存上传"); System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("商品核价"); System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("随机厂商商品"); - System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] { + System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("微店管理"); + System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3, @@ -52,7 +53,8 @@ treeNode9, treeNode10, treeNode11, - treeNode12}); + treeNode12, + treeNode13}); this.panel1 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); @@ -167,10 +169,12 @@ treeNode11.Text = "商品核价"; treeNode12.Name = "随机厂商商品"; treeNode12.Text = "随机厂商商品"; - treeNode13.Name = "超级权限管理"; - treeNode13.Text = "超级权限管理"; + treeNode13.Name = "微店管理"; + treeNode13.Text = "微店管理"; + treeNode14.Name = "超级权限管理"; + treeNode14.Text = "超级权限管理"; this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode13}); + treeNode14}); this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); this.tv.Size = new System.Drawing.Size(140, 446); this.tv.TabIndex = 1; diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs index 6d581bd..a54c21a 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminForm.cs @@ -1,4 +1,5 @@ using AllBase; +using KJD.VDianForms; using System; using System.Collections.Generic; using System.ComponentModel; @@ -27,6 +28,7 @@ namespace TemuKJD.PDDForms.AdminForms public Lazy getChanceProdByImgForm = new Lazy(); public Lazy getJuShuitanProdForm = new Lazy(); public Lazy randomComProductForm = new Lazy(); + public Lazy vDianUploadProductForm = new Lazy(); //public Lazy dbPriceMarkUpForm = new Lazy(); //public Lazy dbProductSelectListManageForm = new Lazy(); //public Lazy productThirdSelectListManageForm = new Lazy(); @@ -106,6 +108,9 @@ namespace TemuKJD.PDDForms.AdminForms case "随机厂商商品": SetForm(randomComProductForm.Value); break; + case "微店管理": + SetForm(vDianUploadProductForm.Value); + break; //case "选品加价管理": // SetForm(dbPriceMarkUpForm.Value); // break; diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs index 9f3dc9a..ae0b18a 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs @@ -327,7 +327,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "&search_notes=" + txtNotes.Text.Trim() + "&search_ext_code=" + txtExtCode.Text.Trim() + "&search_group=" + cmbGroupFilter.Text.Trim() + - "&search_prod_name=" + txtProdName.Text.Trim() + + "&search_prod_name=" + GetHtml.UrlEncodeUtf8(txtProdName.Text.Trim()) + "&wx_safe_status=" + cmbWxSafe.Text.Trim().Replace("安全+未校验", "安全商品,未校验") + "&special_prod_type=" + cmbSpProdType.Text.Trim(); diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.Designer.cs index 8ca6216..1a69994 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.Designer.cs @@ -38,6 +38,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.pbShopLoading = new System.Windows.Forms.PictureBox(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.panel2 = new System.Windows.Forms.Panel(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.btnSelectNotGetDetail = new DevComponents.DotNetBar.PanelEx(); this.cmbFilterType = new System.Windows.Forms.ComboBox(); @@ -77,9 +82,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.chkOverride = new TemuKJD.UserComponent.UcCheckBox(this.components); this.label6 = new System.Windows.Forms.Label(); this.txtMinPrice = new System.Windows.Forms.TextBox(); - this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.splitContainer3 = new System.Windows.Forms.SplitContainer(); - this.pbShopLoading = new System.Windows.Forms.PictureBox(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -90,27 +92,24 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.pbLoading = new System.Windows.Forms.PictureBox(); - this.panel2 = new System.Windows.Forms.Panel(); this.dgvChanceProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.chk = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colChanceId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colImg = new System.Windows.Forms.DataGridViewImageColumn(); + this.colDel = new System.Windows.Forms.DataGridViewLinkColumn(); this.colGoodsName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colHotValue = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colCate = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colDel = new System.Windows.Forms.DataGridViewLinkColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.chk = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); - this.ucGroupBoxEx1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); @@ -120,8 +119,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer3.Panel2.SuspendLayout(); this.splitContainer3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + this.ucGroupBoxEx1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvChanceProduct)).BeginInit(); this.SuspendLayout(); // @@ -145,6 +145,82 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer1.SplitterDistance = 140; this.splitContainer1.TabIndex = 4; // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.splitContainer3); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.chk); + this.splitContainer2.Panel2.Controls.Add(this.statusBar); + this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); + this.splitContainer2.Size = new System.Drawing.Size(1424, 491); + this.splitContainer2.SplitterDistance = 462; + this.splitContainer2.TabIndex = 0; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer3.Location = new System.Drawing.Point(4, 0); + this.splitContainer3.Name = "splitContainer3"; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.pbShopLoading); + this.splitContainer3.Panel1.Controls.Add(this.dgvShop); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.pbLoading); + this.splitContainer3.Panel2.Controls.Add(this.panel2); + this.splitContainer3.Panel2.Controls.Add(this.dgvChanceProduct); + this.splitContainer3.Size = new System.Drawing.Size(1416, 462); + this.splitContainer3.SplitterDistance = 290; + this.splitContainer3.TabIndex = 9; + // + // pbShopLoading + // + this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbShopLoading.Location = new System.Drawing.Point(120, 206); + this.pbShopLoading.Name = "pbShopLoading"; + this.pbShopLoading.Size = new System.Drawing.Size(50, 50); + this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbShopLoading.TabIndex = 8; + this.pbShopLoading.TabStop = false; + // + // pbLoading + // + this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbLoading.Location = new System.Drawing.Point(536, 206); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 7; + this.pbLoading.TabStop = false; + this.pbLoading.Visible = false; + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel2.Location = new System.Drawing.Point(409, 355); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(690, 87); + this.panel2.TabIndex = 8; + // // ucGroupBoxEx1 // this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -728,60 +804,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.txtMinPrice.TabIndex = 842; this.txtMinPrice.Text = "10"; // - // splitContainer2 - // - this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer2.Location = new System.Drawing.Point(0, 0); - this.splitContainer2.Name = "splitContainer2"; - this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer2.Panel1 - // - this.splitContainer2.Panel1.Controls.Add(this.splitContainer3); - this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.chk); - this.splitContainer2.Panel2.Controls.Add(this.statusBar); - this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); - this.splitContainer2.Size = new System.Drawing.Size(1424, 491); - this.splitContainer2.SplitterDistance = 462; - this.splitContainer2.TabIndex = 0; - // - // splitContainer3 - // - this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer3.Location = new System.Drawing.Point(4, 0); - this.splitContainer3.Name = "splitContainer3"; - // - // splitContainer3.Panel1 - // - this.splitContainer3.Panel1.Controls.Add(this.pbShopLoading); - this.splitContainer3.Panel1.Controls.Add(this.dgvShop); - // - // splitContainer3.Panel2 - // - this.splitContainer3.Panel2.Controls.Add(this.pbLoading); - this.splitContainer3.Panel2.Controls.Add(this.panel2); - this.splitContainer3.Panel2.Controls.Add(this.dgvChanceProduct); - this.splitContainer3.Size = new System.Drawing.Size(1416, 462); - this.splitContainer3.SplitterDistance = 290; - this.splitContainer3.TabIndex = 9; - // - // pbShopLoading - // - this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbShopLoading.Location = new System.Drawing.Point(120, 206); - this.pbShopLoading.Name = "pbShopLoading"; - this.pbShopLoading.Size = new System.Drawing.Size(50, 50); - this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbShopLoading.TabIndex = 8; - this.pbShopLoading.TabStop = false; - // // dgvShop // this.dgvShop.AllowUserToAddRows = false; @@ -893,28 +915,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colMessage.Name = "colMessage"; this.colMessage.ReadOnly = true; // - // pbLoading - // - this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(536, 206); - this.pbLoading.Name = "pbLoading"; - this.pbLoading.Size = new System.Drawing.Size(50, 50); - this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbLoading.TabIndex = 7; - this.pbLoading.TabStop = false; - this.pbLoading.Visible = false; - // - // panel2 - // - this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel2.Location = new System.Drawing.Point(409, 355); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(690, 87); - this.panel2.TabIndex = 8; - // // dgvChanceProduct // this.dgvChanceProduct.AllowUserToAddRows = false; @@ -939,11 +939,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colChanceId, this.colImgUrl, this.colImg, + this.colDel, this.colGoodsName, this.colHotValue, this.colCate, this.colPrice, - this.colDel, this.colMsg}); this.dgvChanceProduct.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvChanceProduct.Location = new System.Drawing.Point(0, 0); @@ -955,87 +955,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.dgvChanceProduct.TabIndex = 6; this.dgvChanceProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvChanceProduct_CellContentClick); // - // colCheck - // - this.colCheck.FillWeight = 26F; - this.colCheck.HeaderText = "选"; - this.colCheck.Name = "colCheck"; - this.colCheck.ReadOnly = true; - this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - // - // colChanceId - // - this.colChanceId.FillWeight = 50F; - this.colChanceId.HeaderText = "机会Id"; - this.colChanceId.Name = "colChanceId"; - this.colChanceId.ReadOnly = true; - // - // colImgUrl - // - this.colImgUrl.FillWeight = 300F; - this.colImgUrl.HeaderText = "图片路径"; - this.colImgUrl.Name = "colImgUrl"; - this.colImgUrl.ReadOnly = true; - this.colImgUrl.Visible = false; - // - // colImg - // - this.colImg.FillWeight = 40F; - this.colImg.HeaderText = "图片"; - this.colImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; - this.colImg.Name = "colImg"; - this.colImg.ReadOnly = true; - this.colImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - // - // colGoodsName - // - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle5; - this.colGoodsName.FillWeight = 120F; - this.colGoodsName.HeaderText = "商品名称"; - this.colGoodsName.Name = "colGoodsName"; - this.colGoodsName.ReadOnly = true; - // - // colHotValue - // - this.colHotValue.FillWeight = 60F; - this.colHotValue.HeaderText = "热度"; - this.colHotValue.Name = "colHotValue"; - this.colHotValue.ReadOnly = true; - // - // colCate - // - this.colCate.HeaderText = "类目"; - this.colCate.Name = "colCate"; - this.colCate.ReadOnly = true; - // - // colPrice - // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colPrice.DefaultCellStyle = dataGridViewCellStyle6; - this.colPrice.FillWeight = 70F; - this.colPrice.HeaderText = "价格"; - this.colPrice.Name = "colPrice"; - this.colPrice.ReadOnly = true; - // - // colDel - // - this.colDel.FillWeight = 35F; - this.colDel.HeaderText = "删除"; - this.colDel.Name = "colDel"; - this.colDel.ReadOnly = true; - // - // colMsg - // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colMsg.DefaultCellStyle = dataGridViewCellStyle7; - this.colMsg.FillWeight = 200F; - this.colMsg.HeaderText = "操作结果"; - this.colMsg.Name = "colMsg"; - this.colMsg.ReadOnly = true; - // // chk // this.chk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1076,6 +995,87 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucSplitPage1.TotalPage = 1; this.ucSplitPage1.PageChange += new System.Action(this.ucSplitPage1_PageChange); // + // colCheck + // + this.colCheck.FillWeight = 26F; + this.colCheck.HeaderText = "选"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colChanceId + // + this.colChanceId.FillWeight = 50F; + this.colChanceId.HeaderText = "机会Id"; + this.colChanceId.Name = "colChanceId"; + this.colChanceId.ReadOnly = true; + // + // colImgUrl + // + this.colImgUrl.FillWeight = 300F; + this.colImgUrl.HeaderText = "图片路径"; + this.colImgUrl.Name = "colImgUrl"; + this.colImgUrl.ReadOnly = true; + this.colImgUrl.Visible = false; + // + // colImg + // + this.colImg.FillWeight = 40F; + this.colImg.HeaderText = "图片"; + this.colImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colImg.Name = "colImg"; + this.colImg.ReadOnly = true; + this.colImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colDel + // + this.colDel.FillWeight = 35F; + this.colDel.HeaderText = "删除"; + this.colDel.Name = "colDel"; + this.colDel.ReadOnly = true; + // + // colGoodsName + // + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle5; + this.colGoodsName.FillWeight = 120F; + this.colGoodsName.HeaderText = "商品名称"; + this.colGoodsName.Name = "colGoodsName"; + this.colGoodsName.ReadOnly = true; + // + // colHotValue + // + this.colHotValue.FillWeight = 60F; + this.colHotValue.HeaderText = "热度"; + this.colHotValue.Name = "colHotValue"; + this.colHotValue.ReadOnly = true; + // + // colCate + // + this.colCate.HeaderText = "类目"; + this.colCate.Name = "colCate"; + this.colCate.ReadOnly = true; + // + // colPrice + // + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colPrice.DefaultCellStyle = dataGridViewCellStyle6; + this.colPrice.FillWeight = 70F; + this.colPrice.HeaderText = "价格"; + this.colPrice.Name = "colPrice"; + this.colPrice.ReadOnly = true; + // + // colMsg + // + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colMsg.DefaultCellStyle = dataGridViewCellStyle7; + this.colMsg.FillWeight = 200F; + this.colMsg.HeaderText = "操作结果"; + this.colMsg.Name = "colMsg"; + this.colMsg.ReadOnly = true; + // // PDDGetChanceProdForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1091,8 +1091,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); - this.ucGroupBoxEx1.ResumeLayout(false); - this.ucGroupBoxEx1.PerformLayout(); this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel2.ResumeLayout(false); this.splitContainer2.Panel2.PerformLayout(); @@ -1103,8 +1101,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); this.splitContainer3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + this.ucGroupBoxEx1.ResumeLayout(false); + this.ucGroupBoxEx1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvChanceProduct)).EndInit(); this.ResumeLayout(false); @@ -1146,16 +1146,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms private DevComponents.DotNetBar.PanelEx btnStop; private DevComponents.DotNetBar.PanelEx btnSelectSuccess; private DevComponents.DotNetBar.PanelEx btnStopStop; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; - private System.Windows.Forms.DataGridViewTextBoxColumn colChanceId; - private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; - private System.Windows.Forms.DataGridViewImageColumn colImg; - private System.Windows.Forms.DataGridViewTextBoxColumn colGoodsName; - private System.Windows.Forms.DataGridViewTextBoxColumn colHotValue; - private System.Windows.Forms.DataGridViewTextBoxColumn colCate; - private System.Windows.Forms.DataGridViewTextBoxColumn colPrice; - private System.Windows.Forms.DataGridViewLinkColumn colDel; - private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label6; private System.Windows.Forms.TextBox txtMinPrice; @@ -1181,5 +1171,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms private System.Windows.Forms.TextBox txtFilter; private System.Windows.Forms.ComboBox cmbFilterType; private DevComponents.DotNetBar.PanelEx btnSelectNotGetDetail; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colChanceId; + private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colImg; + private System.Windows.Forms.DataGridViewLinkColumn colDel; + private System.Windows.Forms.DataGridViewTextBoxColumn colGoodsName; + private System.Windows.Forms.DataGridViewTextBoxColumn colHotValue; + private System.Windows.Forms.DataGridViewTextBoxColumn colCate; + private System.Windows.Forms.DataGridViewTextBoxColumn colPrice; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs index 2dab4c0..c6ebf6a 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs @@ -87,11 +87,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms chanceProductResult.chance_id, chanceProductResult.pic_url.Replace("https://", "http://"), DataGridViewExtension.defaultBitmap, + "删除", chanceProductResult.keywords, chanceProductResult.hot_index, chanceProductResult.cat_id_3.ParseToLong() == 0 ? new long?() : chanceProductResult.cat_id_3.ParseToLong(), "采集详情后显示", - "删除", chanceProductResult.getProductMsg ); dgvChanceProduct.Rows[rowId].Height = 60; @@ -507,11 +507,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms chanceProductResult.chance_id, chanceProductResult.pic_url.Replace("https://", "http://"), DataGridViewExtension.defaultBitmap, + "删除", chanceProductResult.keywords, chanceProductResult.hot_index, chanceProductResult.cat_id_3.ParseToLong() == 0 ? new long?() : chanceProductResult.cat_id_3.ParseToLong(), - "预估:" + chanceProductResult.refer_price / 100.0 + " 采集详情后显示实际值", - "删除" + "预估:" + chanceProductResult.refer_price / 100.0 + " 采集详情后显示实际值" ); dgvChanceProduct.Rows[rowId].Height = 60; })); diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.resx b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.resx index ce08b3e..8991e21 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.resx +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.resx @@ -153,6 +153,9 @@ True + + True + True @@ -165,9 +168,6 @@ True - - True - True diff --git a/TEMUKJD/VDianForms/VDianShopListForm.cs b/TEMUKJD/VDianForms/VDianShopListForm.cs new file mode 100644 index 0000000..0865262 --- /dev/null +++ b/TEMUKJD/VDianForms/VDianShopListForm.cs @@ -0,0 +1,900 @@ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using NaiBa.Util.Extension; +using Work; +using AllBase; +using AllBase.Helper; +using TemuKJD.BaseForms; +using TemuKJD.Extension; +using AllBase.Model.Result; +using TemuKJD.BLL.VDian; +using TemuKJD; + +namespace KJD.VDianForms +{ + public partial class VDianShopListForm : BaseGeneralForm + { + private bool isLoading = false; + public static VDianShopListForm Instance; + + public VDianShopListForm() + { + InitializeComponent(); + Instance = this; + } + + public void HideBorder() + { + this.panel6.BorderStyle = BorderStyle.None; + } + + private void ProductMappingVDianListFrom_Load(object sender, EventArgs e) + { + this.TitleText = this.Text; + this.dgvVDianShop.AddSelectorColumn("colSelect"); + + this.VisibleChanged += ProductMappingVDianListFrom_VisibleChanged; + } + + private void ProductMappingVDianListFrom_VisibleChanged(object sender, EventArgs e) + { + if (this.Visible == true) + RefreshDataGridView(); + } + + private void ProductMappingVDianLoginForm_SaveComplete(object obj) + { + VDianShopLoginInfo vDianShopLoginInfo = obj as VDianShopLoginInfo; + if (vDianShopLoginInfo == null) + return; + + var vDianShop = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == vDianShopLoginInfo.ShopId); + if (vDianShop != null) + { + vDianShop.ShopName = vDianShopLoginInfo.ShopName; + vDianShop.Wdtoken = vDianShopLoginInfo.Wdtoken; + vDianShop.Cookies = vDianShopLoginInfo.Cookies; + vDianShop.ApiAuth = vDianShopLoginInfo.ApiAuth; + // 保存到服务器 + SaveVDianToServer(vDianShop); + } + else + { + GlobalConfig.VDianShopLoginList.Add(vDianShopLoginInfo); + // 保存到服务器 + SaveVDianToServer(vDianShopLoginInfo); + } + + CheckShopLogin(new string[] { vDianShopLoginInfo.ShopId }); + + if (vDianShopLoginInfo.LoginStatus == 1) + { + // cookie保存到服务端 + var url = BaseClass.BuildObjString("api/weidian&act=add_weidian_login_cookie").Replace("littlecow/api/weidian", "api/weidian"); + var data = UserLogin.GetSignaturex() + + "&shop_id=" + vDianShopLoginInfo.ShopId + + "&shop_name=" + vDianShopLoginInfo.ShopName + + "&cookie=" + GetHtml.UrlEncodeUtf8(vDianShopLoginInfo.Cookies.Replace(" ", "")); + var html = GetHtml.PostUtf8(url, data); + + // 测试获取cookie + //url = BaseClass.BuildObjString("api/weidian&act=get_weidian_login_cookie").Replace("littlecow/api/weidian", "api/weidian"); + //data = UserLogin.GetSignaturex() + "&cid=6"; + //html = GetHtml.PostUtf8(url, data); + } + } + + /// + /// 读取服务端的微店 + /// + public static List GetServerVDian() + { + // 读取已有店铺 + List list = new List(); + string url = BaseClass.BuildObjString("shop&act=auto_login_shop_v1"); + string data = UserLogin.GetSignaturex(); + data += "&siteid=5"; + string html = GetHtml.PostUtf8(url, data); + if (html == "Ok" || string.IsNullOrEmpty(html)) + { + return list; + } + var m = BaseRegex.GetMatchRegex(ref html, "]+?)>"); + for (int i = 0; m != null && i < m.Count; i++) + { + string shopStr = m[i].Groups[0].Value; + VDianShopLoginInfo vsp = new VDianShopLoginInfo(); + vsp.ShopId = BaseRegex.GetStringJson(ref shopStr, "id"); + if (vsp.ShopId == null) + continue; + vsp.Phone = BaseRegex.GetStringJson(ref shopStr, "user_name"); + vsp.ShopName = BaseRegex.GetStringJson(ref shopStr, "name"); + vsp.Password = BaseRegex.GetStringJson(ref shopStr, "password"); + if (!string.IsNullOrEmpty(vsp.Password)) + vsp.Password = DataOpenSSL.DecryptString(vsp.Password); + vsp.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id"); + + if (list.Any(l => l.Phone == vsp.Phone)) + continue; + list.Add(vsp); + } + return list; + } + + /// + /// 新增微店店铺列表 + /// + /// + /// 是否更新服务端已存在的店铺 + public void SaveVDianToServer(List vDianList, bool isUpdateContainsShop = false) + { + var shops = vDianList; + if (!isUpdateContainsShop) + { + /// + /// 读取店铺列表 + /// + /// + List list = new List(); + string url = BaseClass.BuildObjString("shop&act=auto_login_shop_v1"); + string data = UserLogin.GetSignaturex(); + data += "&siteid=5"; + string html = GetHtml.PostUtf8(url, data); + if (!string.IsNullOrEmpty(html)) + { + var m = BaseRegex.GetMatchRegex(ref html, "]+?)>"); + for (int i = 0; m != null && i < m.Count; i++) + { + string shopStr = m[i].Groups[0].Value; + VDianShopLoginInfo vsp = new VDianShopLoginInfo(); + vsp.ShopId = BaseRegex.GetStringJson(ref shopStr, "id"); + if (vsp.ShopId == null) + continue; + vsp.Phone = BaseRegex.GetStringJson(ref shopStr, "user_name"); + vsp.ShopName = BaseRegex.GetStringJson(ref shopStr, "name"); + vsp.Password = BaseRegex.GetStringJson(ref shopStr, "password"); + if (!string.IsNullOrEmpty(vsp.Password)) + vsp.Password = DataOpenSSL.DecryptString(vsp.Password); + vsp.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id"); + + if (list.Any(l => l.Phone == vsp.Phone)) + continue; + list.Add(vsp); + } + } + + // 写入服务端没有的店铺 + shops = GlobalConfig.VDianShopLoginList.Where(s => !list.Any(l => l.ShopId == s.ShopId)).ToList(); + } + for (int i = 0; i < shops.Count; i++) + { + var vShop = shops[i]; + SaveVDianToServer(vShop); + } + } + + /// + /// 将微店保存到服务器,如果已存在店铺,将会被覆盖 + /// + public void SaveVDianToServer(VDianShopLoginInfo vShop) + { + string sShopPhone = vShop.Phone; + string sPassword = vShop.Password; + string sShopName = vShop.ShopName; + string sShopId = vShop.ShopId; + //string sGroup = ""; + + //var x = "123 +/"; + //var r = GetHtml.UrlEncodeUtf8(DataOpenSSL.EncryptString(x)); + //var rr = DataOpenSSL.DecryptString(GetHtml.UrlDecode(r)); + + var url = BaseClass.BuildObjString("shop&act=add_shop_vd_v1"); + var data = UserLogin.GetSignaturex() + "&user_name=" + sShopPhone + + "&password=" + GetHtml.UrlEncodeUtf8(DataOpenSSL.EncryptString(sPassword)) + "&name=" + sShopName + + "&shop_id=" + sShopId //+ "&cat_name=" + sGroup + + "&service=&buyer=&login_user=&upload_user=" + + "&collect_user=" + BaseClass.NickName + "&sub_account_name=&sub_account_password="; + data += "&site_id=5"; // 5为微店 + var html = GetHtml.PostUtf8(url, data); + if (!string.IsNullOrEmpty(html) && html.Equals("Full Shop Count")) + { + BaseMsgForm.ShowInfo("当前版本支持的最大店铺数已满,请升级版本或另外购买一个账户"); + } + if (string.IsNullOrEmpty(html)) + { + Thread.Sleep(1000); + html = GetHtml.PostUtf8(url, data); + } + } + + /// + /// 删除服务端的微店店铺 + /// + /// + /// + public string DelServerVDianShop(string name) + { + string url = BaseClass.BuildObjString("shop&act=delete"); + string data = UserLogin.GetSignaturex() + "&name=" + name; + data += "&site_id=5"; + string html = GetHtml.PostUtf8(url, data); + return html; + } + + private void dgvVDianShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvVDianShop.Columns[e.ColumnIndex].HeaderText; + string shopId = dgvVDianShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); + string shopName = dgvVDianShop.Rows[e.RowIndex].Cells["colShopName"].Value.ParseToString(); + + switch (headerText) + { + case "检测": + CheckShopLogin(new string[] { shopId }); + break; + + case "删除": + if (BaseMsgForm.ShowConfirm("确定删除店铺吗?").DialogResult == DialogResult.Cancel) + return; + DeleteVDianShop(e.RowIndex); + DelServerVDianShop(shopName); + //StartUp.SaveVDianShopLogin(); + break; + + case "编辑": + //var shopInfo = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == shopId); + //ProductMappingVDianEditForm editForm = new ProductMappingVDianEditForm(shopInfo); + //editForm.SaveComplete += EditForm_SaveComplete; + //editForm.ShowDialog(); + break; + + case "重登": + //ProductMappingVDianLoginForm.IsRun = true; + //var vDian = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == shopId); + //var phone = ""; + //var password = ""; + //if (vDian != null) + //{ + // phone = vDian.Phone; + // password = vDian.Password; + //} + //ProductMappingVDianLoginForm productMappingVDianLoginForm = new ProductMappingVDianLoginForm(phone, password); + //productMappingVDianLoginForm.SaveComplete += ProductMappingVDianLoginForm_SaveComplete; + //productMappingVDianLoginForm.ShowDialog(); + //ProductMappingVDianLoginForm.IsRun = false; + break; + + case "上货认证": + //ProductMappingVDianLoginForm.IsRun = true; + //var vDian1 = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == shopId); + //if (vDian1 != null) + //{ + // if (vDian1.UpGoodAuth == "去认证") + // { + // ProductMappingVDianLoginForm productMappingVDianLoginForm1 = new ProductMappingVDianLoginForm(vDian1, "upAuth"); + // productMappingVDianLoginForm1.SaveComplete += ProductMappingVDianLoginForm_SaveComplete; + // productMappingVDianLoginForm1.ShowDialog(); + // } + // else + // { + // ProductMappingVDianLoginForm productMappingVDianLoginForm1 = new ProductMappingVDianLoginForm(vDian1, "mainAuth"); + // productMappingVDianLoginForm1.SaveComplete += ProductMappingVDianLoginForm_SaveComplete; + // productMappingVDianLoginForm1.ShowDialog(); + // } + //} + //ProductMappingVDianLoginForm.IsRun = false; + break; + case "接口授权": + //ProductMappingVDianLoginForm.IsRun = true; + //var vDian2 = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == shopId); + //ApiAuth(vDian2); + //ProductMappingVDianLoginForm.IsRun = false; + break; + case "接口模式2": + //var vDian3 = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == shopId); + //if (vDian3 != null) + //{ + // ProductMappingVDianLoginForm productMappingVDianLoginForm3 = new ProductMappingVDianLoginForm(vDian3, "api2Auth"); + // productMappingVDianLoginForm3.SaveComplete += ProductMappingVDianLoginForm_SaveComplete; + // productMappingVDianLoginForm3.ShowDialog(); + //} + break; + + default: + dgvVDianShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvVDianShop.Rows[e.RowIndex].Cells["colSelect"].Value; + break; + } + } + + private void EditForm_SaveComplete(object obj) + { + VDianShopLoginInfo vDianShopLoginInfo = obj as VDianShopLoginInfo; + if (vDianShopLoginInfo == null) + return; + + //StartUp.SaveVDianShopLogin(); + SaveVDianToServer(vDianShopLoginInfo); + DataGridViewRow dgvr = dgvVDianShop.Rows.Cast().Where(p => + p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == vDianShopLoginInfo.ShopId).FirstOrDefault(); + + if (dgvr != null) + UpdateDataGridViewRowToken(dgvr, vDianShopLoginInfo); + } + + private void dgvVDianShop_UserDeletedRow(object sender, DataGridViewRowEventArgs e) + { + } + + /// + /// 检测店铺登录授权等情况 + /// + /// + /// + public void CheckShopLogin(string[] shopIds, bool isStart = false) + { + if (!isStart) + { + this.statusBar.lblTaskStatus.Text = "正在检测..."; + this.statusBar.pgbTaskProgress.Value = 0; + this.statusBar.pgbTaskProgress.Maximum = shopIds.Length; + this.statusBar.pgbTaskProgress.Text = "0" + "/" + shopIds.Length; + } + + Task.Run(() => + { + for (int i = 0; i < shopIds.Length; i++) + { + var vDian = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == shopIds[i]); + if (vDian != null) + { + // 获取登录状态 + // string url = "https://d.weidian.com/weidian-pc/pc-vue-index/index.html"; // 微店商家后台 + var result = new VDianUpProdMappingBLL().request_vdian_sell_com(vDian.Wdtoken, vDian.Cookies); + Thread.Sleep(200); + if (result.Contains("LOGIN ERROR")) + { + vDian.LoginStatus = 2; + } + else if (result.Contains("\"message\":\"OK\"")) + { + vDian.LoginStatus = 1; + } + + // 获取店铺token列表 + vDian.ApiAuth = "未授权"; + #region 检测微店授权1 + //int authCount = 0; + //foreach (var vDianAppKey in ProductMappingVDianLoginForm.lstVDianAppKey) + //{ + // VDianApiToken vDianApiToken = new VDianApiToken() { AppKey = vDianAppKey, ApiAuth = "未授权", ApiAccessToken = "" }; + // string data = UserLogin.GetSignaturex() + "&act=get_token_list&shop_id=" + vDian.ShopId + "&appkey=" + vDianApiToken.AppKey.AppKey; + // string sVDianTokenApiUrl = ProductMappingVDianLoginForm.VDianUrl + "?" + BaseClass.ObjUrl + "weidian_token&appkey=" + vDianAppKey?.AppKey; + // var res = GetHtml.PostUtf8(sVDianTokenApiUrl, data); + // if (res.Contains(",")) + // { + // var arr = res.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + // if (arr.Length > 0) + // { + // var arr1 = arr[0].Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); + // if (arr1.Length == 2 && !string.IsNullOrEmpty(arr1[1])) + // { + // vDianApiToken.ApiAccessToken = arr1[1]; + + // bool outDay = false; + // var tokenExists = vDian.LstWdApiToken.FirstOrDefault(t => t.AppKey?.AppKey == vDianApiToken.AppKey?.AppKey); + // if (tokenExists != null && tokenExists.LastRefreshDate != DateTime.Now.ToString("yyyyMMdd")) + // { + // outDay = true; + // } + // var apiJson = ""; + + // if (!outDay) + // { + // apiJson = request_vdian_api_auth(vDianApiToken.ApiAccessToken); + // if (apiJson.Contains("\"status_code\":0")) + // { + // vDianApiToken.ApiAuth = "已授权"; + // authCount++; + // } + // // 频次超过上限 + // else if (apiJson.Contains("上限")) + // vDian.ApiAuth = "接口上限"; + // else if (string.IsNullOrEmpty(apiJson)) + // vDianApiToken.ApiAuth = "获取失败"; + // } + // if (outDay || apiJson.Contains("无效或已过期") && apiJson.Contains("access_token:")) // 有效期只有1天,所以即使已授权也直接刷新 + // { + // sVDianTokenApiUrl = ProductMappingVDianLoginForm.VDianUrl + "?" + BaseClass.ObjUrl + "weidian_token"; + // data = UserLogin.GetSignaturex() + "&act=reflesh_token&shop_id=" + vDian.ShopId + "&appkey=" + vDianApiToken.AppKey.AppKey; + // var refreshResult = GetHtml.PostUtf8(sVDianTokenApiUrl, data); + // if (refreshResult.StartsWith("ok,") && refreshResult.Length > 3) + // { + // vDianApiToken.ApiAccessToken = refreshResult.Substring(3); + // vDianApiToken.ApiAuth = "已授权"; + // authCount++; + // } + // else if (refreshResult.StartsWith("ok,")) + // vDianApiToken.ApiAuth = "已过期"; + // else + // vDianApiToken.ApiAuth = "获取失败"; + + // if (tokenExists != null) + // { + // tokenExists.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd"); + // } + // } + // } + // } + // } + // var vDianTokenExists = vDian.LstWdApiToken.FirstOrDefault(t => t.AppKey?.AppKey == vDianApiToken.AppKey?.AppKey); + // if (vDianTokenExists != null) + // { + // vDianTokenExists.ApiAccessToken = vDianApiToken.ApiAccessToken; + // vDianTokenExists.ApiAuth = vDianApiToken.ApiAuth; + // } + // else + // vDian.LstWdApiToken.Add(vDianApiToken); + //} + //vDian.ApiAuth = authCount < 2 ? "未授权" : "已授权"; + #endregion + + vDian.Api2Auth = "未授权"; + #region 验证授权2 + //if (!string.IsNullOrEmpty(vDian.WdApi2Token)) + //{ + // var api2Json = request_vdian_api_auth(vDian.WdApi2Token); + // if (api2Json.Contains("\"status_code\":0")) + // vDian.Api2Auth = "已授权"; + // else if (api2Json.Contains("无效或已过期") && api2Json.Contains("access_token:")) + // { + // var refreshResult = MappingVDianThirdApiBLL.RefreshVDianAccessToken(vDian.WdApi2RefreshToken); + // if (refreshResult.Contains("\"status_code\":0")) + // { + // vDian.WdApi2Token = BaseRegex.GetMatchRegexString(refreshResult, "\"access_token\":\"([\\s\\S]*?)\""); + // vDian.WdApi2RefreshToken = BaseRegex.GetMatchRegexString(refreshResult, "\"refresh_token\":\"([\\s\\S]*?)\""); + // vDian.Api2Auth = "已授权"; + // } + // else + // vDian.Api2Auth = "已过期"; + // } + // // 频次超过上限 + // else if (api2Json.Contains("上限")) + // vDian.Api2Auth = "接口上限"; + // else + // vDian.Api2Auth = "获取失败"; + //} + + //// 是否通过上货认证 + //var authResult = request_vdian_upgood_auth_com(vDian.Cookies); + //vDian.UpGoodAuth = "去认证"; + //vDian.MainAuth = "未认证"; + //if (authResult.ToLower().Replace("\"", "").Contains("status:unauth") || authResult.Contains("信息不存在")) + // vDian.UpGoodAuth = "去认证"; + //else if (authResult.Contains("LOGIN ERROR")) + // vDian.UpGoodAuth = "请先登录"; + //else if (authResult.ToLower().Replace("\"", "").Contains("成功")) + //{ + // // 企业认证信息: {"status":{"code":0,"message":"成功","description":"成功"},"result":{"basicAuthModel":{"authTime":1596704856000,"certNo":"**************4311","certType":"BL","payTypes":["WD"],"updateTime":1596704856000,"userId":"1504742654","userName":"厦门*****有限公司","userType":"COMPANY","verifyTypes":["BL","LEGAL"]},"licenseAuthModel":{"beginTime":1596643200000,"businessAddress":"厦门市思明区东坪山路93号101单元","businessArea":"福建省-厦门市-思明区","certNo":"**************4311","certStatus":"USABLE","companyName":"厦门*****有限公司","createTime":1596704856000,"endTime":2214489600000,"licenseImg":"https://private.weidian.com/audit1504742654-776e00000173c2aee4650a217216_4032_3024.jpg","licenseType":1,"updateTime":1596704856000}}} + // if (authResult.Contains("\"CERT\"") == false && authResult.Contains("\"LEGAL\"") == false) + // vDian.UpGoodAuth = "需主体认证"; + // else + // { + // vDian.UpGoodAuth = "认证成功"; + // vDian.MainAuth = "认证成功"; + // } + //} + //else + // vDian.UpGoodAuth = "获取失败"; + #endregion + + // 每天第一次打开验证的话要验证一个保存一次,防止没验证完关闭了再打开浪费接口资源。 + if (!isStart) + AddDataGridViewRow(vDian); + } + if (this.Created && !isStart) + { + if (i % 5 == 0 || i == shopIds.Length - 1) + { + + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在检测..."; + this.statusBar.pgbTaskProgress.Value = (i + 1); + this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + shopIds.Length; + })); + } + } + //if (isStart) + // StartUp.SaveVDianShopLogin(); + } + if (this.Created && !isStart) + { + this.Invoke(new Action(() => + { + //this.btnCheck.Text = "检测选中"; + this.statusBar.lblTaskStatus.Text = "检测完毕"; + })); + } + //if (!isStart) + // StartUp.SaveVDianShopLogin(); + }); + } + + private void AddDataGridViewRow(VDianShopLoginInfo param, bool isRefresh = false) + { + if (!this.Created) + return; + this.Invoke(new Action(() => + { + DataGridViewRow dgvr = dgvVDianShop.Rows.Cast().Where(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == param.ShopId).FirstOrDefault(); + if (dgvr != null) + { + UpdateDataGridViewRowToken(dgvr, param); + if (!isRefresh) + { + // help to scroll to checked + dgvVDianShop.CurrentCell = dgvr.Cells[2]; + } + } + else + { + int rowIndex = this.dgvVDianShop.Rows.Add(param.ShopId, + false, + param.ShopName, + param.Phone, + param.Cookies, + param.LoginStatus == 1 ? "正常" : "未登录", + "检测", + "重登", + param.UpGoodAuth, + param.ApiAuth, + param.Api2Auth, + "编辑", + "删除"); + if (!isRefresh) + { + // help to scroll to latest checked + dgvVDianShop.CurrentCell = this.dgvVDianShop.Rows[rowIndex].Cells[2]; + } + } + })); + } + + private void UpdateDataGridViewRowToken(DataGridViewRow dgvr, VDianShopLoginInfo param) + { + if (dgvr == null || param == null) + return; + dgvr.Cells["colLoginStatus"].Value = (param.LoginStatus == 1 ? "正常" : "未登录"); + dgvr.Cells["colCookie"].Value = param.Cookies; + dgvr.Cells["colUpGoodAuth"].Value = param.UpGoodAuth; + dgvr.Cells["colApiAuth"].Value = param.ApiAuth; + dgvr.Cells["colApi2Auth"].Value = param.Api2Auth; + dgvr.Cells["colPhone"].Value = param.Phone; + } + + private void RefreshDataGridView() + { + if (isLoading) + { + //BaseMsgForm.ShowError("当前正在加载,请稍等"); + return; + } + this.statusBar.pgbTaskProgress.Maximum = GlobalConfig.VDianShopLoginList.Count; + this.dgvVDianShop.Rows.Clear(); + Task.Run(() => + { + isLoading = true; + for (int i = 0; i < GlobalConfig.VDianShopLoginList.Count; i++) + { + if (i % 5 == 0 || i == GlobalConfig.VDianShopLoginList.Count - 1) + { + if (this.Created) + { + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在加载..."; + this.statusBar.pgbTaskProgress.Value = (i + 1); + this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + GlobalConfig.VDianShopLoginList.Count; + })); + } + } + AddDataGridViewRow(GlobalConfig.VDianShopLoginList[i], true); + } + if (this.Created) + { + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "加载完毕"; + })); + } + isLoading = false; + }); + } + + private void DeleteVDianShop(int rowIndex) + { + string shopId = this.dgvVDianShop.Rows[rowIndex].Cells["colShopId"].Value.ParseToString(); + dgvVDianShop.Rows.RemoveAt(rowIndex); + GlobalConfig.VDianShopLoginList.RemoveAll(v => v.ShopId == shopId); + } + + private void btnCheck_Click(object sender, EventArgs e) + { + if (this.btnCheck.Text == "检测选中") + { + List shopIdList = GetCheckedTokenList(); + if (!shopIdList.Any()) + { + BaseMsgForm.ShowError("请选择需要检测的店铺"); + return; + } + + CheckShopLogin(shopIdList.ToArray()); + } + } + + private List GetCheckedTokenList() + { + List shopIdList = new List(); + for (int i = 0; i < dgvVDianShop.Rows.Count; i++) + { + if (dgvVDianShop.Rows[i].Cells["colSelect"].Value.ParseToBool()) + { + string shopId = dgvVDianShop.Rows[i].Cells["colShopId"].Value.ParseToString(); + shopIdList.Add(shopId); + } + } + return shopIdList; + } + + // 批量导入店铺 + private void btnImport_Click(object sender, EventArgs e) + { + // ProductMappingVDianLoginForm.IsRun = true; + ImportShop(); + } + + void ImportShop() + { + BaseMsgForm.ShowInfo("微店店铺导入格式:店铺手机号-----店铺密码\r\n多个店铺请每个店铺新起一行。"); + + OpenFileDialog openFileDialog = new OpenFileDialog(); + openFileDialog.Filter = "文本文件(*.txt)|*.txt"; + openFileDialog.RestoreDirectory = true; + openFileDialog.FilterIndex = 1; + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + using (StreamReader sr = new StreamReader(openFileDialog.FileName, System.Text.Encoding.Default)) + { + string fileName = openFileDialog.FileName; + string importStr = sr.ReadToEnd().Trim(); + var strArr = importStr.Replace("\r", "").Split('\n'); + for (int i = 0; i < strArr.Length; i++) + { + //if (ProductMappingVDianLoginForm.IsRun == false) + // break; + //try + //{ + // // 通用格式 + // if (strArr[i].Contains("-----")) + // { + // var productArr = strArr[i].Split(new string[] { "-----" }, StringSplitOptions.RemoveEmptyEntries); + // if (productArr.Length >= 2) + // { + // var phone = productArr[0]; + // var password = productArr[1]; + + // ProductMappingVDianLoginForm productMappingVDianLoginForm = new ProductMappingVDianLoginForm(phone, password); + // productMappingVDianLoginForm.SaveComplete += ProductMappingVDianLoginForm_SaveComplete; + // productMappingVDianLoginForm.ShowDialog(); + // } + // } + //} + //catch (Exception ex) + //{ + //} + } + } + this.btnImport.Enabled = true; + } + } + + /// + /// 读取微店上货认证信息 + /// + /// + /// + private string request_vdian_upgood_auth_com(string wdCookie) + { + var spider_token = BaseClass.GetMd5(DateTime.Now.ToString()).Substring(0, 4).ToLower(); + + //https://thor.weidian.com/authentication/realname.getUserAuthInfoWithScopes/1.0?param=%7B%22scopes%22:%22BASIC,LICENSE%22%7D&wdtoken=3a5523f7 + string referer = "https://weidian.com/pay/member/credential-status.html?essentials=twoParam&redirect=https://d.weidian.com/weidian-pc/pc-vue-item/?spider_token=" + spider_token; + string url = "https://thor.weidian.com/authentication/realname.queryAuthStatus/1.0?v=1.0×tamp=" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now); + url = "https://thor.weidian.com/authentication/realname.getUserAuthInfoWithScopes/1.0?param=%7B%22scopes%22:%22BASIC,LICENSE%22%7D"; + return request_vdian(url, referer, wdCookie); + } + + /// + /// 微店主题认证 + /// + /// + /// + private string request_vdian_main_auth_com(string wdCookie) + { + string referer = "https://h5.weidian.com/m/shop-certify/status.html"; + string url = "https://h5.weidian.com/m/shop-certify/status.html"; + return request_vdian(url, referer, wdCookie); + } + + public static List CheckTokenStrList = new List() + { + BaseClass.VDianApi + "api?param={{}}&public={{\"method\":\"vdian.order.expresslist\",\"access_token\":\"{0}\",\"version\":\"1.0\"}}" , + BaseClass.VDianApi + "api?param={{}}&public={{\"method\":\"vdian.sku.attrs.get\",\"access_token\":\"{0}\",\"version\":\"1.0\",\"format\":\"json\"}}" , + BaseClass.VDianApi + "api?param={{\"pageNum\":0,\"pageSize\":10}}&public={{\"method\":\"vdian.supplies.list\",\"format\":\"json\",\"access_token\":\"{0}\",\"version\":\"1.0\"}}", + BaseClass.VDianApi + "api?param={{}}&public={{\"method\":\"dinggou.get.versions\",\"access_token\":\"{0}\",\"version\":\"1.0\",\"format\":\"json\"}}", + BaseClass.VDianApi + "api?param={{}}&public={{\"method\":\"get.user.dinggou.info\",\"access_token\":\"{0}\",\"version\":\"1.0\",\"format\":\"json\"}}", + }; + + /// + /// 验证token + /// + /// + /// + private string request_vdian_api_auth(string access_token) + { + string baseUrl = CheckTokenStrList[Randomx.GetId(CheckTokenStrList.Count)]; + string url = string.Format(baseUrl, access_token); + //url = string.Format(CheckTokenStrList[0], access_token); + + var result = request_vdian(url, "https://api.vdian.com/api", ""); + while (result.Contains("上限") && CheckTokenStrList.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + CheckTokenStrList.Remove(baseUrl); + baseUrl = CheckTokenStrList[Randomx.GetId(CheckTokenStrList.Count)]; + url = string.Format(baseUrl, access_token); + result = request_vdian(url, "https://api.vdian.com/api", ""); + } + return result; + } + + private string request_vdian(string url, string referer, string cookies) + { + + HttpWebResponse response = null; + string responseText = ""; + + try + { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + request.Accept = "*/*"; + request.Headers.Add("Origin", @"https://weidian.com"); + request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"; + request.ContentType = "application/x-www-form-urlencoded"; + request.Referer = referer; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + request.Headers.Set(HttpRequestHeader.Cookie, cookies); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException e) + { + if (e.Status == WebExceptionStatus.ProtocolError) response = (HttpWebResponse)e.Response; + responseText = "error: " + e.Message; + } + catch (Exception ex) + { + if (response != null) response.Close(); + responseText = "error: " + ex.Message; + } + if (response != null) + { + if (string.IsNullOrEmpty(responseText)) + responseText = GetHtml.ReadResponse(response); + response.Close(); + } + Thread.Sleep(500); + return responseText; + } + + private void buttonX1_Click(object sender, EventArgs e) + { + GetHtml.OpenUrl("https://d.weidian.com/weidian-pc/pc-vue-item/"); + } + + private void btnLoginSelect_Click(object sender, EventArgs e) + { + //ProductMappingVDianLoginForm.IsRun = true; + if (this.btnLoginSelect.Text == "登录选中") + { + List shopIdList = GetCheckedTokenList(); + if (!shopIdList.Any()) + { + BaseMsgForm.ShowError("请选择需要登录的店铺"); + return; + } + + foreach (var shopId in shopIdList) + { + //if (ProductMappingVDianLoginForm.IsRun == false) + // break; + + var vDian = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == shopId); + if (vDian != null && !string.IsNullOrEmpty(vDian.Phone)/* && !string.IsNullOrEmpty(vDian.Password)*/) + { + //ProductMappingVDianLoginForm productMappingVDianLoginForm = new ProductMappingVDianLoginForm(vDian.Phone, vDian.Password); + //productMappingVDianLoginForm.SaveComplete += ProductMappingVDianLoginForm_SaveComplete; + //productMappingVDianLoginForm.ShowDialog(); + } + } + } + } + + private void btnAuthSelect_Click(object sender, EventArgs e) + { + //ProductMappingVDianLoginForm.IsRun = true; + //if (this.btnAuthSelect.Text == "授权选中") + //{ + // List shopIdList = GetCheckedTokenList(); + // if (!shopIdList.Any()) + // { + // BaseMsgForm.ShowError("请选择需要授权的店铺"); + // return; + // } + + // foreach (var shopId in shopIdList) + // { + // if (ProductMappingVDianLoginForm.IsRun == false) + // break; + + // var vDian = GlobalConfig.VDianShopLoginList.FirstOrDefault(v => v.ShopId == shopId); + // ApiAuth(vDian); + // } + //} + } + + private void ApiAuth(VDianShopLoginInfo vDian) + { + //if (vDian != null) + //{ + // if (ProductMappingVDianLoginForm.lstVDianAppKey.Count > 0) + // { + // foreach (var appKey in ProductMappingVDianLoginForm.lstVDianAppKey) + // { + // if (ProductMappingVDianLoginForm.IsRun == false) + // break; + // ProductMappingVDianLoginForm productMappingVDianLoginForm2 = new ProductMappingVDianLoginForm(vDian, "apiAuth", appKey); + // if (ProductMappingVDianLoginForm.lstVDianAppKey.LastOrDefault() == appKey) + // productMappingVDianLoginForm2.SaveComplete += ProductMappingVDianLoginForm_SaveComplete; + // productMappingVDianLoginForm2.ShowDialog(); + // } + // } + // else + // { + // if (ProductMappingVDianLoginForm.IsRun == false) + // return; + // ProductMappingVDianLoginForm productMappingVDianLoginForm2 = new ProductMappingVDianLoginForm(vDian, "apiAuth"); + // productMappingVDianLoginForm2.SaveComplete += ProductMappingVDianLoginForm_SaveComplete; + // productMappingVDianLoginForm2.ShowDialog(); + // } + //} + } + } +} diff --git a/TEMUKJD/VDianForms/VDianShopListForm.designer.cs b/TEMUKJD/VDianForms/VDianShopListForm.designer.cs new file mode 100644 index 0000000..1bd9495 --- /dev/null +++ b/TEMUKJD/VDianForms/VDianShopListForm.designer.cs @@ -0,0 +1,492 @@ +namespace KJD.VDianForms +{ + partial class VDianShopListForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VDianShopListForm)); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.panel5 = new System.Windows.Forms.Panel(); + this.btnAuthSelect = new DevComponents.DotNetBar.ButtonX(); + this.btnLoginSelect = new DevComponents.DotNetBar.ButtonX(); + this.btnCheck = new DevComponents.DotNetBar.ButtonX(); + this.panel4 = new System.Windows.Forms.Panel(); + this.labelX1 = new DevComponents.DotNetBar.LabelX(); + this.btnImport = new DevComponents.DotNetBar.ButtonX(); + this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); + this.panel2 = new System.Windows.Forms.Panel(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.dgvVDianShop = new TemuKJD.UserComponent.DataGridViewXEx(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPhone = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopOperate = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colRelogin = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colUpGoodAuth = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colApiAuth = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colApi2Auth = new System.Windows.Forms.DataGridViewLinkColumn(); + this.ColEdit = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn(); + this.panel3 = new System.Windows.Forms.Panel(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.panel6 = new System.Windows.Forms.Panel(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel2.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvVDianShop)).BeginInit(); + this.panel3.SuspendLayout(); + this.panel6.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.White; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.panel2); + this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4); + this.splitContainer1.Size = new System.Drawing.Size(858, 499); + this.splitContainer1.SplitterWidth = 2; + this.splitContainer1.TabIndex = 32; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel2.Controls.Add(this.panel5, 1, 0); + this.tableLayoutPanel2.Controls.Add(this.panel4, 0, 0); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(858, 50); + this.tableLayoutPanel2.TabIndex = 37; + // + // panel5 + // + this.panel5.Controls.Add(this.btnAuthSelect); + this.panel5.Controls.Add(this.btnLoginSelect); + this.panel5.Controls.Add(this.btnCheck); + this.panel5.Location = new System.Drawing.Point(626, 3); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(229, 44); + this.panel5.TabIndex = 1; + // + // btnAuthSelect + // + this.btnAuthSelect.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnAuthSelect.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnAuthSelect.Location = new System.Drawing.Point(151, 12); + this.btnAuthSelect.Name = "btnAuthSelect"; + this.btnAuthSelect.Size = new System.Drawing.Size(66, 23); + this.btnAuthSelect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnAuthSelect.TabIndex = 38; + this.btnAuthSelect.Text = "授权选中"; + this.btnAuthSelect.Click += new System.EventHandler(this.btnAuthSelect_Click); + // + // btnLoginSelect + // + this.btnLoginSelect.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnLoginSelect.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnLoginSelect.Location = new System.Drawing.Point(79, 12); + this.btnLoginSelect.Name = "btnLoginSelect"; + this.btnLoginSelect.Size = new System.Drawing.Size(66, 23); + this.btnLoginSelect.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnLoginSelect.TabIndex = 37; + this.btnLoginSelect.Text = "登录选中"; + this.btnLoginSelect.Click += new System.EventHandler(this.btnLoginSelect_Click); + // + // btnCheck + // + this.btnCheck.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnCheck.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnCheck.Location = new System.Drawing.Point(7, 12); + this.btnCheck.Name = "btnCheck"; + this.btnCheck.Size = new System.Drawing.Size(66, 23); + this.btnCheck.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnCheck.TabIndex = 33; + this.btnCheck.Text = "检测选中"; + this.btnCheck.Click += new System.EventHandler(this.btnCheck_Click); + // + // panel4 + // + this.panel4.Controls.Add(this.labelX1); + this.panel4.Controls.Add(this.btnImport); + this.panel4.Controls.Add(this.buttonX1); + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel4.Location = new System.Drawing.Point(3, 3); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(617, 44); + this.panel4.TabIndex = 0; + // + // labelX1 + // + // + // + // + this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX1.ForeColor = System.Drawing.Color.Blue; + this.labelX1.Location = new System.Drawing.Point(155, 13); + this.labelX1.Name = "labelX1"; + this.labelX1.Size = new System.Drawing.Size(476, 23); + this.labelX1.TabIndex = 36; + this.labelX1.Text = "应微店主体认证要求,请点击上货认证下链接尽快完成主体认证,以免影响数据转换。"; + this.labelX1.Visible = false; + // + // btnImport + // + this.btnImport.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnImport.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnImport.Location = new System.Drawing.Point(6, 12); + this.btnImport.Name = "btnImport"; + this.btnImport.Size = new System.Drawing.Size(66, 23); + this.btnImport.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnImport.TabIndex = 34; + this.btnImport.Text = "店铺导入"; + this.btnImport.Click += new System.EventHandler(this.btnImport_Click); + // + // buttonX1 + // + this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.buttonX1.Location = new System.Drawing.Point(80, 12); + this.buttonX1.Name = "buttonX1"; + this.buttonX1.Size = new System.Drawing.Size(66, 23); + this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.buttonX1.TabIndex = 35; + this.buttonX1.Text = "打开地址"; + this.buttonX1.Click += new System.EventHandler(this.buttonX1_Click); + // + // panel2 + // + this.panel2.Controls.Add(this.tableLayoutPanel1); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Padding = new System.Windows.Forms.Padding(8, 0, 8, 8); + this.panel2.Size = new System.Drawing.Size(858, 447); + this.panel2.TabIndex = 0; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.dgvVDianShop, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.panel3, 0, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(8, 0); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(842, 439); + this.tableLayoutPanel1.TabIndex = 28; + // + // dgvVDianShop + // + this.dgvVDianShop.AllowUserToAddRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvVDianShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvVDianShop.BackgroundColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvVDianShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvVDianShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvVDianShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colShopId, + this.colSelect, + this.colShopName, + this.colPhone, + this.colCookie, + this.colLoginStatus, + this.colShopOperate, + this.colRelogin, + this.colUpGoodAuth, + this.colApiAuth, + this.colApi2Auth, + this.ColEdit, + this.colDelete}); + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvVDianShop.DefaultCellStyle = dataGridViewCellStyle3; + this.dgvVDianShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvVDianShop.EnableHeadersVisualStyles = false; + this.dgvVDianShop.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dgvVDianShop.Location = new System.Drawing.Point(0, 0); + this.dgvVDianShop.Margin = new System.Windows.Forms.Padding(0); + this.dgvVDianShop.Name = "dgvVDianShop"; + this.dgvVDianShop.ReadOnly = true; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvVDianShop.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dgvVDianShop.RowTemplate.Height = 23; + this.dgvVDianShop.Size = new System.Drawing.Size(842, 399); + this.dgvVDianShop.TabIndex = 26; + this.dgvVDianShop.UseCustomBackgroundColor = true; + this.dgvVDianShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvVDianShop_CellContentClick); + this.dgvVDianShop.UserDeletedRow += new System.Windows.Forms.DataGridViewRowEventHandler(this.dgvVDianShop_UserDeletedRow); + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + // + // colSelect + // + this.colSelect.HeaderText = "选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 30; + // + // colShopName + // + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 145; + // + // colPhone + // + this.colPhone.HeaderText = "手机"; + this.colPhone.Name = "colPhone"; + this.colPhone.ReadOnly = true; + this.colPhone.Width = 95; + // + // colCookie + // + this.colCookie.HeaderText = "店铺Cookie"; + this.colCookie.Name = "colCookie"; + this.colCookie.ReadOnly = true; + this.colCookie.Visible = false; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "登录状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Width = 75; + // + // colShopOperate + // + this.colShopOperate.HeaderText = "检测"; + this.colShopOperate.Name = "colShopOperate"; + this.colShopOperate.ReadOnly = true; + this.colShopOperate.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopOperate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colShopOperate.Width = 55; + // + // colRelogin + // + this.colRelogin.HeaderText = "重登"; + this.colRelogin.Name = "colRelogin"; + this.colRelogin.ReadOnly = true; + this.colRelogin.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colRelogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colRelogin.Width = 55; + // + // colUpGoodAuth + // + this.colUpGoodAuth.HeaderText = "上货认证"; + this.colUpGoodAuth.Name = "colUpGoodAuth"; + this.colUpGoodAuth.ReadOnly = true; + this.colUpGoodAuth.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colUpGoodAuth.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colApiAuth + // + this.colApiAuth.HeaderText = "接口授权"; + this.colApiAuth.Name = "colApiAuth"; + this.colApiAuth.ReadOnly = true; + this.colApiAuth.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colApiAuth.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colApiAuth.Width = 75; + // + // colApi2Auth + // + this.colApi2Auth.FillWeight = 90F; + this.colApi2Auth.HeaderText = "接口模式2"; + this.colApi2Auth.Name = "colApi2Auth"; + this.colApi2Auth.ReadOnly = true; + this.colApi2Auth.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colApi2Auth.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colApi2Auth.Visible = false; + this.colApi2Auth.Width = 75; + // + // ColEdit + // + this.ColEdit.HeaderText = "编辑"; + this.ColEdit.Name = "ColEdit"; + this.ColEdit.ReadOnly = true; + this.ColEdit.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.ColEdit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.ColEdit.Width = 55; + // + // colDelete + // + this.colDelete.HeaderText = "删除"; + this.colDelete.Name = "colDelete"; + this.colDelete.ReadOnly = true; + this.colDelete.Width = 55; + // + // panel3 + // + this.panel3.Controls.Add(this.statusBar); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 399); + this.panel3.Margin = new System.Windows.Forms.Padding(0); + this.panel3.Name = "panel3"; + this.panel3.Padding = new System.Windows.Forms.Padding(0, 8, 0, 0); + this.panel3.Size = new System.Drawing.Size(842, 40); + this.panel3.TabIndex = 27; + // + // statusBar + // + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 8); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(842, 32); + this.statusBar.TabIndex = 27; + // + // panel6 + // + this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel6.Controls.Add(this.splitContainer1); + this.panel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel6.Location = new System.Drawing.Point(1, 33); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(860, 501); + this.panel6.TabIndex = 33; + // + // VDianShopListForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(862, 535); + this.Controls.Add(this.panel6); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "VDianShopListForm"; + this.Text = "微店列表"; + this.TitleText = "微店列表"; + this.Load += new System.EventHandler(this.ProductMappingVDianListFrom_Load); + this.Controls.SetChildIndex(this.panel6, 0); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.panel5.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvVDianShop)).EndInit(); + this.panel3.ResumeLayout(false); + this.panel6.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.Panel panel2; + private TemuKJD.UserComponent.DataGridViewXEx dgvVDianShop; + private TemuKJD.UserControls.StatusBarUserControl statusBar; + private DevComponents.DotNetBar.ButtonX btnCheck; + private DevComponents.DotNetBar.ButtonX btnImport; + private DevComponents.DotNetBar.ButtonX buttonX1; + private DevComponents.DotNetBar.LabelX labelX1; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colPhone; + private System.Windows.Forms.DataGridViewTextBoxColumn colCookie; + private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus; + private System.Windows.Forms.DataGridViewLinkColumn colShopOperate; + private System.Windows.Forms.DataGridViewLinkColumn colRelogin; + private System.Windows.Forms.DataGridViewLinkColumn colUpGoodAuth; + private System.Windows.Forms.DataGridViewLinkColumn colApiAuth; + private System.Windows.Forms.DataGridViewLinkColumn colApi2Auth; + private System.Windows.Forms.DataGridViewLinkColumn ColEdit; + private System.Windows.Forms.DataGridViewLinkColumn colDelete; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Panel panel6; + private DevComponents.DotNetBar.ButtonX btnLoginSelect; + private DevComponents.DotNetBar.ButtonX btnAuthSelect; + } +} \ No newline at end of file diff --git a/TEMUKJD/VDianForms/VDianShopListForm.resx b/TEMUKJD/VDianForms/VDianShopListForm.resx new file mode 100644 index 0000000..681747b --- /dev/null +++ b/TEMUKJD/VDianForms/VDianShopListForm.resx @@ -0,0 +1,334 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + + + AAABAAEAgIAQcgAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// + AAD///8AAAAAAAAAAAAAAAAzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMQ + AAAAAAAAAAAAAAAAAAAAAAAAABM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZkzEAAAAAAAAAAAAAAAAAAAAAADOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZMwAAAAAAAAAAAAAAAAAAABOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZkzAAAAAAAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmTEAAAAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAAAA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAADmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAA5mZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAADmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAGZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAJmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZAAAAAA + OZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmT + AAAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmRAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZkwAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZkwAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZMAAJmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZEAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkwCZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkRmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZOZmZOZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmP+JmZmZmZmZj/////// + ///4OZmZj/eZmZmZmZmZmPg5OZmZmZuI//iIuZmZmZmZmZmZmZM5mZmZmZmZmZmZmb//+JmZmZmZmP// + //////////OZmP//uZmZmZmZmY//+ZmZOZf///////h5k5mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZ + mZ/////////////4mZ///4mZmZmZmZP///uZmZmP////////+JmZmZmZmZmZkzmZmZmZmZmZmZmZj//4 + mZmZmZmf////////////+Jmf//+JmZmZmZmb///4mZmY//////////+JmZmZmZmZmZM5mZmZmZmZmZmZ + mY//+JmZmZmZn/////////////mZmP//iZmZmZmZk///+5mZj/////iP////+JmZmZmZmZmTOZmZmZmZ + mZmZmZmP//iZmZmZmZ////iIiIiIiIiZOZj//4mZmZmZmZP///uZmf////eZmT////+ZmZmZmZmZkzmZ + mZmZmZmZmZmZj//4mZmZmZmf//+JmZmZmZmZk5mY//+JmZmZmZmT///7mZj///+ZmZmZj///uZmZmZmZ + mZM5mZmZmZmZmZmZmY//+JmZmZmZn///iZmZmZmZmZmZmP//iZmZN5k5k///+5mY///zk5mZOT///4mZ + mZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ///4mZmZmZmZmZmZj//4mZmP/5k5P///uZmP//+ZmZmZmY + //+JmZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf///4iIiIiIg5mZmY//+JOb//+JmT///7mZj//4mZ + mZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn///////////85mZmP//iZn///+Jk///+5mf + //+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ////////////+ZmZj//4mY////85v/ + //uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf////////////mZmY//+Jv/// + //+Z///7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn///////////+JmZmP// + if//////if//+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ///////////4mZ + mZj//4j///////j///uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf//+JMzMz + MzOZOZmY//////+D///////7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn/// + iZmZmZmZmZmZmP//////mY//////+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZ + mZ///4mZmZmZmZmZmZj/////+5mf//////uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZMzM5j//4 + kzMzmZmf//+JMzMzMzM5mZmY/////4mTk//////7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmP// + /////////4mZn////////////4mZmP////+ZmZmP////+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZ + mY/////////////4mZ/////////////7mZj////7mZmZn/////uZmP//iZmZmZmY///5mZmZmZmZkzmZ + mZmZmZn//////////////5mf////////////+Jmf////iZmZk5P////4mZ///4mZmZmZmP//+ZmZmZmZ + mZM5mZmZmZmZj/////////////iZn/////////////iZmP///5mZmZmZj///+5mY//+JmZmZmZj//4mZ + mZmZmZmTOZmZmZmZmZ/////////////zmZP///////////+JmZP///uTmZmZmZj//4mZm///mZmZmZmZ + //85mZmZmZmZkzmZmZmZmZOZiIiIiIiIiIiImTmZOIiIiIiIiIiImTmZOIi5mZmZmZOZiIuZmZk4iZOZ + mZmZOZiDmZmZmZmZmZM5mZmZmZmZOZmZmZmZmZmZmZOZmZmZmZmZmZmZmZOZmZmZmZmZmZmZOZmZmZmZ + mZk5mZmZmZOZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmTuIiIiIs5mZmZmZmZ + mTu4i7mZmZmZmZmZmTMzmZOZmZkzOZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmTmbj///////+HmT + mZmZk4j/////iJmZmZk4iP////iZOZmZj/mZOZOIiIiIiIiIiDmZmZmZmZmZkzmZmZmZmZmZj/////// + ///4mZk5k4///4iI///4OZOY////////iZOZmb/5mZmP///////////4mZmZmZmZmZM5mZmZmZmZn/// + //////////mZmY///5mZmZP///iZmP////////+ZOZk/iZmY/////////////4mZmZmZmZmTOZmZmZmZ + mZ/////////////5mZ////+JmZmY////iZl/////////+ZmZP4mZP//////////////7mZmZmZmZkzmZ + mZmZmZmb////////////uZP/j///+HM3j/////+ZmYj///////iZmT+JmY//////////////+JmZmZmZ + mZM5mZmZmZmZmY//////////+JmT+Jv///////////iPmTmZOI/4mP//uTk/iZmP//////////////iZ + mZmZmZmTOZmZmZmZmZmf//////////mZmZmZ///////////5mZmZmZmTOZk///mZP4mZj/////////// + ///4mZmZmZmZkzmZmZmZmZmTmP////////+JOZmZOY//////////iZmZmZmZmZk5mf/4mT+JmY////// + ////////+JmZmZmZmZM5mZmZmZmZmZn/////////mZmZmZk//////////zmZmZmZmZmZmTmP/zm/iZmP + //////////////iZmZmZmZmTOZmZmZmZmZk5v///////85OZmZkzmP////////iZmZmZmZmZmZmZn//4 + /4mZj/////hzN4/////4mZmZmZmZkzmZmZmZmZmZmZj//////4mZmTmY/4j////////4mZmZmZmZmZmZ + mZj///+JmY////+JmZmY////+JmZmZmZmZM5mZmZmZmZmZmZ//////+ZmZmZj////////////4mZmZmZ + mZmZmZmb////+ZmP///4mZu5mY////iZmZmZmZmTOZmZmZmZmZmZOb/////4k5mZmP/////////////7 + mZmZmZmZmZmZk/////OZv///+ZmP+Jmf///4mZmZmZmZkzmZmZmZmZmZmZmf////+ZmZmZj////////4 + eI//+JmZmZmZmZmZmZP////4mb///4mY//+JmP//+5mZmZmZmZM5mZmZmZmZmZk5v/////uTmZmb//// + ///4mZmX//iZmZmZmZmZmZmZ////+Jmf//95n///+Zj///OZmZmZmZmTOZmZmZmZmZmZmf//////mZmZ + mY//////+ZOZmZiJmZmZmZmZmZmZmY////+ZmP//+I////iP//+JmZmZmZmZkzmZmZmZmZmZmZj///// + /4mZmZmf/////5k5mZOZmTmZmZmZmZmZmZmP///4mZP/////////////OZmZmZmZmZM5mZmZmZmZmZk/ + ///////zmZmZm/////iZmZmZmZmZmZmZmZmZmZmZj///85mZj///////////+JmZmZmZmZmTOZmZmZmZ + mZmZv///////+5mZmZmP///5mZmZmZmZmZmZmZmZmZmZmZ///3mZmZj//////////4mZmZmZmZmZkzmZ + mZmZmZmZmb///4j///uZmZmZmP//mTmZmZmZmZmZmZmZmZmZmZmY/4OZmZmZeP///////4eZmZmZmZmZ + mZM5mZmZmZmZmZmY/4OZOP+JmZmZmZmIiZOZmZmZmZmZmZmZmZmZmZmZmYiZmZmZmZk4iIiIiIOZmZmZ + mZmZmZmTOZmZmZmZmZmZmTOZmZkzmZmZmZmZmZk5mZmZmZmZmZmZmZmZmZmZmZmZk5mZmZmZmZmZmZmZ + mZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmTGZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZkwmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZkwA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZMACZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmQAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAABmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTAAADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAJmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmRAAAAA5mZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAACZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmQAAAAAAGZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAOZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkwAAAAAA + AAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTAA + AAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZMAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZkwAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmTAAAAAAAAAAAAAAGZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZEAAAAAAAAAAAAAAAA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAAAAAAAATmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZMQAAAAAAAAAAAAAAAAAAABOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZMQAAAAAAAAAAAAAAAAAAAAAAAzmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTMAAAAAAAAAAAAAAAAAAAAAAAAAAAEzMzMzMzMzMzMzMzMzMz + MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxAAAAAAAAAAAAAAD////////////////////////4AAAA + AAAAAAAAAB//////wAAAAAAAAAAAAAAD/////wAAAAAAAAAAAAAAAP////wAAAAAAAAAAAAAAAA////w + AAAAAAAAAAAAAAAAD///4AAAAAAAAAAAAAAAAAf//8AAAAAAAAAAAAAAAAAD//+AAAAAAAAAAAAAAAAA + Af//AAAAAAAAAAAAAAAAAAD//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAA + AAAAAAAf+AAAAAAAAAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAA + AAAAAAAAAAAAB+AAAAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AA + AAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAAD4AAAAAAAAAAAAAAAAAAAA+AA + AAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAA + AA/4AAAAAAAAAAAAAAAAAAAf/AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAAAD/+AAAAAAAAAAAA + AAAAAAB//wAAAAAAAAAAAAAAAAAA//+AAAAAAAAAAAAAAAAAAf//wAAAAAAAAAAAAAAAAAP//+AAAAAA + AAAAAAAAAAAH///4AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAD////8AAAAAAAAAAAAAAAD///// + wAAAAAAAAAAAAAAD//////wAAAAAAAAAAAAAH////////////////////////w== + + + \ No newline at end of file diff --git a/TEMUKJD/VDianForms/VDianShopLoginForm.Designer.cs b/TEMUKJD/VDianForms/VDianShopLoginForm.Designer.cs new file mode 100644 index 0000000..225c71b --- /dev/null +++ b/TEMUKJD/VDianForms/VDianShopLoginForm.Designer.cs @@ -0,0 +1,305 @@ +namespace TemuKJD.VDianForms +{ + partial class VDianShopLoginForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VDianShopLoginForm)); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.panel2 = new System.Windows.Forms.Panel(); + this.txtUserName = new System.Windows.Forms.TextBox(); + this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx(); + this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.label2 = new System.Windows.Forms.Label(); + this.btnReload = new TemuKJD.UserControls.ButtonEx(); + this.label1 = new System.Windows.Forms.Label(); + this.btnStop = new TemuKJD.UserControls.ButtonEx(); + this.btnCopyPassword = new TemuKJD.UserControls.ButtonEx(); + this.txtPassWord = new System.Windows.Forms.TextBox(); + this.btnCopyUserName = new TemuKJD.UserControls.ButtonEx(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.txtAddress = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White; + this.splitContainer1.Panel2.Controls.Add(this.panel2); + this.splitContainer1.Panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel2_Paint); + this.splitContainer1.Size = new System.Drawing.Size(1022, 704); + this.splitContainer1.SplitterDistance = 547; + this.splitContainer1.SplitterWidth = 3; + this.splitContainer1.TabIndex = 4; + // + // panel2 + // + this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.panel2.Controls.Add(this.txtUserName); + this.panel2.Controls.Add(this.btnLoginAgain); + this.panel2.Controls.Add(this.chkCloseAfterLogin); + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.btnReload); + this.panel2.Controls.Add(this.label1); + this.panel2.Controls.Add(this.btnStop); + this.panel2.Controls.Add(this.btnCopyPassword); + this.panel2.Controls.Add(this.txtPassWord); + this.panel2.Controls.Add(this.btnCopyUserName); + this.panel2.Location = new System.Drawing.Point(22, 20); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(968, 121); + this.panel2.TabIndex = 463; + this.panel2.Visible = false; + // + // txtUserName + // + this.txtUserName.Location = new System.Drawing.Point(117, 37); + this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtUserName.Name = "txtUserName"; + this.txtUserName.ReadOnly = true; + this.txtUserName.Size = new System.Drawing.Size(135, 23); + this.txtUserName.TabIndex = 373; + // + // btnLoginAgain + // + this.btnLoginAgain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnLoginAgain.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnLoginAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnLoginAgain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnLoginAgain.ForeColor = System.Drawing.Color.White; + this.btnLoginAgain.Location = new System.Drawing.Point(639, 65); + this.btnLoginAgain.Margin = new System.Windows.Forms.Padding(2); + this.btnLoginAgain.Name = "btnLoginAgain"; + this.btnLoginAgain.Size = new System.Drawing.Size(91, 25); + this.btnLoginAgain.TabIndex = 462; + this.btnLoginAgain.Text = "重新登录"; + this.btnLoginAgain.UseVisualStyleBackColor = false; + this.btnLoginAgain.Click += new System.EventHandler(this.btnLoginAgain_Click); + // + // chkCloseAfterLogin + // + // + // + // + this.chkCloseAfterLogin.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.chkCloseAfterLogin.Checked = true; + this.chkCloseAfterLogin.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkCloseAfterLogin.CheckValue = "Y"; + this.chkCloseAfterLogin.Location = new System.Drawing.Point(790, 40); + this.chkCloseAfterLogin.Name = "chkCloseAfterLogin"; + this.chkCloseAfterLogin.Size = new System.Drawing.Size(135, 23); + this.chkCloseAfterLogin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.chkCloseAfterLogin.TabIndex = 8; + this.chkCloseAfterLogin.Text = "登录成功后关闭窗口"; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(73, 67); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(44, 17); + this.label2.TabIndex = 378; + this.label2.Text = "密码"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // btnReload + // + this.btnReload.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnReload.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnReload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnReload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnReload.ForeColor = System.Drawing.Color.White; + this.btnReload.Location = new System.Drawing.Point(733, 65); + this.btnReload.Margin = new System.Windows.Forms.Padding(2); + this.btnReload.Name = "btnReload"; + this.btnReload.Size = new System.Drawing.Size(91, 25); + this.btnReload.TabIndex = 371; + this.btnReload.Text = "重新加载"; + this.btnReload.UseVisualStyleBackColor = false; + this.btnReload.Click += new System.EventHandler(this.btnReload_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(73, 40); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(44, 17); + this.label1.TabIndex = 377; + this.label1.Text = "用户名"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // btnStop + // + this.btnStop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStop.ForeColor = System.Drawing.Color.White; + this.btnStop.Location = new System.Drawing.Point(826, 65); + this.btnStop.Margin = new System.Windows.Forms.Padding(2); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(91, 25); + this.btnStop.TabIndex = 372; + this.btnStop.Text = "停止操作"; + this.btnStop.UseVisualStyleBackColor = false; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // btnCopyPassword + // + this.btnCopyPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCopyPassword.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCopyPassword.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCopyPassword.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCopyPassword.ForeColor = System.Drawing.Color.White; + this.btnCopyPassword.Location = new System.Drawing.Point(255, 63); + this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2); + this.btnCopyPassword.Name = "btnCopyPassword"; + this.btnCopyPassword.Size = new System.Drawing.Size(57, 25); + this.btnCopyPassword.TabIndex = 376; + this.btnCopyPassword.Text = "复制"; + this.btnCopyPassword.UseVisualStyleBackColor = false; + this.btnCopyPassword.Click += new System.EventHandler(this.btnCopyPassword_Click); + // + // txtPassWord + // + this.txtPassWord.Location = new System.Drawing.Point(117, 64); + this.txtPassWord.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtPassWord.Name = "txtPassWord"; + this.txtPassWord.PasswordChar = '●'; + this.txtPassWord.ReadOnly = true; + this.txtPassWord.Size = new System.Drawing.Size(135, 23); + this.txtPassWord.TabIndex = 374; + // + // btnCopyUserName + // + this.btnCopyUserName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCopyUserName.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCopyUserName.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCopyUserName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCopyUserName.ForeColor = System.Drawing.Color.White; + this.btnCopyUserName.Location = new System.Drawing.Point(255, 36); + this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2); + this.btnCopyUserName.Name = "btnCopyUserName"; + this.btnCopyUserName.Size = new System.Drawing.Size(57, 25); + this.btnCopyUserName.TabIndex = 375; + this.btnCopyUserName.Text = "复制"; + this.btnCopyUserName.UseVisualStyleBackColor = false; + this.btnCopyUserName.Click += new System.EventHandler(this.btnCopyUserName_Click); + // + // splitContainer2 + // + this.splitContainer2.BackColor = System.Drawing.Color.White; + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(1, 33); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.txtAddress); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.splitContainer1); + this.splitContainer2.Size = new System.Drawing.Size(1022, 734); + this.splitContainer2.SplitterDistance = 26; + this.splitContainer2.TabIndex = 5; + // + // txtAddress + // + this.txtAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtAddress.Location = new System.Drawing.Point(3, 3); + this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtAddress.Name = "txtAddress"; + this.txtAddress.Size = new System.Drawing.Size(1016, 23); + this.txtAddress.TabIndex = 7; + this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown); + // + // VDianShopLoginForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1024, 768); + this.Controls.Add(this.splitContainer2); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "VDianShopLoginForm"; + this.ShowMaximizeBox = true; + this.Text = "店铺登录"; + this.TitleText = "店铺登录"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ShopLoginForm_FormClosed); + this.Load += new System.EventHandler(this.ShopLoginForm_Load); + this.Controls.SetChildIndex(this.splitContainer2, 0); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel1.PerformLayout(); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private UserControls.ButtonEx btnStop; + private UserControls.ButtonEx btnReload; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.TextBox txtAddress; + private UserControls.ButtonEx btnLoginAgain; + public DevComponents.DotNetBar.Controls.CheckBoxX chkCloseAfterLogin; + public System.Windows.Forms.TextBox txtPassWord; + public System.Windows.Forms.TextBox txtUserName; + public System.Windows.Forms.Label label2; + public UserControls.ButtonEx btnCopyPassword; + public UserControls.ButtonEx btnCopyUserName; + private System.Windows.Forms.Panel panel2; + public System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/TEMUKJD/VDianForms/VDianShopLoginForm.cs b/TEMUKJD/VDianForms/VDianShopLoginForm.cs new file mode 100644 index 0000000..7a688e9 --- /dev/null +++ b/TEMUKJD/VDianForms/VDianShopLoginForm.cs @@ -0,0 +1,576 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Result; +using CefSharp; +using CefSharp.WinForms; +//using TemuKJD.DashBoardForms; +using TemuKJD.Helper; +using TemuKJD.BaseForms; +using Microsoft.Win32; +using NaiBa.CefHelper; +using NaiBa.CefHelper.Handler; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +//using System.Web.Hosting; +using System.Windows.Forms; +using Work; +using Work.BLL.Tools; +using TemuKJD.BLL; +using AllBase.Model.Result.PDDResult; +using AllBase.Model.Param.PDDProdParam; +using TemuKJD.PDDForms.ShopForms; + +namespace TemuKJD.VDianForms +{ + public partial class VDianShopLoginForm : BaseGeneralForm + { + public static VDianShopLoginForm PddMobileLoginInstance { get; set; } = null; + + public int CloseAfterSecond { get; set; } + public EnumOpenType openType = EnumOpenType.manage; + public string InitUrl = ""; + private string shopCookieHead = "yangkeduo.com"; + private string shopLoginUrl = "https://mobile.yangkeduo.com/login.html?from=https%3A%2F%2Fmobile.yangkeduo.com%2Fpersonal.html"; + private string shopMainUrl = "https://mobile.yangkeduo.com/index.html"; + public ChromiumWebBrowser cefWebBrowser = null; + private VDianShopLoginInfo vDian = null; + private List lstShopCompany = new List(); + private string currentUrl = ""; + + public VDianShopLoginForm(VDianShopLoginInfo vDianInfo) + { + PddMobileLoginInstance = this; + + InitializeComponent(); + + this.vDian = vDianInfo; + this.txtUserName.Text = vDianInfo?.ShopName; + this.txtPassWord.Text = ""; //DataOpenSSL.DecryptString(buyerInfo.Password); + } + + private void ShopLoginForm_Load(object sender, EventArgs e) + { + this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 80; + if (openType == EnumOpenType.login) + { + //this.label3.Visible = true; + //this.panel3.Visible = true; + } + + if (CloseAfterSecond > 0) + { + Task.Run(() => + { + Thread.Sleep(1000 * CloseAfterSecond); + if (this.Created) + { + Invoke(new Action(() => { this.Close(); })); + } + }); + } + + AutoLogin(); + CheckAndSaveShop(); //判断登录是否成功,成功则保存店铺信息和店铺cookie + //ClosePopWindow(); //自动关闭弹窗 + } + + /// + /// 判断登录,保存店铺 + /// + private void CheckAndSaveShop() + { + } + + /// + /// 自动关闭弹窗 + /// + private void ClosePopWindow() + { + // 关闭弹窗 + Task.Run(() => + { + var sleepTime = 2500; + int i = 0; + while (true && i++ < 50) + { + try + { + Thread.Sleep(sleepTime); + var jsStr1 = "function ClosePopWindow(txt) {\r\n" + + " var result = 'no_pop'\r\n" + + " var item = document.getElementsByClassName(txt);\r\n" + + " for(i = 0; i < item.length; i++) {\r\n" + + " item[i].click();\r\n" + + " result = 'success'\r\n" + + " }\r\n" + + " return result;\r\n" + + "}\r\n" + + "ClosePopWindow('anticon-close-circle');\r\n" + + "ClosePopWindow('ant-modal-close-x');\r\n"; + var jsStr2 = "function clickPopWindow(txt) {\r\n" + + "var child = document.body.firstElementChild;\r\n" + + "var element1 = null;\r\n" + + " while (child) {\r\n" + + " if (child.innerHTML.indexOf(txt) >= 0) {\r\n" + + " element1 = child;\r\n" + + " if (child.firstElementChild) {\r\n" + + " child = child.firstElementChild; continue;\r\n" + + " } else break;\r\n" + + " }\r\n" + + " child = child.nextElementSibling;\r\n" + + " }\r\n" + + " if (element1) {\r\n" + + " element1.click(); return 'success';\r\n" + + " } else return 'no_pop';\r\n" + + "}\r\n" + + "clickPopWindow('我知道了');\r\n" + + "clickPopWindow('知道了');\r\n"; + if (cefWebBrowser != null && cefWebBrowser.IsBrowserInitialized) + { + var t1 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr1); + t1.Wait(); + var t2 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr2); + t2.Wait(); + if (t1.Result?.Result?.ToString() == "success" || t2.Result?.Result?.ToString() == "success") + sleepTime = Randomx.GetId(550, 650); + else + sleepTime = Randomx.GetId(1500, 2000); + } + } + catch (Exception ex) { } + } + }); + } + + /// + /// 自动登录店铺后台 + /// + private void AutoLogin() + { + if (openType != EnumOpenType.login && vDian == null) + return; + + if (cefWebBrowser == null) + { + //cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false); + if (!string.IsNullOrEmpty(InitUrl)) + cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(InitUrl, false); + else + cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false); + CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal(); + resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete; + resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad; + cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler); + var lifeSapnHandler = new LifeSpanHandlerLocal(PopWindowType.SelfWindow); + cefWebBrowser.LifeSpanHandler = lifeSapnHandler; + cefWebBrowser.KeyboardHandler = new KeyboardHandler(); + cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd; + cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged; + cefWebBrowser.LoadError += CefWebBrowser_LoadError; + cefWebBrowser.Dock = DockStyle.Fill; + + //js绑定C#对象 + //PDDShopBrowserObject shopObj = new PDDShopBrowserObject(); + //shopObj.OnInfoReceived += ShopObj_OnInfoReceived; + //CefSharpSettings.WcfEnabled = true; + //cefWebBrowser.JavascriptObjectRepository.Register( + // name: "shopObj", + // objectToBind: shopObj, + // isAsync: false, + // options: new BindingOptions { Binder = BindingOptions.DefaultBinder.Binder /*CamelCaseJavascriptNames = false*/ /*cef79*/ } + //); + + //if (buyer.cookie == null) + // buyer.cookie = ""; + + List cookieLst = new List(); + try + { + if (vDian != null) + { + cookieLst = JsonHelper.DeserializeJsonToList(vDian?.Cookies); + if (cookieLst == null) + cookieLst = new List(); + } + } + catch + { + } + + Task.Run(() => + { + Invoke(new Action(() => + { + splitContainer1.Panel1.Controls.Add(cefWebBrowser); + //cefWebBrowser.Load(shopMainUrl); + })); + // cef138必须init后方可设置或删除cookie + while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid) + Thread.Sleep(20); + CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null)); + + //if (cookieLst.Any(c => c.Value.StartsWith("windows_1"))) + // cefWebBrowser.ExecuteScriptAsync("navigator.__defineGetter__('userAgent', function() { return 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12'; });"); + + //cef 138 如果没有设置RequestContext 可能为空,直接getCookieManager + //if (this.openType != EnumOpenType.login) + { + var t = CEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), cefWebBrowser.GetCookieManager(null)); + foreach (var cook in cookieLst) + { + //var t = CEFBrowser.SetCookieAsync(cook.Domain.Trim('.'), cook.Name + "=" + cook.Value + ";", cefWebBrowser.GetCookieManager(null)); + //t.Wait(5000); + + //if (cook.Name == "PDDAccessToken") + //{ + // var jsStr = "var date = new Date();" + + // "date.setTime(date.getTime() + (465 * 24 * 60 * 60 * 1000)); " + + // "document.cookie='PDDAccessToken=" + cook.Value + ";domain=mobile.yangkeduo.com; expires=' + date.toUTCString()"; + + // jsStr = "document.cookie='PDDAccessToken=" + cook.Value + ";domain=mobile.yangkeduo.com;'"; + // cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr); + + // //cook.Expires = DateTime.Now.AddDays(465); + // //cefWebBrowser.GetCookieManager(null).SetCookie("https://" + cook.Domain.Trim('.'), cook); + //} + ////else + //// cefWebBrowser.GetCookieManager(null).SetCookie("https://" + cook.Domain, cook); + } + } + + //根据登录的具体店铺设置local storage + if (!string.IsNullOrEmpty(vDian?.ShopId)) + { + //var storageJsCode = "window.localStorage.setItem('" + "mall-info-id" + "', '" + shop.ShopId + "');\r\n"; + //storageJsCode += "window.localStorage.setItem('" + "agentseller-mall-info-id" + "', '" + shop.ShopId + "');\r\n"; + //while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid) + // Thread.Sleep(20); + //cefWebBrowser.GetBrowser().MainFrame.ExecuteJavaScriptAsync(storageJsCode); + } + + if (!string.IsNullOrEmpty(InitUrl)) + cefWebBrowser.Load(InitUrl); + else + cefWebBrowser.Load(shopMainUrl); + + //不是登录的话就此返回 + if (openType != EnumOpenType.login) + { + Invoke(new Action(() => + { + chkCloseAfterLogin.Visible = false; + btnLoginAgain.Visible = false; + })); + return; + } + + for (int i = 0; i < 50; i++) + { + if (cefWebBrowser.IsLoading) + Thread.Sleep(100); + } + Thread.Sleep(Randomx.GetId(1500,2000)); + + if (!this.Created) + return; + + while (!cefWebBrowser.Address.StartsWith(shopLoginUrl)) + { + Thread.Sleep(1000); + if (!this.Created) + return; + } + + //CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null)); + //InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password)); + }); + } + } + + private void ShopObj_OnInfoReceived(string information) + { + //BaseMsgForm.ShowInfo(information); + if (!string.IsNullOrEmpty(information)) + cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync("alert('" + information + "');"); + } + + private void CefWebBrowser_LoadError(object sender, CefSharp.LoadErrorEventArgs e) + { + } + + private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e) + { + if (this.Created && !this.Disposing && !this.IsDisposed) + { + Invoke(new Action(() => + { + currentUrl = e.Address; + txtAddress.Text = e.Address; + })); + } + } + + private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e) + { + //js绑定C#对象 html页面内声明绑定的C#对象 + StringBuilder sb = new StringBuilder(); + sb.Append("(function(){"); + sb.Append("CefSharp.BindObjectAsync('shopObj');"); + sb.Append("})();"); + cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString()); + } + + //public Func BeforeResourceLoadEvent; // sender, requestUrl, postData, request, true(表示取消执行) + private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request) + { + return false; + } + public PDDProductUploadParam prodParam = null; + + static int GetAntiContentsTimes = 40; + private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request) + { + //if (url.Contains("https://mobile.yangkeduo.com/personal.html?refer_page_name=login") && openType == EnumOpenType.login) + if (url.Contains("https://mobile.yangkeduo.com/index.html") && openType == EnumOpenType.login) + { + Task.Run(() => { cefWebBrowser.Load("https://mobile.yangkeduo.com/personal.html"); }); + } + + if (url.Contains("https://mobile.yangkeduo.com/personal.html")) + { + if (openType == EnumOpenType.login) + { + Task.Run(() => + { + var data = responseData; + if (data.Contains("\"success\":true") || data.Contains("nickname")) + { + var uid = BaseRegex.GetStringJson(ref data, "uid"); + var nickname = BaseRegex.GetStringJson(ref data, "nickname"); + var mobile = BaseRegex.GetStringJson(ref data, "mobile"); + var username = nickname; + + if (!string.IsNullOrEmpty(nickname) && !string.IsNullOrEmpty(uid)) + { + Thread.Sleep(2000); + + List cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null)); + + var buyerUrl = BaseClass.BuildPDDObjString("shop/add_vdian"); + + if (this.vDian == null || this.vDian.ShopId != uid) + this.vDian = GlobalConfig.VDianShopLoginList.FirstOrDefault(b => b.ShopId == uid); + if (this.vDian != null) + { + this.vDian.ShopName = username; + this.vDian.Phone = mobile; + this.vDian.Cookies = JsonHelper.SerializeObject(cookieList); + buyerUrl = BaseClass.BuildPDDObjString("shop/mdy_vdian"); + } + + var buyerData = UserLogin.GetSignaturex() + + "&buyer_id=" + uid + + "&buyer_name=" + username + + "&buyer_nick=" + nickname; + var result = GetHtml.PostUtf8(buyerUrl, buyerData); + if (string.IsNullOrEmpty(result) || !result.Contains("\"code\":200")) + result = GetHtml.PostUtf8(buyerUrl, buyerData); + + buyerUrl = BaseClass.BuildPDDObjString("shop/mdy_vdian_cookie"); + buyerData = UserLogin.GetSignaturex() + + "&buyer_id=" + uid + + "&status=" + "在线" + + "&cookie=" + GetHtml.UrlEncodeUtf8(JsonHelper.SerializeObject(cookieList)); + result = GetHtml.PostUtf8(buyerUrl, buyerData); + if (string.IsNullOrEmpty(result) || !result.Contains("\"code\":200")) + result = GetHtml.PostUtf8(buyerUrl, buyerData); + + Invoke(new Action(() => + { + try + { + if (chkCloseAfterLogin.Checked) + this.Close(); + } + catch (Exception ex) + { } + })); + } + } + }); + } + } + } + + // 鼠标左键按下,移动,移动...左键抬起。 + public static void CefMouseDragDou(ChromiumWebBrowser webBrowser, int x1, int y1, int x2, int y2) + { + Thread.Sleep(100); + var host = webBrowser.GetBrowser().GetHost(); + + var rx = -6 + Randomx.GetId(13); + x2 = x2 + rx; + // 随机按下点的位置(正负6像素),提高仿真性 + int x = x1 + rx; + int y = y1 - 6 + Randomx.GetId(13); + + // 按下鼠标左键 + host.SendMouseClickEvent(x, y, MouseButtonType.Left, false, 1, CefEventFlags.None); + Thread.Sleep(100 + Randomx.GetId(300)); + + // 滑动光标 + int times = -20; + while (x < x2 + 4 - Randomx.GetId(9)) + { + times++; + x += (15 + Randomx.GetId(15)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + if (x < x2 - 1) + while (x < x2) + { + times++; + x += (8 + Randomx.GetId(8)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + else if (x > x2 + 1) + while (x > x2) + { + times++; + x -= (8 + Randomx.GetId(8)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + + // 如果最后位置偏差较多,再做一次调整 + x = x2 - 1 + Randomx.GetId(3); + x = x2; + Thread.Sleep(18 + Math.Abs(times) / 5 + Randomx.GetId(16)); + Thread.Sleep(18 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + + // 抬起鼠标左键 + Thread.Sleep(300 + Randomx.GetId(500)); + host.SendMouseClickEvent(x, y, MouseButtonType.Left, true, 1, CefEventFlags.None); + host.SendMouseClickEvent(x, y, MouseButtonType.Left, true, 1, CefEventFlags.None); + } + + private void btnStop_Click(object sender, EventArgs e) + { + } + + private void btnCopyUserName_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtUserName.Text)) + Clipboard.SetDataObject(txtUserName.Text); + } + + private void btnCopyPassword_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtPassWord.Text)) + Clipboard.SetDataObject(txtPassWord.Text); + } + + private void btnReload_Click(object sender, EventArgs e) + { + if (cefWebBrowser != null) + { + if (txtAddress.Text != "about:blank") + cefWebBrowser.Load(txtAddress.Text); + else + cefWebBrowser.Load(shopMainUrl); + } + } + + private void ShopLoginForm_FormClosed(object sender, FormClosedEventArgs e) + { + //OnSaveComplete(shop); + Task.Run(() => { + Thread.Sleep(500); + if (!this.Disposing && !this.IsDisposed) + { + //MainForm.instance.Invoke(new Action(() => { this.Dispose(); })); + } + }); + } + + private void txtAddress_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + if (cefWebBrowser != null) + { + cefWebBrowser.Load(txtAddress.Text); + } + } + } + + string sInputValueChange { get; set; } = @" +let usernameId = document.getElementById('usernameId'); +usernameId.value = '1'; + +var event = document.createEvent('HTMLEvents'); +event.initEvent('input', true, true); +event.eventType = 'message'; +usernameId.dispatchEvent(event); +"; + + string sInputValueChange2 { get; set; } = @" +function changeReactInputValue(inputDom,newText){ + let lastValue = inputDom.value; + inputDom.value = newText; + let event = new Event('input', { bubbles: true }); + event.simulated = true; + let tracker = inputDom._valueTracker; + if (tracker) { + tracker.setValue(lastValue); + } + inputDom.dispatchEvent(event); +} +"; + + string sGetElementWithText { get; set; } = @" +function getElementWithText(sText) +{ + var elem=null; + const elements = document.querySelectorAll('*'); // 选择所有元素 + elements.forEach(element => { + if (element.textContent.includes(sText)) { + // 对每个匹配的元素执行操作 + //console.log(element); + elem=element; + } + }); + return elem; +}; +"; + + private void btnLoginAgain_Click(object sender, EventArgs e) + { + if (this.currentUrl != shopLoginUrl) + this.cefWebBrowser.Load(shopLoginUrl); + } + + private void splitContainer1_Panel2_Paint(object sender, PaintEventArgs e) + { + + } + } +} diff --git a/TEMUKJD/VDianForms/VDianShopLoginForm.resx b/TEMUKJD/VDianForms/VDianShopLoginForm.resx new file mode 100644 index 0000000..c963c3c --- /dev/null +++ b/TEMUKJD/VDianForms/VDianShopLoginForm.resx @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAgIAQYAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// + AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzM + zMzMzMzMzMx3d4iIiIiIiIh3fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM + zMzMzMzMzMzHeIiIiIj/////////iIiIiId8zMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM + zMzMzMzMzMzMzMeIiI/////////////////////4iIh8zMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAATMzM + zMzMzMzMzMzMzMzMzHiI////////////////////////////iIfMzMzMzMzMzMzMzMzMzMzMxAAAAAAA + AGzMzMzMzMzMzMzMzMzMx3iP///////////////////////////////4iHzMzMzMzMzMzMzMzMzMzMYA + AAAAAAbMzMzMzMzMzMzMzMzMx3iP//////////////////////////////////+IfMzMzMzMzMzMzMzM + zMzMYAAAAABMzMzMzMzMzMzMzMzMx3iP/////////////////////////////////////4h8zMzMzMzM + zMzMzMzMzMQAAAAAbMzMzMzMzMzMzMzMzHiP////////////////////////////////////////h3zM + zMzMzMzMzMzMzMzGAAAABMzMzMzMzMzMzMzMzHiP//////////////////////////////////////// + //iHzMzMzMzMzMzMzMzMzEAAAAbMzMzMzMzMzMzMzMeI//////////////////////////////////// + ////////+IfMzMzMzMzMzMzMzMxgAABMzMzMzMzMzMzMzMx4//////////////////////////////// + //////////////+IfMzMzMzMzMzMzMzMxAAAbMzMzMzMzMzMzMzHj/////////////////////////// + /////////////////////4fMzMzMzMzMzMzMzMYAAMzMzMzMzMzMzMzMeP////////////////////// + ///////////////////////////4fMzMzMzMzMzMzMzMAAbMzMzMzMzMzMzMx4////////////////// + /////////////////////////////////4fMzMzMzMzMzMzMzGAGzMzMzMzMzMzMzHj///////////// + ///////////////////////////////////////4fMzMzMzMzMzMzMxgDMzMzMzMzMzMzMyI//////// + /////////////////////////////////////////////4zMzMzMzMzMzMzMwEzMzMzMzMzMzMzHj/// + //////////////////////////////////////////////////+HzMzMzMzMzMzMzMRszMzMzMzMzMzM + eP//////////////////////////////////////////////////////+HzMzMzMzMzMzMzGbMzMzMzM + zMzMzHj///////////////////////////////////////////////////////+MzMzMzMzMzMzMxmzM + zMzMzMzMzMyP////+IiP////////////////////////////////////////+I//////h8zMzMzMzMzM + zMZszMzMzMzMzMzHj////4iIiI//////////////////////////////////////+IiIj/////jMzMzM + zMzMzMzGbMzMzMzMzMzMyP////iIiIiI/////////////////////////////////////4iIiIj////4 + fMzMzMzMzMzMxszMzMzMzMzMzHj////4iIiIiP////////////////////////////////////+IiIiI + j////4zMzMzMzMzMzMbMzMzMzMzMzMx4////iIiIiIj////////////////////////////////////4 + iIiIiI////+HzMzMzMzMzMzMzMzMzMzMzMzMj////4iIiIiI//////////////+IiP//iI////////// + ////+IiIiIiP////h8zMzMzMzMzMzMzMzMzMzMzMzI/////4iIiIiP/////////////4d3eIiIeIj/// + //////////+IiIiIj/////jMzMzMzMzMzMzMzMzMzMzMzMyP////+IiIiIj/////////////iIiId3eI + iI//////////////iIiIiI/////4zMzMzMzMzMzMzMzMzMzMzMzHj/////+IiIiP/////////////4// + /4d4j/+P//////////////iIiIj/////+MzMzMzMzMzMzMzMzMzMzMzMx4//////+IiP//////////// + ///////4j///////////////////iIiP//////jMzMzMzMzMzMzMzMzMzMzMzMeP//////////+IiIj/ + ///////////////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzH//////////+H + fMx8eP//////////////////////////iId3iP//////////+HzMzMzMzMzMzMzMzMzMzMzMyP////// + ///4fMzHh8eP////////////////////////+MzMzMd4//////////h8zMzMzMzMzMzMzMzMzMzMzMf/ + ////////+MzMePjMeP///////////////////////4zMzMeHx4/////////4fMzMzMzMzMzMzMzMzMzM + zMzH/////////4fMd3eHzMeP//////////////////////iMzMzIiHx4////////+HzMzMzMzMzMzMzM + zMzMzMzMx/////////+Hx4iIfMzMj//////////////////////4h3d8x4h8yP////////jMzMzMzMzM + zMzMzMzMzMzMzMeP////////+HiP+IfMzI//////////////////////+HiIiHd3zHj////////4zMzM + zMzMzMzMzMzMzMzMzMzHj/////////h4//+HzMeP//////////////////////h4//h8zMyP//////// + +MzMzMzMzMzMzMzMzMzMzMzMzI/////////4iP//h8x4///////////////////////4j//4fMzHj/// + //////jMzMzMzMzMzMzMzMzMzMzMzMyP///////4iIiP+IfHj///////////////////////+Ij/+HzM + eP/////////4zMzMzMzMzMzMzMzMzMzMzMzMj///////iIiIiIh3eP////////////////////////+I + j4h8x3iI////////h8zMzMzMzMzMzMzMzMzMzMzMzH//////+Hj///iIiI////////////////////// + /////4iId4iIiIj//////4zMzMzMzMzMzMzMzMzMzMzMzMx4//////iP////iP////////////////// + /////////////4iP//iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMyP//////////+I////////////// + ///////////////////4eP//iP//////jMzMzMzMzMzMzMzMzMzMzMzMzMj///////////iP//////// + /////////////////////////4j/////////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////////// + //////////////////////////////+I//////////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////// + //////////////////////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMyP//// + ////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM + eP///////////////////////////////////////////////////////4zMzMzMzMzMzMzMzMzMzMzM + zMzMzMj///////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzM + zMzMzMzMzMzHj//////////////////////////////////////////////////////4zMzMzMzMzMzM + zMzMzMzMzMzMzMzMzI//////////////////////////////////////////////////////h8zMzMzM + zMzMzMzMzMzMzMzMzMzMzMx4////////////////////////////////////////////////////+HzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMyI////+I//////////////////////////////////////////// + //h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+Ij///////////////////////////////////// + //////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+IiIiIj//////////////////////////4 + ////iI/////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMiP/////4iIiP////////////////////// + ////+IiIiIj/////iHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////////////////// + ///////////4iIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP//////////////////// + //////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////// + //////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHj///////// + ///////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//// + ////////////////////////////////////////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI + j/////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMeP//////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMx4////////+I//////////////////////////////////////jMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMeP///////4iIj///////////////////////////iP///////4fMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMx4////////iIiIiP///////////////////////4iIiP///////4zMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIj///////+HzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIj////////////////////4iIiIiIj/////// + +MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIiI// + //////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiP////////////////////iIiI + iIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiIj/////iIiIiIiIj///// + /4iIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiI/////4zMzMzMzM + j/////+IiIiIiIiP//////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//////+IiIiIiIj/////+MzM + zMzMzI//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iIiIiIiI//// + //jMzMzMzMyP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP///////4iIiIiI + iP/////4zMzMzMzMj//////4iIiIiIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iI + iIiIiI//////+MzMzMzMzI//////+IiIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMyP//// + ///4iIiIiIiP//////fMzMzMzMyP//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzH + j///////+IiIiIiI//////+HzMzMzMzMeP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzM + zMzMyP////////iIiIiIiP//////jMzMzMzMzHj///////iIiIiIiI///////4fMzMzMzMzMzMzMzMzM + zMzMzMzMzMj///////+IiIiIiI///////4zMzMzMzMzI///////4iIiIiIiI///////3zMzMzMzMzMzM + zMzMzMzMzMzMzMzI////////iIiIiIiP//////+MzMzMzMzMyP//////+IiIiIiIiP//////+MzMzMzM + zMzMzMzMzMzMzMzMzMzMeP///////4iIiIiIj///////jMzMzMzMzMj///////+IiIiIiIj///////jM + zMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiIiP//////+HzMzMzMzMzHj///////iIiIiIiI//// + ///4zMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIiI////////jMzMzMzMzMzI///////4iIiIiI + iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMzMj////////4iIiIiP///////4zMzMzMzMzMyP///////4 + iIiIiIiP//////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiI////////h8zMzMzMzMzMeP// + /////4iIiIiIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIj////////4fMzMzMzMzM + zHj///////+IiIiIiI//////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////iIiP////////+MzMzM + zMzMzMzI////////+IiIiIiP//////h8zMzMzMzMzMzMxmzMzMzMzMzMx4/////////4iP/////////4 + fMzMzMzMzMzMx4////////+IiIiIj//////4fMzMzMzMzMzMzMZszMzMzMzMzMeP//////////////// + ////+MzMzMzMzMzMzMyP////////iIiIiP//////+HzMzMzMzMzMzMzGbMzMzMzMzMzH//////////// + //////////fMzMzMzMzMzMzMeP////////iIiIj///////98zMzMzMzMzMzMxmzMzMzMzMzMyP////// + //////////////+HzMzMzMzMzMzMzHj/////////+IiP////////jMzMzMzMzMzMzMZszMzMzMzMzMj/ + ////////////////////jMzMzMzMzMzMzMzIj////////////////////4zMzMzMzMzMzMzGTMzMzMzM + zMzH////////////////////+HzMzMzMzMzMzMzMx4////////////////////+MzMzMzMzMzMzMxAzM + zMzMzMzMx/////////////////////jMzMzMzMzMzMzMzMyI///////////////////4fMzMzMzMzMzM + zMAGzMzMzMzMzMeP//////////////////+HzMzMzMzMzMzMzMzMeP//////////////////+HzMzMzM + zMzMzMxgBszMzMzMzMzHj//////////////////4fMzMzMzMzMzMzMzMzMeP//////////////////h8 + zMzMzMzMzMzMYADMzMzMzMzMzI//////////////////+HzMzMzMzMzMzMzMzMzHj/////////////// + ///4zMzMzMzMzMzMzAAAbMzMzMzMzMyP/////////////////4fMzMzMzMzMzMzMzMzMzHj///////// + ////////+MzMzMzMzMzMzMYAAEzMzMzMzMzMj/////////////////+MzMzMzMzMzMzMzMzMzMzIj/// + /////////////4fMzMzMzMzMzMzEAAAGzMzMzMzMzHj////////////////4fMzMzMzMzMzMzMzMzMzM + x4////////////////+MzMzMzMzMzMzMYAAABMzMzMzMzMx4////////////////h8zMzMzMzMzMzMzM + zMzMzMx4///////////////4fMzMzMzMzMzMzEAAAABszMzMzMzMx4//////////////+HzMzMzMzMzM + zMzMzMzMzMzMx4//////////////+MzMzMzMzMzMzMYAAAAATMzMzMzMzMyP/////////////4fMzMzM + zMzMzMzMzMzMzMzMzMeI/////////////4fMzMzMzMzMzMzEAAAAAAbMzMzMzMzMeP////////////h8 + zMzMzMzMzMzMzMzMzMzMzMzMeI////////////h8zMzMzMzMzMzMYAAAAAAAbMzMzMzMzMeP//////// + //iHzMzMzMzMzMzMzMzMzMzMzMzMzMyI//////////+HzMzMzMzMzMzMxgAAAAAAAEzMzMzMzMzMeP// + //////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMx4/////////4fMzMzMzMzMzMzMQAAAAAAAAGzMzMzMzM + zMeI//////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4j//////4h8zMzMzMzMzMzMxgAAAAAAAAAGzM + zMzMzMzMx4iIiIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiIj/+Ih3zMzMzMzMzMzMzGAAAAAAAA + AAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx3iId8zMzMzMzMzMzMzMYAAA + AAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + xgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzGAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA + AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+ + AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA + B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA + AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA + AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA + AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA + AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA + AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA + AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA + AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA + AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA + AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA + AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf///// + +AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w== + + + \ No newline at end of file diff --git a/TEMUKJD/VDianForms/VDianUploadProductForm.cs b/TEMUKJD/VDianForms/VDianUploadProductForm.cs new file mode 100644 index 0000000..8fd5fa1 --- /dev/null +++ b/TEMUKJD/VDianForms/VDianUploadProductForm.cs @@ -0,0 +1,1178 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.IO; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Newtonsoft.Json; +using NaiBa.Util.Extension; +using System.Threading; +using AllBase; +using Work.CollectClass; +using AllBase.Helper; +using CefSharp.WinForms; +using NaiBa.CefHelper; +using CefSharp; +using AllBase.Model.Result; +using AllBase.Model.Param.VDianManage; +using AllBase.Model.Param.ToolsManage; +using Work.Api; +using TemuKJD.BaseForms; +using NaiBa.Util.Helper; +using TemuKJD.BLL.VDian; +using CefSharp.Handler; +using TemuKJD.Extension; +using LittleCow.Model.Param.WeiDianManage; + +namespace KJD.VDianForms +{ + public partial class VDianUploadProductForm : BaseForm + { + public NaiBa.Util.ConcurrentList lstTemuDBProductSelect = new NaiBa.Util.ConcurrentList(); + + /// + /// 微店上货地址(使用getUa(); js方法获取ua算法) + /// + public static string vDianUploadUrl = "https://d.weidian.com/weidian-pc/pc-vue-item/#/item/edit"; + //public static string vDianUploadUrl = "https://d.weidian.com/weidian-pc/pc-vue-item/#/item/listNew"; + //public static string vDianUploadUrl = "https://d.weidian.com/weidian-pc/pc-vue-index/index.html"; + + public static Dictionary sShopProductOnSaleCountDic = new Dictionary(); + public static Dictionary sShopProductOffSaleCountDic = new Dictionary(); + public static Dictionary sShopCpsRateDic = new Dictionary(); + //private WeiDianProductTable weiDianProductTable = new WeiDianProductTable(); + //private ProductBLL productBLL = new ProductBLL(); + private List lstUpVDianShopId = new List(); + decimal addPercent = 30; + decimal addPrice = 10; + int threadCount = 1; + bool isRun = false; + bool isSetCPS = false; + decimal CPSPercent = 10; + /// + /// 当前正在上货的微店,同一微店同时只能上一件货 + /// + private Dictionary dicCurrentVDian = new Dictionary(); + private CheckBox chkSelectAll = null; + + List lstCef = new List(); + List lstCefUsing = new List(); + int cefId = -1; + int labelClickTimes = 0; + + public VDianUploadProductForm() + { + InitializeComponent(); + } + + #region 窗体事件 + private void UploadProductForm_Load(object sender, EventArgs e) + { + GlobalConfig.WeiDianUploadParam = ConfigHelper.LoadConfig("vdian_upload_setting_param"); + if (GlobalConfig.WeiDianUploadParam == null) + { + GlobalConfig.WeiDianUploadParam = new WeiDianSettingParam + { + AddPercent = "400", + AddPrice = "0", + IsSetCps = false, + CpsPercent = "10", + ThreadCount = "1", + }; + } + + + // 连续单击6次出现显示网页按钮 + Task.Run(() => + { + while (true) + { + Thread.Sleep(200); + if (labelClickTimes > 0) + { + Thread.Sleep(6000); + labelClickTimes = 0; + } + } + }); + + LoadThreadCount(); + + LoadUploadQueue(); + RefreshQueueCount(); + + BtnRefreshShop_Click(null, null); + + this.VisibleChanged += UploadProductForm_VisibleChanged; + + chkSelectAll = dgvShop.Columns["colIsUpload"].AddHeaderCheckBox(HorizontalAlignment.Right, 0, 0, null, null, false); + chkSelectAll.Width = chkSelectAll.Height = 13; + chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; + + this.chkCPS.Checked = GlobalConfig.WeiDianUploadParam.IsSetCps; + this.txtCPSRate.Text = GlobalConfig.WeiDianUploadParam.CpsPercent; + this.txtPriceBase.Text = GlobalConfig.WeiDianUploadParam.AddPrice; + this.txtPriceRatio.Text = GlobalConfig.WeiDianUploadParam.AddPercent; + this.cmbThreadCount.SelectedIndexChanged -= cmbThreadCount_SelectedIndexChanged; + try { this.cmbThreadCount.SelectedValue = Convert.ToInt32(GlobalConfig.WeiDianUploadParam.ThreadCount); } catch { } + this.cmbThreadCount.SelectedIndexChanged += cmbThreadCount_SelectedIndexChanged; + } + + private void UploadProductForm_VisibleChanged(object sender, EventArgs e) + { + if (Visible == true) + RefreshShop(); + } + + private void BtnImport_Click(object sender, EventArgs e) + { + OpenFileDialog ofd = new OpenFileDialog(); + ofd.Title = "请选择需要导入的商品"; + ofd.Filter = "文本文件|*.txt"; + if (DialogResult.OK == ofd.ShowDialog()) + { + this.btnImport.Enabled = false; + this.btnUpload.Enabled = false; + this.btnClear.Enabled = false; + + Task.Run(new Action(() => + { + try + { + //List importList = new List(); + //List dbList = new List(); + //List uploadQueueList = DataManageBLL.WeiDianUploadQueueList.Clone(); + + //string file = ofd.FileName; + //string source = File.ReadAllText(file, Encoding.Default); + //string[] sourceArr = source.Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries).Distinct().ToArray(); + //for (int i = 0; i < sourceArr.Length; i++) + //{ + // string[] lineArr = sourceArr[i].Split(new string[] { "-----" }, StringSplitOptions.RemoveEmptyEntries); + // ProductInfo product = null; + // if (lineArr.Length > 0) + // { + // product = new ProductInfo(); + // productBLL.GetProductInfoByUrl(product, lineArr); + // } + // if (product.ProductId <= 0) + // { + // product = new ProductInfo(); + // var text = sourceArr[i]; + + // var pStr = BaseRegex.GetMatchRegexString(text, "id=(\\d{5,18})"); + // if (!text.Contains(',') && string.IsNullOrEmpty(pStr) && !text.Contains("detail.1688.com/offer/")) + // text = BaseEncrypt.EncryptDecode(text); + + // // 通用格式 "来源", "商品ID", "商品标题",... + // if (text != null && text.Contains(',')) + // { + // var productArr = text.Split(','); + // if (productArr.Length >= 6) + // { + // string From = productArr[0].Trim('"'); + // string ProductId = productArr[1].Trim('"'); + // string ProductTitle = productArr[2].Trim('"'); + // string RealProductId = productArr[1].Trim('"'); + // string CatId = productArr[5].Trim('"'); + + // if (From == "淘宝" || From == "天猫") + // { + // product.Platform = (int)ShopPlatform.TaoBao; + // } + // else if (From == "拼多多" || From == "搜款网") + // { + // product.Platform = (int)ShopPlatform.PinDuoDuo; + // } + // else if (From == "1688" || From == "阿里巴巴") + // { + // product.Platform = (int)ShopPlatform.Alibaba; + // } + // if (From == "搜款网") + // { + // var idStr = ProductId.ToString(); + // if (idStr.Length >= 2) + // { + // var idStrNew = idStr[idStr.Length - 1] + idStr.Substring(1, idStr.Length - 2) + idStr[0]; + // RealProductId = idStrNew; + // } + // } + // product.ProductId = RealProductId.ParseToLong(); + // product.FissionProductName = ProductTitle; + // } + // } + // } + // if (product != null && product.ProductId > 0) + // { + // if (!importList.Where(p => p.ProductId == product.ProductId && p.Platform == product.Platform && p.FissionProductName == product.FissionProductName).Any()) + // { + // if (!uploadQueueList.Where(p => p.ProductId == product.ProductId && p.Platform == product.Platform && p.FissionProductName == product.FissionProductName).Any()) + // { + // if (i % 30 == 0) + // { + // RefreshQueueCount(importList.Count); + // } + // importList.Add(product); + // dbList.Add(new IdValueTypeEntity + // { + // Id = product.ProductId, + // Type = product.Platform, + // Value = JsonConvert.SerializeObject(product) + // }); + // } + // } + // } + // if (importList.Count > 100) + // { + // SaveBatch(dbList, importList); + // } + //} + //SaveBatch(dbList, importList); + //RefreshQueueCount(); + } + catch (Exception ex) + { + LogHelper.WriteWithTime(ex); + } + this.BeginInvoke(new Action(() => + { + this.btnImport.Enabled = true; + this.btnUpload.Enabled = true; + this.btnClear.Enabled = true; + })); + })); + } + } + + private void BtnUpload_Click(object sender, EventArgs e) + { + if (lstTemuDBProductSelect.Count == 0) + { + BaseMsgForm.ShowError("上传队列不能为空"); + return; + } + if (lstUpVDianShopId.Count == 0) + { + BaseMsgForm.ShowInfo("请选择要上货店铺"); + return; + } + try + { + addPercent = Convert.ToDecimal(txtPriceRatio.Text); + addPrice = Convert.ToDecimal(txtPriceBase.Text); + threadCount = this.cmbThreadCount.SelectedValue.ParseToInt(); + isSetCPS = chkCPS.Checked; + CPSPercent = Convert.ToDecimal(txtCPSRate.Text); + this.dgvProduct.Columns["colCPSResult"].Visible = isSetCPS; + + GlobalConfig.WeiDianUploadParam.CpsPercent = CPSPercent.ToString(); + GlobalConfig.WeiDianUploadParam.IsSetCps = isSetCPS; + GlobalConfig.WeiDianUploadParam.AddPercent = addPercent.ToString(); + GlobalConfig.WeiDianUploadParam.AddPrice = addPrice.ToString(); + GlobalConfig.WeiDianUploadParam.ThreadCount = threadCount.ToString(); + ConfigHelper.SaveConfig("vdian_upload_setting_param", GlobalConfig.WeiDianUploadParam); + } + catch + { + BaseMsgForm.ShowInfo("请输入正确的加价数据或推广金比例"); + return; + } + this.btnUpload.Enabled = false; + int i = 0; + int total = lstTemuDBProductSelect.Count; + this.isRun = true; + Task.Run(() => + { + List threadList = new List(); + while (lstTemuDBProductSelect.Count > 0) + { + // 中断操作 + if (!isRun) + break; + + i++; + this.Invoke(new Action(() => + { + this.statusBarUpload.lblTaskStatus.Text = "正在上货..."; + this.statusBarUpload.pgbTaskProgress.Value = i; + this.statusBarUpload.pgbTaskProgress.Text = i + "/" + total; + this.statusBarUpload.pgbTaskProgress.Maximum = total; + })); + + var pInfo = lstTemuDBProductSelect[0]; + lstTemuDBProductSelect.Remove(pInfo); + //weiDianProductTable.Remove(new IdValueTypeEntity { Id = pInfo.ProductId, Type = pInfo.Platform }); + Thread thread = new Thread(obj => + { + try + { + var prodInfo = obj as KJDDBProduct; + var prod = new ProductMappingImportParam() + { + From = "", + ProductId = prodInfo.spu_id.ToString(), + RealProductId = prodInfo.spu_id.ToString(), + ProductTitle = prodInfo.product_name + }; + ProductCollectBase product = null; + + //if (prodInfo.Platform == (int)ShopPlatform.TaoBao) + //{ + // prod.From = "淘宝"; + // product = GetTaobaoProduct(prod); + //} + //else if (prodInfo.Platform == (int)ShopPlatform.PinDuoDuo) + //{ + // prod.From = "拼多多"; + // product = GetPinDuoDuoProduct(prod); + //} + //else if (prodInfo.Platform == (int)ShopPlatform.Alibaba) + //{ + // prod.From = "阿里巴巴"; + // product = GetAlibabaProduct(prod); + //} + + VDianParam.VDianProductBase vDianProduct = null; + if (product != null && !string.IsNullOrEmpty(product.content) && (!string.IsNullOrEmpty(product.image) || product.Images.Count > 0)) + { + // 确定待转换商品图片 + prod.Image = !string.IsNullOrEmpty(product.image) ? product.image : product.Images[0]; + if (prod.Image.StartsWith("https:")) + prod.Image = prod.Image.Substring(6); + else if (prod.Image.StartsWith("http:")) + prod.Image = prod.Image.Substring(5); + // 确定待转换商品标题 + if (string.IsNullOrEmpty(prod.ProductTitle)) + prod.ProductTitle = product.name; + + var pre = txtPrefix.Text.Trim(); + if (!string.IsNullOrEmpty(pre)) + { + var leg = pre.Length; + if (prod.ProductTitle.Length > 60 - leg) + { + prod.ProductTitle = prod.ProductTitle.Substring(prod.ProductTitle.Length - (60 - leg)); + } + prod.ProductTitle = pre + prod.ProductTitle; + } + + // 新接口 + //vDianProduct = UpLoadProductUseMutliApi(prod, product); + // 开箱小店和威武宝宝接口 + vDianProduct = UpLoadProductUseApi(prod, product); + if (vDianProduct == null) + { + Thread.Sleep(5000); + //vDianProduct = UpLoadProductUseApi(prod, product); + prod.MappingResult = ""; + vDianProduct = UploadProductSim(prod, product); + } + if (!string.IsNullOrEmpty(prod.MappingResult)) + { + prod.MappingResult = prod.MappingResult.Replace("转换失败", "上货失败"); + } + } + else + { + if (string.IsNullOrEmpty(prod.MappingResult)) + { + if (string.IsNullOrEmpty(product.image) && (product.Images == null || product.Images.Count == 0)) + { + prod.MappingResult = "上货失败,未找到商品主图或详情图"; + } + else if (string.IsNullOrEmpty(product.content) && !string.IsNullOrEmpty(product.name)) + { + prod.MappingResult = "上货失败,未找到上家商品详情"; + } + else if (string.IsNullOrEmpty(prod.MappingResult)) + { + if (prod.From == "拼多多" || prod.From == "搜款网") + prod.MappingResult = "上货失败,可能不满足上货条件或拼多多Token失效"; + else + prod.MappingResult = "上货失败,可能不满足上货条件"; + } + } + prod.MappingResult = prod.MappingResult.Replace("转换失败", "上货失败"); + } + + Invoke(new Action(() => + { + dgvProduct.Rows.Add(product?.upShopId, prodInfo?.product_get_type_text, product?.from_id, product?.from_title, product?.price, product?.saleCount + , vDianProduct?.itemId, vDianProduct?.itemName, prod?.MappingResult, prod?.CPSResult, vDianProduct?.shopName, "删除"); + })); + } + catch (Exception ex) + { + } + finally + { + RefreshQueueCount(); + } + }); + Thread.Sleep(1500 + Randomx.GetId(1000)); + Threadx.ThreadListWait(ref threadList, thread, threadCount, pInfo); + } + Threadx.ThreadListWait(ref threadList); + Invoke(new Action(() => + { + btnUpload.Enabled = true; + if (isRun) + { + this.statusBarUpload.lblTaskStatus.Text = "上货完毕"; + BaseMsgForm.ShowInfo("上货完成!"); + } + else + { + this.statusBarUpload.lblTaskStatus.Text = "上货中断"; + BaseMsgForm.ShowInfo("上货中断!"); + } + isRun = false; + })); + }); + } + + private ProductCollectBase GetTaobaoProduct(ProductMappingImportParam prod) + { + ProductCollectBase proInfo = new ProductCollectBase + { + from_url = "https://item.taobao.com/item.htm?id=" + prod.RealProductId, + from_id = Convert.ToInt64(prod.RealProductId), + }; + TaobaoMobileCollect goodsFromTaobaoInfo = new TaobaoMobileCollect(proInfo); + goodsFromTaobaoInfo.Get(); + var product = goodsFromTaobaoInfo.Product; + if (goodsFromTaobaoInfo.IsDown) + prod.MappingResult = "转换失败,可能是商品已下架或商品不存在"; + return product; + } + + private ProductCollectBase GetPinDuoDuoProduct(ProductMappingImportParam prod) + { + TaobaoProductBase tp = new TaobaoProductBase(); + tp.GoodsId = tp.FromId = Convert.ToInt64(prod.RealProductId); + tp.FromType = "拼多多"; + PinduoduoProductCollect pinduoduoProductCollect = new PinduoduoProductCollect(Name, tp); + PinduoduoProductCollect.TempIds.Clear(); + //PinduoduoProductCollect.ConPddTokenList = GlobalConfig.PinDuoDuoTokenList; + pinduoduoProductCollect.Get(); + var product = pinduoduoProductCollect.pb; + // 如果无法获取拼多多商品信息了,提示重连 + //if (pinduoduoProductCollect.IsNeedLogin) + prod.MappingResult = "转换失败,需要登录拼多多或登录Token!"; + if (pinduoduoProductCollect.IsOnSale == false) + prod.MappingResult = "转换失败,可能是商品下架或商品不存在"; + if (pinduoduoProductCollect.IsPresale == true) + prod.MappingResult = "转换失败,预售商品不能上货"; + //if (pinduoduoProductCollect.IsResultError) + prod.MappingResult = "转换失败,可能是商品不存在或服务器出错"; + return product; + } + + private ProductCollectBase GetAlibabaProduct(ProductMappingImportParam prod) + { + ProductCollectBase proInfo = new ProductCollectBase + { + from_url = "https://detail.1688.com/offer/" + prod.RealProductId + ".html", + from_id = Convert.ToInt64(prod.RealProductId), + }; + AlibabaProductGet goodsFrom1688Info = new AlibabaProductGet(proInfo); + goodsFrom1688Info.Get(); + var product = goodsFrom1688Info.Product; + return product; + } + + /// + /// 服务端获取的随机Api接口上传 + /// + /// + /// + /// + private VDianParam.VDianProductBase UpLoadProductUseMutliApi(ProductMappingImportParam prod, ProductCollectBase product) + { + VDianParam.VDianProductBase vDianProduct = null; + var UpShopList = GlobalConfig.VDianShopLoginList.Where(s => lstUpVDianShopId.Contains(s.ShopId)).ToList(); + + #region 随机api接口 暂时注释 + //if (UpShopList.Count > 0 && vDianProduct == null) + //{ + // prod.MappingResult = null; + + // var simUpShops = GlobalConfig.VDianShopLoginList.Where(v => v.UpGoodAuth == "认证成功").ToList(); + // while (simUpShops.Count == 0) + // { + // Thread.Sleep(500); + // simUpShops = GlobalConfig.VDianShopLoginList.Where(v => v.UpGoodAuth == "认证成功").ToList(); + // } + // var simVdianShop = simUpShops[Randomx.GetId(simUpShops.Count)]; + + // var canUpList = UpShopList.Where(v => !dicCurrentVDian.Keys.Contains(v)).ToList(); + // while (canUpList.Count == 0) + // { + // Thread.Sleep(500); + // canUpList = UpShopList.Where(v => !dicCurrentVDian.Keys.Contains(v)).ToList(); + // } + // var vDianShops = canUpList.Where(s => s.MainAuth == "认证成功").ToList(); + // VDianShopLoginInfo vDianShop = null; + // if (vDianShops.Count > 0) + // { + // var id = Randomx.GetId(vDianShops.Count); + // vDianShop = vDianShops[id]; + // } + // else + // { + // var id = Randomx.GetId(canUpList.Count); + // vDianShop = canUpList[id]; + // } + // while (dicCurrentVDian.Keys.Contains(vDianShop)) + // { + // Thread.Sleep(500); + // } + // dicCurrentVDian.Add(vDianShop, DateTime.Now); + + // int retryApiTime = 0; + //retryApi: + + // try + // { + // ProductMappingForm.GetMultiApiAccesstoken(vDianShop, this); + // if (//vDianShop.MultiAttrApiToken?.AppKey?.PropCountStatus == "ok" + // //&& vDianShop.MultiImgApiToken?.AppKey?.ImgsCountStatus == "ok" + // //&& + // vDianShop.MultiProductApiToken?.AppKey?.GoodsCountStatus == "ok") + // vDianProduct = new MappingVDianMultiApiBLL().ConvertProductToVDian(prod, product, vDianShop, this.addPercent, this.addPrice, true, simVdianShop); + // else + // { + // prod.MappingResult = "转换失败,error,未找到合适的转换接口"; + // } + // ProductMappingForm.UpdateMultiApi(vDianShop); + // } + // catch (Exception ex) + // { + // } + + // if (prod.MappingResult != null && prod.MappingResult.Contains("无效或已过期") && prod.MappingResult.Contains("access_token:")) + // { + // if (retryApiTime == 0) + // { + // prod.MappingResult = null; + // retryApiTime++; + // goto retryApi; + // } + // } + // if (prod.MappingResult != null && prod.MappingResult.Contains("长时间未登录")) + // { + // prod.MappingResult = prod.MappingResult.Insert(prod.MappingResult.IndexOf("长时间未登录"), vDianShop.ShopName); + // } + // Thread.Sleep(2000 + Randomx.GetId(2000)); + // dicCurrentVDian.Remove(vDianShop); + //} + return vDianProduct; + #endregion + } + + #region 微店模拟接口 + private VDianParam.VDianProductBase UploadProductSim(ProductMappingImportParam prod, ProductCollectBase product) + { + VDianParam.VDianProductBase vDianProduct = null; + var UpShopList = GlobalConfig.VDianShopLoginList.Where(s => lstUpVDianShopId.Contains(s.ShopId) && s.UpGoodAuth == "认证成功").ToList(); + + if (UpShopList.Count > 0 && vDianProduct == null) + { + var canUpList = UpShopList.Where(v => !dicCurrentVDian.Keys.Contains(v)).ToList(); + while (canUpList.Count == 0) + { + Thread.Sleep(500); + canUpList = UpShopList.Where(v => !dicCurrentVDian.Keys.Contains(v)).ToList(); + } + var vDianShop = canUpList[Randomx.GetId(canUpList.Count)]; + while (dicCurrentVDian.Keys.Contains(vDianShop)) + { + Thread.Sleep(500); + } + dicCurrentVDian.Add(vDianShop, DateTime.Now); + if (vDianProduct == null && + (string.IsNullOrEmpty(prod.MappingResult) || prod.MappingResult.Contains("系统错误") || prod.MappingResult.Contains("频次超过上限") + || prod.MappingResult.Contains("未找到合适的转换接口"))) + { + Thread.Sleep(Randomx.GetId(2000, 4000)); + vDianProduct = new VDianUpProdMappingBLL().ProductToVDianBySim(prod, product, vDianShop, this.addPercent, this.addPrice, GetVDianUa); + } + if (prod.MappingResult != null && prod.MappingResult.Contains("现在人太多了, 请稍后重试")) + { + prod.MappingResult = "调用太多了, 请稍后重试"; + for (int i = 0; i < 25; i++) + { + if (!isRun) + break; + Thread.Sleep(1000); + } + } + Thread.Sleep(Randomx.GetId(2500, 4000)); + + if (vDianProduct != null) + { + prod.MappingResult = "店铺" + vDianShop.ShopName + "上货成功"; + // 设置分成推广金 + if (isSetCPS) + { + SetCps(prod, vDianShop, vDianProduct); + } + } + Thread.Sleep(Randomx.GetId(1500, 2500)); + dicCurrentVDian.Remove(vDianShop); + } + return vDianProduct; + } + + public string GetVDianUa(VDianShopLoginInfo vDianShop) + { + while (lstCef.Count < 3) + { + var browser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false); + browser.KeyboardHandler = new KeyboardHandler(); + Invoke(new Action(() => + { + this.panel1.Controls.Add(browser); + })); + lstCef.Add(browser); + } + + var notUseCefList = lstCef.Where(c => !lstCefUsing.Contains(c)).ToList(); + while (notUseCefList.Count == 0) + { + Thread.Sleep(Randomx.GetId(250, 750)); + notUseCefList = lstCef.Where(c => !lstCefUsing.Contains(c)).ToList(); + } + var cefWebBrowser = notUseCefList[Randomx.GetId(notUseCefList.Count)]; + while (lstCefUsing.Contains(cefWebBrowser)) + { + Thread.Sleep(Randomx.GetId(250, 750)); + } + lstCefUsing.Add(cefWebBrowser); + + var vDianUa = ""; + + // 登录cef店铺为模拟上传计算ua值 + var cookieManager = cefWebBrowser.RequestContext.GetCookieManager(null); + if (vDianShop != null) + { + var task = CEFBrowser.SetCookieAsync("weidian.com", vDianShop.Cookies, cookieManager); + task.Wait(2000); + Thread.Sleep(500); + } + cefWebBrowser.Load(vDianUploadUrl); + Thread.Sleep(Randomx.GetId(6000, 8000)); + + var t = cefWebBrowser.GetMainFrame().GetSourceAsync(); + t.Wait(5000); + if (t.Result.Contains("进入微店")) + { + // 模拟登录 + //ProductMappingVDianLoginForm.InputUserNameAndPassword(cefWebBrowser, vDianShop.Phone, vDianShop.Password); + //ProductMappingVDianLoginForm.ClickLogin(cefWebBrowser); + //ProductMappingVDianLoginForm.SelectShop(cefWebBrowser); + vDianShop.LoginStatus = 2; + Thread.Sleep(2000); + return "店铺掉线"; + } + + var response = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync("getUa();"); + response.Wait(2000); + Thread.Sleep(500 + Randomx.GetId(1000)); + vDianUa = response.Result?.Result?.ToString(); + if (vDianUa == null) + vDianUa = ""; + + lstCefUsing.Remove(cefWebBrowser); + return vDianUa; + } + #endregion + + // api上货暂时注释 + private VDianParam.VDianProductBase UpLoadProductUseApi(ProductMappingImportParam prod, ProductCollectBase product) + { + VDianParam.VDianProductBase vDianProduct = null; + //var UpShopList = GlobalConfig.VDianShopLoginList.Where(s => lstUpVDianShopId.Contains(s.ShopId)); + + //var canUpList = UpShopList.Where(v => !dicCurrentVDian.Keys.Contains(v)).ToList(); + //while (canUpList.Count == 0) + //{ + // Thread.Sleep(500); + // canUpList = UpShopList.Where(v => !dicCurrentVDian.Keys.Contains(v)).ToList(); + //} + //var id = Randomx.GetId(canUpList.Count); + //var vDianShop = canUpList[id]; + //// 实时更新微店token的状态 + //foreach (var token in vDianShop.LstWdApiToken) + //{ + // var newKey = ProductMappingVDianLoginForm.lstVDianAppKey.FirstOrDefault(k => k.AppKey == token.AppKey.AppKey); + // if (newKey != null) + // { + // if (newKey.GoodsCountStatus == "error" && newKey.ImgsCountStatus == "error" && newKey.PropCountStatus == "error") + // newKey.Status = "error"; + // token.AppKey = newKey; + // } + //} + + //dicCurrentVDian[vDianShop] = DateTime.Now; + //try + //{ + // int retryApiTime = 0; + //retryApi: + // vDianProduct = new MappingVDianApiBLL().ConvertProductToVDian(prod, product, vDianShop, addPercent, addPrice, false, vDianShop); + // if (vDianProduct == null && prod.MappingResult != null && !prod.MappingResult.Contains("上限")) + // vDianProduct = new MappingVDianApiBLL().ConvertProductToVDian(prod, product, vDianShop, addPercent, addPrice, false, vDianShop); + // if (vDianProduct != null) + // { + // if (vDianProduct != null && !string.IsNullOrEmpty(vDianProduct.itemId)) + // { + // prod.MappingResourceType = "Api"; + + // // 0上货缓存 1标题缓存 2标题搜索 3接口上货 4接口上货失败 5模拟上货 6微店群控接口上货 + // MappingVDianApiBLL.UpDateMappingResultToStatistics("6"); + // } + + // prod.MappingResult = "店铺" + vDianShop.ShopName + "上货成功"; + // // 设置分成推广金 + // if (isSetCPS) + // { + // SetCps(prod, vDianShop, vDianProduct); + // } + // } + + // if (prod.MappingResult != null && prod.MappingResult.Contains("无效或已过期") && prod.MappingResult.Contains("access_token:")) + // { + // prod.MappingResult = null; + // // 刷新已过期的token + // foreach (var token in vDianShop.LstWdApiToken) + // { + // var sVDianTokenApiUrl = ProductMappingVDianLoginForm.VDianUrl + "?" + BaseClass.ObjUrl + "weidian_token"; + // var data = UserLogin.GetSignaturex() + "&act=reflesh_token&shop_id=" + vDianShop.ShopId + "&appkey=" + token.AppKey.AppKey; + // var refreshResult = GetHtml.PostUtf8(sVDianTokenApiUrl, data); + // if (refreshResult.StartsWith("ok,") && refreshResult.Length > 3) + // { + // token.ApiAccessToken = refreshResult.Substring(3); + // token.ApiAuth = "已授权"; + // StartUp.SaveVDianShopLogin(); + // } + // else + // { + // token.ApiAuth = "已过期"; + // StartUp.SaveVDianShopLogin(); + // } + // } + // if (!vDianShop.LstWdApiToken.All(t => t.ApiAuth == "已授权")) + // { + // prod.MappingResult = "店铺" + vDianShop.ShopName + "需要重新授权"; + // vDianShop.ApiAuth = "未授权"; + // } + // else if (retryApiTime == 0) + // { + // retryApiTime++; + // goto retryApi; + // } + // } + // if (prod.MappingResult != null && prod.MappingResult.Contains("长时间未登录")) + // { + // prod.MappingResult = prod.MappingResult.Insert(prod.MappingResult.IndexOf("长时间未登录"), vDianShop.ShopName); + // } + // Thread.Sleep(500 + Randomx.GetId(1000)); + //} + //catch (Exception ex) + //{ + //} + //dicCurrentVDian.Remove(vDianShop); + return vDianProduct; + } + + private void SetCps(ProductMappingImportParam prod, VDianShopLoginInfo vDianShop, VDianParam.VDianProductBase vDianProduct) + { + //var CPSResultCode = new WeiDianProductBLL().UpdateCps(vDianProduct.itemId, vDianShop, this.CPSPercent.ToString()); + //if (CPSResultCode.Contains("\"code\":0")) + // prod.CPSResult = "推广金设置成功"; + //else if (CPSResultCode.Contains("供应商不存在")) + //{ + // prod.CPSResult = "店铺未开通分成推广功能"; + // //vDianShop.IsCPSable = "未开通"; + //} + //else if (CPSResultCode.Contains("LOGIN ERROR")) + //{ + // prod.CPSResult = "店铺未网页登录"; + // //vDianShop.IsCPSable = "未登录"; + //} + //else + //{ + // var failMessage = AllBase.BaseRegex.GetStringJson(ref CPSResultCode, "message"); + // if (string.IsNullOrEmpty(failMessage)) + // failMessage = CPSResultCode; + // if (string.IsNullOrEmpty(failMessage)) + // failMessage = "推广金设置失败"; + // prod.CPSResult = failMessage; + // //vDianShop.IsCPSable = "发生错误"; + //} + //prod.CPSResult = prod.CPSResult.Replace("CPS", "分成推广"); + } + + private void BtnClear_Click(object sender, EventArgs e) + { + ClearGood(); + } + + private void ClearGood() + { + if (BaseMsgForm.ShowConfirm("是否清理备用产品").DialogResult == DialogResult.OK) + { + //DataManageBLL.WeiDianUploadQueueList.Clear(); + //weiDianProductTable.RemoveAll(); + //RefreshQueueCount(); + lstTemuDBProductSelect.Clear(); + ConfigHelper.SaveConfig("vdian_db_prod_upload_list", this.lstTemuDBProductSelect); + } + } + + private void BtnRefreshShop_Click(object sender, EventArgs e) + { + RefreshShop(); + } + + private void RefreshShop() + { + // 更新选中的上货店铺Id + lstUpVDianShopId = lstUpVDianShopId.Where(id => GlobalConfig.VDianShopLoginList.Any(s => s.ShopId == id && s.ApiAuth == "已授权")).ToList(); + // 获取被删除的店铺 + List dgvRowList = dgvShop.Rows.Cast().Where(row + => !GlobalConfig.VDianShopLoginList.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList(); + // 更新被删除的店铺列表 + foreach (var row in dgvRowList) + { + dgvShop.Rows.Remove(row); + } + // 绑定其他店铺(含新导入的店铺) + foreach (VDianShopLoginInfo shopEntity in GlobalConfig.VDianShopLoginList) + { + BindShop(shopEntity); + } + } + + private void BindShop(VDianShopLoginInfo shopEntity) + { + var row = dgvShop.Rows.Cast().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId); + if (row == null) + { + this.dgvShop.Rows.Add(0, shopEntity.ShopId, shopEntity.ShopName, + VDianUploadProductForm.sShopProductOnSaleCountDic.Keys.Contains(shopEntity.ShopId) ? VDianUploadProductForm.sShopProductOnSaleCountDic[shopEntity.ShopId] : "", + shopEntity.ApiAuth == "已授权" ? true : false, false, string.Empty); + } + else + { + row.Cells["colIsAuthorize"].Value = shopEntity.ApiAuth == "已授权" ? true : false; + row.Cells["colShopName"].Value = shopEntity.ShopName; + row.Cells["colIsUpload"].Value = lstUpVDianShopId.Contains(shopEntity.ShopId); + row.Cells["colProductCount"].Value = + VDianUploadProductForm.sShopProductOnSaleCountDic.Keys.Contains(shopEntity.ShopId) ? VDianUploadProductForm.sShopProductOnSaleCountDic[shopEntity.ShopId] : ""; + } + } + + private void DgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; + long shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToLong(); + switch (headerText) + { + case "店铺名称": + FileHelper.OpenUrl(string.Format("https://weidian.com/?userid=", shopId)); + break; + + case "上货": + if (dgvShop.Rows[e.RowIndex].Cells["colIsAuthorize"].Value.ParseToBool()) + { + dgvShop.Rows[e.RowIndex].Cells["colIsUpload"].Value = !dgvShop.Rows[e.RowIndex].Cells["colIsUpload"].Value.ParseToBool(); + if (dgvShop.Rows[e.RowIndex].Cells["colIsUpload"].Value.ParseToBool()) + lstUpVDianShopId.Add(shopId.ToString()); + else + lstUpVDianShopId.Remove(shopId.ToString()); + } + else + { + BaseMsgForm.ShowInfo("店铺未授权"); + } + break; + } + } + #endregion + + #region 私有方法 + private void LoadThreadCount() + { + Dictionary dict = new Dictionary(); + dict.Add(1, 1); + dict.Add(2, 2); + dict.Add(3, 3); + dict.Add(5, 5); + dict.Add(8, 8); + dict.Add(10, 10); + dict.Add(15, 15); + //dict.Add(20, 20); + //dict.Add(30, 30); + //dict.Add(50, 50); + this.cmbThreadCount.DataSource = new BindingSource(dict, null); + this.cmbThreadCount.DisplayMember = "Value"; + this.cmbThreadCount.ValueMember = "Key"; + } + + public void RefreshQueueCount(int addCount = 0) + { + this.Invoke(new Action(() => + { + this.lblQueueCount.Text = (addCount + lstTemuDBProductSelect.Count).ParseToString() + " 个"; + })); + } + + private void LoadUploadQueue() + { + //Task.Run(new Action(() => + //{ + // List productQueueList = new WeiDianProductTable().GetList(); + // for (int i = 0; i < productQueueList.Count; i++) + // { + // ProductInfo productInfoEntity = JsonConvert.DeserializeObject(productQueueList[i].Value); + // DataManageBLL.WeiDianUploadQueueList.Add(productInfoEntity); + // if (i % 5000 == 0) + // { + // RefreshQueueCount(); + // } + // } + // RefreshQueueCount(); + //})); + } + + //private void SaveBatch(List dbList, List importList) + //{ + // weiDianProductTable.Save(dbList); + // DataManageBLL.WeiDianUploadQueueList.AddRange(importList); + + // dbList.Clear(); + // importList.Clear(); + //} + #endregion + + private void cmbThreadCount_SelectedIndexChanged(object sender, EventArgs e) + { + threadCount = this.cmbThreadCount.SelectedValue.ParseToInt(); + + if (threadCount > 0) + { + GlobalConfig.WeiDianUploadParam.ThreadCount = threadCount.ToString(); + //StartUp.SaveWeiDianUploadSettingParam(); + + ConfigHelper.SaveConfig("vdian_upload_setting_param", GlobalConfig.WeiDianUploadParam); + } + } + + private void dgvProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvProduct.Columns[e.ColumnIndex].HeaderText; + switch (headerText) + { + case "上家Id": + case "上家标题": + int platform = dgvProduct.Rows[e.RowIndex].Cells["colProductPlatform"].Value.ParseToInt(); + long productId = dgvProduct.Rows[e.RowIndex].Cells["colProductId"].Value.ParseToLong(); + switch (platform) + { + case (int)ShopPlatform.TaoBao: + //FileHelper.OpenUrl(string.Format(TaoBaoHelper.TaoBaoProductUrl, productId)); + break; + + case (int)ShopPlatform.PinDuoDuo: + //FileHelper.OpenUrl(string.Format(PinDuoDuoHelper.PinDuoDuoProductUrl, productId)); + break; + + case (int)ShopPlatform.Alibaba: + //FileHelper.OpenUrl(string.Format(AlibabaHelper.AlibabaProductUrl, productId)); + break; + } + break; + + case "微店标题": + long vDianProductId = dgvProduct.Rows[e.RowIndex].Cells["colWeiDianProductId"].Value.ParseToLong(); + FileHelper.OpenUrl(string.Format("https://weidian.com/item.html?itemID={0}", vDianProductId)); + break; + + case "操作": + dgvProduct.Rows.RemoveAt(e.RowIndex); + break; + } + } + + private void btnStop_Click(object sender, EventArgs e) + { + isRun = false; + } + + private void btnClearUpload_Click(object sender, EventArgs e) + { + ClearUpload(); + } + + void ClearUpload() + { + dgvProduct.Rows.Clear(); + } + + private void btnGetProductCount_Click(object sender, EventArgs e) + { + GetShopProductCount(); + } + + void GetShopProductCount() + { + if (lstUpVDianShopId.Count == 0) + { + BaseMsgForm.ShowInfo("请选择要查询的店铺"); + return; + } + + this.btnGetProductCount.Enabled = false; + foreach (DataGridViewRow row in dgvShop.Rows) + { + row.Cells["colStatus"].Value = ""; + } + Task.Run(() => + { + var shopList = GlobalConfig.VDianShopLoginList.Where(s => s.ApiAuth == "已授权").ToList(); + + foreach (var vShop in shopList) + { + DataGridViewRow row = null; + Invoke(new Action(() => + { + row = this.dgvShop.Rows.Cast().FirstOrDefault(r => r.Cells["colShopId"].Value.ToString() == vShop.ShopId); + if (row != null) + row.Cells["colStatus"].Value = "正在获取店铺商品数量"; + })); + + // 获取商品总数目 + int totalNum = -1; + int page = 1; + string resultText = ""; + var result = new WeiDianProductBLL().GetShopProductIds(vShop, page); + Thread.Sleep(1500); + if (!result.Contains("\"status_code\":0")) + result = new WeiDianProductBLL().GetShopProductIds(vShop, page); + if (result.Contains("\"status_code\":0")) + { + totalNum = AllBase.BaseRegex.GetIntJson(ref result, "total_num"); + VDianUploadProductForm.sShopProductOnSaleCountDic[vShop.ShopId] = totalNum.ToString(); + resultText = "商品数量获取成功"; + } + else + { + if (result.Contains("频次超过上限")) // {"status":{"status_code":10005,"status_reason":"用户请求频次超过上限"}} + resultText = "商品数量获取失败,商品获取频次超过上限"; + else + { + resultText = BaseRegex.GetMatchRegexString(result, "\"status_reason\":\"([\\s\\S]*?)\""); + if (string.IsNullOrEmpty(resultText)) + resultText = result; + resultText = "商品数量获取失败," + resultText; + } + } + + Invoke(new Action(() => + { + if (row != null) + { + row.Cells["colProductCount"].Value = totalNum == -1 ? "" : totalNum.ToString(); + row.Cells["colStatus"].Value = resultText; + } + })); + } + Invoke(new Action(() => + { + btnGetProductCount.Enabled = true; + BaseMsgForm.ShowInfo("商品数量获取完成"); + })); + }); + } + + private void linklblOpen_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + ////FileHelper.OpenUrl("https://d.weidian.com/weidian-pc/pc-vue-fx/DistributionConfig.html"); + //CPSIntoForm cf = new CPSIntoForm(); + //cf.ShowDialog(); + } + + private void chkSelectAll_CheckedChanged(object sender, EventArgs e) + { + if (!chkSelectAll.Checked) + { + lstUpVDianShopId.Clear(); + foreach (DataGridViewRow row in dgvShop.Rows) + { + row.Cells["colIsUpload"].Value = false; + } + } + else + { + lstUpVDianShopId.Clear(); + var list = GlobalConfig.VDianShopLoginList.Where(s => s.ApiAuth == "已授权").Select(ss => ss.ShopId); + lstUpVDianShopId.AddRange(list); + foreach (DataGridViewRow row in dgvShop.Rows) + { + if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString())) + row.Cells["colIsUpload"].Value = true; + } + } + } + + private void labelX4_Click(object sender, EventArgs e) + { + labelClickTimes++; + if (labelClickTimes >= 6) + { + labelClickTimes = 0; + btnShowCef.Visible = !btnShowCef.Visible; + } + } + + private void btnShowCef_Click(object sender, EventArgs e) + { + if (btnShowCef.Text == "显示网页") + { + cefId++; + if (cefId >= lstCef.Count - 1) + { + cefId = lstCef.Count - 1; + btnShowCef.Text = "隐藏网页"; + } + if (cefId >= 0 && lstCef[cefId] != null) + lstCef[cefId].BringToFront(); + } + else + { + btnShowCef.Text = "显示网页"; + cefId = -1; + foreach (var cefWebBrowser in lstCef) + { + if (cefWebBrowser != null) + cefWebBrowser.SendToBack(); + } + } + } + + private void btnManageVDian_Click(object sender, EventArgs e) + { + VDianShopListForm vDianShopForm = new VDianShopListForm(); + vDianShopForm.ShowDialog(); + } + } +} diff --git a/TEMUKJD/VDianForms/VDianUploadProductForm.designer.cs b/TEMUKJD/VDianForms/VDianUploadProductForm.designer.cs new file mode 100644 index 0000000..da175fa --- /dev/null +++ b/TEMUKJD/VDianForms/VDianUploadProductForm.designer.cs @@ -0,0 +1,929 @@ +using TemuKJD.UserControls; + +namespace KJD.VDianForms +{ + partial class VDianUploadProductForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.lblPriceRatio = new DevComponents.DotNetBar.LabelX(); + this.lblPriceRatioUnit = new DevComponents.DotNetBar.LabelX(); + this.txtPriceRatio = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.lblPriceBaseUnit = new DevComponents.DotNetBar.LabelX(); + this.txtPriceBase = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.lblPriceBase = new DevComponents.DotNetBar.LabelX(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.btnClear2 = new DevComponents.DotNetBar.ButtonX(); + this.btnStop = new DevComponents.DotNetBar.ButtonX(); + this.labelX3 = new DevComponents.DotNetBar.LabelX(); + this.cmbThreadCount = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboItem6 = new DevComponents.Editors.ComboItem(); + this.comboItem7 = new DevComponents.Editors.ComboItem(); + this.comboItem8 = new DevComponents.Editors.ComboItem(); + this.comboItem9 = new DevComponents.Editors.ComboItem(); + this.comboItem10 = new DevComponents.Editors.ComboItem(); + this.btnClear = new DevComponents.DotNetBar.ButtonX(); + this.lblQueueCount = new DevComponents.DotNetBar.LabelX(); + this.labelX2 = new DevComponents.DotNetBar.LabelX(); + this.btnUpload = new DevComponents.DotNetBar.ButtonX(); + this.btnImport = new DevComponents.DotNetBar.ButtonX(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.btnManageVDian = new DevComponents.DotNetBar.ButtonX(); + this.btnGetProductCount = new DevComponents.DotNetBar.ButtonX(); + this.btnRefreshShop = new DevComponents.DotNetBar.ButtonX(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); + this.txtCPSRate = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.labelX1 = new DevComponents.DotNetBar.LabelX(); + this.labelX6 = new DevComponents.DotNetBar.LabelX(); + this.chkCPS = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.statusBarUpload = new TemuKJD.UserControls.StatusBarUserControl(); + this.dgvProduct = new TemuKJD.UserComponent.DataGridViewXEx(); + this.colUploadShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductPlatform = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProductPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colWeiDianProductId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colWeiDianProductName = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colUploadStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCPSResult = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUploadShop = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUploadOperate = new System.Windows.Forms.DataGridViewLinkColumn(); + this.dgvShop = new TemuKJD.UserComponent.DataGridViewXEx(); + this.colId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProductCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colIsAuthorize = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colIsUpload = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.btnShowCef = new DevComponents.DotNetBar.ButtonX(); + this.labelX4 = new DevComponents.DotNetBar.LabelX(); + this.txtPrefix = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.panel1 = new System.Windows.Forms.Panel(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.groupBox3.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + this.groupBox5.SuspendLayout(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.lblPriceRatio); + this.groupBox3.Controls.Add(this.lblPriceRatioUnit); + this.groupBox3.Controls.Add(this.txtPriceRatio); + this.groupBox3.Controls.Add(this.lblPriceBaseUnit); + this.groupBox3.Controls.Add(this.txtPriceBase); + this.groupBox3.Controls.Add(this.lblPriceBase); + this.groupBox3.Location = new System.Drawing.Point(135, 3); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(131, 155); + this.groupBox3.TabIndex = 103; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "商品加价设置"; + // + // lblPriceRatio + // + // + // + // + this.lblPriceRatio.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.lblPriceRatio.Location = new System.Drawing.Point(6, 38); + this.lblPriceRatio.Name = "lblPriceRatio"; + this.lblPriceRatio.Size = new System.Drawing.Size(58, 23); + this.lblPriceRatio.TabIndex = 15; + this.lblPriceRatio.Text = "加价比例"; + // + // lblPriceRatioUnit + // + // + // + // + this.lblPriceRatioUnit.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.lblPriceRatioUnit.Location = new System.Drawing.Point(105, 37); + this.lblPriceRatioUnit.Name = "lblPriceRatioUnit"; + this.lblPriceRatioUnit.Size = new System.Drawing.Size(22, 23); + this.lblPriceRatioUnit.TabIndex = 16; + this.lblPriceRatioUnit.Text = "%"; + // + // txtPriceRatio + // + // + // + // + this.txtPriceRatio.Border.Class = "TextBoxBorder"; + this.txtPriceRatio.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtPriceRatio.DisabledBackColor = System.Drawing.Color.White; + this.txtPriceRatio.Location = new System.Drawing.Point(65, 37); + this.txtPriceRatio.Name = "txtPriceRatio"; + this.txtPriceRatio.PreventEnterBeep = true; + this.txtPriceRatio.Size = new System.Drawing.Size(39, 23); + this.txtPriceRatio.TabIndex = 17; + this.txtPriceRatio.Text = "30"; + // + // lblPriceBaseUnit + // + // + // + // + this.lblPriceBaseUnit.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.lblPriceBaseUnit.Location = new System.Drawing.Point(105, 74); + this.lblPriceBaseUnit.Name = "lblPriceBaseUnit"; + this.lblPriceBaseUnit.Size = new System.Drawing.Size(20, 23); + this.lblPriceBaseUnit.TabIndex = 19; + this.lblPriceBaseUnit.Text = "元"; + // + // txtPriceBase + // + // + // + // + this.txtPriceBase.Border.Class = "TextBoxBorder"; + this.txtPriceBase.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtPriceBase.DisabledBackColor = System.Drawing.Color.White; + this.txtPriceBase.Location = new System.Drawing.Point(65, 74); + this.txtPriceBase.Name = "txtPriceBase"; + this.txtPriceBase.PreventEnterBeep = true; + this.txtPriceBase.Size = new System.Drawing.Size(39, 23); + this.txtPriceBase.TabIndex = 20; + this.txtPriceBase.Text = "10"; + // + // lblPriceBase + // + // + // + // + this.lblPriceBase.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.lblPriceBase.Location = new System.Drawing.Point(6, 74); + this.lblPriceBase.Name = "lblPriceBase"; + this.lblPriceBase.Size = new System.Drawing.Size(56, 23); + this.lblPriceBase.TabIndex = 21; + this.lblPriceBase.Text = "基础加价"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.btnClear2); + this.groupBox1.Controls.Add(this.btnStop); + this.groupBox1.Controls.Add(this.labelX3); + this.groupBox1.Controls.Add(this.cmbThreadCount); + this.groupBox1.Controls.Add(this.btnClear); + this.groupBox1.Controls.Add(this.lblQueueCount); + this.groupBox1.Controls.Add(this.labelX2); + this.groupBox1.Controls.Add(this.btnUpload); + this.groupBox1.Controls.Add(this.btnImport); + this.groupBox1.ForeColor = System.Drawing.SystemColors.ControlText; + this.groupBox1.Location = new System.Drawing.Point(676, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(297, 155); + this.groupBox1.TabIndex = 100; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "操作"; + // + // btnClear2 + // + this.btnClear2.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnClear2.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnClear2.Location = new System.Drawing.Point(199, 111); + this.btnClear2.Name = "btnClear2"; + this.btnClear2.Size = new System.Drawing.Size(75, 23); + this.btnClear2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear2.TabIndex = 92; + this.btnClear2.Text = "清空已上货"; + this.btnClear2.Click += new System.EventHandler(this.btnClearUpload_Click); + // + // btnStop + // + this.btnStop.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnStop.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnStop.Location = new System.Drawing.Point(17, 111); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(75, 23); + this.btnStop.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStop.TabIndex = 91; + this.btnStop.Text = "中断上货"; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // labelX3 + // + // + // + // + this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX3.Location = new System.Drawing.Point(108, 37); + this.labelX3.Name = "labelX3"; + this.labelX3.Size = new System.Drawing.Size(68, 23); + this.labelX3.TabIndex = 90; + this.labelX3.Text = "上传线程:"; + // + // cmbThreadCount + // + this.cmbThreadCount.DisplayMember = "Text"; + this.cmbThreadCount.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cmbThreadCount.FormattingEnabled = true; + this.cmbThreadCount.ItemHeight = 18; + this.cmbThreadCount.Items.AddRange(new object[] { + this.comboItem6, + this.comboItem7, + this.comboItem8, + this.comboItem9, + this.comboItem10}); + this.cmbThreadCount.Location = new System.Drawing.Point(178, 36); + this.cmbThreadCount.Name = "cmbThreadCount"; + this.cmbThreadCount.Size = new System.Drawing.Size(47, 24); + this.cmbThreadCount.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cmbThreadCount.TabIndex = 89; + this.cmbThreadCount.Text = "0"; + this.cmbThreadCount.SelectedIndexChanged += new System.EventHandler(this.cmbThreadCount_SelectedIndexChanged); + // + // comboItem6 + // + this.comboItem6.Text = "1"; + // + // comboItem7 + // + this.comboItem7.Text = "2"; + // + // comboItem8 + // + this.comboItem8.Text = "3"; + // + // comboItem9 + // + this.comboItem9.Text = "4"; + // + // comboItem10 + // + this.comboItem10.Text = "5"; + // + // btnClear + // + this.btnClear.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnClear.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnClear.Location = new System.Drawing.Point(108, 111); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(75, 23); + this.btnClear.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.TabIndex = 85; + this.btnClear.Text = "清空队列"; + this.btnClear.Click += new System.EventHandler(this.BtnClear_Click); + // + // lblQueueCount + // + // + // + // + this.lblQueueCount.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.lblQueueCount.FontBold = true; + this.lblQueueCount.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.lblQueueCount.Location = new System.Drawing.Point(172, 74); + this.lblQueueCount.Name = "lblQueueCount"; + this.lblQueueCount.Size = new System.Drawing.Size(68, 23); + this.lblQueueCount.TabIndex = 84; + this.lblQueueCount.Text = "0 个"; + // + // labelX2 + // + // + // + // + this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX2.Location = new System.Drawing.Point(108, 74); + this.labelX2.Name = "labelX2"; + this.labelX2.Size = new System.Drawing.Size(67, 23); + this.labelX2.TabIndex = 83; + this.labelX2.Text = "上传队列:"; + // + // btnUpload + // + this.btnUpload.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnUpload.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnUpload.Location = new System.Drawing.Point(17, 74); + this.btnUpload.Name = "btnUpload"; + this.btnUpload.Size = new System.Drawing.Size(75, 23); + this.btnUpload.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnUpload.TabIndex = 2; + this.btnUpload.Text = "开始上货"; + this.btnUpload.Click += new System.EventHandler(this.BtnUpload_Click); + // + // btnImport + // + this.btnImport.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnImport.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnImport.Location = new System.Drawing.Point(17, 37); + this.btnImport.Name = "btnImport"; + this.btnImport.Size = new System.Drawing.Size(75, 23); + this.btnImport.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnImport.TabIndex = 1; + this.btnImport.Text = "导入数据"; + this.btnImport.Click += new System.EventHandler(this.BtnImport_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.btnManageVDian); + this.groupBox2.Controls.Add(this.btnGetProductCount); + this.groupBox2.Controls.Add(this.btnRefreshShop); + this.groupBox2.ForeColor = System.Drawing.SystemColors.ControlText; + this.groupBox2.Location = new System.Drawing.Point(2, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(127, 155); + this.groupBox2.TabIndex = 106; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "店铺刷新"; + // + // btnManageVDian + // + this.btnManageVDian.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnManageVDian.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnManageVDian.FocusCuesEnabled = false; + this.btnManageVDian.Location = new System.Drawing.Point(17, 111); + this.btnManageVDian.Name = "btnManageVDian"; + this.btnManageVDian.Size = new System.Drawing.Size(91, 23); + this.btnManageVDian.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnManageVDian.TabIndex = 87; + this.btnManageVDian.Text = "管理微店"; + this.btnManageVDian.Click += new System.EventHandler(this.btnManageVDian_Click); + // + // btnGetProductCount + // + this.btnGetProductCount.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnGetProductCount.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnGetProductCount.Location = new System.Drawing.Point(17, 60); + this.btnGetProductCount.Name = "btnGetProductCount"; + this.btnGetProductCount.Size = new System.Drawing.Size(91, 23); + this.btnGetProductCount.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnGetProductCount.TabIndex = 86; + this.btnGetProductCount.Text = "获取商品数量"; + this.btnGetProductCount.Click += new System.EventHandler(this.btnGetProductCount_Click); + // + // btnRefreshShop + // + this.btnRefreshShop.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnRefreshShop.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnRefreshShop.Location = new System.Drawing.Point(17, 26); + this.btnRefreshShop.Name = "btnRefreshShop"; + this.btnRefreshShop.Size = new System.Drawing.Size(91, 23); + this.btnRefreshShop.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRefreshShop.TabIndex = 85; + this.btnRefreshShop.Text = "刷新店铺状态"; + this.btnRefreshShop.Click += new System.EventHandler(this.BtnRefreshShop_Click); + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.labelX5); + this.groupBox4.Controls.Add(this.txtCPSRate); + this.groupBox4.Controls.Add(this.labelX1); + this.groupBox4.Controls.Add(this.labelX6); + this.groupBox4.Controls.Add(this.chkCPS); + this.groupBox4.Location = new System.Drawing.Point(272, 3); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(142, 155); + this.groupBox4.TabIndex = 107; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "分成推广金设置"; + // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(111, 61); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(20, 23); + this.labelX5.TabIndex = 19; + this.labelX5.Text = "%"; + // + // txtCPSRate + // + // + // + // + this.txtCPSRate.Border.Class = "TextBoxBorder"; + this.txtCPSRate.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtCPSRate.DisabledBackColor = System.Drawing.Color.White; + this.txtCPSRate.Location = new System.Drawing.Point(79, 61); + this.txtCPSRate.Name = "txtCPSRate"; + this.txtCPSRate.PreventEnterBeep = true; + this.txtCPSRate.Size = new System.Drawing.Size(30, 23); + this.txtCPSRate.TabIndex = 20; + this.txtCPSRate.Text = "10"; + // + // labelX1 + // + // + // + // + this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX1.ForeColor = System.Drawing.SystemColors.ActiveCaption; + this.labelX1.Location = new System.Drawing.Point(11, 87); + this.labelX1.Name = "labelX1"; + this.labelX1.Size = new System.Drawing.Size(120, 47); + this.labelX1.TabIndex = 23; + this.labelX1.Text = "开通分成推广金,请\r\n先去分成推广模块。"; + // + // labelX6 + // + // + // + // + this.labelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX6.Location = new System.Drawing.Point(10, 61); + this.labelX6.Name = "labelX6"; + this.labelX6.Size = new System.Drawing.Size(71, 23); + this.labelX6.TabIndex = 21; + this.labelX6.Text = "推广金比例"; + // + // chkCPS + // + // + // + // + this.chkCPS.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.chkCPS.Location = new System.Drawing.Point(10, 37); + this.chkCPS.Name = "chkCPS"; + this.chkCPS.Size = new System.Drawing.Size(121, 23); + this.chkCPS.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.chkCPS.TabIndex = 22; + this.chkCPS.Text = "上货后设置推广金"; + // + // statusBarUpload + // + this.statusBarUpload.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.statusBarUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBarUpload.Location = new System.Drawing.Point(2, 676); + this.statusBarUpload.Margin = new System.Windows.Forms.Padding(0); + this.statusBarUpload.Name = "statusBarUpload"; + this.statusBarUpload.Size = new System.Drawing.Size(1038, 30); + this.statusBarUpload.TabIndex = 105; + // + // dgvProduct + // + this.dgvProduct.AllowUserToAddRows = false; + dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; + this.dgvProduct.BackgroundColor = System.Drawing.Color.White; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; + this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colUploadShopId, + this.colProductPlatform, + this.colProductId, + this.colProductName, + this.colProductPrice, + this.colProductSaleCount, + this.colWeiDianProductId, + this.colWeiDianProductName, + this.colUploadStatus, + this.colCPSResult, + this.colUploadShop, + this.colUploadOperate}); + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvProduct.DefaultCellStyle = dataGridViewCellStyle11; + this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvProduct.EnableHeadersVisualStyles = false; + this.dgvProduct.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dgvProduct.Location = new System.Drawing.Point(0, 0); + this.dgvProduct.Name = "dgvProduct"; + this.dgvProduct.ReadOnly = true; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvProduct.RowHeadersDefaultCellStyle = dataGridViewCellStyle12; + this.dgvProduct.RowTemplate.Height = 23; + this.dgvProduct.Size = new System.Drawing.Size(651, 511); + this.dgvProduct.TabIndex = 102; + this.dgvProduct.UseCustomBackgroundColor = true; + this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick); + // + // colUploadShopId + // + this.colUploadShopId.HeaderText = "上传店铺Id"; + this.colUploadShopId.Name = "colUploadShopId"; + this.colUploadShopId.ReadOnly = true; + this.colUploadShopId.Visible = false; + // + // colProductPlatform + // + this.colProductPlatform.HeaderText = "商品平台类型"; + this.colProductPlatform.Name = "colProductPlatform"; + this.colProductPlatform.ReadOnly = true; + this.colProductPlatform.Visible = false; + // + // colProductId + // + this.colProductId.HeaderText = "上家Id"; + this.colProductId.Name = "colProductId"; + this.colProductId.ReadOnly = true; + // + // colProductName + // + this.colProductName.HeaderText = "上家标题"; + this.colProductName.Name = "colProductName"; + this.colProductName.ReadOnly = true; + this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colProductName.Width = 200; + // + // colProductPrice + // + this.colProductPrice.HeaderText = "价格"; + this.colProductPrice.Name = "colProductPrice"; + this.colProductPrice.ReadOnly = true; + this.colProductPrice.Resizable = System.Windows.Forms.DataGridViewTriState.True; + // + // colProductSaleCount + // + this.colProductSaleCount.HeaderText = "销量"; + this.colProductSaleCount.Name = "colProductSaleCount"; + this.colProductSaleCount.ReadOnly = true; + // + // colWeiDianProductId + // + this.colWeiDianProductId.HeaderText = "微店Id"; + this.colWeiDianProductId.Name = "colWeiDianProductId"; + this.colWeiDianProductId.ReadOnly = true; + // + // colWeiDianProductName + // + this.colWeiDianProductName.HeaderText = "微店标题"; + this.colWeiDianProductName.Name = "colWeiDianProductName"; + this.colWeiDianProductName.ReadOnly = true; + this.colWeiDianProductName.Width = 200; + // + // colUploadStatus + // + this.colUploadStatus.HeaderText = "状态"; + this.colUploadStatus.Name = "colUploadStatus"; + this.colUploadStatus.ReadOnly = true; + this.colUploadStatus.Width = 150; + // + // colCPSResult + // + this.colCPSResult.HeaderText = "推广金设置"; + this.colCPSResult.Name = "colCPSResult"; + this.colCPSResult.ReadOnly = true; + this.colCPSResult.Width = 150; + // + // colUploadShop + // + this.colUploadShop.HeaderText = "上传店铺"; + this.colUploadShop.Name = "colUploadShop"; + this.colUploadShop.ReadOnly = true; + // + // colUploadOperate + // + this.colUploadOperate.HeaderText = "操作"; + this.colUploadOperate.Name = "colUploadOperate"; + this.colUploadOperate.ReadOnly = true; + this.colUploadOperate.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colUploadOperate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // dgvShop + // + this.dgvShop.AllowUserToAddRows = false; + this.dgvShop.AllowUserToDeleteRows = false; + dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13; + this.dgvShop.BackgroundColor = System.Drawing.Color.White; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14; + this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colId, + this.colShopId, + this.colShopName, + this.colProductCount, + this.colIsAuthorize, + this.colIsUpload, + this.colStatus}); + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.DefaultCellStyle = dataGridViewCellStyle15; + this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvShop.EnableHeadersVisualStyles = false; + this.dgvShop.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dgvShop.Location = new System.Drawing.Point(0, 0); + this.dgvShop.Name = "dgvShop"; + this.dgvShop.ReadOnly = true; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle16.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvShop.RowHeadersDefaultCellStyle = dataGridViewCellStyle16; + this.dgvShop.RowTemplate.Height = 23; + this.dgvShop.Size = new System.Drawing.Size(381, 511); + this.dgvShop.TabIndex = 101; + this.dgvShop.UseCustomBackgroundColor = true; + this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvShop_CellContentClick); + // + // colId + // + this.colId.HeaderText = "Id"; + this.colId.Name = "colId"; + this.colId.ReadOnly = true; + this.colId.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + // + // colShopName + // + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colShopName.Width = 120; + // + // colProductCount + // + this.colProductCount.HeaderText = "商品数量"; + this.colProductCount.Name = "colProductCount"; + this.colProductCount.ReadOnly = true; + this.colProductCount.Width = 80; + // + // colIsAuthorize + // + this.colIsAuthorize.HeaderText = "接口"; + this.colIsAuthorize.Name = "colIsAuthorize"; + this.colIsAuthorize.ReadOnly = true; + this.colIsAuthorize.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.colIsAuthorize.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colIsAuthorize.Width = 50; + // + // colIsUpload + // + this.colIsUpload.HeaderText = "上货"; + this.colIsUpload.Name = "colIsUpload"; + this.colIsUpload.ReadOnly = true; + this.colIsUpload.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.colIsUpload.Width = 50; + // + // colStatus + // + this.colStatus.HeaderText = "状态"; + this.colStatus.Name = "colStatus"; + this.colStatus.ReadOnly = true; + this.colStatus.Width = 150; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.btnShowCef); + this.groupBox5.Controls.Add(this.labelX4); + this.groupBox5.Controls.Add(this.txtPrefix); + this.groupBox5.Location = new System.Drawing.Point(420, 3); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(250, 155); + this.groupBox5.TabIndex = 108; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "其他设置"; + // + // btnShowCef + // + this.btnShowCef.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnShowCef.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnShowCef.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnShowCef.FocusCuesEnabled = false; + this.btnShowCef.Location = new System.Drawing.Point(163, 111); + this.btnShowCef.Name = "btnShowCef"; + this.btnShowCef.Size = new System.Drawing.Size(66, 23); + this.btnShowCef.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnShowCef.TabIndex = 33; + this.btnShowCef.Text = "显示网页"; + this.btnShowCef.Visible = false; + this.btnShowCef.Click += new System.EventHandler(this.btnShowCef_Click); + // + // labelX4 + // + // + // + // + this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX4.Location = new System.Drawing.Point(15, 38); + this.labelX4.Name = "labelX4"; + this.labelX4.Size = new System.Drawing.Size(58, 23); + this.labelX4.TabIndex = 15; + this.labelX4.Text = "标题前缀"; + this.labelX4.Click += new System.EventHandler(this.labelX4_Click); + // + // txtPrefix + // + // + // + // + this.txtPrefix.Border.Class = "TextBoxBorder"; + this.txtPrefix.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtPrefix.DisabledBackColor = System.Drawing.Color.White; + this.txtPrefix.Location = new System.Drawing.Point(79, 39); + this.txtPrefix.Name = "txtPrefix"; + this.txtPrefix.PreventEnterBeep = true; + this.txtPrefix.Size = new System.Drawing.Size(150, 23); + this.txtPrefix.TabIndex = 20; + // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.Controls.Add(this.splitContainer1); + this.panel1.Location = new System.Drawing.Point(2, 162); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1036, 511); + this.panel1.TabIndex = 109; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.dgvShop); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.dgvProduct); + this.splitContainer1.Size = new System.Drawing.Size(1036, 511); + this.splitContainer1.SplitterDistance = 381; + this.splitContainer1.TabIndex = 0; + // + // VDianUploadProductForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1042, 708); + this.Controls.Add(this.panel1); + this.Controls.Add(this.groupBox5); + this.Controls.Add(this.groupBox4); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.statusBarUpload); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ForeColor = System.Drawing.SystemColors.ControlText; + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "VDianUploadProductForm"; + this.Text = "UploadProductForm"; + this.Load += new System.EventHandler(this.UploadProductForm_Load); + this.groupBox3.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + this.groupBox5.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private StatusBarUserControl statusBarUpload; + private System.Windows.Forms.GroupBox groupBox3; + private DevComponents.DotNetBar.LabelX lblPriceRatio; + private DevComponents.DotNetBar.LabelX lblPriceRatioUnit; + private DevComponents.DotNetBar.Controls.TextBoxX txtPriceRatio; + private DevComponents.DotNetBar.LabelX lblPriceBaseUnit; + private DevComponents.DotNetBar.Controls.TextBoxX txtPriceBase; + private DevComponents.DotNetBar.LabelX lblPriceBase; + private TemuKJD.UserComponent.DataGridViewXEx dgvShop; + private System.Windows.Forms.GroupBox groupBox1; + private DevComponents.DotNetBar.LabelX labelX3; + private DevComponents.DotNetBar.Controls.ComboBoxEx cmbThreadCount; + private DevComponents.Editors.ComboItem comboItem6; + private DevComponents.Editors.ComboItem comboItem7; + private DevComponents.Editors.ComboItem comboItem8; + private DevComponents.Editors.ComboItem comboItem9; + private DevComponents.Editors.ComboItem comboItem10; + private DevComponents.DotNetBar.ButtonX btnClear; + private DevComponents.DotNetBar.LabelX lblQueueCount; + private DevComponents.DotNetBar.LabelX labelX2; + private DevComponents.DotNetBar.ButtonX btnUpload; + private DevComponents.DotNetBar.ButtonX btnImport; + private System.Windows.Forms.GroupBox groupBox2; + private DevComponents.DotNetBar.ButtonX btnRefreshShop; + private DevComponents.DotNetBar.ButtonX btnStop; + private DevComponents.DotNetBar.ButtonX btnClear2; + private System.Windows.Forms.GroupBox groupBox4; + private DevComponents.DotNetBar.Controls.CheckBoxX chkCPS; + private DevComponents.DotNetBar.ButtonX btnGetProductCount; + private DevComponents.DotNetBar.LabelX labelX6; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.TextBoxX txtCPSRate; + private DevComponents.DotNetBar.LabelX labelX1; + private TemuKJD.UserComponent.DataGridViewXEx dgvProduct; + private System.Windows.Forms.DataGridViewTextBoxColumn colUploadShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductPlatform; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductId; + private System.Windows.Forms.DataGridViewLinkColumn colProductName; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductPrice; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductSaleCount; + private System.Windows.Forms.DataGridViewTextBoxColumn colWeiDianProductId; + private System.Windows.Forms.DataGridViewLinkColumn colWeiDianProductName; + private System.Windows.Forms.DataGridViewTextBoxColumn colUploadStatus; + private System.Windows.Forms.DataGridViewTextBoxColumn colCPSResult; + private System.Windows.Forms.DataGridViewTextBoxColumn colUploadShop; + private System.Windows.Forms.DataGridViewLinkColumn colUploadOperate; + private System.Windows.Forms.DataGridViewTextBoxColumn colId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewLinkColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductCount; + private System.Windows.Forms.DataGridViewCheckBoxColumn colIsAuthorize; + private System.Windows.Forms.DataGridViewCheckBoxColumn colIsUpload; + private System.Windows.Forms.DataGridViewTextBoxColumn colStatus; + private System.Windows.Forms.GroupBox groupBox5; + private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.Controls.TextBoxX txtPrefix; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.SplitContainer splitContainer1; + private DevComponents.DotNetBar.ButtonX btnShowCef; + private DevComponents.DotNetBar.ButtonX btnManageVDian; + } +} \ No newline at end of file diff --git a/TEMUKJD/VDianForms/VDianUploadProductForm.resx b/TEMUKJD/VDianForms/VDianUploadProductForm.resx new file mode 100644 index 0000000..14694a2 --- /dev/null +++ b/TEMUKJD/VDianForms/VDianUploadProductForm.resx @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 82317fa..6a56022 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -3441,7 +3441,7 @@ namespace TemuKJD.WXForms.ProductForms // 库存 skuParam.productSkuInfo.stockInfo = new stockInfoParam() { stockNum = defaultAddPriceRule.StockNum }; // 厂商直采上家库存为0则按0上架 - if (dbProd.product_get_type_text == "厂商直采" && skuInfo.quantity.ParseToInt() == 0) + if (dbProd.product_get_type_text == "厂商直采" && skuInfo.quantity.IsNullOrZero()) skuParam.productSkuInfo.stockInfo.stockNum = 0; skuParam.productSkuInfo.saleParam = new List(); foreach (var specInfo in skuInfo.spec) @@ -3478,7 +3478,8 @@ namespace TemuKJD.WXForms.ProductForms } skuParam.productSkuInfo.skuDeliverInfo = new skuDeliverInfoParam(); skuParam.productSkuInfo.stockDiff = new stockDiffParam() { diffType = 1, num = defaultAddPriceRule.StockNum }; - if (skuInfo.quantity.ParseToInt() == 0) + // 厂商直采上家库存为0则按0上架 + if (dbProd.product_get_type_text == "厂商直采" && skuInfo.quantity.IsNullOrZero()) skuParam.productSkuInfo.stockDiff.num = 0; skuParam.status = 5; } diff --git a/Work/CollectClass/JingXiCollect.cs b/Work/CollectClass/JingXiCollect.cs index da5f95e..50ccdbd 100644 --- a/Work/CollectClass/JingXiCollect.cs +++ b/Work/CollectClass/JingXiCollect.cs @@ -411,11 +411,13 @@ namespace Work.CollectClass redirectUrl = AllBase.BaseRegex.GetStringJson(ref skuInfoCBC, "redirectUrl"); if (string.IsNullOrEmpty(redirectUrl) && html.Contains("提交错误")) { - LogHelper.WriteWithTime(" 代理ip:" + listIp[IpListCount] + "请求失败" + html); + //LogHelper.WriteWithTime(" 代理ip:" + listIp[IpListCount] + "请求失败" + html); + System.Windows.Forms.MessageBox.Show(" 代理ip:" + listIp[IpListCount] + "请求失败" + html); } else { - LogHelper.WriteWithTime(" 代理ip:" + listIp[IpListCount] + "redirectUrl参数:" + redirectUrl); + //LogHelper.WriteWithTime(" 代理ip:" + listIp[IpListCount] + "redirectUrl参数:" + redirectUrl); + System.Windows.Forms.MessageBox.Show(" 代理ip:" + listIp[IpListCount] + "redirectUrl参数:" + redirectUrl); } } }