微信调用外部插件修改订单,拼多多获取token等部分功能
This commit is contained in:
1 parent
81d5107b32
commit
ff42506091
24 files changed
+2728
-193
No files matched your search
@@ -14,6 +14,8 @@ using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Media;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -23,6 +25,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using TemuKJD.BLL;
|
||||
using TemuKJD.BLL.Tools;
|
||||
using TemuKJD.Helper;
|
||||
using TemuKJD.ToolForms;
|
||||
using TemuKJD.WXForms.ShopForms;
|
||||
@@ -76,6 +79,8 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
public static Dictionary<DataGridViewRow, Color> dicRowColor = new Dictionary<DataGridViewRow, Color>();
|
||||
public List<string> LstTagShop = new List<string>();
|
||||
|
||||
public WxOrderListForm WxOrderListForm = null;
|
||||
|
||||
public int LocationXY = 0;
|
||||
public int LocationSize = 200;
|
||||
|
||||
@@ -100,6 +105,7 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
else
|
||||
this.Icon = BaseClass.Ico = ImageBuild.ConvertToIcon(Properties.Resources.icon);
|
||||
|
||||
lblProgress.Text = "";
|
||||
//SetTitle();
|
||||
|
||||
// 点击变绿的按钮
|
||||
@@ -323,6 +329,22 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
});
|
||||
|
||||
WxOrderListForm = new WxOrderListForm();
|
||||
WxOrderListForm.TopLevel = false;
|
||||
WxOrderListForm.FormBorderStyle = FormBorderStyle.None;
|
||||
WxOrderListForm.Dock = DockStyle.Fill;
|
||||
panel4.Controls.Add(WxOrderListForm);
|
||||
WxOrderListForm.Show();
|
||||
|
||||
//var _1688AddressForm = new GetAddressForm() { AddressType = "1688" };
|
||||
//_1688AddressForm.cmbType.Enabled = false;
|
||||
//_1688AddressForm.cmbTypeFilter.Enabled = false;
|
||||
//_1688AddressForm.TopLevel = false;
|
||||
//_1688AddressForm.FormBorderStyle = FormBorderStyle.None;
|
||||
//_1688AddressForm.Dock = DockStyle.Fill;
|
||||
//this.panel4.Controls.Add(_1688AddressForm);
|
||||
//_1688AddressForm.Show();
|
||||
}
|
||||
|
||||
void ClosePopWindow()
|
||||
@@ -1647,6 +1669,66 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
}
|
||||
}
|
||||
|
||||
private void btnChangeAddress_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Directory.Exists("temp\\orderInfo"))
|
||||
Directory.CreateDirectory("temp\\orderInfo");
|
||||
if (!FileBase.Exists("temp\\orderInfo\\订单物流信息更新.exe"))
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
//if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "orderInfo.zip", "temp\\orderInfo\\orderInfo.zip"))
|
||||
if (DownloadBLL.downloadFile(BaseClass.ServerUrl + "/Download/orderInfo.zip", Path.Combine(Environment.CurrentDirectory, "temp\\orderInfo\\orderInfo.zip"), lblProgress) == "下载完成")
|
||||
{
|
||||
ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\orderInfo\\orderInfo.zip"), Path.Combine(Environment.CurrentDirectory, "temp\\orderInfo"));
|
||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\orderInfo\\orderInfo.zip"));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
System.Diagnostics.Process[] psiNewcas = System.Diagnostics.Process.GetProcessesByName("订单物流信息更新");
|
||||
foreach (System.Diagnostics.Process p in psiNewcas)
|
||||
{
|
||||
p.Kill();
|
||||
}
|
||||
|
||||
|
||||
string cookie = "";
|
||||
string biz_magic = "";
|
||||
var cookieLst = JsonHelper.DeserializeJsonToList<CefSharp.Cookie>(currentShop.Cookies.ParseToString().Replace("empty=true;", "[]"));
|
||||
foreach (var c in cookieLst)
|
||||
{
|
||||
if (c.Name == "biz_magic")
|
||||
biz_magic = c.Value;
|
||||
cookie += c.Name + "=" + c.Value + "; ";
|
||||
}
|
||||
cookie = cookie.Trim(';', ' ');
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "temp\\orderInfo\\cookie.txt"), cookie);
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "temp\\orderInfo\\biz_magic.txt"), biz_magic);
|
||||
|
||||
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
startInfo.FileName = Path.Combine(Environment.CurrentDirectory, "temp\\orderInfo\\订单物流信息更新.exe");
|
||||
//startInfo.Arguments = "arg1 arg2"; // exe参数
|
||||
startInfo.UseShellExecute = false; // 不使用shell启动
|
||||
startInfo.RedirectStandardOutput = false; // 不重定向输出
|
||||
startInfo.WorkingDirectory = Path.Combine(Environment.CurrentDirectory, "temp\\orderInfo");
|
||||
|
||||
using (Process process = Process.Start(startInfo))
|
||||
{
|
||||
//process.WaitForExit(); // 等待进程退出
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("优化工具打开失败 " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string defaultTalkTemplate = @"###亲亲,客服人员正在仓库核实打包发货,您的问题我们记录好,客服小姐姐回来会为您解答哦!
|
||||
###亲亲,在的呢亲亲,这款商品质量很好的呢,现在下单为您优先发出哦
|
||||
###亲,客户已经听到您的呼叫,请稍等!
|
||||
@@ -1715,5 +1797,17 @@ namespace TemuKJD.WXForms.TalkForms
|
||||
//催发货###亲,您的订单我们已经收到,仓库正在为您进行质量检查,确认无误后就会发出的哦!
|
||||
//订单编号###亲,您的这笔订单已核实,请问是遇到什么问题了呢?
|
||||
//退款成功###亲,您的退款已办理成功,欢迎下次光临哦!";
|
||||
|
||||
//https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/list/cgi/orderSearch?token=&lang=zh_CN
|
||||
//https://store.weixin.qq.com/shop/order/list
|
||||
// 待发货
|
||||
//{"isSearch":false,"pageSize":30,"overTime":0,"pengingShipOneDay":0,"pengingShipSixHour":0,"expediteDelivery":0,"stockoutPunishAlert":0,"waybillStatus":0,"pageNum":1,"onAftersaleOrderExist":0,"orderStatus":20}
|
||||
// 售后中
|
||||
//{"isSearch":false,"pageSize":30,"overTime":0,"pengingShipOneDay":0,"pengingShipSixHour":0,"expediteDelivery":0,"stockoutPunishAlert":0,"waybillStatus":0,"pageNum":1,"onAftersaleOrderExist":1,"orderStatus":0}
|
||||
// 已发货
|
||||
//{"isSearch":false,"pageSize":30,"overTime":0,"pengingShipOneDay":0,"pengingShipSixHour":0,"expediteDelivery":0,"stockoutPunishAlert":0,"waybillStatus":0,"pageNum":1,"onAftersaleOrderExist":0,"orderStatus":30}
|
||||
|
||||
// 时间段查询全部
|
||||
//{"isSearch":true,"pageSize":30,"overTime":0,"pengingShipOneDay":0,"pengingShipSixHour":0,"expediteDelivery":0,"stockoutPunishAlert":0,"waybillStatus":0,"pageNum":1,"onAftersaleOrderExist":0,"orderStatus":0,"orderId":"","orderTime":{"type":0,"time":[1772380800000,1774868515000]},"telNumber":"","title":"","receiverName":"","finderNickName":"","merchantNotes":"","merchantNotesTagColor":0,"waybillId":"","productCode":"","inspectStatus":"","finderWay":0,"searchOrderType":0,"payMethod":0,"orderChannel":0,"bulkbuyActivityId":"","deliveryNegotiationFlag":0,"transactionId":"","page":1,"status":20,"startCreateTime":1772380800000,"endCreateTime":1774868515000}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user