活动报名逻辑优化

This commit is contained in:
wule committed 2025-09-26 09:23:05 +08:00
1 parent d01d3bc306
commit 8fb90422a2
15 files changed
+1736 -291

No files matched your search

+301 -39
View File
@@ -31,11 +31,25 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDShopLoginForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnReturnPackage = new TemuKJD.UserControls.ButtonEx();
this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx();
this.pnlMultiLogin = new System.Windows.Forms.Panel();
this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
this.btnDel = new DevComponents.DotNetBar.PanelEx();
this.pnlUploadOpBtns = new System.Windows.Forms.Panel();
this.numMinPrice = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.pictureBox8 = new System.Windows.Forms.PictureBox();
this.pictureBox7 = new System.Windows.Forms.PictureBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btnRestoreSkuImg = new DevComponents.DotNetBar.PanelEx();
this.btnSignActivity = new DevComponents.DotNetBar.PanelEx();
this.btnSaveSourceGoodsData = new DevComponents.DotNetBar.PanelEx();
this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btnCopyPassword = new TemuKJD.UserControls.ButtonEx();
@@ -48,9 +62,20 @@
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.txtAddress = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.pnlMultiLogin.SuspendLayout();
this.pnlUploadOpBtns.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMinPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
@@ -67,12 +92,16 @@
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnReturnPackage);
this.splitContainer1.Panel1.Controls.Add(this.pnlMultiLogin);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel2.Controls.Add(this.btnReturnPackage);
this.splitContainer1.Panel2.Controls.Add(this.pnlUploadOpBtns);
this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain);
this.splitContainer1.Panel2.Controls.Add(this.pnlMultiLogin);
this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Panel2.Controls.Add(this.label1);
this.splitContainer1.Panel2.Controls.Add(this.btnCopyPassword);
@@ -82,8 +111,8 @@
this.splitContainer1.Panel2.Controls.Add(this.btnStop);
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
this.splitContainer1.Size = new System.Drawing.Size(1438, 755);
this.splitContainer1.SplitterDistance = 690;
this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
this.splitContainer1.SplitterDistance = 671;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
@@ -95,7 +124,7 @@
this.btnReturnPackage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReturnPackage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReturnPackage.ForeColor = System.Drawing.Color.White;
this.btnReturnPackage.Location = new System.Drawing.Point(674, 30);
this.btnReturnPackage.Location = new System.Drawing.Point(5, 605);
this.btnReturnPackage.Margin = new System.Windows.Forms.Padding(2);
this.btnReturnPackage.Name = "btnReturnPackage";
this.btnReturnPackage.Size = new System.Drawing.Size(136, 25);
@@ -105,31 +134,14 @@
this.btnReturnPackage.Visible = false;
this.btnReturnPackage.Click += new System.EventHandler(this.btnReturnPackage_Click);
//
// btnLoginAgain
//
this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginAgain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginAgain.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginAgain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginAgain.ForeColor = System.Drawing.Color.White;
this.btnLoginAgain.Location = new System.Drawing.Point(1137, 31);
this.btnLoginAgain.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginAgain.Name = "btnLoginAgain";
this.btnLoginAgain.Size = new System.Drawing.Size(91, 25);
this.btnLoginAgain.TabIndex = 462;
this.btnLoginAgain.Text = "重新登录";
this.btnLoginAgain.UseVisualStyleBackColor = false;
this.btnLoginAgain.Click += new System.EventHandler(this.btnLoginAgain_Click);
//
// pnlMultiLogin
//
this.pnlMultiLogin.Controls.Add(this.cmbMultiCookieName);
this.pnlMultiLogin.Controls.Add(this.btnMultiLogin);
this.pnlMultiLogin.Controls.Add(this.btnDel);
this.pnlMultiLogin.Location = new System.Drawing.Point(357, 8);
this.pnlMultiLogin.Location = new System.Drawing.Point(5, 634);
this.pnlMultiLogin.Name = "pnlMultiLogin";
this.pnlMultiLogin.Size = new System.Drawing.Size(270, 33);
this.pnlMultiLogin.Size = new System.Drawing.Size(251, 31);
this.pnlMultiLogin.TabIndex = 461;
this.pnlMultiLogin.Visible = false;
//
@@ -153,7 +165,7 @@
this.btnMultiLogin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnMultiLogin.DisabledBackColor = System.Drawing.Color.Empty;
this.btnMultiLogin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMultiLogin.Location = new System.Drawing.Point(186, 3);
this.btnMultiLogin.Location = new System.Drawing.Point(185, 3);
this.btnMultiLogin.Name = "btnMultiLogin";
this.btnMultiLogin.Size = new System.Drawing.Size(60, 24);
this.btnMultiLogin.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -177,7 +189,7 @@
this.btnDel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnDel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDel.Location = new System.Drawing.Point(161, 3);
this.btnDel.Location = new System.Drawing.Point(163, 3);
this.btnDel.Name = "btnDel";
this.btnDel.Size = new System.Drawing.Size(20, 24);
this.btnDel.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -196,9 +208,233 @@
this.btnDel.Text = "删";
this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
//
// pnlUploadOpBtns
//
this.pnlUploadOpBtns.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pnlUploadOpBtns.Controls.Add(this.numMinPrice);
this.pnlUploadOpBtns.Controls.Add(this.label3);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox8);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox7);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox6);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox5);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox4);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox3);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox2);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox1);
this.pnlUploadOpBtns.Controls.Add(this.btnRestoreSkuImg);
this.pnlUploadOpBtns.Controls.Add(this.btnSignActivity);
this.pnlUploadOpBtns.Controls.Add(this.btnSaveSourceGoodsData);
this.pnlUploadOpBtns.Location = new System.Drawing.Point(338, 3);
this.pnlUploadOpBtns.Name = "pnlUploadOpBtns";
this.pnlUploadOpBtns.Size = new System.Drawing.Size(812, 53);
this.pnlUploadOpBtns.TabIndex = 463;
//
// numMinPrice
//
this.numMinPrice.DecimalPlaces = 2;
this.numMinPrice.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.numMinPrice.Location = new System.Drawing.Point(372, 3);
this.numMinPrice.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.numMinPrice.Name = "numMinPrice";
this.numMinPrice.Size = new System.Drawing.Size(182, 23);
this.numMinPrice.TabIndex = 468;
this.numMinPrice.Value = new decimal(new int[] {
50,
0,
0,
0});
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(280, 6);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(92, 17);
this.label3.TabIndex = 467;
this.label3.Text = "报名活动最低价";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Click += new System.EventHandler(this.label3_Click);
//
// pictureBox8
//
this.pictureBox8.Location = new System.Drawing.Point(242, 17);
this.pictureBox8.Name = "pictureBox8";
this.pictureBox8.Size = new System.Drawing.Size(32, 32);
this.pictureBox8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox8.TabIndex = 456;
this.pictureBox8.TabStop = false;
this.pictureBox8.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox7
//
this.pictureBox7.Location = new System.Drawing.Point(209, 17);
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(32, 32);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox7.TabIndex = 455;
this.pictureBox7.TabStop = false;
this.pictureBox7.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox6
//
this.pictureBox6.Location = new System.Drawing.Point(176, 17);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(32, 32);
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox6.TabIndex = 454;
this.pictureBox6.TabStop = false;
this.pictureBox6.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox5
//
this.pictureBox5.Location = new System.Drawing.Point(143, 17);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(32, 32);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox5.TabIndex = 453;
this.pictureBox5.TabStop = false;
this.pictureBox5.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox4
//
this.pictureBox4.Location = new System.Drawing.Point(110, 17);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(32, 32);
this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox4.TabIndex = 452;
this.pictureBox4.TabStop = false;
this.pictureBox4.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox3
//
this.pictureBox3.Location = new System.Drawing.Point(77, 17);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(32, 32);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox3.TabIndex = 451;
this.pictureBox3.TabStop = false;
this.pictureBox3.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox2
//
this.pictureBox2.Location = new System.Drawing.Point(44, 17);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(32, 32);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 450;
this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(11, 17);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 449;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// btnRestoreSkuImg
//
this.btnRestoreSkuImg.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRestoreSkuImg.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRestoreSkuImg.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRestoreSkuImg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRestoreSkuImg.Location = new System.Drawing.Point(464, 28);
this.btnRestoreSkuImg.Name = "btnRestoreSkuImg";
this.btnRestoreSkuImg.Size = new System.Drawing.Size(90, 23);
this.btnRestoreSkuImg.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRestoreSkuImg.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRestoreSkuImg.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRestoreSkuImg.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRestoreSkuImg.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRestoreSkuImg.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRestoreSkuImg.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRestoreSkuImg.Style.GradientAngle = 90;
this.btnRestoreSkuImg.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRestoreSkuImg.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRestoreSkuImg.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRestoreSkuImg.TabIndex = 439;
this.btnRestoreSkuImg.Text = "还原商品图片";
this.btnRestoreSkuImg.Click += new System.EventHandler(this.btnRestoreSkuImg_Click);
//
// btnSignActivity
//
this.btnSignActivity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSignActivity.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSignActivity.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSignActivity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSignActivity.Location = new System.Drawing.Point(372, 28);
this.btnSignActivity.Name = "btnSignActivity";
this.btnSignActivity.Size = new System.Drawing.Size(90, 23);
this.btnSignActivity.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSignActivity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSignActivity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSignActivity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSignActivity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSignActivity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSignActivity.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSignActivity.Style.GradientAngle = 90;
this.btnSignActivity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSignActivity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSignActivity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSignActivity.TabIndex = 435;
this.btnSignActivity.Text = "一键报名活动";
this.btnSignActivity.Click += new System.EventHandler(this.btnSignActivity_Click);
//
// btnSaveSourceGoodsData
//
this.btnSaveSourceGoodsData.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSaveSourceGoodsData.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSaveSourceGoodsData.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSaveSourceGoodsData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveSourceGoodsData.Location = new System.Drawing.Point(280, 28);
this.btnSaveSourceGoodsData.Name = "btnSaveSourceGoodsData";
this.btnSaveSourceGoodsData.Size = new System.Drawing.Size(90, 23);
this.btnSaveSourceGoodsData.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveSourceGoodsData.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveSourceGoodsData.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveSourceGoodsData.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSaveSourceGoodsData.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSaveSourceGoodsData.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSaveSourceGoodsData.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSaveSourceGoodsData.Style.GradientAngle = 90;
this.btnSaveSourceGoodsData.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveSourceGoodsData.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveSourceGoodsData.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveSourceGoodsData.TabIndex = 431;
this.btnSaveSourceGoodsData.Text = "暂存商品图片";
this.btnSaveSourceGoodsData.Click += new System.EventHandler(this.btnSaveSourceGoodsData_Click);
//
// btnLoginAgain
//
this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginAgain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginAgain.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginAgain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginAgain.ForeColor = System.Drawing.Color.White;
this.btnLoginAgain.Location = new System.Drawing.Point(1155, 31);
this.btnLoginAgain.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginAgain.Name = "btnLoginAgain";
this.btnLoginAgain.Size = new System.Drawing.Size(91, 25);
this.btnLoginAgain.TabIndex = 462;
this.btnLoginAgain.Text = "重新登录";
this.btnLoginAgain.UseVisualStyleBackColor = false;
this.btnLoginAgain.Click += new System.EventHandler(this.btnLoginAgain_Click);
//
// label2
//
this.label2.Location = new System.Drawing.Point(23, 35);
this.label2.Location = new System.Drawing.Point(9, 35);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 378;
@@ -208,7 +444,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 8);
this.label1.Location = new System.Drawing.Point(9, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 17);
this.label1.TabIndex = 377;
@@ -222,7 +458,7 @@
this.btnCopyPassword.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyPassword.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyPassword.ForeColor = System.Drawing.Color.White;
this.btnCopyPassword.Location = new System.Drawing.Point(295, 31);
this.btnCopyPassword.Location = new System.Drawing.Point(276, 31);
this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2);
this.btnCopyPassword.Name = "btnCopyPassword";
this.btnCopyPassword.Size = new System.Drawing.Size(57, 25);
@@ -238,7 +474,7 @@
this.btnCopyUserName.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyUserName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyUserName.ForeColor = System.Drawing.Color.White;
this.btnCopyUserName.Location = new System.Drawing.Point(295, 4);
this.btnCopyUserName.Location = new System.Drawing.Point(276, 4);
this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2);
this.btnCopyUserName.Name = "btnCopyUserName";
this.btnCopyUserName.Size = new System.Drawing.Size(57, 25);
@@ -249,7 +485,7 @@
//
// txtPassWord
//
this.txtPassWord.Location = new System.Drawing.Point(72, 32);
this.txtPassWord.Location = new System.Drawing.Point(53, 32);
this.txtPassWord.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtPassWord.Name = "txtPassWord";
this.txtPassWord.PasswordChar = '●';
@@ -259,7 +495,7 @@
//
// txtUserName
//
this.txtUserName.Location = new System.Drawing.Point(72, 5);
this.txtUserName.Location = new System.Drawing.Point(53, 5);
this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtUserName.Name = "txtUserName";
this.txtUserName.ReadOnly = true;
@@ -274,10 +510,10 @@
this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop.ForeColor = System.Drawing.Color.White;
this.btnStop.Location = new System.Drawing.Point(1324, 31);
this.btnStop.Location = new System.Drawing.Point(1342, 31);
this.btnStop.Margin = new System.Windows.Forms.Padding(2);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(96, 25);
this.btnStop.Size = new System.Drawing.Size(91, 25);
this.btnStop.TabIndex = 372;
this.btnStop.Text = "停止操作";
this.btnStop.UseVisualStyleBackColor = false;
@@ -291,7 +527,7 @@
this.btnReload.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReload.ForeColor = System.Drawing.Color.White;
this.btnReload.Location = new System.Drawing.Point(1231, 31);
this.btnReload.Location = new System.Drawing.Point(1249, 31);
this.btnReload.Margin = new System.Windows.Forms.Padding(2);
this.btnReload.Name = "btnReload";
this.btnReload.Size = new System.Drawing.Size(91, 25);
@@ -310,7 +546,7 @@
this.chkCloseAfterLogin.Checked = true;
this.chkCloseAfterLogin.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkCloseAfterLogin.CheckValue = "Y";
this.chkCloseAfterLogin.Location = new System.Drawing.Point(997, 32);
this.chkCloseAfterLogin.Location = new System.Drawing.Point(1306, 6);
this.chkCloseAfterLogin.Name = "chkCloseAfterLogin";
this.chkCloseAfterLogin.Size = new System.Drawing.Size(135, 23);
this.chkCloseAfterLogin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -322,7 +558,7 @@
this.splitContainer2.BackColor = System.Drawing.Color.White;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(1, 14);
this.splitContainer2.Location = new System.Drawing.Point(1, 33);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
@@ -333,7 +569,7 @@
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.splitContainer1);
this.splitContainer2.Size = new System.Drawing.Size(1438, 785);
this.splitContainer2.Size = new System.Drawing.Size(1438, 766);
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 5;
//
@@ -362,11 +598,23 @@
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ShopLoginForm_FormClosed);
this.Load += new System.EventHandler(this.ShopLoginForm_Load);
this.Controls.SetChildIndex(this.splitContainer2, 0);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.pnlMultiLogin.ResumeLayout(false);
this.pnlUploadOpBtns.ResumeLayout(false);
this.pnlUploadOpBtns.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numMinPrice)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel1.PerformLayout();
this.splitContainer2.Panel2.ResumeLayout(false);
@@ -396,5 +644,19 @@
private DevComponents.DotNetBar.PanelEx btnMultiLogin;
private DevComponents.DotNetBar.PanelEx btnDel;
private UserControls.ButtonEx btnReturnPackage;
private System.Windows.Forms.Panel pnlUploadOpBtns;
private DevComponents.DotNetBar.PanelEx btnSaveSourceGoodsData;
private DevComponents.DotNetBar.PanelEx btnSignActivity;
private DevComponents.DotNetBar.PanelEx btnRestoreSkuImg;
private System.Windows.Forms.PictureBox pictureBox8;
private System.Windows.Forms.PictureBox pictureBox7;
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown numMinPrice;
}
}
+307 -82
View File
@@ -36,6 +36,12 @@ namespace TemuKJD.PDDForms.ShopForms
public partial class PDDShopLoginForm : LRBaseForm
{
public static PDDShopLoginForm shopLoginInstance { get; set; } = null;
public ProductSelectForms.PDDDBProdUserSelectForm prodUserSelectForm { get; set; } = null;
public static string pddUploadGoodsData = "";
//public static AllBase.Model.Param.PDDProdParam.PDDProductUploadParam prodParam = null;
public static string pddSourceGoodsData = "";
public static string pddSourceGoodsDataTemp = "";
//public static AllBase.Model.Result.PDDResult.PDDProductDetailInfo prodInfo = null;
public int CloseAfterSecond { get; set; }
public EnumOpenType openType = EnumOpenType.manage;
@@ -43,14 +49,12 @@ namespace TemuKJD.PDDForms.ShopForms
public string MultiLoginCookieName = "";
public string InitUrl = "";
private string shopCookieHead = "pinduoduo.com";
private string shopCookieHead2 = "temu.com";
private string shopLoginUrl = "https://mms.pinduoduo.com/login";
private string shopMainUrl = "https://mms.pinduoduo.com/home";
private ChromiumWebBrowser cefWebBrowser = null;
private ShopLoginInfo shop = null;
private List<ShopCompany> lstShopCompany = new List<ShopCompany>();
private string currentUrl = "";
private long currentSupplierId = 0;
public PDDShopLoginForm(ShopLoginInfo shopInfo)
{
@@ -70,6 +74,8 @@ namespace TemuKJD.PDDForms.ShopForms
private void ShopLoginForm_Load(object sender, EventArgs e)
{
this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62;
this.pnlUploadOpBtns.Visible = this.prodUserSelectForm != null;
pddSourceGoodsDataTemp = "";
if (isMultiLogin && shop != null)
{
@@ -433,27 +439,53 @@ namespace TemuKJD.PDDForms.ShopForms
private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e)
{
//if (!cefWebBrowser.IsBrowserInitialized) return;
//currentUrl = e.Url;
//if (currentUrl.StartsWith("https://fxg.jinritemai.com/ffa/multiShop"))
//{
// Thread.Sleep(Randomx.GetId(500, 800));
//}
//if (currentUrl.StartsWith("https://fxg.jinritemai.com/ffa/mshop/homepage/index"))
//{
// Task.Run(() =>
// {
//
// });
//}
//js绑定C#对象 html页面内声明绑定的C#对象
StringBuilder sb = new StringBuilder();
sb.Append("(function(){");
sb.Append("CefSharp.BindObjectAsync('shopObj');");
sb.Append("})();");
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
// 库存上传按钮 pdd不需要
if (1 == 2 && currentUrl.StartsWith("https://mms.pinduoduo.com/goods/goods_list"))
{
Task.Run(() => {
string sAddInputJs = @"
document.addEventListener('wheel', function(event) {
// 检查滚动方向
//if (event.deltaY < 0) {
// console.log('向上滚动');
//} else {
// console.log('向下滚动');
//}
// 或者使用 event.deltaX 来检查水平滚动
//if (event.deltaX < 0) {
// console.log('向左滚动');
//} else if (event.deltaX > 0) {
// console.log('向右滚动');
//}
// 阻止默认的滚动行为(如果有需要)
//event.preventDefault();
addGetProdButton();
});
addGetProdButton();
function addGetProdButton() {
var productLst = document.getElementsByClassName('goods-id');
for(i=0; i<productLst.length; i++) {
var addBtnItem = productLst[i].parentElement.parentElement;
if (addBtnItem.parentElement.innerHTML.indexOf('库存上传') < 0 && addBtnItem.parentElement.innerHTML.indexOf('ID:') >= 0) {
var sSpuId = addBtnItem.innerText.replace('\r','').replace('\n','').replace('ID: ', '');
addBtnItem.outerHTML = addBtnItem.outerHTML.replace(""<section>"",""<section style=\""display:inline; float:left; \"">"")
.replace(""</section>"", ""</section><input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""库存上传\"" onclick=\""shopObj.getThirdProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">"");
}
}
}";
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs);
});
}
}
static int GetAntiContentsTimes = 40;
@@ -462,38 +494,20 @@ namespace TemuKJD.PDDForms.ShopForms
var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : "";
if (shop != null && !url.StartsWith("https://mms.pinduoduo.com/janus/api/userinfo") && !string.IsNullOrEmpty(antiContent))
{
GetAntiContentsTimes++;
Invoke(new Action(() => { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; }));
shop.AntiContents.Add(antiContent);
while (shop.AntiContents.Count > 50)
shop.AntiContents.RemoveAt(0);
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 500)
Task.Run(() =>
{
GetAntiContentsTimes = 0;
Task.Run(() =>
GetAntiContentsTimes++;
Invoke(new Action(() => { try { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; } catch { return; } }));
shop.AntiContents.Add(antiContent);
while (shop.AntiContents.Count > 50)
shop.AntiContents.RemoveAt(0);
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 500)
{
GetAntiContentsTimes = 0;
ShopBLL.MdyAntiContent(shop);
});
}
}
});
}
Task.Run(() =>
{
var data = responseData;
if (data.Contains("\"validate_message\""))
{
}
//if (data.Contains("supplierId") && data.Contains("\"success\":true"))
//{
// var supplierIds = BaseRegex.GetMatchRegex(ref data, "\"supplierId\":\\d{5,20}");
// if (supplierIds.Count > 0 && supplierIds[0].Groups.Count > 0)
// {
// var supplierId = supplierIds[0].Groups[0].Value.Replace("\"supplierId\":", "").ParseToLong();
// if (supplierId > 0)
// this.currentSupplierId = supplierId;
// }
//}
});
if (url == "https://mms.pinduoduo.com/janus/api/userinfo")
{
Task.Run(() =>
@@ -528,44 +542,35 @@ namespace TemuKJD.PDDForms.ShopForms
}
});
}
// 库存上传按钮
if (1 == 1 && currentUrl.StartsWith("https://mms.pinduoduo.com/goods/goods_list"))
if (prodUserSelectForm != null && url.StartsWith("https://mms.pinduoduo.com/glide/mms/goodsCommit/action/edit"))
{
Task.Run(() => {
string sAddInputJs = @"
document.addEventListener('wheel', function(event) {
// 检查滚动方向
//if (event.deltaY < 0) {
// console.log('向上滚动');
//} else {
// console.log('向下滚动');
//}
// 或者使用 event.deltaX 来检查水平滚动
//if (event.deltaX < 0) {
// console.log('向左滚动');
//} else if (event.deltaX > 0) {
// console.log('向右滚动');
//}
// 阻止默认的滚动行为(如果有需要)
//event.preventDefault();
addGetProdButton();
});
addGetProdButton();
function addGetProdButton() {
var productLst = document.getElementsByClassName('goods-id0000000000');
for(i=0; i<productLst.length; i++) {
var addBtnItem = productLst[i].parentElement.parentElement;
if (addBtnItem.parentElement.innerHTML.indexOf('库存上传') < 0 && addBtnItem.parentElement.innerHTML.indexOf('ID:') >= 0) {
var sSpuId = addBtnItem.innerText.replace('\r','').replace('\n','').replace('ID: ', '');
addBtnItem.outerHTML = addBtnItem.outerHTML.replace(""<section>"",""<section style=\""display:inline; float:left; \"">"")
.replace(""</section>"", ""</section><input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""库存上传\"" onclick=\""shopObj.getThirdProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">"");
}
}
}";
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs);
try
{
pddUploadGoodsData = System.Text.Encoding.UTF8.GetString(request.PostData.Elements[0].Bytes);
var prodParam = JsonHelper.DeserializeJsonToObject<AllBase.Model.Param.PDDProdParam.PDDProductUploadParam>(pddUploadGoodsData);
}
catch (Exception ex)
{
pddUploadGoodsData = "";
//prodParam = null;
}
}
if (prodUserSelectForm != null && url.StartsWith("https://mms.pinduoduo.com/glide/v2/mms/query/commit/detail"))
{
Task.Run(() =>
{
pddSourceGoodsDataTemp = responseData;
try
{
JObject jObj = JObject.Parse(pddSourceGoodsDataTemp);
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
var prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
}
catch (Exception ex)
{
pddSourceGoodsDataTemp = "";
//prodInfo = null;
}
});
}
}
@@ -1011,5 +1016,225 @@ function getElementWithText(sText)
//ReturnPackageDetailForm form = new ReturnPackageDetailForm(this.shop);
//form.ShowDialog();
}
private void btnSaveSourceGoodsData_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(pddSourceGoodsDataTemp))
{
BaseMsgForm.ShowError("未捕获到商品详情!");
return;
}
pddSourceGoodsData = pddSourceGoodsDataTemp;
try
{
JObject jObj = JObject.Parse(pddSourceGoodsData);
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
var prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
var skuimgs = prodInfo.sku.Select(s => s.thumb_url).Distinct().ToList();
while (skuimgs.Count < 8)
skuimgs.Add("");
this.pictureBox1.ImageLocation = skuimgs[0].Replace("https://", "http://");
this.pictureBox2.ImageLocation = skuimgs[1].Replace("https://", "http://");
this.pictureBox3.ImageLocation = skuimgs[2].Replace("https://", "http://");
this.pictureBox4.ImageLocation = skuimgs[3].Replace("https://", "http://");
this.pictureBox5.ImageLocation = skuimgs[4].Replace("https://", "http://");
this.pictureBox6.ImageLocation = skuimgs[5].Replace("https://", "http://");
this.pictureBox7.ImageLocation = skuimgs[6].Replace("https://", "http://");
this.pictureBox8.ImageLocation = skuimgs[7].Replace("https://", "http://");
this.numMinPrice.Value = prodInfo.sku.Min(s => s.multi_price).ParseToDecimal() / 100m;
}
catch (Exception ex)
{
BaseMsgForm.ShowError("暂存图片失败:" + ex.Message);
return;
}
BaseMsgForm.ShowInfo("暂存图片成功!");
}
private void btnRestoreSkuImg_Click(object sender, EventArgs e)
{
var commitId = BaseRegex.GetStringQuery(ref currentUrl, "id");
var goodsId = BaseRegex.GetStringQuery(ref currentUrl, "goods_id");
AllBase.Model.Result.PDDResult.PDDProductDetailInfo prodInfo = null;
AllBase.Model.Param.PDDProdParam.PDDProductUploadParam prodParam = null;
if (string.IsNullOrEmpty(commitId) || string.IsNullOrEmpty(goodsId))
{
BaseMsgForm.ShowError("不是商品编辑页面!");
return;
}
if (prodUserSelectForm == null)
{
BaseMsgForm.ShowError("不是从上传界面进入!");
return;
}
if (string.IsNullOrEmpty(pddSourceGoodsData))
{
BaseMsgForm.ShowError("未捕获到商品详情!");
return;
}
if (string.IsNullOrEmpty(pddUploadGoodsData))
{
BaseMsgForm.ShowError("未捕获到商品上传记录!无法还原!");
return;
}
try
{
JObject jObj = JObject.Parse(pddSourceGoodsData);
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
prodParam = JsonHelper.DeserializeJsonToObject<AllBase.Model.Param.PDDProdParam.PDDProductUploadParam>(pddUploadGoodsData);
if (prodInfo.goods_id != prodParam.goods_id || prodInfo.goods_id != goodsId.ParseToLong())
{
BaseMsgForm.ShowError("来源商品和还原商品不一致!无法还原!");
return;
}
}
catch (Exception ex)
{
BaseMsgForm.ShowError("商品数据格式还原失败:" + ex.Message);
return;
}
var prodParamObj = JObject.Parse(pddUploadGoodsData);
prodParamObj["goods_commit_id"] = commitId;
foreach (var skuObj in prodParamObj["skus"])
{
var specNames = "";
foreach (var spec in skuObj["spec"])
{
specNames += spec["spec_name"] + ",";
}
specNames = specNames.TrimEnd(',');
var sourceSku = prodInfo.sku.FirstOrDefault(s => string.Join(",", s.spec.Select(sp => sp.spec_name)) == specNames);
if (sourceSku != null)
{
skuObj["thumb_url"] = sourceSku.thumb_url;
skuObj["thumb_url_file_id"] = sourceSku.thumb_url_file_id;
}
else
{
BaseMsgForm.ShowError("商品数据格式还原失败:有未能匹配的sku");
return;
}
}
var newData = JsonHelper.SerializeObject(prodParamObj);
var saveProdRst = prodUserSelectForm.save_goods_edit_data(shop, newData, goodsId, commitId, false, "edit");
if (!saveProdRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref saveProdRst, "error_msg");
if (string.IsNullOrEmpty(error))
error = saveProdRst;
BaseMsgForm.ShowError("保存失败 " + error);
return;
}
Thread.Sleep(Randomx.GetId(100, 600));
var submitProdRst = prodUserSelectForm.submit_goods_edit(shop, goodsId, commitId, false, "edit");
if (!submitProdRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref submitProdRst, "error_msg");
if (string.IsNullOrEmpty(error))
error = submitProdRst;
BaseMsgForm.ShowError("提交失败 " + error);
return;
}
cefWebBrowser.Load("https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav");
BaseMsgForm.ShowInfo("还原并提交成功!");
}
private void btnSignActivity_Click(object sender, EventArgs e)
{
var commitId = BaseRegex.GetStringQuery(ref currentUrl, "id");
var goodsId = BaseRegex.GetStringQuery(ref currentUrl, "goods_id");
AllBase.Model.Result.PDDResult.PDDProductDetailInfo prodInfo = null;
AllBase.Model.Param.PDDProdParam.PDDProductUploadParam prodParam = null;
if (string.IsNullOrEmpty(commitId) || string.IsNullOrEmpty(goodsId))
{
BaseMsgForm.ShowError("不是商品编辑页面!");
return;
}
if (prodUserSelectForm == null)
{
BaseMsgForm.ShowError("不是从上传界面进入!");
return;
}
if (string.IsNullOrEmpty(pddSourceGoodsData))
{
BaseMsgForm.ShowError("未捕获到商品详情!");
return;
}
if (string.IsNullOrEmpty(pddUploadGoodsData))
{
BaseMsgForm.ShowError("未捕获到商品上传记录!无法报名!");
return;
}
try
{
JObject jObj = JObject.Parse(pddSourceGoodsData);
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
prodParam = JsonHelper.DeserializeJsonToObject<AllBase.Model.Param.PDDProdParam.PDDProductUploadParam>(pddUploadGoodsData);
if (prodInfo.goods_id != prodParam.goods_id || prodInfo.goods_id != goodsId.ParseToLong())
{
BaseMsgForm.ShowError("来源商品和还原商品不一致!无法报名!");
return;
}
}
catch (Exception ex)
{
BaseMsgForm.ShowError("一键报名活动失败:" + ex.Message);
return;
}
btnSignActivity.Text = "报名中请稍候";
Task.Run(() =>
{
try
{
foreach (var sku in prodParam.skus)
{
sku.multi_price = (numMinPrice.Value * 100).ParseToInt();
sku.price = sku.multi_price + 100;
}
var result = prodUserSelectForm.SignAcitvity(shop, prodParam);
Invoke(new Action(() =>
{
btnSignActivity.Text = "一键报名活动";
if (!string.IsNullOrEmpty(result))
{
BaseMsgForm.ShowError(result);
}
else
{
BaseMsgForm.ShowInfo("一键报名活动成功");
}
}));
}
catch (Exception ex)
{
}
});
}
private void pictureBox1_Click(object sender, EventArgs e)
{
var pb = sender as PictureBox;
if (!string.IsNullOrEmpty(pb?.ImageLocation))
{
ToolForms.ShowImgForm imgFrom = new ToolForms.ShowImgForm(pb.ImageLocation);
imgFrom.ShowDialog();
}
}
private void label3_Click(object sender, EventArgs e)
{
}
}
}