店铺优化相关功能
This commit is contained in:
1 parent
9805792aed
commit
0e6a927cf2
43 files changed
+3305
-1604
No files matched your search
+58
-36
@@ -55,6 +55,8 @@
|
||||
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 +72,8 @@
|
||||
this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.colBuyApi = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colBindApi = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colBuyOrderApi = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.colBindOrderApi = 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,8 +85,6 @@
|
||||
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();
|
||||
@@ -459,6 +461,8 @@
|
||||
this.colLoginStatus,
|
||||
this.colBuyApi,
|
||||
this.colBindApi,
|
||||
this.colBuyOrderApi,
|
||||
this.colBindOrderApi,
|
||||
this.colGotoShop,
|
||||
this.colShopOperate,
|
||||
this.colRelogin,
|
||||
@@ -480,6 +484,31 @@
|
||||
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;
|
||||
@@ -578,23 +607,39 @@
|
||||
// colBuyApi
|
||||
//
|
||||
this.colBuyApi.FillWeight = 46F;
|
||||
this.colBuyApi.HeaderText = "购买授权";
|
||||
this.colBuyApi.HeaderText = "上传Api";
|
||||
this.colBuyApi.Name = "colBuyApi";
|
||||
this.colBuyApi.ReadOnly = true;
|
||||
//
|
||||
// colBindApi
|
||||
//
|
||||
this.colBindApi.FillWeight = 46F;
|
||||
this.colBindApi.HeaderText = "绑定授权";
|
||||
this.colBindApi.FillWeight = 48F;
|
||||
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;
|
||||
//
|
||||
// colBuyOrderApi
|
||||
//
|
||||
this.colBuyOrderApi.FillWeight = 46F;
|
||||
this.colBuyOrderApi.HeaderText = "订单Api";
|
||||
this.colBuyOrderApi.Name = "colBuyOrderApi";
|
||||
this.colBuyOrderApi.ReadOnly = true;
|
||||
this.colBuyOrderApi.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.colBuyOrderApi.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
|
||||
//
|
||||
// colBindOrderApi
|
||||
//
|
||||
this.colBindOrderApi.FillWeight = 48F;
|
||||
this.colBindOrderApi.HeaderText = "订单授权";
|
||||
this.colBindOrderApi.Name = "colBindOrderApi";
|
||||
this.colBindOrderApi.ReadOnly = true;
|
||||
//
|
||||
// colGotoShop
|
||||
//
|
||||
this.colGotoShop.FillWeight = 46F;
|
||||
this.colGotoShop.HeaderText = "进入店铺";
|
||||
this.colGotoShop.FillWeight = 38F;
|
||||
this.colGotoShop.HeaderText = "进店";
|
||||
this.colGotoShop.Name = "colGotoShop";
|
||||
this.colGotoShop.ReadOnly = true;
|
||||
this.colGotoShop.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
@@ -612,7 +657,7 @@
|
||||
//
|
||||
// colRelogin
|
||||
//
|
||||
this.colRelogin.FillWeight = 40F;
|
||||
this.colRelogin.FillWeight = 38F;
|
||||
this.colRelogin.HeaderText = "登录";
|
||||
this.colRelogin.Name = "colRelogin";
|
||||
this.colRelogin.ReadOnly = true;
|
||||
@@ -677,7 +722,7 @@
|
||||
//
|
||||
// colEdit
|
||||
//
|
||||
this.colEdit.FillWeight = 46F;
|
||||
this.colEdit.FillWeight = 38F;
|
||||
this.colEdit.HeaderText = "编辑";
|
||||
this.colEdit.Name = "colEdit";
|
||||
this.colEdit.ReadOnly = true;
|
||||
@@ -686,36 +731,11 @@
|
||||
//
|
||||
// colDelete
|
||||
//
|
||||
this.colDelete.FillWeight = 46F;
|
||||
this.colDelete.FillWeight = 38F;
|
||||
this.colDelete.HeaderText = "删除";
|
||||
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;
|
||||
@@ -777,6 +797,7 @@
|
||||
private UserControls.ButtonEx btnRefreshShop;
|
||||
private System.Windows.Forms.ComboBox cmbNotes;
|
||||
private UserComponent.UcCheckBox chkUsePddWorkbanch;
|
||||
public UserControls.ButtonEx btnOpenOrder;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colMallId;
|
||||
@@ -792,6 +813,8 @@
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colBuyApi;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colBindApi;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colBuyOrderApi;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colBindOrderApi;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colGotoShop;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colShopOperate;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colRelogin;
|
||||
@@ -803,6 +826,5 @@
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
|
||||
public UserControls.ButtonEx btnOpenOrder;
|
||||
}
|
||||
}
|
||||
@@ -485,6 +485,8 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
"",
|
||||
"购买授权",
|
||||
"绑定授权",
|
||||
"购买授权",
|
||||
"绑定授权",
|
||||
"进入",
|
||||
"检测",
|
||||
string.IsNullOrWhiteSpace(param.LoginStatus) ? "未登录" : param.LoginStatus.Trim(),
|
||||
@@ -759,7 +761,8 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
switch (headerText)
|
||||
{
|
||||
case "检测":
|
||||
//CheckShopLoginAsync(new string[] { loginName });
|
||||
//CheckShopLoginAsync(new string[] { loginName });
|
||||
case "进店":
|
||||
case "进入店铺":
|
||||
IsOperate = true;
|
||||
{
|
||||
@@ -839,7 +842,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
}
|
||||
IsOperate = false;
|
||||
break;
|
||||
case "购买授权":
|
||||
case "上传Api":
|
||||
{
|
||||
var currentPddClient = GlobalConfig.PddClentInfoList.FirstOrDefault(c => c.is_current == true);
|
||||
if (currentPddClient != null)
|
||||
@@ -855,7 +858,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "绑定授权":
|
||||
case "上传授权":
|
||||
{
|
||||
var currentPddClient = GlobalConfig.PddClentInfoList.FirstOrDefault(c => c.is_current == true);
|
||||
if (currentPddClient != null)
|
||||
@@ -874,6 +877,36 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "订单Api":
|
||||
{
|
||||
var currentPddClient = GlobalConfig.PddClentInfoList.FirstOrDefault(c => c.is_current == true);
|
||||
if (currentPddClient != null)
|
||||
{
|
||||
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
|
||||
shopLoginForm.InitUrl = "https://fuwu.pinduoduo.com/service-market/service-detail?detailId=84862";
|
||||
shopLoginForm.openType = EnumOpenType.manage;
|
||||
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
|
||||
shopLoginForm.ShowDialog();
|
||||
btnRefreshCookie_Click(null, null);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "订单授权":
|
||||
{
|
||||
var currentPddClient = GlobalConfig.PddClentInfoList.FirstOrDefault(c => c.is_current == true);
|
||||
if (currentPddClient != null)
|
||||
{
|
||||
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
|
||||
shopLoginForm.InitUrl = "https://fuwu.pinduoduo.com/service-market/auth?client_id=" + PddApi.clientId_pi_xiu_guan_jia +
|
||||
"&redirect_uri=" + GetHtml.UrlEncodeUtf8("http://po.e57.cn/login?source=pdd_code_pixiu") + "&response_type=code";
|
||||
shopLoginForm.openType = EnumOpenType.manage;
|
||||
shopLoginForm.AuthClientId = currentPddClient.client_id;
|
||||
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
|
||||
shopLoginForm.ShowDialog();
|
||||
btnRefreshCookie_Click(null, null);
|
||||
}
|
||||
}
|
||||
break;
|
||||
//case "多重登录":
|
||||
// IsOperate = true;
|
||||
// ShopLoginForm shopMultiLoginForm = new ShopLoginForm(shop);
|
||||
@@ -932,7 +965,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
this.btnCheck.Enabled = false;
|
||||
var t = Task.Run(() =>
|
||||
{
|
||||
UpdateShop();
|
||||
//UpdateShop();
|
||||
CheckShopListLogin(shopNameList.Distinct().ToArray());
|
||||
RefreshDataGridView(false);
|
||||
});
|
||||
@@ -1181,7 +1214,7 @@ function setCookie(name, value, daysToLive, path, domain, secure, httpOnly, same
|
||||
if (shop == null)
|
||||
shop = new ShopLoginInfo();
|
||||
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
|
||||
shopLoginForm.openType = EnumOpenType.manage;
|
||||
shopLoginForm.openType = EnumOpenType.order_login;
|
||||
shopLoginForm.WindowState = FormWindowState.Maximized;
|
||||
shopLoginForm.txtUserName.ReadOnly = false;
|
||||
shopLoginForm.txtPassWord.ReadOnly = false;
|
||||
|
||||
@@ -162,6 +162,12 @@
|
||||
<metadata name="colBindApi.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colBuyOrderApi.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="colBindOrderApi.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>
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
login,
|
||||
manage,
|
||||
refresh_cookie,
|
||||
order_login,
|
||||
}
|
||||
public partial class PDDShopLoginForm : BaseGeneralForm
|
||||
{
|
||||
@@ -515,7 +516,19 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
txtAddress.Text = e.Address;
|
||||
}));
|
||||
}
|
||||
if (e.Address == "https://po.e57.cn/login?redirect=%2Findex" && shop != null && !string.IsNullOrEmpty(shop.LoginName))
|
||||
if (e.Address == "https://po.e57.cn/login?redirect=%2Findex" && openType == EnumOpenType.manage)
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(2000);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (this.Created && !this.IsDisposed && !this.Disposing)
|
||||
this.Close();
|
||||
}));
|
||||
});
|
||||
}
|
||||
if (e.Address == "https://po.e57.cn/login?redirect=%2Findex" && openType == EnumOpenType.order_login && shop != null && !string.IsNullOrEmpty(shop.LoginName))
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
@@ -670,7 +683,8 @@ namespace TemuKJD.PDDForms.ShopForms
|
||||
if (this.Created && !this.Disposing && !this.IsDisposed)
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
try { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; } catch { return; }
|
||||
if (this.Created && !this.Disposing && !this.IsDisposed)
|
||||
try { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; } catch { return; }
|
||||
}));
|
||||
shop.AntiContents.Add(antiContent);
|
||||
while (shop.AntiContents.Count > 100)
|
||||
|
||||
Reference in new issue
Block a user