聚水潭商品采集未完善的逻辑优化
This commit is contained in:
1 parent
ce42448b29
commit
3db584fe1e
7 files changed
+510
-175
No files matched your search
+93
-22
@@ -98,6 +98,9 @@ namespace TemuKJD.ToolForms
|
||||
this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnDel = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.txtWaitSeconds = new System.Windows.Forms.TextBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.btnGetHotGood = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnCancelSelect = new DevComponents.DotNetBar.PanelEx();
|
||||
this.txtTitle = new System.Windows.Forms.TextBox();
|
||||
@@ -124,6 +127,7 @@ namespace TemuKJD.ToolForms
|
||||
this.btnSaveCookie = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnImportCookie = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.btnExportCookie = new DevComponents.DotNetBar.PanelEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
@@ -160,7 +164,7 @@ namespace TemuKJD.ToolForms
|
||||
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1390, 433);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1390, 435);
|
||||
this.splitContainer2.SplitterDistance = 26;
|
||||
this.splitContainer2.TabIndex = 6;
|
||||
//
|
||||
@@ -199,7 +203,7 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(673, 193);
|
||||
this.pbLoading.Location = new System.Drawing.Point(673, 194);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
@@ -245,7 +249,7 @@ namespace TemuKJD.ToolForms
|
||||
this.dgvProduct.Name = "dgvProduct";
|
||||
this.dgvProduct.ReadOnly = true;
|
||||
this.dgvProduct.RowTemplate.Height = 23;
|
||||
this.dgvProduct.Size = new System.Drawing.Size(1390, 432);
|
||||
this.dgvProduct.Size = new System.Drawing.Size(1390, 434);
|
||||
this.dgvProduct.TabIndex = 7;
|
||||
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
|
||||
//
|
||||
@@ -371,6 +375,10 @@ namespace TemuKJD.ToolForms
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnExportCookie);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label7);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.txtWaitSeconds);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label8);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnGetHotGood);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnCancelSelect);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.txtTitle);
|
||||
@@ -389,7 +397,6 @@ namespace TemuKJD.ToolForms
|
||||
this.splitContainer1.Panel2.Controls.Add(this.txtPageStart);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label3);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnCollectSupplier);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.line1);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.txtSupplierName);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.txtFilterSaleCount);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnRefreshCookie);
|
||||
@@ -397,8 +404,9 @@ namespace TemuKJD.ToolForms
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnSaveCookie);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnImportCookie);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label2);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.line1);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1404, 561);
|
||||
this.splitContainer1.SplitterDistance = 469;
|
||||
this.splitContainer1.SplitterDistance = 471;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 4;
|
||||
//
|
||||
@@ -414,7 +422,7 @@ namespace TemuKJD.ToolForms
|
||||
this.ucTabControlMetro1.Name = "ucTabControlMetro1";
|
||||
this.ucTabControlMetro1.SelectedIndex = 0;
|
||||
this.ucTabControlMetro1.ShowCloseButton = false;
|
||||
this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 469);
|
||||
this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 471);
|
||||
this.ucTabControlMetro1.TabIndex = 462;
|
||||
this.ucTabControlMetro1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucTabControlMetro1.TabSelectTextColor = System.Drawing.Color.Gray;
|
||||
@@ -426,7 +434,7 @@ namespace TemuKJD.ToolForms
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(1396, 439);
|
||||
this.tabPage1.Size = new System.Drawing.Size(1396, 441);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "商品页面";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
@@ -438,7 +446,7 @@ namespace TemuKJD.ToolForms
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(1396, 438);
|
||||
this.tabPage2.Size = new System.Drawing.Size(1396, 440);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "采集列表";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
@@ -448,7 +456,7 @@ namespace TemuKJD.ToolForms
|
||||
this.tabPage3.Controls.Add(this.splitContainer3);
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Size = new System.Drawing.Size(1396, 438);
|
||||
this.tabPage3.Size = new System.Drawing.Size(1396, 440);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "下架SKU查询";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
@@ -480,7 +488,7 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.splitContainer3.Panel2.Controls.Add(this.pictureBox1);
|
||||
this.splitContainer3.Panel2.Controls.Add(this.dgvDownSku);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(1396, 438);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(1396, 440);
|
||||
this.splitContainer3.SplitterDistance = 82;
|
||||
this.splitContainer3.TabIndex = 0;
|
||||
//
|
||||
@@ -638,7 +646,7 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pictureBox1.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(673, 151);
|
||||
this.pictureBox1.Location = new System.Drawing.Point(673, 152);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(50, 50);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
@@ -686,7 +694,7 @@ namespace TemuKJD.ToolForms
|
||||
this.dgvDownSku.Name = "dgvDownSku";
|
||||
this.dgvDownSku.ReadOnly = true;
|
||||
this.dgvDownSku.RowTemplate.Height = 23;
|
||||
this.dgvDownSku.Size = new System.Drawing.Size(1396, 352);
|
||||
this.dgvDownSku.Size = new System.Drawing.Size(1396, 354);
|
||||
this.dgvDownSku.TabIndex = 8;
|
||||
//
|
||||
// colDownSelect
|
||||
@@ -877,6 +885,39 @@ namespace TemuKJD.ToolForms
|
||||
this.btnDel.TabIndex = 409;
|
||||
this.btnDel.Text = "删";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
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(952, 35);
|
||||
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);
|
||||
this.label7.TabIndex = 1027;
|
||||
this.label7.Text = "额外等待";
|
||||
//
|
||||
// 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(1008, 32);
|
||||
this.txtWaitSeconds.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtWaitSeconds.Name = "txtWaitSeconds";
|
||||
this.txtWaitSeconds.Size = new System.Drawing.Size(24, 23);
|
||||
this.txtWaitSeconds.TabIndex = 1028;
|
||||
this.txtWaitSeconds.Text = "1";
|
||||
this.txtWaitSeconds.TextChanged += new System.EventHandler(this.txtWaitSeconds_TextChanged);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
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(1032, 35);
|
||||
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);
|
||||
this.label8.TabIndex = 1029;
|
||||
this.label8.Text = "秒";
|
||||
//
|
||||
// btnGetHotGood
|
||||
//
|
||||
this.btnGetHotGood.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -972,6 +1013,7 @@ namespace TemuKJD.ToolForms
|
||||
this.chkSkip.TabIndex = 942;
|
||||
this.chkSkip.Text = "采集时跳过库中已存在商品";
|
||||
this.chkSkip.UseVisualStyleBackColor = true;
|
||||
this.chkSkip.CheckedChanged += new System.EventHandler(this.chkSkip_CheckedChanged);
|
||||
//
|
||||
// chkOverride
|
||||
//
|
||||
@@ -1181,9 +1223,9 @@ namespace TemuKJD.ToolForms
|
||||
//
|
||||
this.line1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.line1.ForeColor = System.Drawing.SystemColors.AppWorkspace;
|
||||
this.line1.Location = new System.Drawing.Point(296, 7);
|
||||
this.line1.Location = new System.Drawing.Point(298, 7);
|
||||
this.line1.Name = "line1";
|
||||
this.line1.Size = new System.Drawing.Size(25, 74);
|
||||
this.line1.Size = new System.Drawing.Size(20, 74);
|
||||
this.line1.TabIndex = 790;
|
||||
this.line1.Text = "line1";
|
||||
this.line1.VerticalLine = true;
|
||||
@@ -1214,9 +1256,9 @@ namespace TemuKJD.ToolForms
|
||||
this.btnRefreshCookie.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRefreshCookie.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnRefreshCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnRefreshCookie.Location = new System.Drawing.Point(171, 57);
|
||||
this.btnRefreshCookie.Location = new System.Drawing.Point(153, 57);
|
||||
this.btnRefreshCookie.Name = "btnRefreshCookie";
|
||||
this.btnRefreshCookie.Size = new System.Drawing.Size(125, 25);
|
||||
this.btnRefreshCookie.Size = new System.Drawing.Size(72, 25);
|
||||
this.btnRefreshCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnRefreshCookie.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnRefreshCookie.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -1229,7 +1271,7 @@ namespace TemuKJD.ToolForms
|
||||
this.btnRefreshCookie.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnRefreshCookie.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnRefreshCookie.TabIndex = 776;
|
||||
this.btnRefreshCookie.Text = "更新网页cookie";
|
||||
this.btnRefreshCookie.Text = "刷新cookie";
|
||||
this.btnRefreshCookie.Click += new System.EventHandler(this.btnRefreshCookie_Click);
|
||||
//
|
||||
// txtCookie
|
||||
@@ -1240,7 +1282,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(164, 78);
|
||||
this.txtCookie.Size = new System.Drawing.Size(145, 78);
|
||||
this.txtCookie.TabIndex = 766;
|
||||
this.txtCookie.Text = "填写cookie后点击导入cookie并刷新";
|
||||
//
|
||||
@@ -1251,9 +1293,9 @@ namespace TemuKJD.ToolForms
|
||||
this.btnSaveCookie.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSaveCookie.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSaveCookie.Font = new System.Drawing.Font("微软雅黑", 8F);
|
||||
this.btnSaveCookie.Location = new System.Drawing.Point(171, 30);
|
||||
this.btnSaveCookie.Location = new System.Drawing.Point(153, 30);
|
||||
this.btnSaveCookie.Name = "btnSaveCookie";
|
||||
this.btnSaveCookie.Size = new System.Drawing.Size(125, 25);
|
||||
this.btnSaveCookie.Size = new System.Drawing.Size(146, 25);
|
||||
this.btnSaveCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSaveCookie.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSaveCookie.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -1276,9 +1318,9 @@ namespace TemuKJD.ToolForms
|
||||
this.btnImportCookie.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnImportCookie.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnImportCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnImportCookie.Location = new System.Drawing.Point(171, 3);
|
||||
this.btnImportCookie.Location = new System.Drawing.Point(153, 3);
|
||||
this.btnImportCookie.Name = "btnImportCookie";
|
||||
this.btnImportCookie.Size = new System.Drawing.Size(125, 25);
|
||||
this.btnImportCookie.Size = new System.Drawing.Size(146, 25);
|
||||
this.btnImportCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnImportCookie.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnImportCookie.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -1304,6 +1346,31 @@ namespace TemuKJD.ToolForms
|
||||
this.label2.TabIndex = 789;
|
||||
this.label2.Text = "供应商";
|
||||
//
|
||||
// btnExportCookie
|
||||
//
|
||||
this.btnExportCookie.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnExportCookie.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnExportCookie.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnExportCookie.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnExportCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnExportCookie.Location = new System.Drawing.Point(227, 57);
|
||||
this.btnExportCookie.Name = "btnExportCookie";
|
||||
this.btnExportCookie.Size = new System.Drawing.Size(72, 25);
|
||||
this.btnExportCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExportCookie.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExportCookie.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExportCookie.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnExportCookie.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnExportCookie.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnExportCookie.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnExportCookie.Style.GradientAngle = 90;
|
||||
this.btnExportCookie.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExportCookie.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnExportCookie.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnExportCookie.TabIndex = 1063;
|
||||
this.btnExportCookie.Text = "导出cookie";
|
||||
this.btnExportCookie.Click += new System.EventHandler(this.btnExportCookie_Click);
|
||||
//
|
||||
// GetJuShuitanProdForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -1424,5 +1491,9 @@ namespace TemuKJD.ToolForms
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDel;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMsg;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox txtWaitSeconds;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private DevComponents.DotNetBar.PanelEx btnExportCookie;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
@@ -1001,6 +1002,7 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
}
|
||||
|
||||
int getDetailWait = 1;
|
||||
private void GetPinDuoduoProd()
|
||||
{
|
||||
//https://sc.scm121.com/api/goods/goods/goGoodsPdd/queryBaseData?itemSpuId=26903724F0044AC5976D098842D919E3&shelvesType=DISTRIBUTION&originator=SUPPLIER&itemCoId=14202245
|
||||
@@ -1033,12 +1035,13 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
var prodId = row.Cells["colProductId"].Value.ParseToString();
|
||||
var prod = lstJSTListProductInfo.FirstOrDefault(c => c.id == prodId);
|
||||
// 不存在或已经采集过
|
||||
if (prod == null || prod?.dbProduct?.product_json?.ParseToString().Length > 10)
|
||||
continue;
|
||||
|
||||
if (chkSkip.Checked)
|
||||
{
|
||||
// 不存在或已经采集过
|
||||
if (prod == null || prod?.dbProduct?.product_json?.ParseToString().Length > 10)
|
||||
continue;
|
||||
|
||||
if (prod.getProductMsg == "商品已存在,跳过详情采集")
|
||||
continue;
|
||||
if (prod.getProductMsg.ParseToString().Contains("入库成功") || prod.getProductMsg.ParseToString().Contains("已存在相同id商品"))
|
||||
@@ -1073,6 +1076,8 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(500, 1500));
|
||||
// 休眠
|
||||
Thread.Sleep(getDetailWait * 1000);
|
||||
|
||||
// 爆款专区查询真实供应商coid和供应商退货地址
|
||||
if (prod.itemCoId == "12840800" || prod.supplierName == "寻合作-爆款专区")
|
||||
@@ -1231,7 +1236,14 @@ namespace TemuKJD.ToolForms
|
||||
prod.dbProduct.distribution_set = 1;
|
||||
}
|
||||
//{"success":true,"total":null,"data":{"message":"成功添加1款分销商品,系统会自动按商品拆分订单并推送给对应供应商","count":1,"shelvesType":"DISTRIBUTION"},"message":null,"code":"0000","hasNext":false,"now":1769330182209,"extra":{}}
|
||||
|
||||
|
||||
// 先获取Pdd店铺信息
|
||||
if (string.IsNullOrEmpty(jstPddShopId))
|
||||
{
|
||||
var getShopIdRst = GetPddShopId(shop, prod);
|
||||
//{"success":true,"total":1,"data":[{"shopId":"20115638","supplierId":"14791477","shopName":"阿杰小铺浦哈哈","shopType":"拼多多","shopTypeKey":"拼多多","shopTypeValue":"拼多多","itemSpuId":null,"shopItemSpuId":null,"shopAuthorizationDate":"2027-01-23 11:17:00","userName":null,"shelvesStatus":false,"updated":null,"sessionStatus":2,"sessionUid":null,"created":null,"hasPermission":true,"enabled":true,"mainSpuId":null,"shelved":false,"appCid":0,"riskVerifyUrl":null,"storeType":"COMMON"}],"message":null,"code":"0000","hasNext":false,"now":1769588598917,"extra":{}}
|
||||
jstPddShopId = BaseRegex.GetStringJson(ref getShopIdRst, "shopId");
|
||||
}
|
||||
|
||||
// 采集商品详情
|
||||
var getPddDetailRst = GetPddBaseData(shop, prod);
|
||||
@@ -1252,22 +1264,23 @@ namespace TemuKJD.ToolForms
|
||||
{
|
||||
var jObj = JsonHelper.JObjectParse(getPddDetailRst)["data"];
|
||||
|
||||
// 未维护拼多多平台数据的,采集聚水潭基础数据转化为拼多多数据,给客户上传草稿箱使用
|
||||
// 未维护拼多多平台数据的,采集聚水潭拼多多页面基础数据,转化为拼多多数据,给客户上传草稿箱使用
|
||||
if (jObj.IsJTokenNullOrEmpty())
|
||||
{
|
||||
jObj = GetJstDetail(shop, prod, row);
|
||||
jObj = GetJstPddPageDetail(shop, prod, row);
|
||||
if (jObj == null)
|
||||
continue;
|
||||
}
|
||||
|
||||
prod.dbProduct.cat_id = jObj["catId"].ParseToString();
|
||||
// 未维护拼多多平台数据的,采集聚水潭商品详情页面基础数据,转化为拼多多数据,给客户上传草稿箱使用
|
||||
//if (jObj.IsJTokenNullOrEmpty())
|
||||
//{
|
||||
// jObj = GetJstPageDetail(shop, prod, row);
|
||||
// if (jObj == null)
|
||||
// continue;
|
||||
//}
|
||||
|
||||
if (string.IsNullOrEmpty(jstPddShopId))
|
||||
{
|
||||
var getShopIdRst = GetPddShopId(shop, prod);
|
||||
//{"success":true,"total":1,"data":[{"shopId":"20115638","supplierId":"14791477","shopName":"阿杰小铺浦哈哈","shopType":"拼多多","shopTypeKey":"拼多多","shopTypeValue":"拼多多","itemSpuId":null,"shopItemSpuId":null,"shopAuthorizationDate":"2027-01-23 11:17:00","userName":null,"shelvesStatus":false,"updated":null,"sessionStatus":2,"sessionUid":null,"created":null,"hasPermission":true,"enabled":true,"mainSpuId":null,"shelved":false,"appCid":0,"riskVerifyUrl":null,"storeType":"COMMON"}],"message":null,"code":"0000","hasNext":false,"now":1769588598917,"extra":{}}
|
||||
jstPddShopId = BaseRegex.GetStringJson(ref getShopIdRst, "shopId");
|
||||
}
|
||||
prod.dbProduct.cat_id = jObj["catId"].ParseToString();
|
||||
|
||||
// 获取属性
|
||||
if (prod.dbProduct.cat_id.IsNullOrEmpty())
|
||||
@@ -1376,6 +1389,8 @@ namespace TemuKJD.ToolForms
|
||||
}, cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取聚水潭商品详情并转换为聚水潭拼多多商品详情
|
||||
/// </summary>
|
||||
@@ -1383,7 +1398,7 @@ namespace TemuKJD.ToolForms
|
||||
/// <param name="prod"></param>
|
||||
/// <param name="row"></param>
|
||||
/// <returns></returns>
|
||||
private JObject GetJstDetail(ShopLoginInfo shop, JSTListProductInfo prod, DataGridViewRow row)
|
||||
private JObject GetJstPageDetail(ShopLoginInfo shop, JSTListProductInfo prod, DataGridViewRow row)
|
||||
{
|
||||
var detailRst = GetGoodsDetail(shop, prod);
|
||||
if (!detailRst.Contains("\"success\":true"))
|
||||
@@ -1399,90 +1414,248 @@ namespace TemuKJD.ToolForms
|
||||
return null;
|
||||
}
|
||||
|
||||
var JstData = JsonHelper.JObjectParse(detailRst)["data"];
|
||||
var PddData = new JObject();
|
||||
PddData["id"] = JstData["supplierId"].ParseToString();
|
||||
PddData["coId"] = JstData["coId"].ParseToString();
|
||||
PddData["carouselGallery"] = JstData["itemMainImage"];
|
||||
PddData["categoryData"] = new JArray() { 1 };
|
||||
PddData["catId"] = 1;
|
||||
//PddData["detailGallery"] = JstData["itemDetailImages"];
|
||||
if (JstData["itemDetailImages"].IsJTokenNullOrEmpty() || JstData["itemDetailImages"].Count() == 0)
|
||||
try
|
||||
{
|
||||
PddData["detailGallery"] = new JArray();
|
||||
foreach(var jItem in PddData["carouselGallery"])
|
||||
var JstData = JsonHelper.JObjectParse(detailRst)["data"];
|
||||
var PddData = new JObject();
|
||||
PddData["id"] = JstData["supplierId"].ParseToString();
|
||||
PddData["coId"] = JstData["coId"].ParseToString();
|
||||
PddData["carouselGallery"] = JstData["itemMainImage"];
|
||||
PddData["categoryData"] = new JArray() { 1 };
|
||||
PddData["catId"] = 1;
|
||||
//PddData["detailGallery"] = JstData["itemDetailImages"];
|
||||
if (JstData["itemDetailImages"].IsJTokenNullOrEmpty() || JstData["itemDetailImages"].Count() == 0)
|
||||
{
|
||||
(PddData["detailGallery"] as JArray).Add(jItem);
|
||||
PddData["detailGallery"] = new JArray();
|
||||
foreach (var jItem in PddData["carouselGallery"])
|
||||
{
|
||||
(PddData["detailGallery"] as JArray).Add(jItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PddData["detailGallery"] = new JArray();
|
||||
foreach (var jItem in JstData["itemDetailImages"])
|
||||
else
|
||||
{
|
||||
(PddData["detailGallery"] as JArray).Add(jItem["imageUrl"]);
|
||||
PddData["detailGallery"] = new JArray();
|
||||
foreach (var jItem in JstData["itemDetailImages"])
|
||||
{
|
||||
(PddData["detailGallery"] as JArray).Add(jItem["imageUrl"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
PddData["goodsDesc"] = JstData["itemName"].ParseToString();
|
||||
PddData["goodsName"] = JstData["itemName"].ParseToString();
|
||||
PddData["goodsProperties"] = new JArray();
|
||||
PddData["marketPrice"] = JstData["maxSupplyPrice"].ParseToDecimal() * 2 + 10;
|
||||
PddData["styleCode"] = JstData["styleCode"];
|
||||
PddData["itemSpuId"] = JstData["itemSpuId"];
|
||||
PddData["skuInfo"] = new JObject();
|
||||
(PddData["skuInfo"] as JObject).Add("goodsSkuDetail", new JArray());
|
||||
foreach (var jstSkuObj in JstData["itemSkuList"])
|
||||
{
|
||||
JObject skuObj = new JObject();
|
||||
(PddData["skuInfo"]["goodsSkuDetail"] as JArray).Add(skuObj);
|
||||
PddData["goodsDesc"] = JstData["itemName"].ParseToString();
|
||||
PddData["goodsName"] = JstData["itemName"].ParseToString();
|
||||
PddData["goodsProperties"] = new JArray();
|
||||
PddData["marketPrice"] = JstData["maxSupplyPrice"].ParseToDecimal() * 2 + 10;
|
||||
PddData["styleCode"] = JstData["styleCode"];
|
||||
PddData["itemSpuId"] = JstData["itemSpuId"];
|
||||
PddData["skuInfo"] = new JObject();
|
||||
(PddData["skuInfo"] as JObject).Add("goodsSkuDetail", new JArray());
|
||||
foreach (var jstSkuObj in JstData["itemSkuList"])
|
||||
{
|
||||
JObject skuObj = new JObject();
|
||||
(PddData["skuInfo"]["goodsSkuDetail"] as JArray).Add(skuObj);
|
||||
|
||||
skuObj["quantity"] = jstSkuObj["stock"];
|
||||
skuObj["skus"] = new JArray();
|
||||
if (!jstSkuObj["colour"].IsJTokenNullOrEmpty())
|
||||
{
|
||||
JObject jSpecColor = new JObject();
|
||||
(skuObj["skus"] as JArray).Add(jSpecColor);
|
||||
jSpecColor["v"] = jstSkuObj["colour"].ParseToString();
|
||||
jSpecColor["k"] = "颜色";
|
||||
skuObj["quantity"] = jstSkuObj["stock"];
|
||||
skuObj["skus"] = new JArray();
|
||||
if (!jstSkuObj["colour"].IsJTokenNullOrEmpty())
|
||||
{
|
||||
JObject jSpecColor = new JObject();
|
||||
(skuObj["skus"] as JArray).Add(jSpecColor);
|
||||
jSpecColor["v"] = jstSkuObj["colour"].ParseToString();
|
||||
jSpecColor["k"] = "颜色";
|
||||
}
|
||||
if (!jstSkuObj["spec"].IsJTokenNullOrEmpty())
|
||||
{
|
||||
JObject jSpecColor = new JObject();
|
||||
(skuObj["skus"] as JArray).Add(jSpecColor);
|
||||
jSpecColor["v"] = jstSkuObj["spec"].ParseToString();
|
||||
jSpecColor["k"] = "尺码";
|
||||
}
|
||||
skuObj["supplyPrice"] = jstSkuObj["supplyPrice"];
|
||||
skuObj["erpSkuStatus"] = jstSkuObj["erpSkuStatus"];
|
||||
skuObj["baseSkuId"] = jstSkuObj["id"];
|
||||
skuObj["coId"] = jstSkuObj["coId"];
|
||||
skuObj["isOnsale"] = 1;
|
||||
skuObj["itemNo"] = jstSkuObj["itemCode"].IsJTokenNullOrEmpty() ? jstSkuObj["erpStyleCode"] : jstSkuObj["itemCode"];
|
||||
skuObj["pic"] = jstSkuObj["pic"];
|
||||
skuObj["jdSkuStatus"] = 1;
|
||||
skuObj["limitQuantity"] = 999;
|
||||
skuObj["sales"] = 0;
|
||||
skuObj["aliSkuStatus"] = 1;
|
||||
skuObj["preSaleTime"] = "";
|
||||
skuObj["price"] = jstSkuObj["supplyPrice"].ParseToDecimal() + 1;
|
||||
skuObj["multiPrice"] = jstSkuObj["supplyPrice"];
|
||||
skuObj["id"] = jstSkuObj["id"];
|
||||
}
|
||||
if (!jstSkuObj["spec"].IsJTokenNullOrEmpty())
|
||||
|
||||
PddData["whiteImage"] = JstData["whiteImage"];
|
||||
PddData["colourRelation"] = JstData["colourSet"];
|
||||
PddData["specRelation"] = JstData["specSet"];
|
||||
PddData["itemCoId"] = JstData["itemCoId"];
|
||||
PddData["shopTypeEnum"] = "Pinduoduo";
|
||||
PddData["forecastMainImage"] = PddData["carouselGallery"].FirstOrDefault();
|
||||
PddData["forecastItemName"] = PddData["goodsName"];
|
||||
PddData["mainImage"] = PddData["carouselGallery"];
|
||||
PddData["leafCategoryId"] = PddData["catId"].ParseToString();
|
||||
PddData["itemName"] = PddData["goodsName"];
|
||||
PddData["groupPreSaleDay"] = 0;
|
||||
PddData["categoryPropStr"] = "[]";
|
||||
|
||||
return PddData;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private JObject GetJstPddPageDetail(ShopLoginInfo shop, JSTListProductInfo prod, DataGridViewRow row)
|
||||
{
|
||||
// 获取商品详情
|
||||
var detailRst = GetItemSpuInfo(shop, prod);
|
||||
if (!detailRst.Contains("\"success\":true"))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref detailRst, "message");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = detailRst;
|
||||
prod.getProductMsg = "采集失败 " + errMsg;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
JObject jSpecColor = new JObject();
|
||||
(skuObj["skus"] as JArray).Add(jSpecColor);
|
||||
jSpecColor["v"] = jstSkuObj["spec"].ParseToString();
|
||||
jSpecColor["k"] = "尺码";
|
||||
}
|
||||
skuObj["supplyPrice"] = jstSkuObj["supplyPrice"];
|
||||
skuObj["erpSkuStatus"] = jstSkuObj["erpSkuStatus"];
|
||||
skuObj["baseSkuId"] = jstSkuObj["id"];
|
||||
skuObj["coId"] = jstSkuObj["coId"];
|
||||
skuObj["isOnsale"] = 1;
|
||||
skuObj["itemNo"] = jstSkuObj["itemCode"].IsJTokenNullOrEmpty() ? jstSkuObj["erpStyleCode"] : jstSkuObj["itemCode"];
|
||||
skuObj["pic"] = jstSkuObj["pic"];
|
||||
skuObj["jdSkuStatus"] = 1;
|
||||
skuObj["limitQuantity"] = 999;
|
||||
skuObj["sales"] = 0;
|
||||
skuObj["aliSkuStatus"] = 1;
|
||||
skuObj["preSaleTime"] = "";
|
||||
skuObj["price"] = jstSkuObj["supplyPrice"].ParseToDecimal() + 1;
|
||||
skuObj["multiPrice"] = jstSkuObj["supplyPrice"];
|
||||
skuObj["id"] = jstSkuObj["id"];
|
||||
try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { }
|
||||
}));
|
||||
return null;
|
||||
}
|
||||
|
||||
PddData["whiteImage"] = JstData["whiteImage"];
|
||||
PddData["colourRelation"] = JstData["colourSet"];
|
||||
PddData["specRelation"] = JstData["specSet"];
|
||||
PddData["itemCoId"] = JstData["itemCoId"];
|
||||
PddData["shopTypeEnum"] = "Pinduoduo";
|
||||
PddData["forecastMainImage"] = PddData["carouselGallery"].FirstOrDefault();
|
||||
PddData["forecastItemName"] = PddData["goodsName"];
|
||||
PddData["mainImage"] = PddData["carouselGallery"];
|
||||
PddData["leafCategoryId"] = "1";
|
||||
PddData["itemName"] = PddData["goodsName"];
|
||||
PddData["groupPreSaleDay"] = 0;
|
||||
PddData["categoryPropStr"] = "[]";
|
||||
// 获取类目预测
|
||||
var cateRst = categoryForecastWithPlatform(shop, prod, jstPddShopId);
|
||||
Thread.Sleep(Randomx.GetId(1000, 2000));
|
||||
if (!cateRst.Contains("\"success\":true"))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref cateRst, "message");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = cateRst;
|
||||
prod.getProductMsg = "采集失败 " + errMsg;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { }
|
||||
}));
|
||||
return null;
|
||||
}
|
||||
|
||||
return PddData;
|
||||
try
|
||||
{
|
||||
var JstPddData = JsonHelper.JObjectParse(detailRst)["data"];
|
||||
var pddCateForecast = JsonHelper.JObjectParse(cateRst)["data"].FirstOrDefault()?["forecastCategory"] as JArray;
|
||||
|
||||
var PddData = new JObject();
|
||||
PddData["id"] = JstPddData["goodsItemSpu"]["id"].ParseToString();
|
||||
PddData["coId"] = JstPddData["goodsItemSpu"]["coId"].ParseToString();
|
||||
PddData["carouselGallery"] = JstPddData["goodsItemSpu"]["itemMainImage"];
|
||||
PddData["categoryData"] = new JArray();
|
||||
foreach (var catItem in pddCateForecast)
|
||||
{
|
||||
(PddData["categoryData"] as JArray).Add(catItem["categoryId"]);
|
||||
}
|
||||
PddData["catId"] = (pddCateForecast.LastOrDefault()?["categoryId"]).ParseToLong();
|
||||
if (JstPddData["goodsItemPhoto"]["itemDetailImages"].IsJTokenNullOrEmpty() || JstPddData["goodsItemPhoto"]["itemDetailImages"].Count() == 0)
|
||||
{
|
||||
PddData["detailGallery"] = new JArray();
|
||||
foreach (var jItem in PddData["carouselGallery"])
|
||||
{
|
||||
(PddData["detailGallery"] as JArray).Add(jItem);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PddData["detailGallery"] = new JArray();
|
||||
foreach (var jItem in JstPddData["goodsItemPhoto"]["itemDetailImages"])
|
||||
{
|
||||
(PddData["detailGallery"] as JArray).Add(jItem["imageUrl"]);
|
||||
}
|
||||
}
|
||||
|
||||
PddData["goodsDesc"] = JstPddData["goodsItemSpu"]["itemName"].ParseToString();
|
||||
PddData["goodsName"] = JstPddData["goodsItemSpu"]["itemName"].ParseToString();
|
||||
PddData["goodsProperties"] = new JArray();
|
||||
|
||||
// 市场价
|
||||
PddData["marketPrice"] = 0;
|
||||
|
||||
PddData["styleCode"] = JstPddData["goodsItemSpu"]["styleCode"];
|
||||
PddData["itemSpuId"] = JstPddData["goodsItemSpu"]["itemSpuId"];
|
||||
|
||||
PddData["colourRelation"] = new JObject(); // JstPddData["colourSet"];
|
||||
PddData["specRelation"] = new JObject(); //JstPddData["specSet"];
|
||||
|
||||
PddData["skuInfo"] = new JObject();
|
||||
(PddData["skuInfo"] as JObject).Add("goodsSkuDetail", new JArray());
|
||||
foreach (var jstSkuObjC in JstPddData["colourItemSkus"])
|
||||
{
|
||||
//string colour = jstSkuObjC["colour"].ParseToString();
|
||||
foreach (var jstSkuObj in jstSkuObjC["goodsItemSkus"])
|
||||
{
|
||||
JObject skuObj = new JObject();
|
||||
(PddData["skuInfo"]["goodsSkuDetail"] as JArray).Add(skuObj);
|
||||
|
||||
skuObj["quantity"] = jstSkuObj["skuStock"];
|
||||
skuObj["skus"] = new JArray();
|
||||
if (!jstSkuObj["colour"].IsNullOrEmpty())
|
||||
{
|
||||
JObject jSpecColor = new JObject();
|
||||
(skuObj["skus"] as JArray).Add(jSpecColor);
|
||||
jSpecColor["v"] = jstSkuObj["colour"].ParseToString();
|
||||
jSpecColor["k"] = JstPddData["goodsItemSpu"]["realColorName"].ParseToString().IsNullOrEmpty() ? "颜色" : JstPddData["goodsItemSpu"]["realColorName"];
|
||||
(PddData["colourRelation"] as JObject)[jstSkuObj["colour"].ParseToString()] = jstSkuObj["colour"];
|
||||
}
|
||||
if (!jstSkuObj["spec"].IsJTokenNullOrEmpty())
|
||||
{
|
||||
JObject jSpecColor = new JObject();
|
||||
(skuObj["skus"] as JArray).Add(jSpecColor);
|
||||
jSpecColor["v"] = jstSkuObj["spec"].ParseToString();
|
||||
jSpecColor["k"] = JstPddData["goodsItemSpu"]["realSpecName"].ParseToString().IsNullOrEmpty() ? "尺码" : JstPddData["goodsItemSpu"]["realSpecName"];
|
||||
(PddData["specRelation"] as JObject)[jstSkuObj["spec"].ParseToString()] = jstSkuObj["spec"];
|
||||
}
|
||||
skuObj["supplyPrice"] = jstSkuObj["supplyPrice"];
|
||||
skuObj["erpSkuStatus"] = jstSkuObj["erpSkuStatus"];
|
||||
skuObj["baseSkuId"] = jstSkuObj["id"];
|
||||
skuObj["coId"] = JstPddData["goodsItemSpu"]["coId"];
|
||||
skuObj["isOnsale"] = 1;
|
||||
skuObj["itemNo"] = jstSkuObj["itemCode"];
|
||||
skuObj["pic"] = jstSkuObj["pic"];
|
||||
skuObj["jdSkuStatus"] = 1;
|
||||
skuObj["limitQuantity"] = 999;
|
||||
skuObj["sales"] = 0;
|
||||
skuObj["aliSkuStatus"] = 1;
|
||||
skuObj["preSaleTime"] = "";
|
||||
skuObj["price"] = jstSkuObj["supplyPrice"].ParseToDecimal() + 1;
|
||||
skuObj["multiPrice"] = jstSkuObj["supplyPrice"];
|
||||
skuObj["id"] = jstSkuObj["id"];
|
||||
|
||||
// 市场价
|
||||
PddData["marketPrice"] = Math.Max(PddData["marketPrice"].ParseToDecimal(), skuObj["multiPrice"].ParseToDecimal() * 2 + 10);
|
||||
}
|
||||
}
|
||||
|
||||
PddData["whiteImage"] = JstPddData["goodsItemPhoto"]["whiteImage"];
|
||||
PddData["itemCoId"] = JstPddData["goodsItemSpu"]["coId"].ParseToString();
|
||||
PddData["shopTypeEnum"] = "Pinduoduo";
|
||||
PddData["forecastMainImage"] = PddData["carouselGallery"].FirstOrDefault();
|
||||
PddData["forecastItemName"] = PddData["goodsName"];
|
||||
PddData["mainImage"] = PddData["carouselGallery"];
|
||||
PddData["leafCategoryId"] = PddData["catId"].ParseToString();
|
||||
PddData["itemName"] = PddData["goodsName"];
|
||||
PddData["groupPreSaleDay"] = 0;
|
||||
PddData["categoryPropStr"] = "[]";
|
||||
|
||||
return PddData;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
prod.getProductMsg = "详情采集失败:" + ex.Message;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { }
|
||||
}));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private void GetDyProd()
|
||||
@@ -1650,6 +1823,39 @@ namespace TemuKJD.ToolForms
|
||||
return detailRst;
|
||||
}
|
||||
|
||||
public string GetItemSpuInfo(ShopLoginInfo shop, JSTListProductInfo jstLstProd)
|
||||
{
|
||||
string url = "https://sc.scm121.com/api/goods/shelves/itemSpuShelves/getItemSpuInfo";
|
||||
string referer = "https://sc.scm121.com/manage/goods/qualitySupplier/goodsDetail/" + jstLstProd.itemSpuId + "?itemCoId=" + jstLstProd.itemCoId + "&noBack=true";
|
||||
string data = @"{""itemSpuId"":""" + jstLstProd.itemSpuId + @""",""itemCoId"":""" + jstLstProd.itemCoId + @"""}";
|
||||
data = @"{""id"":""" + jstLstProd.itemSpuId + @""",""platformType"":""Pinduoduo"",""shelvesType"":""DISTRIBUTION"",""companyType"":""SUPPLIER"",""itemCoId"":""" +
|
||||
jstLstProd.itemCoId + @"""}";
|
||||
|
||||
var detailRst = "";
|
||||
for (int i = 0; i < 3 && !detailRst.Contains("\"success\":true"); i++)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(1000, 2000));
|
||||
detailRst = JSTHttpResponseBLL.JSTPostResponse(shop, url, data, referer, appVersion);
|
||||
}
|
||||
return detailRst;
|
||||
}
|
||||
|
||||
public string categoryForecastWithPlatform(ShopLoginInfo shop, JSTListProductInfo jstLstProd, string shopId)
|
||||
{
|
||||
string url = "https://sc.scm121.com/api/goods/platform/category/categoryForecastWithPlatform";
|
||||
string referer = "https://sc.scm121.com/manage/goods/qualitySupplier/goodsDetail/" + jstLstProd.itemSpuId + "?itemCoId=" + jstLstProd.itemCoId + "&noBack=true";
|
||||
string data = @"{""itemCoId"":""" + jstLstProd.coId + @""",""itemSpuId"":""" + jstLstProd.itemSpuId +
|
||||
@""",""shopId"":""" + shopId + @""",""shopType"":""Pinduoduo"",""itemName"":""" + jstLstProd.itemName + @"""}";
|
||||
|
||||
var detailRst = "";
|
||||
for (int i = 0; i < 3 && !detailRst.Contains("\"success\":true"); i++)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(1000, 2000));
|
||||
detailRst = JSTHttpResponseBLL.JSTPostResponse(shop, url, data, referer, appVersion);
|
||||
}
|
||||
return detailRst;
|
||||
}
|
||||
|
||||
public string GetPddShopId(ShopLoginInfo shop, JSTListProductInfo jstLstProd)
|
||||
{
|
||||
string url = "https://sc.scm121.com/api/goods/shelves/mxStoresInformation/selectStoresInfo?shopTypeKey=%E6%8B%BC%E5%A4%9A%E5%A4%9A&spuId=" +
|
||||
@@ -2260,6 +2466,49 @@ namespace TemuKJD.ToolForms
|
||||
if (CancelGetDown != null)
|
||||
CancelGetDown.Cancel();
|
||||
}
|
||||
|
||||
private void chkSkip_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void txtWaitSeconds_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
getDetailWait = txtWaitSeconds.Text.ParseToInt();
|
||||
}
|
||||
|
||||
private void btnExportCookie_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<Cookie> cookieList = CEFBrowser.GetCookieList(".scm121.com", cefWebBrowser.GetCookieManager(null));
|
||||
var shop = new ShopLoginInfo();
|
||||
shop.Cookies = JsonHelper.SerializeObject(cookieList);
|
||||
|
||||
List<CefSharp.Cookie> cooks = null;
|
||||
try { cooks = JsonHelper.DeserializeJsonToList<CefSharp.Cookie>(shop.Cookies); } catch (Exception ex) { }
|
||||
if (cooks == null)
|
||||
cooks = new List<CefSharp.Cookie>();
|
||||
|
||||
string cookJs = "";
|
||||
var keys = new string[] { "acw_tc", "DISTRYBUTION_TOKEN" };
|
||||
foreach (var shopCook in cooks)
|
||||
{
|
||||
var cookie = shopCook.Name + "=" + shopCook.Value;
|
||||
if (!keys.Any(k => cookie.StartsWith(k)))
|
||||
continue;
|
||||
cookJs += "\r\ndocument.cookie='" + cookie.Substring(0, Math.Max(0, cookie.IndexOf("="))) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';";
|
||||
}
|
||||
foreach (var shopCook in cooks)
|
||||
{
|
||||
var cookie = shopCook.Name + "=" + shopCook.Value;
|
||||
if (!keys.Any(k => cookie.StartsWith(k)))
|
||||
continue;
|
||||
cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.scm121.com; expires=" +
|
||||
DateTime.Now.AddMonths(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';";
|
||||
}
|
||||
cookJs += "\r\nsetTimeout(() => { window.location.href='https://sc.scm121.com/suppliersManage/suppliersList/onlineSuppliers'; }, 200)";
|
||||
Clipboard.SetDataObject(cookJs);
|
||||
BaseMsgForm.ShowInfo("复制成功");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user