Merge branch 'master' of github.com:jtt-fan/KJD

This commit is contained in:
chfei committed 2026-09-21 11:08:59 +08:00
commit d9dd4dfaed
15 files changed
+270 -19

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@
<ErrorReportUrlHistory />
<FallbackCulture>zh-CN</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
<ActiveDebugProfile>Development</ActiveDebugProfile>
<ActiveDebugProfile>Production</ActiveDebugProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+22 -4
View File
@@ -311,8 +311,8 @@ namespace TemuKJD
Task.Run(()=>
{
ReadWxCate();
//ReadWxCateBound();
ReadWxCateBound60323();
//ReadWxCateBound();
ReadWxCateBound60921();
ReadPddCate();
while(!StartUp.IsShopInit)
@@ -332,7 +332,7 @@ namespace TemuKJD
void ReadWxCate()
{
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60808");
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat60920");
if (!File.Exists(filePath))
return;
using (StreamReader sr = new StreamReader(filePath, System.Text.Encoding.UTF8))
@@ -472,7 +472,25 @@ namespace TemuKJD
GlobalConfig.WxCatBoundList = new ConcurrentList<WxCatBoundInfo>();
}
public void SetTitle()
void ReadWxCateBound60921()
{
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound60921");
if (!File.Exists(filePath))
return;
try
{
var catTxt = FileBase.ReadAllText(filePath, System.Text.Encoding.UTF8);
GlobalConfig.WxCatBoundList = [.. JsonHelper.DeserializeJsonToList<WxCatBoundInfo>(catTxt)];
}
catch (Exception ex)
{
BaseMsgForm.ShowError("类目价格获取失败:" + ex.Message);
}
if (GlobalConfig.WxCatBoundList == null)
GlobalConfig.WxCatBoundList = new ConcurrentList<WxCatBoundInfo>();
}
public void SetTitle()
{
lblVersionInfo.Text = BaseClass.ToolName + " V" + BaseClass.Varsion + " - " + BaseClass.NickName;
lblVersionInfo.ForeColor = GlobalConfig.MainColorLight;
@@ -1714,7 +1714,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.panelEx1.TabIndex = 787;
this.panelEx1.Text = "类目保证金转换";
this.panelEx1.Visible = false;
this.panelEx1.Click += new System.EventHandler(this.btnCatBound_Click);
//
// btnGetAllCate
@@ -1739,7 +1738,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.btnGetAllCate.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnGetAllCate.TabIndex = 777;
this.btnGetAllCate.Text = "取微信全类目";
this.btnGetAllCate.Visible = false;
this.btnGetAllCate.Click += new System.EventHandler(this.btnGetAllCate_Click);
//
// pnlEditExtCodePrice
@@ -2230,6 +2228,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
this.ucSplitPage1.IsShowTotalCount = false;
this.ucSplitPage1.Location = new System.Drawing.Point(985, 0);
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
this.ucSplitPage1.MaxPageSizeValue = 5000;
this.ucSplitPage1.Name = "ucSplitPage1";
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
this.ucSplitPage1.PageSize = 100;
@@ -2710,8 +2710,51 @@ namespace TemuKJD.PDDForms.ProductSelectForms
private void btnCatBound_Click(object sender, EventArgs e)
{
List<WxCatBoundInfo> WxCatBoundInfolst = new List<WxCatBoundInfo>();
foreach (var cat in GlobalConfig.WxCatList)
{
var index = GlobalConfig.WxCatList.IndexOf(cat);
if (cat.leaf)
{
var url1 = BaseClass.BuildWXObjString("product/Wx_api_get_wx_cate_bound");
var data1 = UserLogin.GetSignaturex();
data1 += "&token=" + new WxApiBLL().GetRandomWxToken().accessToken;
data1 += "&cat_id=" + cat.cat_id;
var html1 = GetHtml.PostUtf8(url1, data1);
while (string.IsNullOrEmpty(html1) || BaseRegex.GetIntJson(ref html1, "deposit").IsNullOrZero())
{
Thread.Sleep(100);
data1 = UserLogin.GetSignaturex();
//data1 += "&token=" + GlobalConfig.WxGlobalTokenList.OrderBy(x => Guid.NewGuid()).FirstOrDefault()?.accessToken;
data1 += "&token=" + new WxApiBLL().GetRandomWxToken().accessToken;
data1 += "&cat_id=" + cat.cat_id;
html1 = GetHtml.PostUtf8(url1, data1);
}
}
WxCatBoundInfo wxCatBoundInfo = new WxCatBoundInfo();
wxCatBoundInfo.leaf_id = cat.cat_id.ParseToLong();
wxCatBoundInfo.full_cat_name = cat.name;
wxCatBoundInfo.leaf_name = cat.name;
wxCatBoundInfo.cat_bound = BaseRegex.GetIntJson(ref html1, "deposit") / 100;
var parentCat = cat;
while (!parentCat.f_cat_id.ParseToLong().IsNullOrZero())
{
parentCat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == parentCat.f_cat_id);
if (parentCat == null)
break;
wxCatBoundInfo.full_cat_name = parentCat.name + "/" + wxCatBoundInfo.full_cat_name;
}
if (wxCatBoundInfo.cat_bound > 0)
WxCatBoundInfolst.Add(wxCatBoundInfo);
}
}
var catBoundStr = JsonHelper.SerializeObject(WxCatBoundInfolst);
}
private void btnExportIdImg_Click(object sender, EventArgs e)
{