微信调用外部插件修改订单,拼多多获取token等部分功能
This commit is contained in:
1 parent
81d5107b32
commit
ff42506091
24 files changed
+2728
-193
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user