微信调用外部插件修改订单,拼多多获取token等部分功能

This commit is contained in:
wule committed 2026-03-31 09:51:15 +08:00
1 parent 81d5107b32
commit ff42506091
24 files changed
+2728 -193

No files matched your search

+51 -28
View File
@@ -54,8 +54,11 @@
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();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -66,6 +69,7 @@
this.colBuyAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colChatAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colBuyApi = 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();
@@ -77,8 +81,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();
@@ -408,6 +410,7 @@
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -423,6 +426,7 @@
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colLoginName,
this.colMallId,
this.colShopId,
this.colShopAccount,
this.colNotes,
@@ -433,6 +437,7 @@
this.colBuyAccount,
this.colChatAccount,
this.colLoginStatus,
this.colBuyApi,
this.colGotoShop,
this.colShopOperate,
this.colRelogin,
@@ -446,6 +451,7 @@
this.colDelete});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.MultiSelectCheckBox = true;
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowTemplate.Height = 23;
@@ -453,6 +459,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;
@@ -469,6 +500,13 @@
this.colLoginName.Name = "colLoginName";
this.colLoginName.ReadOnly = true;
//
// colMallId
//
this.colMallId.FillWeight = 50F;
this.colMallId.HeaderText = "商城Id";
this.colMallId.Name = "colMallId";
this.colMallId.ReadOnly = true;
//
// colShopId
//
this.colShopId.FillWeight = 69.42599F;
@@ -541,6 +579,13 @@
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Visible = false;
//
// colBuyApi
//
this.colBuyApi.FillWeight = 46F;
this.colBuyApi.HeaderText = "购买授权";
this.colBuyApi.Name = "colBuyApi";
this.colBuyApi.ReadOnly = true;
//
// colGotoShop
//
this.colGotoShop.FillWeight = 46F;
@@ -641,31 +686,6 @@
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;
@@ -674,6 +694,7 @@
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.label1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.KeyPreview = true;
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "PDDShopListForm";
this.Text = "ShopListForm";
@@ -725,8 +746,10 @@
private DevComponents.DotNetBar.PanelEx pnlEmpty;
private UserControls.ButtonEx btnRefreshShop;
private System.Windows.Forms.ComboBox cmbNotes;
private UserComponent.UcCheckBox chkUsePddWorkbanch;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colMallId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
@@ -737,6 +760,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn colBuyAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn colChatAccount;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus;
private System.Windows.Forms.DataGridViewLinkColumn colBuyApi;
private System.Windows.Forms.DataGridViewLinkColumn colGotoShop;
private System.Windows.Forms.DataGridViewLinkColumn colShopOperate;
private System.Windows.Forms.DataGridViewLinkColumn colRelogin;
@@ -748,6 +772,5 @@
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private UserComponent.UcCheckBox chkUsePddWorkbanch;
}
}
@@ -471,6 +471,7 @@ namespace TemuKJD.PDDForms.ShopForms
int rowIndex = this.dgvShop.Rows.Add(
isRowCheck,
param.LoginName,
param.MallId,
param.ShopId,
param.ShopAccount,
param.Notes,
@@ -481,6 +482,7 @@ namespace TemuKJD.PDDForms.ShopForms
param.BuyAccount,
param.ChatAccount,
"",
"购买授权",
"进入",
"检测",
string.IsNullOrWhiteSpace(param.LoginStatus) ? "未登录" : param.LoginStatus.Trim(),
@@ -851,6 +853,16 @@ namespace TemuKJD.PDDForms.ShopForms
}
IsOperate = false;
break;
case "购买授权":
{
PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop);
shopLoginForm.InitUrl = "https://fuwu.pinduoduo.com/service-market/service-detail?detailId=84862";
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.SaveComplete += shopLoginForm_SaveComplete;
shopLoginForm.ShowDialog();
btnRefreshCookie_Click(null, null);
}
break;
//case "多重登录":
// IsOperate = true;
// ShopLoginForm shopMultiLoginForm = new ShopLoginForm(shop);
@@ -123,6 +123,9 @@
<metadata name="colLoginName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMallId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -153,6 +156,9 @@
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colBuyApi.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>
+112 -25
View File
@@ -226,6 +226,7 @@ namespace TemuKJD.PDDForms.ShopForms
GroupName = shop.GroupName,
ShopAccount = sc.AccountName,
ShopId = sc.AccountId,
MallId = sc.MallId,
SubUserName = shop.SubUserName,
Notes = shop.Notes,
AntiContents = new NaiBa.Util.ConcurrentList<string> { sc.AntiContent },
@@ -245,6 +246,7 @@ namespace TemuKJD.PDDForms.ShopForms
oldShop.GroupName = newShop.GroupName;
oldShop.ShopAccount = newShop.ShopAccount;
oldShop.ShopId = newShop.ShopId;
oldShop.MallId = newShop.MallId;
oldShop.SubUserName = newShop.SubUserName;
oldShop.Notes = newShop.Notes;
oldShop.AntiContents.AddRange(newShop.AntiContents);
@@ -254,9 +256,10 @@ namespace TemuKJD.PDDForms.ShopForms
// 店铺更新写入到服务端
var url = BaseClass.BuildObjString("shop/mdy_shop");
var data = UserLogin.GetSignaturex()
+ "&login_name=" + oldShop.LoginName
+ "&new_shop_id=" + oldShop.ShopId
+ "&shop_account=" + oldShop.ShopAccount;
+ "&login_name=" + newShop.LoginName
+ "&new_shop_id=" + newShop.ShopId
+ "&shop_account=" + newShop.ShopAccount
+ "&mall_id=" + newShop.MallId;
var result = GetHtml.PostUtf8(url, data);
ShopBLL.MdyAntiContent(oldShop);
@@ -647,7 +650,8 @@ namespace TemuKJD.PDDForms.ShopForms
}
});
}
if (url == "https://mms.pinduoduo.com/janus/api/userinfo")
if (url.Contains("https://mms.pinduoduo.com/home"))
{
Task.Run(() =>
{
@@ -656,35 +660,118 @@ namespace TemuKJD.PDDForms.ShopForms
{
var username = BaseRegex.GetStringJson(ref data, "username");
var maskMobile = BaseRegex.GetStringJson(ref data, "mobile");
maskMobile = maskMobile.Split('*').Last();
if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username))
return;
if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username)
if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(maskMobile))
{
lstShopCompany.Clear();
var jObj = JObject.Parse(data);
var jArr = jObj["result"] as JArray;
if (jArr == null)
jArr = new JArray();
maskMobile = maskMobile.Split('*').Last();
if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username))
return;
Thread.Sleep(500);
ShopCompany sc = new ShopCompany()
if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username)
{
//AccountId = BaseRegex.GetStringJson(ref data, "mallId"),
AccountId = BaseRegex.GetStringJson(ref data, "username"),
AccountName = BaseRegex.GetStringJson(ref data, "mall_name"),
LoginName = shop.LoginName,
UserName = BaseClass.UserName,
LoginStatus = "登录成功",
AntiContent = antiContent,
};
this.lstShopCompany.Add(sc);
lstShopCompany.Clear();
//var jObj = JObject.Parse(data);
//var jArr = jObj["result"] as JArray;
//if (jArr == null)
// jArr = new JArray();
Thread.Sleep(500);
ShopCompany sc = new ShopCompany()
{
MallId = BaseRegex.GetStringJson(ref data, "mall_id"),
AccountId = BaseRegex.GetStringJson(ref data, "username"),
AccountName = BaseRegex.GetStringJson(ref data, "mall_name"),
LoginName = shop.LoginName,
UserName = BaseClass.UserName,
LoginStatus = "登录成功",
AntiContent = antiContent,
};
this.lstShopCompany.Add(sc);
}
}
}
});
}
//if (responseData.Contains("球球小小店铺55") && responseData.Contains("pdd24873711027"))
//{
// Task.Run(() =>
// {
// var data = responseData;
// if (this.shop != null && data.Contains("\"success\":true"))
// {
// var username = BaseRegex.GetStringJson(ref data, "username");
// var maskMobile = BaseRegex.GetStringJson(ref data, "mobile");
// maskMobile = maskMobile.Split('*').Last();
// if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username))
// return;
// if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username)
// {
// lstShopCompany.Clear();
// //var jObj = JObject.Parse(data);
// //var jArr = jObj["result"] as JArray;
// //if (jArr == null)
// // jArr = new JArray();
// Thread.Sleep(500);
// ShopCompany sc = new ShopCompany()
// {
// MallId = BaseRegex.GetStringJson(ref data, "mall_id"),
// AccountId = BaseRegex.GetStringJson(ref data, "username"),
// AccountName = BaseRegex.GetStringJson(ref data, "mall_name"),
// LoginName = shop.LoginName,
// UserName = BaseClass.UserName,
// LoginStatus = "登录成功",
// AntiContent = antiContent,
// };
// this.lstShopCompany.Add(sc);
// }
// }
// });
//}
//if (url == "https://mms.pinduoduo.com/janus/api/userinfo" /*|| url == "https://mms.pinduoduo.com/janus/api/new/userinfo"*/)
//{
// Task.Run(() =>
// {
// var data = responseData;
// if (this.shop != null && data.Contains("\"success\":true"))
// {
// var username = BaseRegex.GetStringJson(ref data, "username");
// var maskMobile = BaseRegex.GetStringJson(ref data, "mobile");
// maskMobile = maskMobile.Split('*').Last();
// if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username))
// return;
// if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username)
// {
// lstShopCompany.Clear();
// var jObj = JObject.Parse(data);
// var jArr = jObj["result"] as JArray;
// if (jArr == null)
// jArr = new JArray();
// Thread.Sleep(500);
// ShopCompany sc = new ShopCompany()
// {
// MallId = BaseRegex.GetStringJson(ref data, "mall_id"),
// AccountId = BaseRegex.GetStringJson(ref data, "username"),
// AccountName = BaseRegex.GetStringJson(ref data, "mall_name"),
// LoginName = shop.LoginName,
// UserName = BaseClass.UserName,
// LoginStatus = "登录成功",
// AntiContent = antiContent,
// };
// this.lstShopCompany.Add(sc);
// }
// }
// });
//}
if (prodUserSelectForm != null && url.StartsWith("https://mms.pinduoduo.com/glide/mms/goodsCommit/action/edit"))
{
try