模拟提交商品,测试最多能传50件左右就会出限制
This commit is contained in:
1 parent
6639224771
commit
6509233208
37 files changed
+2576
-450
No files matched your search
@@ -796,6 +796,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
this.colImportCookies.ReadOnly = true;
|
||||
this.colImportCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colImportCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
this.colImportCookies.Visible = false;
|
||||
//
|
||||
// colCopyCookies
|
||||
//
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
|
||||
this.splitContainer1.SplitterDistance = 675;
|
||||
this.splitContainer1.SplitterDistance = 676;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 4;
|
||||
//
|
||||
@@ -102,6 +102,7 @@
|
||||
this.btnReturnPackage.TabIndex = 463;
|
||||
this.btnReturnPackage.Text = "提交退货到库存管理";
|
||||
this.btnReturnPackage.UseVisualStyleBackColor = false;
|
||||
this.btnReturnPackage.Visible = false;
|
||||
this.btnReturnPackage.Click += new System.EventHandler(this.btnReturnPackage_Click);
|
||||
//
|
||||
// btnLoginAgain
|
||||
@@ -356,8 +357,8 @@
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "PDDAdminShopLoginForm";
|
||||
this.ShowMaximizeBox = true;
|
||||
this.Text = "店铺登录";
|
||||
this.TitleText = "店铺登录";
|
||||
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);
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
UserName = shop.UserName,
|
||||
Notes = shop.Notes,
|
||||
Cookies = cookies,
|
||||
AntiContents = new List<string> { sc.AntiContent },
|
||||
AntiContents = new NaiBa.Util.ConcurrentList<string> { sc.AntiContent },
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(shop.Cookies)) // 有cookie的认为是已登录过的
|
||||
@@ -179,11 +179,12 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
}
|
||||
else
|
||||
{
|
||||
shop.AntiContents = newShop.AntiContents;
|
||||
var urlAddress = BaseClass.BuildObjString("shop/mdy_anti_content");
|
||||
var data = UserLogin.GetSignaturex()
|
||||
+ "&login_name=" + shop.LoginName
|
||||
+ "&shop_id=" + shop.ShopId
|
||||
+ "&anti_contents=" + JsonHelper.SerializeObject(shop.AntiContents);
|
||||
+ "&anti_contents=" + JsonHelper.SerializeObject(newShop.AntiContents);
|
||||
var result = GetHtml.PostUtf8(urlAddress, data);
|
||||
}
|
||||
}
|
||||
@@ -485,7 +486,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
|
||||
}
|
||||
|
||||
int GetAntiContentsTimes = 0;
|
||||
int GetAntiContentsTimes = 40;
|
||||
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
|
||||
{
|
||||
var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : "";
|
||||
@@ -493,9 +494,9 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
{
|
||||
GetAntiContentsTimes++;
|
||||
shop.AntiContents.Add(antiContent);
|
||||
while (shop.AntiContents.Count > 10)
|
||||
while (shop.AntiContents.Count > 50)
|
||||
shop.AntiContents.RemoveAt(0);
|
||||
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 5)
|
||||
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 50)
|
||||
{
|
||||
GetAntiContentsTimes = 0;
|
||||
var antis = shop.AntiContents;
|
||||
@@ -512,7 +513,23 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
}
|
||||
Task.Run(() =>
|
||||
{
|
||||
//var data = responseData;
|
||||
var data = responseData;
|
||||
if (data.Contains("\"validate_message\""))
|
||||
{
|
||||
|
||||
}
|
||||
if (data.Contains("out_goods_sn"))
|
||||
{
|
||||
|
||||
}
|
||||
if (data.Contains("手指涂胶手套") || data.Contains("\\u624b\\u5957"))
|
||||
{
|
||||
|
||||
}
|
||||
if (data.Contains("劳保手套橡胶手套防护手套工地防护工地手套"))
|
||||
{
|
||||
|
||||
}
|
||||
//if (data.Contains("supplierId") && data.Contains("\"success\":true"))
|
||||
//{
|
||||
// var supplierIds = BaseRegex.GetMatchRegex(ref data, "\"supplierId\":\\d{5,20}");
|
||||
@@ -561,7 +578,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
}
|
||||
if (currentUrl.StartsWith("https://mms.pinduoduo.com/goods/goods_list"))
|
||||
{
|
||||
Task.Run(() => {
|
||||
//Task.Run(() => {
|
||||
string sAddInputJs = @"
|
||||
document.addEventListener('wheel', function(event) {
|
||||
// 检查滚动方向
|
||||
@@ -596,7 +613,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
}
|
||||
}";
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs);
|
||||
});
|
||||
//});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user