1删除部分不需要的文件 2货号对应原价导入功能

This commit is contained in:
wule committed 2025-08-14 18:02:28 +08:00
1 parent 0492e87aee
commit 535adc6011
166 files changed
+2091 -55519

No files matched your search

+4 -54
View File
@@ -986,57 +986,7 @@ namespace TemuKJD
Thread.Sleep(500);
}
}
foreach (var shop in GlobalConfig.ShopLoginList)
{
if (shop.LoginStatus != "登录成功")
continue;
var cookie = shop.Cookies == null ? "" : shop.Cookies;
CEFBrowser.DeleteCookie(webBrowser.RequestContext.GetCookieManager(null));
var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, webBrowser.RequestContext.GetCookieManager(null));
t.Wait(2000);
webBrowser.Load("https://fxg.jinritemai.com/ffa/grs/health-center/manage");
while (webBrowser.IsLoading)
{
Thread.Sleep(500);
}
Thread.Sleep(5000);
var jsStr = CommissionForm.clickJsElementStr +
"function clickProduct() {\r\n" +
" var elem = getElement('商品类', document.body);\r\n" +
" if (elem) elem.click(); return 'success';\r\n" +
" return 'no_element';\r\n" +
"}\r\n" +
"clickProduct();\r\n";
var t1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
t1.Wait();
Thread.Sleep(10000);
// 读取过全部违规数据的不再读取
if (dicLastGetFullViolateTime.ContainsKey(shop.ShopId) && dicLastGetFullViolateTime[shop.ShopId] > DateTime.Now.AddDays(-3000))
continue;
for (int i = 2; i < 101; i++)
{
//jsStr = "ant-pagination-item ant-pagination-item-2";
jsStr = "function clickPage(p) {\r\n" +
" if (document.body.innerHTML.indexOf('ant-pagination-item ant-pagination-item-' + p) === -1) return 'no_element';\r\n" +
" var elem = document.getElementsByClassName('ant-pagination-item ant-pagination-item-' + p)[0];\r\n" +
" if (elem) elem.click(); return 'success';\r\n" +
" return 'no_element';\r\n" +
"}\r\n" +
"clickPage(" + i + ");\r\n";
t1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
t1.Wait(1000);
Thread.Sleep(10000);
if (t1.Result.Result?.ToString() != "success")
break;
}
dicLastGetFullViolateTime[shop.ShopId] = DateTime.Now;
NaiBa.Util.Helper.ConfigHelper.SaveConfig<Dictionary<string, DateTime>>("last_get_full_violate_time", dicLastGetFullViolateTime);
}
// 加载一个cef以在后台完成某些任务(原后台违规获取现在作废删除)
}
Dictionary<string, DateTime> dicLastGetFullViolateTime = new Dictionary<string, DateTime>();
@@ -1074,12 +1024,12 @@ namespace TemuKJD
if (!ViolateRuleParam.LstViolateRuleName.Contains(violateInfo?.rule_name?.Trim()))
{
ViolateManageForm.UpdateViolateRuleNameList(violateInfo);
//ViolateManageForm.UpdateViolateRuleNameList(violateInfo);
}
if (string.IsNullOrEmpty(violateInfo.up_product_id))
{
// 获取违规商品的上家ID
ViolateManageForm.GetViolateUpId(violateInfo);
//ViolateManageForm.GetViolateUpId(violateInfo);
}
if (violateInfo.up_product_id_number > 0)
violateListTemp.Add(violateInfo);
@@ -1088,7 +1038,7 @@ namespace TemuKJD
foreach (var violateInfo in violateListTemp)
{
// 将上家商品违规信息保存到服务端
ViolateManageForm.AddViolateToServer(violateInfo);
//ViolateManageForm.AddViolateToServer(violateInfo);
}
if (violateList.Count > 0)
{