商品选品准备工作
This commit is contained in:
1 parent
dda4fdfc5f
commit
a77278c6d1
34 files changed
+2336
-48
No files matched your search
@@ -297,6 +297,7 @@ namespace AllBase
|
||||
/// 注册用户名
|
||||
/// </summary>
|
||||
public static string UserName = "";
|
||||
public static bool IsSa;
|
||||
/// <summary>
|
||||
/// 注册昵称
|
||||
/// </summary>
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace AllBase.Model.Result
|
||||
public int? supplierSourceType { get; set; }
|
||||
public bool temuSupplier { get; set; }
|
||||
public List<object> mainParentSpecIds { get; set; }
|
||||
public object sizeTemplateId { get; set; }
|
||||
public long? sizeTemplateId { get; set; }
|
||||
public List<long?> sizeTemplateIds { get; set; }
|
||||
public List<long?> showSizeTemplateIds { get; set; }
|
||||
public object imageLanguageList { get; set; }
|
||||
|
||||
@@ -382,7 +382,7 @@ namespace AllBase.Model.Result
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string floorId { get; set; }
|
||||
public long? floorId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -598,7 +598,7 @@ namespace AllBase.Model.Result
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<object> productCarouseVideoReqList { get; set; }
|
||||
public List<productCarouseVideoReqItem> productCarouseVideoReqList { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -653,4 +653,14 @@ namespace AllBase.Model.Result
|
||||
public long? productDraftId { get; set; }
|
||||
}
|
||||
|
||||
public class productCarouseVideoReqItem
|
||||
{
|
||||
public string vid { get; set; }
|
||||
public string coverUrl { get; set; }
|
||||
public string videoUrl { get; set; }
|
||||
public int? videoType { get; set; }
|
||||
public int? width { get; set; }
|
||||
public int? height { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using KJD_Web.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.BLL
|
||||
{
|
||||
public class ProductManage
|
||||
{
|
||||
public string AddProduct(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
|
||||
string spu_id = RegexUtils.GetStringQuery(ref inputData, "spu_id");
|
||||
string skc_id = RegexUtils.GetStringQuery(ref inputData, "skc_id");
|
||||
string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id");
|
||||
string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name"));
|
||||
string product_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_name"));
|
||||
string product_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json"));
|
||||
string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json"));
|
||||
string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img"));
|
||||
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"));
|
||||
//string sss = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json"));
|
||||
int r2 = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2);
|
||||
|
||||
if (string.IsNullOrEmpty(user_name))
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"没有用户名\"}";
|
||||
}
|
||||
|
||||
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
|
||||
MysqlUtils mySql = new MysqlUtils(conn);
|
||||
string sql = "";
|
||||
|
||||
sql = "insert into kjd.product (spu_id,skc_id,cat_id,cat_name,product_name,product_json,size_json,main_img,notes,add_time,mdy_time) " +
|
||||
"values ('" + spu_id + "','" + skc_id + "','" + cat_id + "','" + cat_name + "','" + product_name + "','" +
|
||||
product_json + "','" + size_json + "','" + main_img + "','" + notes + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
|
||||
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
|
||||
var rst = mySql.ExecuteNonQuery(sql);
|
||||
mySql.Close();
|
||||
if (rst)
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\"}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"未知错误\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,11 @@ namespace KJD_Web
|
||||
hPath = hPath.Replace("/update/", "/UpdateService.asmx/");
|
||||
Context.RewritePath(hPath);
|
||||
}
|
||||
else if (!hPath.Contains(".asmx") && hPath.Contains("/product/"))
|
||||
{
|
||||
hPath = hPath.Replace("/product/", "/ProductService.asmx/");
|
||||
Context.RewritePath(hPath);
|
||||
}
|
||||
}
|
||||
|
||||
protected void Application_AuthenticateRequest(object sender, EventArgs e)
|
||||
|
||||
@@ -77,12 +77,14 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="ProductService.asmx" />
|
||||
<Content Include="ShopService.asmx" />
|
||||
<Content Include="UpdateService.asmx" />
|
||||
<Content Include="UserService.asmx" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BLL\ProductManage.cs" />
|
||||
<Compile Include="BLL\ShopManage.cs" />
|
||||
<Compile Include="BLL\UpadteManage.cs" />
|
||||
<Compile Include="BLL\UserManage.cs" />
|
||||
@@ -91,9 +93,14 @@
|
||||
</Compile>
|
||||
<Compile Include="Model\CommentParam.cs" />
|
||||
<Compile Include="Model\OrderParam.cs" />
|
||||
<Compile Include="Model\ProductResultParam.cs" />
|
||||
<Compile Include="Model\ShopModel\ShopParam.cs" />
|
||||
<Compile Include="Model\UserLoginResultParam.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ProductService.asmx.cs">
|
||||
<DependentUpon>ProductService.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ShopService.asmx.cs">
|
||||
<DependentUpon>ShopService.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace KJD_Web.Model
|
||||
{
|
||||
public class ProductResultParam
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string spu_id { get; set; }
|
||||
public string skc_id { get; set; }
|
||||
public string cat_id { get; set; }
|
||||
public string cat_name { get; set; }
|
||||
public string product_name { get; set; }
|
||||
public string product_json { get; set; }
|
||||
public string size_json { get; set; }
|
||||
public string main_img { get; set; }
|
||||
public DateTime add_time { get; set; }
|
||||
public DateTime mdy_time { get; set; }
|
||||
public string notes { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<%@ WebService Language="C#" CodeBehind="ProductService.asmx.cs" Class="KJD_Web.ProductService" %>
|
||||
@@ -0,0 +1,99 @@
|
||||
using KJD_Web.BLL;
|
||||
using KJD_Web.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Services;
|
||||
|
||||
namespace KJD_Web
|
||||
{
|
||||
/// <summary>
|
||||
/// ProductService 的摘要说明
|
||||
/// </summary>
|
||||
[WebService(Namespace = "http://tempuri.org/")]
|
||||
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
|
||||
[System.ComponentModel.ToolboxItem(false)]
|
||||
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
|
||||
// [System.Web.Script.Services.ScriptService]
|
||||
public class ProductService : System.Web.Services.WebService
|
||||
{
|
||||
private string GetRequestJsonString()
|
||||
{
|
||||
Context.Response.ContentType = "text/html;charset=utf-8";
|
||||
Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");
|
||||
|
||||
using (Stream s = HttpContext.Current.Request.InputStream) // 获得json 字符流
|
||||
{
|
||||
// 还原数据流
|
||||
byte[] b = new byte[s.Length];
|
||||
s.Read(b, 0, (int)s.Length);
|
||||
string jsonText = Encoding.UTF8.GetString(b); // JSON字符串
|
||||
if (string.IsNullOrEmpty(jsonText))
|
||||
{
|
||||
var qs = HttpContext.Current.Request.QueryString;
|
||||
if (qs != null && qs.Keys.Count > 0)
|
||||
{
|
||||
jsonText = "{";
|
||||
foreach (var key in qs.Keys)
|
||||
{
|
||||
jsonText += "\"" + key + "\":" + "\"" + qs[key.ToString()] + "\";";
|
||||
}
|
||||
jsonText = jsonText.TrimEnd(';') + "}";
|
||||
}
|
||||
}
|
||||
return jsonText;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void get_product_list()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
//result = new ShopManage().GetShop(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void add_product()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new ProductManage().AddProduct(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void del_product()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
//result = new ShopManage().DelShop(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void mdy_product()
|
||||
{
|
||||
string jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
//result = new ShopManage().MdyShop(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.36128.20
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Publish", "Publish\Publish.csproj", "{1EB0D620-09A3-4A9C-8339-10E4AADEFEFE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1EB0D620-09A3-4A9C-8339-10E4AADEFEFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1EB0D620-09A3-4A9C-8339-10E4AADEFEFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1EB0D620-09A3-4A9C-8339-10E4AADEFEFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1EB0D620-09A3-4A9C-8339-10E4AADEFEFE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {DCDDF0B2-6565-4458-82A9-1A3F9A48F15B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
|
||||
namespace Publish
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows 窗体设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.btnPack = new System.Windows.Forms.Button();
|
||||
this.lstFile = new System.Windows.Forms.ListBox();
|
||||
this.btnSelect = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnPack
|
||||
//
|
||||
this.btnPack.Location = new System.Drawing.Point(466, 415);
|
||||
this.btnPack.Name = "btnPack";
|
||||
this.btnPack.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnPack.TabIndex = 0;
|
||||
this.btnPack.Text = "打包";
|
||||
this.btnPack.UseVisualStyleBackColor = true;
|
||||
this.btnPack.Click += new System.EventHandler(this.btnPack_Click);
|
||||
//
|
||||
// lstFile
|
||||
//
|
||||
this.lstFile.FormattingEnabled = true;
|
||||
this.lstFile.ItemHeight = 12;
|
||||
this.lstFile.Items.AddRange(new object[] {
|
||||
"Work.dll",
|
||||
"AllBase.dll",
|
||||
"TemuKJD.exe"});
|
||||
this.lstFile.Location = new System.Drawing.Point(12, 12);
|
||||
this.lstFile.Name = "lstFile";
|
||||
this.lstFile.Size = new System.Drawing.Size(529, 388);
|
||||
this.lstFile.TabIndex = 1;
|
||||
//
|
||||
// btnSelect
|
||||
//
|
||||
this.btnSelect.Location = new System.Drawing.Point(12, 415);
|
||||
this.btnSelect.Name = "btnSelect";
|
||||
this.btnSelect.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSelect.TabIndex = 2;
|
||||
this.btnSelect.Text = "选择文件";
|
||||
this.btnSelect.UseVisualStyleBackColor = true;
|
||||
this.btnSelect.Visible = false;
|
||||
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(553, 450);
|
||||
this.Controls.Add(this.btnSelect);
|
||||
this.Controls.Add(this.lstFile);
|
||||
this.Controls.Add(this.btnPack);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Form1";
|
||||
this.Text = "打包发布";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnPack;
|
||||
private System.Windows.Forms.ListBox lstFile;
|
||||
private System.Windows.Forms.Button btnSelect;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Publish
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnPack_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<string> filePathLst = new List<string>();
|
||||
string destinationZip = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "Update.zip";
|
||||
foreach (var item in this.lstFile.Items)
|
||||
{
|
||||
filePathLst.Add(AppDomain.CurrentDomain.SetupInformation.ApplicationBase + item.ToString());
|
||||
}
|
||||
using (ZipArchive zip = ZipFile.Open(destinationZip, ZipArchiveMode.Create))
|
||||
{
|
||||
foreach (string filePath in filePathLst)
|
||||
{
|
||||
zip.CreateEntryFromFile(filePath, Path.GetFileName(filePath), CompressionLevel.Optimal);
|
||||
}
|
||||
}
|
||||
MessageBox.Show("打包成功!");
|
||||
this.Close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Publish
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Publish")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Publish")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("1eb0d620-09a3-4a9c-8339-10e4aadefefe")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace Publish.Properties
|
||||
{
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Publish.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,29 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace Publish.Properties
|
||||
{
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1EB0D620-09A3-4A9C-8339-10E4AADEFEFE}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>Publish</RootNamespace>
|
||||
<AssemblyName>Publish</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>pack.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="pack.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -61,8 +61,8 @@ BrandingText "TEMU
|
||||
Section "MainSection" SEC01
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOverwrite ifnewer
|
||||
;File /r /x "Config.xml" /x "TemuKJD.exe.choice.debug.tools" /x "DB.dll" /x "AllBase.pdb" /x "Work.pdb" /x "TemuKJD.pdb" /x "data" "${BIN_PATH}\*.*"
|
||||
File /r /x "Config.xml" /x "TemuKJD.exe.choice.debug.tools" /x "DB.dll" /x "*.pdb" /x "*.zip" /x "data" "${BIN_PATH}\*.*"
|
||||
;File /r /x "Config.xml" /x "TemuKJD.exe.choice.debug.tools" /x "DB.dll" /x "Publish.exe" /x "AllBase.pdb" /x "Work.pdb" /x "TemuKJD.pdb" /x "data" "${BIN_PATH}\*.*"
|
||||
File /r /x "Config.xml" /x "TemuKJD.exe.choice.debug.tools" /x "DB.dll" /x "Publish.exe" /x "*.pdb" /x "*.zip" /x "data" "${BIN_PATH}\*.*"
|
||||
CreateDirectory "$SMPROGRAMS\TEMU跨境达"
|
||||
CreateShortCut "$SMPROGRAMS\TEMU跨境达\TEMU跨境达.lnk" "$INSTDIR\TemuKJD.exe"
|
||||
CreateShortCut "$DESKTOP\TEMU跨境达.lnk" "$INSTDIR\TemuKJD.exe"
|
||||
|
||||
@@ -289,6 +289,12 @@
|
||||
<DependentUpon>PriceManageForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="KJDForms\ProductForms\ProductResponse\KJDHttpResponse.cs" />
|
||||
<Compile Include="KJDForms\ProductForms\ProductSelectForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="KJDForms\ProductForms\ProductSelectForm.Designer.cs">
|
||||
<DependentUpon>ProductSelectForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="KJDForms\ProductSelectForms\ProductSelectListForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -875,6 +881,9 @@
|
||||
<EmbeddedResource Include="KJDForms\ProductForms\PriceManageForm.resx">
|
||||
<DependentUpon>PriceManageForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="KJDForms\ProductForms\ProductSelectForm.resx">
|
||||
<DependentUpon>ProductSelectForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="KJDForms\ProductSelectForms\ProductSelectListForm.resx">
|
||||
<DependentUpon>ProductSelectListForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -560,7 +560,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
{
|
||||
var goodsLayerDecorationItem = new GoodsLayerDecorationReqsItem()
|
||||
{
|
||||
floorId = "" + goodsLayerDecorationVOInfo.floorId,
|
||||
floorId = goodsLayerDecorationVOInfo.floorId,
|
||||
key = goodsLayerDecorationVOInfo.key,
|
||||
lang = goodsLayerDecorationVOInfo.lang,
|
||||
priority = goodsLayerDecorationVOInfo.priority,
|
||||
@@ -579,12 +579,16 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
}
|
||||
prodParam.goodsLayerDecorationReqs.Add(goodsLayerDecorationItem);
|
||||
}
|
||||
prodParam.goodsModelReqs = prodInfo.goodsModelList;
|
||||
prodParam.goodsModelReqs = prodInfo.goodsModelList != null? prodInfo.goodsModelList : new List<object>();
|
||||
prodParam.materialImgUrl = prodInfo.materialImgUrl;
|
||||
prodParam.materialMultiLanguages = prodInfo.productLocalExtAttr.materialMultiLanguages != null ?
|
||||
prodInfo.productLocalExtAttr.materialMultiLanguages : new List<object>();
|
||||
prodParam.personalizationSwitch = prodInfo.productWhExtAttr.personalizationSwitch.ParseToInt();
|
||||
prodParam.productCarouseVideoReqList = prodInfo.carouseVideoVOList;
|
||||
|
||||
var carouseVideoVOList = JsonHelper.SerializeObject(prodInfo.carouseVideoVOList);
|
||||
prodParam.productCarouseVideoReqList = JsonHelper.DeserializeJsonToList<productCarouseVideoReqItem>(carouseVideoVOList);
|
||||
if (prodParam.productCarouseVideoReqList == null)
|
||||
prodParam.productCarouseVideoReqList = new List<productCarouseVideoReqItem>();
|
||||
//此处打开商品编辑详情无法获取到,如何查询存疑
|
||||
prodParam.productComplianceStatementReq = new ProductComplianceStatementReq
|
||||
{
|
||||
@@ -709,6 +713,8 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
};
|
||||
skuItem.productSkuNonAuditExtAttrReq = JsonHelper.DeserializeJsonToObject<ProductSkuNonAuditExtAttrReq>(
|
||||
JsonHelper.SerializeObject(skuInfo.productSkuNonAuditExtAttr));
|
||||
if (skuItem.productSkuNonAuditExtAttrReq == null)
|
||||
skuItem.productSkuNonAuditExtAttrReq = new ProductSkuNonAuditExtAttrReq();
|
||||
skuItem.productSkuSpecReqs=new List<ProductSkuSpecReqsItem>();
|
||||
int groupId = 0;
|
||||
foreach(var skuSpecInfo in skuInfo.productSkuSpecList)
|
||||
@@ -808,7 +814,9 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
else
|
||||
{
|
||||
var error = BaseRegex.GetStringJson(ref html, "errorMsg");
|
||||
BaseMsgForm.ShowError("上传商品失败" + error + "\r\n,请在草稿箱查找商品!");
|
||||
if (string.IsNullOrWhiteSpace(error))
|
||||
error = BaseRegex.GetStringJson(ref html, "error_msg");
|
||||
BaseMsgForm.ShowError(("上传商品失败\r\n" + error + "\r\n请在草稿箱查找商品!").Replace("\r\n\r\n","\r\n"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +339,8 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
private void ShopObj_OnInfoReceived(string information)
|
||||
{
|
||||
//BaseMsgForm.ShowInfo(information);
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync("alert('" + information + "');");
|
||||
if (!string.IsNullOrEmpty(information))
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync("alert('" + information + "');");
|
||||
}
|
||||
|
||||
private void CefWebBrowser_LoadError(object sender, CefSharp.LoadErrorEventArgs e)
|
||||
|
||||
@@ -32,49 +32,110 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
return "failed";
|
||||
}
|
||||
|
||||
Task.Run(() => {
|
||||
var shop1 = shop;
|
||||
var prodId1 = prodId;
|
||||
var html = ProductQuery(shop1, prodId1.ToString());
|
||||
if (html.Contains("\"success\":true") && html.Contains("\"result\""))
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var shop1 = shop;
|
||||
var prodId1 = prodId;
|
||||
string err_msg = "";
|
||||
var html = ProductQuery(shop1, prodId1.ToString());
|
||||
if (!html.Contains("\"success\":true") || !html.Contains("\"result\""))
|
||||
{
|
||||
OnInfoReceived("商品获取失败!" + BaseRegex.GetStringJson(ref html, "errorMsg"));
|
||||
return;
|
||||
}
|
||||
|
||||
JObject obj = JObject.Parse(html);
|
||||
try
|
||||
var result = JsonHelper.SerializeObject(obj["result"]);
|
||||
var sizeRst = "";
|
||||
TemuProductInfo product = JsonHelper.DeserializeJsonToObject<TemuProductInfo>(result);
|
||||
|
||||
if (product.sizeTemplateId > 0)
|
||||
{
|
||||
var result = JsonHelper.SerializeObject(obj["result"]);
|
||||
TemuProductInfo product = JsonHelper.DeserializeJsonToObject<TemuProductInfo>(result);
|
||||
|
||||
|
||||
// 创建 SaveFileDialog 的实例
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
|
||||
// 单线程单元(STA)模式运行文件对话框,否则会报错。
|
||||
System.Threading.Thread InvokeThread = new System.Threading.Thread(new System.Threading.ThreadStart(()=> {
|
||||
|
||||
// 设置对话框的属性
|
||||
saveFileDialog.Title = "保存商品";
|
||||
saveFileDialog.Filter = "商品文件 (*.prd)|*.prd|所有文件 (*.*)|*.*"; // 过滤文件类型
|
||||
saveFileDialog.FileName = product.productId.ParseToString(); // 默认文件名
|
||||
saveFileDialog.DefaultExt = "txt"; // 默认文件扩展名
|
||||
|
||||
// 显示对话框并获取结果
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
// 用户点击了“保存”按钮,此时可以获取文件的路径
|
||||
string filePath = saveFileDialog.FileName;
|
||||
// 在这里处理文件保存逻辑,例如写入数据到文件
|
||||
System.IO.File.WriteAllText(filePath, result);
|
||||
}
|
||||
//BaseMsgForm.ShowInfo("商品保存成功!");
|
||||
OnInfoReceived("商品保存成功!");
|
||||
}));
|
||||
InvokeThread.SetApartmentState(System.Threading.ApartmentState.STA);
|
||||
InvokeThread.Start();
|
||||
InvokeThread.Join();
|
||||
html = SizeSpecQuery(shop1, prodId1.ToString(), product.sizeTemplateId.ToString());
|
||||
if(!html.Contains("\"success\":true"))
|
||||
{
|
||||
err_msg += "尺码表获取失败!" + BaseRegex.GetStringJson(ref html, "errorMsg");
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = JObject.Parse(html);
|
||||
sizeRst = JsonHelper.SerializeObject(obj["result"]);
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
|
||||
var cat = product.categories.cat10;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat9;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat8;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat7;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat6;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat5;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat4;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat3;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat2;
|
||||
if (string.IsNullOrWhiteSpace(cat.catName))
|
||||
cat = product.categories.cat1;
|
||||
|
||||
var url = BaseClass.BuildObjString("product/add_product");
|
||||
var data = Work.UserLogin.GetSignaturex() +
|
||||
"&spu_id=" + product.productId +
|
||||
"&skc_id=" + product.productSkcList.FirstOrDefault().productSkcId +
|
||||
"&cat_id=" + cat.catId +
|
||||
"&cat_name=" + HttpUtility.UrlEncode(cat.catName, Encoding.UTF8) +
|
||||
"&product_name=" + HttpUtility.UrlEncode(product.productName, Encoding.UTF8) +
|
||||
"&product_json=" + HttpUtility.UrlEncode(result, Encoding.UTF8) +
|
||||
"&size_json=" + HttpUtility.UrlEncode(sizeRst, Encoding.UTF8) +
|
||||
"&main_img=" + HttpUtility.UrlEncode(product.carouselImageUrls.FirstOrDefault(), Encoding.UTF8);
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//// 创建 SaveFileDialog 的实例
|
||||
//SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
|
||||
//// 单线程单元(STA)模式运行文件对话框,否则会报错。
|
||||
//System.Threading.Thread InvokeThread = new System.Threading.Thread(new System.Threading.ThreadStart(()=> {
|
||||
|
||||
// // 设置对话框的属性
|
||||
// saveFileDialog.Title = "保存商品";
|
||||
// saveFileDialog.Filter = "商品文件 (*.prd)|*.prd|所有文件 (*.*)|*.*"; // 过滤文件类型
|
||||
// saveFileDialog.FileName = product.productId.ParseToString(); // 默认文件名
|
||||
// saveFileDialog.DefaultExt = "txt"; // 默认文件扩展名
|
||||
|
||||
// // 显示对话框并获取结果
|
||||
// if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
// {
|
||||
// // 用户点击了“保存”按钮,此时可以获取文件的路径
|
||||
// string filePath = saveFileDialog.FileName;
|
||||
// // 在这里处理文件保存逻辑,例如写入数据到文件
|
||||
// System.IO.File.WriteAllText(filePath, result);
|
||||
|
||||
// //BaseMsgForm.ShowInfo("商品保存成功!");
|
||||
// }
|
||||
//}));
|
||||
//InvokeThread.SetApartmentState(System.Threading.ApartmentState.STA);
|
||||
//InvokeThread.Start();
|
||||
//InvokeThread.Join();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
});
|
||||
|
||||
@@ -90,5 +151,13 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?from=productList&productId=" + prodId;
|
||||
return KJDHttpResponse.PostResponse(shop, url, body, refere);
|
||||
}
|
||||
|
||||
private string SizeSpecQuery(ShopLoginInfo shop, string prodId, string sizeSpecId)
|
||||
{
|
||||
string url = "https://seller.kuajingmaihuo.com/bg-anniston-mms/sizespec/query";
|
||||
string body = @"{""businessId"":17593513382470,""reusable"":false}";
|
||||
string refere = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?from=productList&productId=" + prodId;
|
||||
return KJDHttpResponse.PostResponse(shop, url, body, refere);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
|
||||
namespace TemuKJD.KJDForms.ProductForms
|
||||
{
|
||||
partial class ProductSelectForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ProductSelectForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(883, 565);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Name = "ProductSelectForm";
|
||||
this.Text = "选品管理";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TemuKJD.KJDForms.ProductForms
|
||||
{
|
||||
public partial class ProductSelectForm : Form
|
||||
{
|
||||
public ProductSelectForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -37,7 +37,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
if (BaseClass.GroupId == 3)
|
||||
{
|
||||
hideName.Remove("用户管理");
|
||||
if (BaseClass.UserName == "18888888888" || BaseClass.UserName == "15333333333")
|
||||
if (BaseClass.IsSa/*BaseClass.UserName == "18888888888" || BaseClass.UserName == "15333333333"*/)
|
||||
{
|
||||
hideName.Remove("超级用户管理");
|
||||
hideName.Remove("超级店铺管理");
|
||||
|
||||
@@ -85,6 +85,11 @@ prefixTextPara,;shopthreadCountPara,3;singeThreadCountPara,1;singleUploadPara,50
|
||||
offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;noNeerDaysPara,3;limitReplacePara,true;replaceCountPara,3;errorDownPara,false;apiPara,false";
|
||||
CheckXmlValue(checkvalue, ConfigFilePach);
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
if (Directory.Exists(System.Environment.CurrentDirectory + "\\data1"))
|
||||
Directory.Delete(System.Environment.CurrentDirectory + "\\data1", true);
|
||||
});
|
||||
//Task.Run(() => { Update(); InitProgress(1); });
|
||||
Task.Run(() => { CheckUpdate(); InitProgress(1); });
|
||||
Task.Run(() => { GetAuthConfig(); InitProgress(1); });
|
||||
@@ -94,6 +99,8 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
|
||||
Task.Run(() => { new PinduoduoCatList().Get(); InitProgress(1); });
|
||||
Task.Run(() => { GetMacCode(); InitProgress(1); });
|
||||
#if DEBUG
|
||||
if (!File.Exists(System.Environment.CurrentDirectory + "\\TemuKJD.exe.choice.debug.tools"))
|
||||
Task.Run(() => { new CheckHecker().Check(); InitProgress(1); }); // 防止破解
|
||||
#else
|
||||
Task.Run(() => { new CheckHecker().Check(); InitProgress(1); }); // 防止破解
|
||||
#endif
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace Work
|
||||
BaseClass.UserKey = BaseRegex.GetStringJson(ref html, "user_key").ParseToInt();
|
||||
BaseClass.NickName = BaseRegex.GetStringJson(ref html, "nick_name");
|
||||
BaseClass.UserName = BaseRegex.GetStringJson(ref html, "user_name");
|
||||
BaseClass.IsSa = BaseRegex.GetIntJson(ref html, "is_sa") == 1;
|
||||
BaseClass.Mobile = BaseRegex.GetStringJson(ref html, "mobile");
|
||||
BaseClass.UserVersion = BaseRegex.GetStringJson(ref html, "version").ParseToInt();
|
||||
BaseClass.UserVersionString = BaseRegex.GetStringJson(ref html, "version_s");
|
||||
|
||||
Reference in new issue
Block a user