微信类目获取

This commit is contained in:
wule committed 2026-01-26 22:33:05 +08:00
1 parent c2c4c8da1a
commit ddc5f6490f
24 files changed
+1082 -268

No files matched your search

+27
View File
@@ -46,6 +46,7 @@ using TemuKJD.KJDForms.JITForms;
using TemuKJD.WXForms.ShopForms;
using TemuKJD.WXForms.AdminForms;
using TemuKJD.WXForms.ProductForms;
using AllBase.Model.Result.WXResult;
namespace TemuKJD
{
@@ -303,6 +304,32 @@ namespace TemuKJD
//ViolateManageForm.GetAllViolateRuleName();
//GetShopViolation();
//});
Task.Run(()=>
{
ReadWxCate();
});
}
void ReadWxCate()
{
string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCat");
if (!File.Exists(filePath))
return;
using (StreamReader sr = new StreamReader(filePath, System.Text.Encoding.UTF8))
{
try
{
string cateStr = sr.ReadToEnd().Trim();
GlobalConfig.WxCatList.AddRange(JsonHelper.DeserializeJsonToList<WxCatInfo>(cateStr));
}
catch (Exception ex)
{
BaseMsgForm.ShowError("商品列表获取失败:" + ex.Message);
}
if (GlobalConfig.WxCatList == null)
GlobalConfig.WxCatList = new ConcurrentList<WxCatInfo>();
}
}
public void SetTitle()