1添加随机上传商品 2优化pdd api授权逻辑
This commit is contained in:
1 parent
07b912e9eb
commit
c0b7c2d986
34 files changed
+1651
-603
No files matched your search
+9
-5
@@ -39,7 +39,8 @@
|
||||
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("认领待上传");
|
||||
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("库存上传");
|
||||
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("商品核价");
|
||||
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
|
||||
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("随机厂商商品");
|
||||
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1,
|
||||
treeNode2,
|
||||
treeNode3,
|
||||
@@ -50,7 +51,8 @@
|
||||
treeNode8,
|
||||
treeNode9,
|
||||
treeNode10,
|
||||
treeNode11});
|
||||
treeNode11,
|
||||
treeNode12});
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -163,10 +165,12 @@
|
||||
treeNode10.Text = "库存上传";
|
||||
treeNode11.Name = "商品核价";
|
||||
treeNode11.Text = "商品核价";
|
||||
treeNode12.Name = "超级权限管理";
|
||||
treeNode12.Text = "超级权限管理";
|
||||
treeNode12.Name = "随机厂商商品";
|
||||
treeNode12.Text = "随机厂商商品";
|
||||
treeNode13.Name = "超级权限管理";
|
||||
treeNode13.Text = "超级权限管理";
|
||||
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode12});
|
||||
treeNode13});
|
||||
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
|
||||
this.tv.Size = new System.Drawing.Size(140, 446);
|
||||
this.tv.TabIndex = 1;
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
public Lazy<PDDGetChanceProdForm> getChanceProdForm = new Lazy<PDDGetChanceProdForm>();
|
||||
public Lazy<PDDGetChanceProdByImgForm> getChanceProdByImgForm = new Lazy<PDDGetChanceProdByImgForm>();
|
||||
public Lazy<GetJuShuitanProdForm> getJuShuitanProdForm = new Lazy<GetJuShuitanProdForm>();
|
||||
public Lazy<RandomComProductForm> randomComProductForm = new Lazy<RandomComProductForm>();
|
||||
//public Lazy<DbPriceMarkUpForm> dbPriceMarkUpForm = new Lazy<DbPriceMarkUpForm>();
|
||||
//public Lazy<DbProductSelectListManageForm> dbProductSelectListManageForm = new Lazy<DbProductSelectListManageForm>();
|
||||
//public Lazy<ProductThirdSelectListManageForm> productThirdSelectListManageForm = new Lazy<ProductThirdSelectListManageForm>();
|
||||
@@ -102,6 +103,9 @@ namespace TemuKJD.PDDForms.AdminForms
|
||||
case "厂家商品采集":
|
||||
SetForm(getJuShuitanProdForm.Value);
|
||||
break;
|
||||
case "随机厂商商品":
|
||||
SetForm(randomComProductForm.Value);
|
||||
break;
|
||||
//case "选品加价管理":
|
||||
// SetForm(dbPriceMarkUpForm.Value);
|
||||
// break;
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
|
||||
namespace TemuKJD.PDDForms.AdminForms
|
||||
{
|
||||
partial class RandomComProductForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.chkIsOn = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.txtProductInterval = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.cmbProductGroup = new System.Windows.Forms.ComboBox();
|
||||
this.btnSave = new DevComponents.DotNetBar.PanelEx();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ucCheckBox1
|
||||
//
|
||||
this.chkIsOn.AutoSize = true;
|
||||
this.chkIsOn.Checked = true;
|
||||
this.chkIsOn.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkIsOn.Location = new System.Drawing.Point(38, 39);
|
||||
this.chkIsOn.Name = "ucCheckBox1";
|
||||
this.chkIsOn.Size = new System.Drawing.Size(147, 21);
|
||||
this.chkIsOn.TabIndex = 0;
|
||||
this.chkIsOn.Text = "打开随机厂商商品功能";
|
||||
this.chkIsOn.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.txtProductInterval.Location = new System.Drawing.Point(274, 38);
|
||||
this.txtProductInterval.Name = "textBox1";
|
||||
this.txtProductInterval.Size = new System.Drawing.Size(58, 23);
|
||||
this.txtProductInterval.TabIndex = 1;
|
||||
this.txtProductInterval.Text = "50";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(218, 41);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(56, 17);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "随机间隔";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(378, 41);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(56, 17);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "随机分组";
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
this.cmbProductGroup.FormattingEnabled = true;
|
||||
this.cmbProductGroup.Location = new System.Drawing.Point(434, 37);
|
||||
this.cmbProductGroup.Name = "comboBox1";
|
||||
this.cmbProductGroup.Size = new System.Drawing.Size(121, 25);
|
||||
this.cmbProductGroup.TabIndex = 5;
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSave.Location = new System.Drawing.Point(609, 38);
|
||||
this.btnSave.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(60, 23);
|
||||
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnSave.Style.GradientAngle = 90;
|
||||
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSave.TabIndex = 802;
|
||||
this.btnSave.Text = "保存";
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// pbLoading
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(375, 200);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pbLoading.TabIndex = 803;
|
||||
this.pbLoading.TabStop = false;
|
||||
this.pbLoading.Visible = false;
|
||||
//
|
||||
// RandomComProductForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.pbLoading);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.cmbProductGroup);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.txtProductInterval);
|
||||
this.Controls.Add(this.chkIsOn);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Name = "RandomComProductForm";
|
||||
this.Text = "RandomComProductForm";
|
||||
this.Load += new System.EventHandler(this.RandomComProductForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private UserComponent.UcCheckBox chkIsOn;
|
||||
private System.Windows.Forms.TextBox txtProductInterval;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ComboBox cmbProductGroup;
|
||||
private DevComponents.DotNetBar.PanelEx btnSave;
|
||||
private System.Windows.Forms.PictureBox pbLoading;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using AllBase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using TemuKJD.PDDForms.ProductSelectForms;
|
||||
using Work;
|
||||
|
||||
namespace TemuKJD.PDDForms.AdminForms
|
||||
{
|
||||
public partial class RandomComProductForm : Form
|
||||
{
|
||||
public RandomComProductForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void RandomComProductForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
pbLoading.Visible = true;
|
||||
Task.Run(() =>
|
||||
{
|
||||
PDDDBProdListForm.GetPDDProductGroup(new List<ComboBox> { cmbProductGroup, });
|
||||
|
||||
var url = BaseClass.BuildObjString("product/get_random_company_product_config");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
BaseMsgForm.ShowError("获取随机厂商商品配置失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
}
|
||||
else
|
||||
{
|
||||
//this.pictureBox2.ImageLocation = imgListForm.SelectDbImgUrl;
|
||||
//dbProd.sku_img_replace_id = imgListForm.SelectDbImgId;
|
||||
//dbProd.sku_img_replace_url = imgListForm.SelectDbImgUrl;
|
||||
Invoke(new Action(() => {
|
||||
|
||||
this.txtProductInterval.Text = BaseRegex.GetStringJson(ref html, "product_interval");
|
||||
this.cmbProductGroup.Text = BaseRegex.GetStringJson(ref html, "product_group");
|
||||
this.chkIsOn.Checked = BaseRegex.GetStringJson(ref html, "is_on") == "1";
|
||||
}));
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
pbLoading.Visible = false;
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
pbLoading.Visible = true;
|
||||
Task.Run(() =>
|
||||
{
|
||||
var url = BaseClass.BuildObjString("product/set_random_company_product_config");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
data += "&product_interval=" + txtProductInterval.Text.Trim();
|
||||
data += "&product_group=" + cmbProductGroup.Text.Trim();
|
||||
data += "&is_on=" + (chkIsOn.Checked ? 1 : 0);
|
||||
}));
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
BaseMsgForm.ShowError("配置随机厂商商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseMsgForm.ShowInfo("配置随机厂商商品成功");
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
pbLoading.Visible = false;
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -29,6 +29,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
|
||||
private void PDDDBProdUserSelectCacheForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseClass.MainPath == "binxixi")
|
||||
{
|
||||
dgvSelectProduct.Columns["colBound"].Visible = false;
|
||||
}
|
||||
|
||||
dgvSelectProduct.AddSelectorColumn("colCheck");
|
||||
dgvSelectProduct.AddImgColumn("colProductSkcPic", "colImgUrl");
|
||||
|
||||
|
||||
@@ -30,15 +30,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = 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();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
|
||||
this.chkRandomCompanyProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.txtAddShippingFeeTimes = new System.Windows.Forms.TextBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.btnApiUpload = new DevComponents.DotNetBar.PanelEx();
|
||||
@@ -207,7 +208,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1523, 546);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1571, 546);
|
||||
this.splitContainer1.SplitterDistance = 140;
|
||||
this.splitContainer1.TabIndex = 11;
|
||||
//
|
||||
@@ -218,6 +219,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
|
||||
this.ucGroupBoxEx2.Controls.Add(this.chkRandomCompanyProd);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.txtAddShippingFeeTimes);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.label12);
|
||||
this.ucGroupBoxEx2.Controls.Add(this.btnApiUpload);
|
||||
@@ -268,11 +270,23 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.ucGroupBoxEx2.Controls.Add(this.label11);
|
||||
this.ucGroupBoxEx2.Location = new System.Drawing.Point(459, 2);
|
||||
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
|
||||
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1062, 140);
|
||||
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1110, 140);
|
||||
this.ucGroupBoxEx2.TabIndex = 667;
|
||||
this.ucGroupBoxEx2.TabStop = false;
|
||||
this.ucGroupBoxEx2.Text = "商品上传";
|
||||
//
|
||||
// chkRandomCompanyProd
|
||||
//
|
||||
this.chkRandomCompanyProd.Checked = true;
|
||||
this.chkRandomCompanyProd.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkRandomCompanyProd.Location = new System.Drawing.Point(846, 111);
|
||||
this.chkRandomCompanyProd.Name = "chkRandomCompanyProd";
|
||||
this.chkRandomCompanyProd.Size = new System.Drawing.Size(87, 21);
|
||||
this.chkRandomCompanyProd.TabIndex = 808;
|
||||
this.chkRandomCompanyProd.Text = "随机工厂商品";
|
||||
this.chkRandomCompanyProd.UseVisualStyleBackColor = true;
|
||||
this.chkRandomCompanyProd.Visible = false;
|
||||
//
|
||||
// txtAddShippingFeeTimes
|
||||
//
|
||||
this.txtAddShippingFeeTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
@@ -302,9 +316,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnApiUpload.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnApiUpload.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnApiUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnApiUpload.Location = new System.Drawing.Point(965, 40);
|
||||
this.btnApiUpload.Location = new System.Drawing.Point(1031, 40);
|
||||
this.btnApiUpload.Name = "btnApiUpload";
|
||||
this.btnApiUpload.Size = new System.Drawing.Size(84, 23);
|
||||
this.btnApiUpload.Size = new System.Drawing.Size(66, 23);
|
||||
this.btnApiUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnApiUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnApiUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -327,9 +341,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnUpload.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnUpload.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnUpload.Location = new System.Drawing.Point(965, 81);
|
||||
this.btnUpload.Location = new System.Drawing.Point(1031, 81);
|
||||
this.btnUpload.Name = "btnUpload";
|
||||
this.btnUpload.Size = new System.Drawing.Size(84, 23);
|
||||
this.btnUpload.Size = new System.Drawing.Size(66, 23);
|
||||
this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
@@ -349,7 +363,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
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(944, 43);
|
||||
this.label7.Location = new System.Drawing.Point(992, 43);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(20, 17);
|
||||
@@ -359,7 +373,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// 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(912, 40);
|
||||
this.txtWaitSeconds.Location = new System.Drawing.Point(960, 40);
|
||||
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);
|
||||
@@ -371,7 +385,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
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(858, 43);
|
||||
this.label6.Location = new System.Drawing.Point(906, 43);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(56, 17);
|
||||
@@ -476,10 +490,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnStop.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnStop.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnStop.Location = new System.Drawing.Point(965, 110);
|
||||
this.btnStop.Location = new System.Drawing.Point(1031, 110);
|
||||
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnStop.Name = "btnStop";
|
||||
this.btnStop.Size = new System.Drawing.Size(84, 23);
|
||||
this.btnStop.Size = new System.Drawing.Size(66, 23);
|
||||
this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
@@ -671,7 +685,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnClearDgv.Location = new System.Drawing.Point(879, 110);
|
||||
this.btnClearDgv.Location = new System.Drawing.Point(944, 110);
|
||||
this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnClearDgv.Name = "btnClearDgv";
|
||||
this.btnClearDgv.Size = new System.Drawing.Size(84, 23);
|
||||
@@ -918,7 +932,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.chkChance.AutoSize = true;
|
||||
this.chkChance.Checked = true;
|
||||
this.chkChance.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkChance.Location = new System.Drawing.Point(968, 17);
|
||||
this.chkChance.Location = new System.Drawing.Point(1020, 17);
|
||||
this.chkChance.Name = "chkChance";
|
||||
this.chkChance.Size = new System.Drawing.Size(87, 21);
|
||||
this.chkChance.TabIndex = 556;
|
||||
@@ -1066,6 +1080,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.cmbSourceType.Name = "cmbSourceType";
|
||||
this.cmbSourceType.Size = new System.Drawing.Size(92, 25);
|
||||
this.cmbSourceType.TabIndex = 671;
|
||||
this.cmbSourceType.Text = "厂商直采";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
@@ -1339,7 +1354,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// splitContainer3.Panel2
|
||||
//
|
||||
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(1523, 402);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(1571, 402);
|
||||
this.splitContainer3.SplitterDistance = 372;
|
||||
this.splitContainer3.TabIndex = 1;
|
||||
//
|
||||
@@ -1363,7 +1378,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.splitContainer2.Panel2.Controls.Add(this.pbLoading);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct);
|
||||
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1523, 372);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1571, 372);
|
||||
this.splitContainer2.SplitterDistance = 326;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
@@ -1383,19 +1398,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle22.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dgvShop.AutoRowNumber = true;
|
||||
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle23.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23;
|
||||
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.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
@@ -1512,7 +1527,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
// txtTest20981
|
||||
//
|
||||
this.txtTest20981.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtTest20981.Location = new System.Drawing.Point(970, 30);
|
||||
this.txtTest20981.Location = new System.Drawing.Point(1018, 30);
|
||||
this.txtTest20981.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||
this.txtTest20981.Name = "txtTest20981";
|
||||
this.txtTest20981.Size = new System.Drawing.Size(127, 23);
|
||||
@@ -1525,7 +1540,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.btnTest20981.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnTest20981.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnTest20981.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnTest20981.Location = new System.Drawing.Point(1101, 30);
|
||||
this.btnTest20981.Location = new System.Drawing.Point(1149, 30);
|
||||
this.btnTest20981.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnTest20981.Name = "btnTest20981";
|
||||
this.btnTest20981.Size = new System.Drawing.Size(84, 23);
|
||||
@@ -1550,7 +1565,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(571, 161);
|
||||
this.pbLoading.Location = new System.Drawing.Point(595, 161);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
@@ -1562,19 +1577,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.dgvSelectProduct.AllowUserToAddRows = false;
|
||||
this.dgvSelectProduct.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle24.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle24;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvSelectProduct.AutoRowNumber = true;
|
||||
this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle25.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle25;
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colCheck,
|
||||
@@ -1605,7 +1620,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.dgvSelectProduct.Name = "dgvSelectProduct";
|
||||
this.dgvSelectProduct.ReadOnly = true;
|
||||
this.dgvSelectProduct.RowTemplate.Height = 23;
|
||||
this.dgvSelectProduct.Size = new System.Drawing.Size(1189, 372);
|
||||
this.dgvSelectProduct.Size = new System.Drawing.Size(1237, 372);
|
||||
this.dgvSelectProduct.TabIndex = 187;
|
||||
this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick);
|
||||
this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll);
|
||||
@@ -1636,8 +1651,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colSupplierName
|
||||
//
|
||||
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle26;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.colSupplierName.Frozen = true;
|
||||
this.colSupplierName.HeaderText = "店铺名称";
|
||||
this.colSupplierName.Name = "colSupplierName";
|
||||
@@ -1715,8 +1730,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colProductName
|
||||
//
|
||||
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle27;
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colProductName.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.colProductName.HeaderText = "商品标题";
|
||||
this.colProductName.Name = "colProductName";
|
||||
this.colProductName.ReadOnly = true;
|
||||
@@ -1776,8 +1791,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
// colAddTime
|
||||
//
|
||||
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle28;
|
||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colAddTime.DefaultCellStyle = dataGridViewCellStyle7;
|
||||
this.colAddTime.FillWeight = 80F;
|
||||
this.colAddTime.HeaderText = "上传时间";
|
||||
this.colAddTime.Name = "colAddTime";
|
||||
@@ -1805,8 +1820,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
//
|
||||
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
|
||||
this.splitContainer4.Panel2.Controls.Add(this.panelEx1);
|
||||
this.splitContainer4.Size = new System.Drawing.Size(1523, 26);
|
||||
this.splitContainer4.SplitterDistance = 832;
|
||||
this.splitContainer4.Size = new System.Drawing.Size(1571, 26);
|
||||
this.splitContainer4.SplitterDistance = 880;
|
||||
this.splitContainer4.TabIndex = 3;
|
||||
//
|
||||
// statusBar
|
||||
@@ -1817,7 +1832,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
this.statusBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(832, 26);
|
||||
this.statusBar.Size = new System.Drawing.Size(880, 26);
|
||||
this.statusBar.TabIndex = 2;
|
||||
//
|
||||
// btnClear
|
||||
@@ -2057,5 +2072,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.PictureBox pbShopLoading;
|
||||
private DevComponents.DotNetBar.PanelEx btnProdDb;
|
||||
private UserComponent.UcCheckBox chkRandomCompanyProd;
|
||||
}
|
||||
}
|
||||
@@ -187,7 +187,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
IsLoadComplate = true;
|
||||
}
|
||||
|
||||
// 测试全局access_token
|
||||
// 测试全局access_token 测试用,目前作废
|
||||
void InitPddToken()
|
||||
{
|
||||
return;
|
||||
@@ -5988,8 +5988,8 @@ Content-Type: image/jpeg
|
||||
var selectProd = JsonHelper.DeserializeJsonToObject<TemuDBProductSelect>(JsonHelper.SerializeObject(prod));
|
||||
selectProd.out_product_Id = prod.id.ToString();
|
||||
selectProd.id = 1;
|
||||
if(lstTemuDBProductSelect.Count > 0)
|
||||
selectProd.id = lstTemuDBProductSelect.Max(p => p.id) + 1;
|
||||
if (lstTemuDBProductSelect.Count > 0)
|
||||
selectProd.id = lstTemuDBProductSelect.Max(p => p.id).ParseToInt() + 1;
|
||||
this.lstTemuDBProductSelect.Add(selectProd);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
@@ -6067,7 +6067,7 @@ Content-Type: image/jpeg
|
||||
|
||||
try
|
||||
{
|
||||
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd);
|
||||
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd).OrderBy(x => Randomx.GetId(999999)).ToList();
|
||||
return list;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -6076,6 +6076,67 @@ Content-Type: image/jpeg
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 随机添加黄总厂商商品(或其他指定分组产品,由服务端控制)
|
||||
/// </summary>
|
||||
/// <param name="totalCount"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
public List<KJDDBProduct> GetRandomCompanyProductList(out int totalCount, string groupName = "黄总数据包", int page = 1, int pageSize = 200)
|
||||
{
|
||||
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
|
||||
List<KJDDBProduct> list = new List<KJDDBProduct>();
|
||||
int pageCount = 1;
|
||||
totalCount = 0;
|
||||
|
||||
var url = BaseClass.BuildObjString("product/get_product_list_random");
|
||||
var data = "";
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
data = UserLogin.GetSignaturex() +
|
||||
"&page=" + 1 +
|
||||
"&page_size=" + pageSize;
|
||||
data += "&in_groups=" + groupName;
|
||||
}));
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowError("获取商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
}));
|
||||
return new List<KJDDBProduct>();
|
||||
}
|
||||
|
||||
int count = BaseRegex.GetIntJson(ref html, "count");
|
||||
totalCount = count;
|
||||
pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt();
|
||||
pageCount = Math.Max(pageCount, 1);
|
||||
|
||||
var jArr = JObject.Parse(html)["data"];
|
||||
if (jArr.Count() == 0)
|
||||
return list;
|
||||
var sProd = JsonHelper.SerializeObject(jArr);
|
||||
|
||||
try
|
||||
{
|
||||
list = JsonHelper.DeserializeJsonToList<KJDDBProduct>(sProd).OrderBy(x=> Randomx.GetId(999999)).ToList();
|
||||
return list;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new List<KJDDBProduct>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void btnClearUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseMsgForm.ShowConfirm("确定清空待上传商品吗?清空后不可恢复!").DialogResult == DialogResult.Cancel)
|
||||
@@ -6083,7 +6144,7 @@ Content-Type: image/jpeg
|
||||
|
||||
this.lstTemuDBProductSelect.Clear();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect);
|
||||
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
lblWaitToUp.Text = "待上传 " + lstTemuDBProductSelect.Count + " 件";
|
||||
}
|
||||
|
||||
private void lblNewAddPrice_Click(object sender, EventArgs e)
|
||||
@@ -6675,13 +6736,27 @@ Content-Type: image/jpeg
|
||||
}
|
||||
|
||||
this.btnUpload.Enabled = false;
|
||||
this.btnApiUpload.Enabled = false;
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(10000);
|
||||
Invoke(new Action(() => {
|
||||
|
||||
this.btnUpload.Enabled = true;
|
||||
this.btnApiUpload.Enabled = true;
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
if (cancellationTokenSource != null)
|
||||
cancellationTokenSource.Cancel();
|
||||
cancellationTokenSource = new CancellationTokenSource();
|
||||
Task.Run(() =>
|
||||
{
|
||||
// 随机店铺并分配商品
|
||||
try
|
||||
{
|
||||
GetShopAndUpProduct();
|
||||
GetShopAndUpProduct(cancellationTokenSource.Token);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -6689,16 +6764,34 @@ Content-Type: image/jpeg
|
||||
}
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (!cancellationTokenSource.Token.IsCancellationRequested)
|
||||
BaseMsgForm.ShowConfirm("上传完成");
|
||||
this.btnUpload.Enabled = true;
|
||||
}));
|
||||
}, cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
void GetShopAndUpProduct()
|
||||
void GetShopAndUpProduct(CancellationToken token)
|
||||
{
|
||||
NaiBa.Util.ConcurrentList<ShopLoginInfo> currentUpShopLst = new NaiBa.Util.ConcurrentList<ShopLoginInfo>();
|
||||
|
||||
// 随机厂商商品
|
||||
var url = BaseClass.BuildObjString("product/get_random_company_product_config");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
chkRandomCompanyProd.Checked = BaseRegex.GetStringJson(ref html, "is_on") == "1";
|
||||
int randomComProdInterval = Math.Max(1, BaseRegex.GetIntJson(ref html, "product_interval"));
|
||||
string randomComProdGroup = BaseRegex.GetStringJson(ref html, "product_group");
|
||||
int waitCompanyProdCnt = 0;
|
||||
List<TemuDBProductSelect> CompanyProdLst = new List<TemuDBProductSelect>();
|
||||
|
||||
while (lstTemuDBProductSelect.Count > 0)
|
||||
{
|
||||
if (token.IsCancellationRequested)
|
||||
break;
|
||||
|
||||
var shopIdLst = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
if (shopIdLst.Count <= 0)
|
||||
@@ -6727,10 +6820,39 @@ Content-Type: image/jpeg
|
||||
currentUpShopLst.Add(canUpShop);
|
||||
|
||||
// 每次挑选列表第一件商品
|
||||
var selectProd = lstTemuDBProductSelect.FirstOrDefault();
|
||||
var selectProd = lstTemuDBProductSelect.FirstOrDefault();
|
||||
selectProd.shop_id = canUpShop.ShopId;
|
||||
selectProd.shop_account = canUpShop.ShopAccount;
|
||||
lstTemuDBProductSelect.Remove(selectProd);
|
||||
|
||||
// 每若干个个商品插一件黄总商品包或其他组商品
|
||||
waitCompanyProdCnt++;
|
||||
if (chkRandomCompanyProd.Checked && waitCompanyProdCnt > randomComProdInterval)
|
||||
{
|
||||
waitCompanyProdCnt = 0;
|
||||
if (CompanyProdLst.Count == 0)
|
||||
{
|
||||
int dbCompanyProdCount;
|
||||
var dbComProdLst = GetRandomCompanyProductList(out dbCompanyProdCount, randomComProdGroup);
|
||||
foreach (var comProd in dbComProdLst)
|
||||
{
|
||||
var comSelectProd = JsonHelper.DeserializeJsonToObject<TemuDBProductSelect>(JsonHelper.SerializeObject(comProd));
|
||||
comSelectProd.out_product_Id = comProd.id.ToString();
|
||||
comSelectProd.id = 1;
|
||||
if (CompanyProdLst.Count > 0)
|
||||
comSelectProd.id = CompanyProdLst.Max(p => p.id).ParseToInt() + 1;
|
||||
CompanyProdLst.Add(comSelectProd);
|
||||
}
|
||||
}
|
||||
selectProd = CompanyProdLst.FirstOrDefault();
|
||||
selectProd.shop_id = canUpShop.ShopId;
|
||||
selectProd.shop_account = canUpShop.ShopAccount;
|
||||
CompanyProdLst.Remove(selectProd);
|
||||
}
|
||||
else
|
||||
{
|
||||
lstTemuDBProductSelect.Remove(selectProd);
|
||||
}
|
||||
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -6787,7 +6909,7 @@ Content-Type: image/jpeg
|
||||
// 接口上传
|
||||
try
|
||||
{
|
||||
result = ApiUploadProduct(canUpShop, selectProd, row);
|
||||
result = ApiUploadProduct(canUpShop, selectProd, row, token);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -6816,7 +6938,7 @@ Content-Type: image/jpeg
|
||||
selectProd.status = BaseRegex.GetStringJson(ref result, "status");
|
||||
if (string.IsNullOrWhiteSpace(selectProd.status))
|
||||
selectProd.status = "待上传";
|
||||
var goodsId = BaseRegex.GetStringJson(ref result, "goodsId");
|
||||
var goodsId = BaseRegex.GetStringJson(ref result, "goods_id");
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -6842,9 +6964,17 @@ Content-Type: image/jpeg
|
||||
|
||||
}, cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
if (token.IsCancellationRequested)
|
||||
BaseMsgForm.ShowConfirm("上传终止,正在上传的商品将继续上传");
|
||||
|
||||
while (currentUpShopLst.Count > 0)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
string ApiUploadProduct(ShopLoginInfo shop, TemuDBProductSelect selectProd, DataGridViewRow row)
|
||||
string ApiUploadProduct(ShopLoginInfo shop, TemuDBProductSelect selectProd, DataGridViewRow row, CancellationToken token)
|
||||
{
|
||||
DataGridViewCell cell = row.Cells["colOpResult"];
|
||||
Invoke(new Action(() =>
|
||||
@@ -6891,7 +7021,7 @@ Content-Type: image/jpeg
|
||||
// 主图
|
||||
int cnt = 0;
|
||||
string carousel_gallery = "";
|
||||
foreach (var img in prodInfo.detail.galleries.Where(g => g.type ==1).ToList())
|
||||
foreach (var img in prodInfo.detail.galleries.Where(g => g.type == 1).ToList())
|
||||
{
|
||||
cnt++;
|
||||
Invoke(new Action(() =>
|
||||
@@ -7055,6 +7185,9 @@ Content-Type: image/jpeg
|
||||
|
||||
foreach (var propApiInfo in apiCatRuleInfo.properties)
|
||||
{
|
||||
if (propApiInfo.name == "成分含量")
|
||||
{
|
||||
}
|
||||
if (propApiInfo.required == true && !propParamLst.Any(p => p.ref_pid == propApiInfo.ref_pid))
|
||||
{
|
||||
var contentOther = propApiInfo.values?.FirstOrDefault(c => c.value == "其他");
|
||||
@@ -7071,7 +7204,7 @@ Content-Type: image/jpeg
|
||||
if (contentValue != null)
|
||||
{
|
||||
var propParam = JsonHelper.DeserializeJsonToObject<ApiPddProperty>(JsonHelper.SerializeObject(propApiInfo));
|
||||
propParam.values = new List<ApiPddPropertyValue>() { contentOther };
|
||||
propParam.values = new List<ApiPddPropertyValue>() { contentValue };
|
||||
propParamLst.Add(propParam);
|
||||
}
|
||||
}
|
||||
@@ -7087,6 +7220,8 @@ Content-Type: image/jpeg
|
||||
foreach (var pp in propParamLst)
|
||||
{
|
||||
var pv = pp.values.FirstOrDefault();
|
||||
if (pv == null)
|
||||
continue;
|
||||
var value_unit = pp.value_unit.FirstOrDefault().ParseToString();
|
||||
var str = "{\"ref_pid\":" + pp.ref_pid + ",\"vid\":" + pv.vid + ",\"value\":\"" + pv.value + "\",\"value_unit\":\"" + value_unit + "\"},";
|
||||
string temp = BaseRegex.GetMatchRegexString(ref str, @"(\d{2,4}-\d{1,2}-\d{1,2})"); // 如果有时间替换成最新的
|
||||
@@ -7110,9 +7245,13 @@ Content-Type: image/jpeg
|
||||
|
||||
// 厂商直采获取推单运费模板
|
||||
#region 厂商直采获取推单运费模板,计算运费加价。
|
||||
//Invoke(new Action(() =>
|
||||
//{
|
||||
// cell.Value = "正在选取运费模板";
|
||||
//}));
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
//cell.Value = "正在选取运费模板";
|
||||
cell.Value = "正在计算加价";
|
||||
}));
|
||||
|
||||
var shippingTemplateJson = "";
|
||||
@@ -7287,8 +7426,15 @@ Content-Type: image/jpeg
|
||||
specNameDic[parent_spec_id] = parent_spec_name;
|
||||
}
|
||||
|
||||
Dictionary<string, long?> specNameIdMapDic = new Dictionary<string, long?>();
|
||||
|
||||
for (int i = 0; i < addPriceSkuInfoLst.Count; i++)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
cell.Value = "正在生成Sku规格 " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
|
||||
}));
|
||||
|
||||
for (int j = 0; j < addPriceSkuInfoLst[i].spec.Count; j++)
|
||||
{
|
||||
var specInfo = addPriceSkuInfoLst[i].spec[j];
|
||||
@@ -7304,19 +7450,26 @@ Content-Type: image/jpeg
|
||||
parent_id = specNameDic.ToList()[j].Key;
|
||||
specInfo.parent_id = parent_id;
|
||||
|
||||
|
||||
PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
|
||||
PddGoodsSpecIdGetApi.Data["parent_spec_id"] = parent_id;
|
||||
PddGoodsSpecIdGetApi.Data["spec_name"] = specInfo.spec_name;
|
||||
var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
|
||||
if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
|
||||
if (specNameIdMapDic.Keys.Contains(specInfo.spec_name + specInfo.parent_name))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = PddGoodsSpecIdGetApiRst;
|
||||
return "Sku属性生成失败 " + errMsg;
|
||||
specInfo.spec_id = specNameIdMapDic[specInfo.spec_name + specInfo.parent_name];
|
||||
}
|
||||
else
|
||||
{
|
||||
PddApi PddGoodsSpecIdGetApi = new PddApi(shop);
|
||||
PddGoodsSpecIdGetApi.Data["parent_spec_id"] = parent_id;
|
||||
PddGoodsSpecIdGetApi.Data["spec_name"] = specInfo.spec_name;
|
||||
var PddGoodsSpecIdGetApiRst = PddGoodsSpecIdGetApi.PddGoodsSpecIdGet();
|
||||
if (!PddGoodsSpecIdGetApiRst.Contains("\"goods_spec_id_get_response\""))
|
||||
{
|
||||
var errMsg = BaseRegex.GetStringJson(ref PddGoodsSpecIdGetApiRst, "error_msg");
|
||||
if (string.IsNullOrEmpty(errMsg))
|
||||
errMsg = PddGoodsSpecIdGetApiRst;
|
||||
return "Sku属性生成失败 " + errMsg;
|
||||
}
|
||||
specInfo.spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
|
||||
specNameIdMapDic[specInfo.spec_name + specInfo.parent_name] = specInfo.spec_id;
|
||||
}
|
||||
specInfo.spec_id = BaseRegex.GetLongJson(ref PddGoodsSpecIdGetApiRst, "spec_id");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7327,7 +7480,7 @@ Content-Type: image/jpeg
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
cell.Value = "正在生成Sku " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
|
||||
cell.Value = "正在拼接Sku " + (i + 1) + "/" + addPriceSkuInfoLst.Count;
|
||||
}));
|
||||
|
||||
string spec = "";
|
||||
@@ -7736,20 +7889,41 @@ Content-Type: image/jpeg
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
foreach (var shop in GlobalConfig.ShopLoginList)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
if (isForceRefresh || (shop.AuthAddTime <= DateTime.Now.AddDays(-1) && shop.AuthExpiresTime <= DateTime.Now))
|
||||
{
|
||||
shop.Message = "";
|
||||
BindShop(shop, selectIds);
|
||||
}));
|
||||
PddApiHelper.RefreshApi(shop, isForceRefresh);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
shop.Message = "授权更新完成";
|
||||
BindShop(shop, selectIds);
|
||||
}));
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
shop.Message = "";
|
||||
BindShop(shop, selectIds);
|
||||
}));
|
||||
PddApiHelper.RefreshApi(shop, isForceRefresh);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
shop.Message = "授权更新完成";
|
||||
BindShop(shop, selectIds);
|
||||
}));
|
||||
}
|
||||
}
|
||||
List<List<AuthInfo>> lsts = GlobalConfig.ShopLoginList.Select(s => s.ApiAuthInfoList).ToList();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_shop_api_auth_info_lists", lsts);
|
||||
List<List<AuthInfo>> NewApiInfolsts = JsonHelper.DeserializeJsonToList<List<AuthInfo>>(JsonHelper.SerializeObject(GlobalConfig.ShopLoginList.Select(s => s.ApiAuthInfoList).ToList()));
|
||||
foreach (var newLst in NewApiInfolsts)
|
||||
{
|
||||
if (newLst.FirstOrDefault()!= null)
|
||||
{
|
||||
var oldApiAuths = PddApiHelper.LstAuthInfos.FirstOrDefault(oldLst => oldLst.FirstOrDefault()?.ShopId == newLst.FirstOrDefault().ShopId);
|
||||
if (oldApiAuths != null)
|
||||
{
|
||||
oldApiAuths.Clear();
|
||||
oldApiAuths.AddRange(newLst);
|
||||
}
|
||||
else
|
||||
{
|
||||
PddApiHelper.LstAuthInfos.Add(newLst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PddApiHelper.LstAuthInfos = PddApiHelper.LstAuthInfos.Where(a => a.OrderBy(o => o.AddTime).LastOrDefault().AddTime > DateTime.Now.AddDays(-30)).ToList();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_shop_api_auth_info_lists", PddApiHelper.LstAuthInfos);
|
||||
Invoke(new Action(() => { pbShopLoading.Visible = false; }));
|
||||
});
|
||||
}
|
||||
|
||||
+74
-42
@@ -39,6 +39,7 @@
|
||||
this.btnLoginSelect = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnCheck = new TemuKJD.UserControls.ButtonEx();
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
this.btnOpenOrder = new TemuKJD.UserControls.ButtonEx();
|
||||
this.chkUsePddWorkbanch = new TemuKJD.UserComponent.UcCheckBox(this.components);
|
||||
this.cmbNotes = new System.Windows.Forms.ComboBox();
|
||||
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
|
||||
@@ -54,8 +55,6 @@
|
||||
this.btnRefreshAuth = new TemuKJD.UserControls.ButtonEx();
|
||||
this.pbLoading = new System.Windows.Forms.PictureBox();
|
||||
this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx();
|
||||
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colMallId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -70,6 +69,7 @@
|
||||
this.colChatAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colBuyApi = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colBindApi = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colGotoShop = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colShopOperate = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colRelogin = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
@@ -81,6 +81,8 @@
|
||||
this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -146,9 +148,9 @@
|
||||
this.panel5.Controls.Add(this.btnRefreshShop);
|
||||
this.panel5.Controls.Add(this.btnLoginSelect);
|
||||
this.panel5.Controls.Add(this.btnCheck);
|
||||
this.panel5.Location = new System.Drawing.Point(1032, 3);
|
||||
this.panel5.Location = new System.Drawing.Point(1044, 3);
|
||||
this.panel5.Name = "panel5";
|
||||
this.panel5.Size = new System.Drawing.Size(229, 40);
|
||||
this.panel5.Size = new System.Drawing.Size(217, 40);
|
||||
this.panel5.TabIndex = 1;
|
||||
//
|
||||
// btnRefreshShop
|
||||
@@ -158,7 +160,7 @@
|
||||
this.btnRefreshShop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnRefreshShop.ForeColor = System.Drawing.Color.White;
|
||||
this.btnRefreshShop.Location = new System.Drawing.Point(21, 9);
|
||||
this.btnRefreshShop.Location = new System.Drawing.Point(7, 9);
|
||||
this.btnRefreshShop.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnRefreshShop.Name = "btnRefreshShop";
|
||||
this.btnRefreshShop.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -174,7 +176,7 @@
|
||||
this.btnLoginSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnLoginSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnLoginSelect.ForeColor = System.Drawing.Color.White;
|
||||
this.btnLoginSelect.Location = new System.Drawing.Point(162, 9);
|
||||
this.btnLoginSelect.Location = new System.Drawing.Point(148, 9);
|
||||
this.btnLoginSelect.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnLoginSelect.Name = "btnLoginSelect";
|
||||
this.btnLoginSelect.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -190,7 +192,7 @@
|
||||
this.btnCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnCheck.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCheck.ForeColor = System.Drawing.Color.White;
|
||||
this.btnCheck.Location = new System.Drawing.Point(92, 9);
|
||||
this.btnCheck.Location = new System.Drawing.Point(78, 9);
|
||||
this.btnCheck.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnCheck.Name = "btnCheck";
|
||||
this.btnCheck.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -201,6 +203,7 @@
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
this.panel4.Controls.Add(this.btnOpenOrder);
|
||||
this.panel4.Controls.Add(this.chkUsePddWorkbanch);
|
||||
this.panel4.Controls.Add(this.cmbNotes);
|
||||
this.panel4.Controls.Add(this.pnlEmpty);
|
||||
@@ -215,13 +218,30 @@
|
||||
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel4.Location = new System.Drawing.Point(3, 3);
|
||||
this.panel4.Name = "panel4";
|
||||
this.panel4.Size = new System.Drawing.Size(1023, 40);
|
||||
this.panel4.Size = new System.Drawing.Size(1035, 40);
|
||||
this.panel4.TabIndex = 0;
|
||||
//
|
||||
// btnOpenOrder
|
||||
//
|
||||
this.btnOpenOrder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOpenOrder.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnOpenOrder.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnOpenOrder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnOpenOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnOpenOrder.ForeColor = System.Drawing.Color.White;
|
||||
this.btnOpenOrder.Location = new System.Drawing.Point(933, 9);
|
||||
this.btnOpenOrder.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnOpenOrder.Name = "btnOpenOrder";
|
||||
this.btnOpenOrder.Size = new System.Drawing.Size(100, 25);
|
||||
this.btnOpenOrder.TabIndex = 466;
|
||||
this.btnOpenOrder.Text = "登录订单系统";
|
||||
this.btnOpenOrder.UseVisualStyleBackColor = false;
|
||||
this.btnOpenOrder.Click += new System.EventHandler(this.btnOpenOrder_Click);
|
||||
//
|
||||
// chkUsePddWorkbanch
|
||||
//
|
||||
this.chkUsePddWorkbanch.AutoSize = true;
|
||||
this.chkUsePddWorkbanch.Location = new System.Drawing.Point(897, 11);
|
||||
this.chkUsePddWorkbanch.Location = new System.Drawing.Point(800, 11);
|
||||
this.chkUsePddWorkbanch.Name = "chkUsePddWorkbanch";
|
||||
this.chkUsePddWorkbanch.Size = new System.Drawing.Size(128, 21);
|
||||
this.chkUsePddWorkbanch.TabIndex = 417;
|
||||
@@ -233,7 +253,7 @@
|
||||
// cmbNotes
|
||||
//
|
||||
this.cmbNotes.FormattingEnabled = true;
|
||||
this.cmbNotes.Location = new System.Drawing.Point(584, 10);
|
||||
this.cmbNotes.Location = new System.Drawing.Point(522, 10);
|
||||
this.cmbNotes.Name = "cmbNotes";
|
||||
this.cmbNotes.Size = new System.Drawing.Size(120, 25);
|
||||
this.cmbNotes.TabIndex = 413;
|
||||
@@ -244,7 +264,7 @@
|
||||
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.pnlEmpty.Location = new System.Drawing.Point(786, 9);
|
||||
this.pnlEmpty.Location = new System.Drawing.Point(718, 9);
|
||||
this.pnlEmpty.Name = "pnlEmpty";
|
||||
this.pnlEmpty.Size = new System.Drawing.Size(66, 26);
|
||||
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -270,7 +290,7 @@
|
||||
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSearch.ForeColor = System.Drawing.Color.White;
|
||||
this.btnSearch.Location = new System.Drawing.Point(715, 9);
|
||||
this.btnSearch.Location = new System.Drawing.Point(647, 9);
|
||||
this.btnSearch.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnSearch.Name = "btnSearch";
|
||||
this.btnSearch.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -282,7 +302,7 @@
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(525, 14);
|
||||
this.label4.Location = new System.Drawing.Point(462, 14);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(68, 17);
|
||||
this.label4.TabIndex = 377;
|
||||
@@ -290,7 +310,7 @@
|
||||
//
|
||||
// txtShopName
|
||||
//
|
||||
this.txtShopName.Location = new System.Drawing.Point(402, 11);
|
||||
this.txtShopName.Location = new System.Drawing.Point(352, 11);
|
||||
this.txtShopName.Name = "txtShopName";
|
||||
this.txtShopName.Size = new System.Drawing.Size(110, 23);
|
||||
this.txtShopName.TabIndex = 374;
|
||||
@@ -298,7 +318,7 @@
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(354, 14);
|
||||
this.label3.Location = new System.Drawing.Point(304, 14);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(56, 17);
|
||||
this.label3.TabIndex = 375;
|
||||
@@ -306,7 +326,7 @@
|
||||
//
|
||||
// txtShopId
|
||||
//
|
||||
this.txtShopId.Location = new System.Drawing.Point(232, 11);
|
||||
this.txtShopId.Location = new System.Drawing.Point(194, 11);
|
||||
this.txtShopId.Name = "txtShopId";
|
||||
this.txtShopId.Size = new System.Drawing.Size(110, 23);
|
||||
this.txtShopId.TabIndex = 372;
|
||||
@@ -314,7 +334,7 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(184, 14);
|
||||
this.label2.Location = new System.Drawing.Point(146, 14);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(55, 17);
|
||||
this.label2.TabIndex = 373;
|
||||
@@ -438,6 +458,7 @@
|
||||
this.colChatAccount,
|
||||
this.colLoginStatus,
|
||||
this.colBuyApi,
|
||||
this.colBindApi,
|
||||
this.colGotoShop,
|
||||
this.colShopOperate,
|
||||
this.colRelogin,
|
||||
@@ -459,31 +480,6 @@
|
||||
this.dgvShop.TabIndex = 5;
|
||||
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
|
||||
//
|
||||
// chkAutoDrag
|
||||
//
|
||||
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.chkAutoDrag.AutoSize = true;
|
||||
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
|
||||
this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2);
|
||||
this.chkAutoDrag.Name = "chkAutoDrag";
|
||||
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
|
||||
this.chkAutoDrag.TabIndex = 3;
|
||||
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
|
||||
this.chkAutoDrag.UseVisualStyleBackColor = false;
|
||||
this.chkAutoDrag.Visible = false;
|
||||
this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click);
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.BackColor = System.Drawing.Color.White;
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusBar.Location = new System.Drawing.Point(0, -1);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1264, 29);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.FillWeight = 26F;
|
||||
@@ -586,6 +582,15 @@
|
||||
this.colBuyApi.Name = "colBuyApi";
|
||||
this.colBuyApi.ReadOnly = true;
|
||||
//
|
||||
// colBindApi
|
||||
//
|
||||
this.colBindApi.FillWeight = 46F;
|
||||
this.colBindApi.HeaderText = "绑定授权";
|
||||
this.colBindApi.Name = "colBindApi";
|
||||
this.colBindApi.ReadOnly = true;
|
||||
this.colBindApi.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colBindApi.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
//
|
||||
// colGotoShop
|
||||
//
|
||||
this.colGotoShop.FillWeight = 46F;
|
||||
@@ -686,6 +691,31 @@
|
||||
this.colDelete.Name = "colDelete";
|
||||
this.colDelete.ReadOnly = true;
|
||||
//
|
||||
// chkAutoDrag
|
||||
//
|
||||
this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.chkAutoDrag.AutoSize = true;
|
||||
this.chkAutoDrag.BackColor = System.Drawing.Color.White;
|
||||
this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2);
|
||||
this.chkAutoDrag.Name = "chkAutoDrag";
|
||||
this.chkAutoDrag.Size = new System.Drawing.Size(159, 21);
|
||||
this.chkAutoDrag.TabIndex = 3;
|
||||
this.chkAutoDrag.Text = "登录时自动滑动拼图验证";
|
||||
this.chkAutoDrag.UseVisualStyleBackColor = false;
|
||||
this.chkAutoDrag.Visible = false;
|
||||
this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click);
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.BackColor = System.Drawing.Color.White;
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusBar.Location = new System.Drawing.Point(0, -1);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1264, 29);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// PDDShopListForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -761,6 +791,7 @@
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colChatAccount;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colBuyApi;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colBindApi;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colGotoShop;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colShopOperate;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colRelogin;
|
||||
@@ -772,5 +803,6 @@
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
|
||||
public UserControls.ButtonEx btnOpenOrder;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ using NaiBa.Util;
|
||||
using System.Globalization;
|
||||
using TemuKJD.BLL;
|
||||
using System.Diagnostics;
|
||||
using TemuKJD.BLL.PddApi;
|
||||
//using TemuKJD.PDDForms.AdminForms;
|
||||
|
||||
namespace TemuKJD.PDDForms.ShopForms
|
||||
@@ -58,8 +59,11 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
localShop.DbId = serverShop.DbId;
|
||||
localShop.UserName = serverShop.UserName;
|
||||
localShop.SubUserName = serverShop.SubUserName;
|
||||
localShop.ApiAuthInfoList = new List<AuthInfo>();
|
||||
localShop.ApiAuthInfoList.AddRange(serverShop.ApiAuthInfoList);
|
||||
if (serverShop.ApiAuthInfoList != null && serverShop.ApiAuthInfoList.Count > 0)
|
||||
{
|
||||
localShop.ApiAuthInfoList = new List<AuthInfo>();
|
||||
localShop.ApiAuthInfoList.AddRange(serverShop.ApiAuthInfoList);
|
||||
}
|
||||
localShop.BuyApiAuth.AccessToken = serverShop.BuyApiAuth.AccessToken;
|
||||
localShop.BuyApiAuth.AddTime = serverShop.BuyApiAuth.AddTime;
|
||||
localShop.BuyApiAuth.AppKey = serverShop.BuyApiAuth.AppKey;
|
||||
@@ -78,6 +82,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
GlobalConfig.ShopLoginList.Add(localShop);
|
||||
}
|
||||
}
|
||||
PddApiHelper.PddGetLocalTokens();
|
||||
}
|
||||
|
||||
public static List<ShopLoginInfo> GetServerShop()
|
||||
@@ -483,6 +488,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
param.ChatAccount,
|
||||
"",
|
||||
"购买授权",
|
||||
"绑定授权",
|
||||
"进入",
|
||||
"检测",
|
||||
string.IsNullOrWhiteSpace(param.LoginStatus) ? "未登录" : param.LoginStatus.Trim(),
|
||||
@@ -857,7 +863,18 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
{
|
||||
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
|
||||
shopLoginForm.InitUrl = "https://fuwu.pinduoduo.com/service-market/service-detail?detailId=84862";
|
||||
shopLoginForm.openType = EnumOpenType.login;
|
||||
shopLoginForm.openType = EnumOpenType.manage;
|
||||
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
|
||||
shopLoginForm.ShowDialog();
|
||||
btnRefreshCookie_Click(null, null);
|
||||
}
|
||||
break;
|
||||
case "绑定授权":
|
||||
{
|
||||
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
|
||||
shopLoginForm.InitUrl = "https://fuwu.pinduoduo.com/service-market/auth?client_id=" + PddApi.clientId + "&redirect_uri=" +
|
||||
GetHtml.UrlEncodeUtf8("http://po.e57.cn/login") + "?source=pdd_code&response_type=code";
|
||||
shopLoginForm.openType = EnumOpenType.manage;
|
||||
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
|
||||
shopLoginForm.ShowDialog();
|
||||
btnRefreshCookie_Click(null, null);
|
||||
@@ -1163,5 +1180,20 @@ function setCookie(name, value, daysToLive, path, domain, secure, httpOnly, same
|
||||
BaseMsgForm.ShowInfo("您已切换Cookie来源,请重启软件生效!");
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("use_pdd_workbanch", chkUsePddWorkbanch.Checked);
|
||||
}
|
||||
|
||||
private void btnOpenOrder_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShopLoginInfo shop = NaiBa.Util.Helper.ConfigHelper.LoadConfig<ShopLoginInfo>("pdd_dian_tong_ling_login_info");
|
||||
if (shop == null)
|
||||
shop = new ShopLoginInfo();
|
||||
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
|
||||
shopLoginForm.openType = EnumOpenType.manage;
|
||||
shopLoginForm.WindowState = FormWindowState.Maximized;
|
||||
shopLoginForm.txtUserName.ReadOnly = false;
|
||||
shopLoginForm.txtPassWord.ReadOnly = false;
|
||||
shopLoginForm.btnSaveUserInfo.Visible = true;
|
||||
shopLoginForm.InitUrl = "https://po.e57.cn/login?redirect=%2Findex";
|
||||
shopLoginForm.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,6 +159,9 @@
|
||||
<metadata name="colBuyApi.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colBindApi.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colGotoShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
+84
-56
@@ -36,6 +36,10 @@
|
||||
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnDel = new DevComponents.DotNetBar.PanelEx();
|
||||
this.pnlUploadOpBtns = new System.Windows.Forms.Panel();
|
||||
this.pictureBox9 = new System.Windows.Forms.PictureBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtSendPrice = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtSendCount = new System.Windows.Forms.TextBox();
|
||||
this.btnSendToUpload = new DevComponents.DotNetBar.PanelEx();
|
||||
this.numMinPrice = new System.Windows.Forms.NumericUpDown();
|
||||
@@ -64,16 +68,14 @@
|
||||
this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.txtAddress = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtSendPrice = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.pictureBox9 = new System.Windows.Forms.PictureBox();
|
||||
this.btnSaveUserInfo = new DevComponents.DotNetBar.PanelEx();
|
||||
((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.pictureBox9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numMinPrice)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
|
||||
@@ -87,7 +89,6 @@
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
@@ -108,6 +109,7 @@
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnSaveUserInfo);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.pnlUploadOpBtns);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.label2);
|
||||
@@ -120,7 +122,7 @@
|
||||
this.splitContainer1.Panel2.Controls.Add(this.btnReload);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
|
||||
this.splitContainer1.SplitterDistance = 668;
|
||||
this.splitContainer1.SplitterDistance = 669;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 4;
|
||||
//
|
||||
@@ -244,6 +246,47 @@
|
||||
this.pnlUploadOpBtns.Size = new System.Drawing.Size(812, 53);
|
||||
this.pnlUploadOpBtns.TabIndex = 463;
|
||||
//
|
||||
// pictureBox9
|
||||
//
|
||||
this.pictureBox9.Location = new System.Drawing.Point(586, 27);
|
||||
this.pictureBox9.Name = "pictureBox9";
|
||||
this.pictureBox9.Size = new System.Drawing.Size(24, 24);
|
||||
this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox9.TabIndex = 494;
|
||||
this.pictureBox9.TabStop = false;
|
||||
this.pictureBox9.Tag = "11";
|
||||
//
|
||||
// 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(699, 6);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(20, 17);
|
||||
this.label6.TabIndex = 493;
|
||||
this.label6.Text = "元";
|
||||
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtSendPrice
|
||||
//
|
||||
this.txtSendPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSendPrice.Location = new System.Drawing.Point(668, 3);
|
||||
this.txtSendPrice.Name = "txtSendPrice";
|
||||
this.txtSendPrice.Size = new System.Drawing.Size(31, 23);
|
||||
this.txtSendPrice.TabIndex = 492;
|
||||
this.txtSendPrice.Text = "20";
|
||||
//
|
||||
// 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(613, 6);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(56, 17);
|
||||
this.label5.TabIndex = 491;
|
||||
this.label5.Text = "提交价格";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtSendCount
|
||||
//
|
||||
this.txtSendCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -518,7 +561,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(276, 31);
|
||||
this.btnCopyPassword.Location = new System.Drawing.Point(191, 31);
|
||||
this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnCopyPassword.Name = "btnCopyPassword";
|
||||
this.btnCopyPassword.Size = new System.Drawing.Size(57, 25);
|
||||
@@ -534,7 +577,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(276, 4);
|
||||
this.btnCopyUserName.Location = new System.Drawing.Point(191, 4);
|
||||
this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnCopyUserName.Name = "btnCopyUserName";
|
||||
this.btnCopyUserName.Size = new System.Drawing.Size(57, 25);
|
||||
@@ -550,7 +593,7 @@
|
||||
this.txtPassWord.Name = "txtPassWord";
|
||||
this.txtPassWord.PasswordChar = '●';
|
||||
this.txtPassWord.ReadOnly = true;
|
||||
this.txtPassWord.Size = new System.Drawing.Size(221, 23);
|
||||
this.txtPassWord.Size = new System.Drawing.Size(135, 23);
|
||||
this.txtPassWord.TabIndex = 374;
|
||||
//
|
||||
// txtUserName
|
||||
@@ -559,7 +602,7 @@
|
||||
this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.txtUserName.Name = "txtUserName";
|
||||
this.txtUserName.ReadOnly = true;
|
||||
this.txtUserName.Size = new System.Drawing.Size(221, 23);
|
||||
this.txtUserName.Size = new System.Drawing.Size(135, 23);
|
||||
this.txtUserName.TabIndex = 373;
|
||||
//
|
||||
// btnStop
|
||||
@@ -644,46 +687,30 @@
|
||||
this.txtAddress.TabIndex = 7;
|
||||
this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown);
|
||||
//
|
||||
// label5
|
||||
// btnSaveUserInfo
|
||||
//
|
||||
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(613, 6);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(56, 17);
|
||||
this.label5.TabIndex = 491;
|
||||
this.label5.Text = "提交价格";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtSendPrice
|
||||
//
|
||||
this.txtSendPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSendPrice.Location = new System.Drawing.Point(668, 3);
|
||||
this.txtSendPrice.Name = "txtSendPrice";
|
||||
this.txtSendPrice.Size = new System.Drawing.Size(31, 23);
|
||||
this.txtSendPrice.TabIndex = 492;
|
||||
this.txtSendPrice.Text = "20";
|
||||
//
|
||||
// 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(699, 6);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(20, 17);
|
||||
this.label6.TabIndex = 493;
|
||||
this.label6.Text = "元";
|
||||
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// pictureBox9
|
||||
//
|
||||
this.pictureBox9.Location = new System.Drawing.Point(586, 27);
|
||||
this.pictureBox9.Name = "pictureBox9";
|
||||
this.pictureBox9.Size = new System.Drawing.Size(24, 24);
|
||||
this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox9.TabIndex = 494;
|
||||
this.pictureBox9.TabStop = false;
|
||||
this.pictureBox9.Tag = "11";
|
||||
this.btnSaveUserInfo.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnSaveUserInfo.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSaveUserInfo.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnSaveUserInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSaveUserInfo.Location = new System.Drawing.Point(251, 4);
|
||||
this.btnSaveUserInfo.Name = "btnSaveUserInfo";
|
||||
this.btnSaveUserInfo.Size = new System.Drawing.Size(88, 25);
|
||||
this.btnSaveUserInfo.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSaveUserInfo.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSaveUserInfo.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnSaveUserInfo.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnSaveUserInfo.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnSaveUserInfo.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnSaveUserInfo.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnSaveUserInfo.Style.GradientAngle = 90;
|
||||
this.btnSaveUserInfo.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnSaveUserInfo.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSaveUserInfo.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnSaveUserInfo.TabIndex = 470;
|
||||
this.btnSaveUserInfo.Text = "保存登录信息";
|
||||
this.btnSaveUserInfo.Visible = false;
|
||||
this.btnSaveUserInfo.Click += new System.EventHandler(this.btnSaveUserInfo_Click);
|
||||
//
|
||||
// PDDShopLoginForm
|
||||
//
|
||||
@@ -707,6 +734,7 @@
|
||||
this.pnlMultiLogin.ResumeLayout(false);
|
||||
this.pnlUploadOpBtns.ResumeLayout(false);
|
||||
this.pnlUploadOpBtns.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numMinPrice)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
|
||||
@@ -721,7 +749,6 @@
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -731,12 +758,6 @@
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private UserControls.ButtonEx btnStop;
|
||||
private UserControls.ButtonEx btnReload;
|
||||
private System.Windows.Forms.TextBox txtPassWord;
|
||||
private System.Windows.Forms.TextBox txtUserName;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private UserControls.ButtonEx btnCopyPassword;
|
||||
private UserControls.ButtonEx btnCopyUserName;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.TextBox txtAddress;
|
||||
private UserControls.ButtonEx btnLoginAgain;
|
||||
@@ -767,5 +788,12 @@
|
||||
private System.Windows.Forms.TextBox txtSendPrice;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.PictureBox pictureBox9;
|
||||
public System.Windows.Forms.TextBox txtPassWord;
|
||||
public System.Windows.Forms.TextBox txtUserName;
|
||||
public System.Windows.Forms.Label label2;
|
||||
public System.Windows.Forms.Label label1;
|
||||
public UserControls.ButtonEx btnCopyPassword;
|
||||
public UserControls.ButtonEx btnCopyUserName;
|
||||
public DevComponents.DotNetBar.PanelEx btnSaveUserInfo;
|
||||
}
|
||||
}
|
||||
@@ -505,11 +505,40 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e)
|
||||
{
|
||||
if (this.Created && !this.Disposing && !this.IsDisposed)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
currentUrl = e.Address;
|
||||
txtAddress.Text = e.Address;
|
||||
}));
|
||||
}
|
||||
if (e.Address == "https://po.e57.cn/login?redirect=%2Findex" && shop != null && !string.IsNullOrEmpty(shop.LoginName))
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(2000);
|
||||
// var jsStr = @"var txt1 = document.getElementByClassName('el-input__inner')[0]; txt1.focus(); txt1.click(); keyboardInput(txt1, '" + _account + "');"
|
||||
var _account = shop.LoginName;
|
||||
var _password = DataOpenSSL.DecryptString(shop.Password);
|
||||
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2);
|
||||
|
||||
var jsStr1 = "var usernameId = document.getElementsByClassName('el-input__inner')[0]; " +
|
||||
"changeReactInputValue(usernameId,'" + _account + "');";
|
||||
var response1 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1);
|
||||
response1.Wait(1000);
|
||||
Thread.Sleep(Randomx.GetId(50, 100));
|
||||
|
||||
if (!string.IsNullOrEmpty(_password))
|
||||
{
|
||||
string jsStr = "var passwordId = document.getElementsByClassName('el-input__inner')[1]; " +
|
||||
"changeReactInputValue(passwordId,'" + _password + "');";
|
||||
var response = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
|
||||
response.Wait(1000);
|
||||
Thread.Sleep(Randomx.GetId(500, 1000));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e)
|
||||
@@ -690,9 +719,40 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
this.lstShopCompany.Add(sc);
|
||||
}
|
||||
}
|
||||
|
||||
if (openType == EnumOpenType.manage && string.IsNullOrWhiteSpace(shop.MallId))
|
||||
{
|
||||
shop.MallId = BaseRegex.GetStringJson(ref data, "mall_id");
|
||||
shop.ShopId = BaseRegex.GetStringJson(ref data, "username");
|
||||
shop.ShopAccount = BaseRegex.GetStringJson(ref data, "mall_name");
|
||||
var mdyShopUrl = BaseClass.BuildObjString("shop/mdy_shop");
|
||||
var mdyShopData = UserLogin.GetSignaturex()
|
||||
+ "&login_name=" + shop.LoginName
|
||||
+ "&new_shop_id=" + shop.ShopId
|
||||
+ "&shop_account=" + shop.ShopAccount
|
||||
+ "&mall_id=" + shop.MallId;
|
||||
var result = GetHtml.PostUtf8(mdyShopUrl, mdyShopData);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 有些店铺mall_id未获取,补救(260401,临时,后面等店铺重新登录后就可以移除)
|
||||
if (url.Contains("https://mms.pinduoduo.com/janus/api/new/userinfo") && responseData.Contains("mall_id"))
|
||||
{
|
||||
if (openType == EnumOpenType.manage && string.IsNullOrWhiteSpace(shop.MallId))
|
||||
{
|
||||
var data = responseData;
|
||||
shop.MallId = BaseRegex.GetStringJson(ref data, "mall_id");
|
||||
shop.ShopId = BaseRegex.GetStringJson(ref data, "username");
|
||||
var mdyShopUrl = BaseClass.BuildObjString("shop/mdy_shop");
|
||||
var mdyShopData = UserLogin.GetSignaturex()
|
||||
+ "&login_name=" + shop.LoginName
|
||||
+ "&new_shop_id=" + shop.ShopId
|
||||
+ "&shop_account=" + shop.ShopAccount
|
||||
+ "&mall_id=" + shop.MallId;
|
||||
var result = GetHtml.PostUtf8(mdyShopUrl, mdyShopData);
|
||||
}
|
||||
}
|
||||
|
||||
//if (responseData.Contains("球球小小店铺55") && responseData.Contains("pdd24873711027"))
|
||||
//{
|
||||
@@ -1671,5 +1731,41 @@ function getElementWithText(sText)
|
||||
BaseMsgForm.ShowError(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSaveUserInfo_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (shop == null)
|
||||
return;
|
||||
|
||||
shop.LoginName = this.txtUserName.Text;
|
||||
shop.Password = DataOpenSSL.EncryptString(this.txtPassWord.Text);
|
||||
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_dian_tong_ling_login_info", shop);
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
// var jsStr = @"var txt1 = document.getElementByClassName('el-input__inner')[0]; txt1.focus(); txt1.click(); keyboardInput(txt1, '" + _account + "');"
|
||||
var _account = shop.LoginName;
|
||||
var _password = DataOpenSSL.DecryptString(shop.Password);
|
||||
|
||||
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2);
|
||||
|
||||
var jsStr1 = "var usernameId = document.getElementsByClassName('el-input__inner')[0]; " +
|
||||
"changeReactInputValue(usernameId,'" + _account + "');";
|
||||
var response1 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1);
|
||||
response1.Wait(1000);
|
||||
Thread.Sleep(Randomx.GetId(50, 100));
|
||||
|
||||
if (!string.IsNullOrEmpty(_password))
|
||||
{
|
||||
string jsStr = "var passwordId = document.getElementsByClassName('el-input__inner')[1]; " +
|
||||
"changeReactInputValue(passwordId,'" + _password + "');";
|
||||
var response = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
|
||||
response.Wait(1000);
|
||||
Thread.Sleep(Randomx.GetId(500, 1000));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user