其他平台买手拍单发送功能 店铺筛选功能逻辑优化
This commit is contained in:
1 parent
2dece676c1
commit
aa45b35145
46 files changed
+4038
-2223
No files matched your search
@@ -185,7 +185,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
while (tList.Where(ta => !ta.IsFaulted && !ta.IsCompleted).Count() >= 20) { Thread.Sleep(100); }
|
||||
}
|
||||
while (tList.Where(ta => !ta.IsFaulted && !ta.IsCompleted).Count() >= 1) { Thread.Sleep(100); }
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig( "wx_shop_auth_list", lstShopAuthInfo);
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_shop_auth_list", lstShopAuthInfo);
|
||||
Invoke(new Action(() => { pbLoadingShop.Visible = false; }));
|
||||
});
|
||||
}
|
||||
|
||||
+99
-31
@@ -30,12 +30,12 @@ namespace TemuKJD.ToolForms
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucTabControlMetro1 = new TemuKJD.UserControls.UcTabControlMetro();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
@@ -63,6 +63,9 @@ namespace TemuKJD.ToolForms
|
||||
this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnDel = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtRetryTimes = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.chkKeepOldData = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.btnClear = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
@@ -88,6 +91,7 @@ namespace TemuKJD.ToolForms
|
||||
this.btnSaveCookie = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnImportCookie = new DevComponents.DotNetBar.PanelEx();
|
||||
this.line1 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.btnReload = new DevComponents.DotNetBar.PanelEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -121,6 +125,10 @@ namespace TemuKJD.ToolForms
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label6);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.txtRetryTimes);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label5);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.chkKeepOldData);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnClear);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label2);
|
||||
@@ -256,20 +264,20 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.dgvProduct.AllowUserToAddRows = false;
|
||||
this.dgvProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvProduct.AutoRowNumber = true;
|
||||
this.dgvProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
@@ -345,8 +353,8 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
// colGoodsName
|
||||
//
|
||||
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle9;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.colGoodsName.HeaderText = "商品名称";
|
||||
this.colGoodsName.Name = "colGoodsName";
|
||||
this.colGoodsName.ReadOnly = true;
|
||||
@@ -367,8 +375,8 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
// colCate
|
||||
//
|
||||
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colCate.DefaultCellStyle = dataGridViewCellStyle10;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colCate.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.colCate.FillWeight = 80F;
|
||||
this.colCate.HeaderText = "类目";
|
||||
this.colCate.Name = "colCate";
|
||||
@@ -377,8 +385,8 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
// colPrice
|
||||
//
|
||||
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colPrice.DefaultCellStyle = dataGridViewCellStyle11;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colPrice.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.colPrice.FillWeight = 70F;
|
||||
this.colPrice.HeaderText = "价格";
|
||||
this.colPrice.Name = "colPrice";
|
||||
@@ -393,8 +401,8 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
// colMsg
|
||||
//
|
||||
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colMsg.DefaultCellStyle = dataGridViewCellStyle12;
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colMsg.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.colMsg.FillWeight = 190F;
|
||||
this.colMsg.HeaderText = "操作结果";
|
||||
this.colMsg.Name = "colMsg";
|
||||
@@ -472,13 +480,46 @@ namespace TemuKJD.ToolForms
|
||||
this.btnDel.TabIndex = 409;
|
||||
this.btnDel.Text = "删";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(1377, 8);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(20, 17);
|
||||
this.label6.TabIndex = 1223;
|
||||
this.label6.Text = "次";
|
||||
//
|
||||
// txtRetryTimes
|
||||
//
|
||||
this.txtRetryTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtRetryTimes.Location = new System.Drawing.Point(1345, 5);
|
||||
this.txtRetryTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtRetryTimes.Name = "txtRetryTimes";
|
||||
this.txtRetryTimes.Size = new System.Drawing.Size(32, 23);
|
||||
this.txtRetryTimes.TabIndex = 1222;
|
||||
this.txtRetryTimes.Text = "50";
|
||||
this.txtRetryTimes.TextChanged += new System.EventHandler(this.txtRetryTimes_TextChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(1193, 8);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(152, 17);
|
||||
this.label5.TabIndex = 1221;
|
||||
this.label5.Text = "下一页查询失败后重试次数";
|
||||
//
|
||||
// chkKeepOldData
|
||||
//
|
||||
this.chkKeepOldData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chkKeepOldData.AutoSize = true;
|
||||
this.chkKeepOldData.Checked = true;
|
||||
this.chkKeepOldData.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkKeepOldData.Location = new System.Drawing.Point(1163, 26);
|
||||
this.chkKeepOldData.Location = new System.Drawing.Point(1163, 31);
|
||||
this.chkKeepOldData.Name = "chkKeepOldData";
|
||||
this.chkKeepOldData.Size = new System.Drawing.Size(123, 21);
|
||||
this.chkKeepOldData.TabIndex = 1196;
|
||||
@@ -607,7 +648,7 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(1289, 28);
|
||||
this.label7.Location = new System.Drawing.Point(1289, 33);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(56, 17);
|
||||
@@ -617,7 +658,7 @@ namespace TemuKJD.ToolForms
|
||||
// txtWaitSeconds
|
||||
//
|
||||
this.txtWaitSeconds.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtWaitSeconds.Location = new System.Drawing.Point(1345, 25);
|
||||
this.txtWaitSeconds.Location = new System.Drawing.Point(1345, 30);
|
||||
this.txtWaitSeconds.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtWaitSeconds.Name = "txtWaitSeconds";
|
||||
this.txtWaitSeconds.Size = new System.Drawing.Size(32, 23);
|
||||
@@ -629,7 +670,7 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(1377, 28);
|
||||
this.label8.Location = new System.Drawing.Point(1377, 33);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(20, 17);
|
||||
@@ -643,7 +684,6 @@ namespace TemuKJD.ToolForms
|
||||
this.txtTitle.Name = "txtTitle";
|
||||
this.txtTitle.Size = new System.Drawing.Size(202, 23);
|
||||
this.txtTitle.TabIndex = 968;
|
||||
this.txtTitle.Visible = false;
|
||||
//
|
||||
// btnSearchTitle
|
||||
//
|
||||
@@ -668,7 +708,6 @@ namespace TemuKJD.ToolForms
|
||||
this.btnSearchTitle.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSearchTitle.TabIndex = 967;
|
||||
this.btnSearchTitle.Text = "搜索标题";
|
||||
this.btnSearchTitle.Visible = false;
|
||||
this.btnSearchTitle.Click += new System.EventHandler(this.btnSearchTitle_Click);
|
||||
//
|
||||
// btnStopStop
|
||||
@@ -790,7 +829,7 @@ namespace TemuKJD.ToolForms
|
||||
this.txtCookie.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.txtCookie.Multiline = true;
|
||||
this.txtCookie.Name = "txtCookie";
|
||||
this.txtCookie.Size = new System.Drawing.Size(145, 78);
|
||||
this.txtCookie.Size = new System.Drawing.Size(145, 51);
|
||||
this.txtCookie.TabIndex = 766;
|
||||
this.txtCookie.Text = "填写cookie后点击导入cookie并刷新";
|
||||
//
|
||||
@@ -855,6 +894,31 @@ namespace TemuKJD.ToolForms
|
||||
this.line1.Text = "line1";
|
||||
this.line1.VerticalLine = true;
|
||||
//
|
||||
// btnReload
|
||||
//
|
||||
this.btnReload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnReload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnReload.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnReload.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnReload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnReload.Location = new System.Drawing.Point(77, 57);
|
||||
this.btnReload.Name = "btnReload";
|
||||
this.btnReload.Size = new System.Drawing.Size(72, 25);
|
||||
this.btnReload.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnReload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnReload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnReload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnReload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnReload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnReload.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnReload.Style.GradientAngle = 90;
|
||||
this.btnReload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnReload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnReload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnReload.TabIndex = 1251;
|
||||
this.btnReload.Text = "重新登录";
|
||||
this.btnReload.Click += new System.EventHandler(this.btnReload_Click);
|
||||
//
|
||||
// WXSaleAssistantForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -937,5 +1001,9 @@ namespace TemuKJD.ToolForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
|
||||
private DevComponents.DotNetBar.PanelEx btnClear;
|
||||
private UserComponent.UcCheckBox chkKeepOldData;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox txtRetryTimes;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private DevComponents.DotNetBar.PanelEx btnReload;
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,7 @@ namespace TemuKJD.ToolForms
|
||||
int filterMonthSaleCount = 100;
|
||||
int filterTotalSaleCount = 500;
|
||||
int searchPageCount = 0;
|
||||
int noNextPageRetryTimes = 50;
|
||||
|
||||
public WXSaleAssistantForm()
|
||||
{
|
||||
@@ -425,6 +426,8 @@ namespace TemuKJD.ToolForms
|
||||
pbLoading.Visible = true;
|
||||
Task.Run(() =>
|
||||
{
|
||||
var rowLst = dgvProduct.Rows.Cast<DataGridViewRow>().ToList();
|
||||
rowLst.Reverse();
|
||||
foreach (DataGridViewRow row in dgvProduct.Rows)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -559,7 +562,7 @@ namespace TemuKJD.ToolForms
|
||||
var cookieShop = new ShopLoginInfo();
|
||||
cookieShop.Cookies = JsonHelper.SerializeObject(cookieList);
|
||||
getSpuItemsParams["pageContext"]["pageContext"] = pageContext;
|
||||
getSpuItemsParams["requestContext"]["requestId"] = requestId;
|
||||
getSpuItemsParams["requestContext"]["requestId"] = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now).ToString(); // requestId;
|
||||
foreach (var item in spuItemsBase)
|
||||
{
|
||||
JObject jObjDisplaySpu = new JObject();
|
||||
@@ -569,8 +572,9 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
//{"code":0,"pageContextResp":{"hasNext":false},"requestId":"1778688044492"}
|
||||
int errorCnt = 0;
|
||||
int nomoreCnt = 0;
|
||||
var spuItemsData = GetAssistant.wxGetAssistant(cookieShop, getSpuItemsParams);
|
||||
for (int i = 1; i <= 50; i++) // 重试50次
|
||||
for (int i = 1; i <= noNextPageRetryTimes; i++) // 重试50次
|
||||
{
|
||||
if (!spuItemsData.Contains("\"code\":0") || spuItemsData.Contains("\"hasNext\":false"))
|
||||
{
|
||||
@@ -579,6 +583,28 @@ namespace TemuKJD.ToolForms
|
||||
if (errorCnt > 5)
|
||||
break;
|
||||
|
||||
if (spuItemsData.Contains("\"hasNext\":false"))
|
||||
nomoreCnt++;
|
||||
|
||||
if (nomoreCnt > 7)
|
||||
{
|
||||
}
|
||||
else if (nomoreCnt > 6)
|
||||
{
|
||||
}
|
||||
else if (nomoreCnt > 5)
|
||||
{
|
||||
}
|
||||
else if (nomoreCnt > 4)
|
||||
{
|
||||
}
|
||||
else if (nomoreCnt > 3)
|
||||
{
|
||||
}
|
||||
else if (nomoreCnt > 2)
|
||||
{
|
||||
}
|
||||
|
||||
sleepTime = (int)(getDetailWaitSeconds * 1000) - 100 + Randomx.GetId(101, 501);
|
||||
Thread.Sleep(Math.Max(100, sleepTime));
|
||||
|
||||
@@ -586,8 +612,8 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
if (i % 10 == 0 && spuItemsData.Contains("\"hasNext\":false"))
|
||||
{
|
||||
if (BaseMsgForm.ShowConfirm("已连续" + i + "次未查询到下一页商品,是否继续?").DialogResult != DialogResult.OK)
|
||||
break;
|
||||
//if (BaseMsgForm.ShowConfirm("已连续" + i + "次未查询到下一页商品,是否继续?").DialogResult != DialogResult.OK)
|
||||
// break;
|
||||
}
|
||||
}
|
||||
if (!spuItemsData.Contains("\"code\":0"))
|
||||
@@ -671,6 +697,17 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_sale_assistant_list_" + MainForm.ProcessCount, lstWxSaleAssistantSpuItemInfo);
|
||||
}
|
||||
|
||||
private void txtRetryTimes_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
noNextPageRetryTimes = Math.Max(20, txtRetryTimes.Text.ParseToInt());
|
||||
}
|
||||
|
||||
private void btnReload_Click(object sender, EventArgs e)
|
||||
{
|
||||
CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null));
|
||||
cefWebBrowser.Load(InitUrl);
|
||||
}
|
||||
}
|
||||
|
||||
public class WXSaleAssistantSpuItemInfo
|
||||
|
||||
Reference in new issue
Block a user