淘宝买手拍单30%

This commit is contained in:
wule committed 2026-09-29 18:34:12 +08:00
1 parent 080fc7e4c4
commit f27ddca730
13 files changed
+378 -184

No files matched your search

@@ -510,72 +510,84 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
return;
}
//BaseMsgWindow.ShowAnimateMessage("触发成功!" + DateTime.Now.ParseToString(), "Msg", 5);
//return;
// 打开拍单窗口
MainWindow.Instance.Dispatcher.Invoke(new Action(() =>
{
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance,
orderItem, GlobalConfig.CurrentPddBuyer, orderItem.BuyMap);
buyOrderForm.IsAutoBuy = isAutoBuy;
buyOrderForm.TitleText = "买手拍单 - 当前买手 " + GlobalConfig.CurrentPddBuyer.buyer_nick;
// 未关联拍单的跳到所有订单页面
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/orders.html"; //"?type=0&comment_tab=1&combine_orders=1&main_orders=1&refer_page_name=personal&refer_page_id=10001_1782219035613_a9ulipk4k3&refer_page_sn=10001";
buyOrderForm.pnlBuy.Visible = false;
// 已有拍单关联的跳的到订单确认界面
if (orderItem.BuyMap != null)
{
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
// "&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + +orderItem.sku_cnt +
// "&page_from=101&detail_id=" + Randomx.GetNumber(11) + "&_oak_rcto=YW" +
// Randomx.GetWordNumber("JvLXvJ8Fx9mUIW34yn103TOlATJGk5PaZshD6pY1bsVrsIjWdxWwjCoNX3IGT".Length) + "_VWkP5_q-1QNqGg" +
// "&order_extra_type=1&refer_page_element=open_btn&source_channel=0&refer_page_name=goods_detail" +
// "&refer_page_id=10014_" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + Randomx.GetNumber(3) + "_tny5ifswls&refer_page_sn=10014";
buyOrderForm.ShowBuyMask = true;
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
"&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
"&page_from=101";
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
// "&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
// "&page_from=0&refer_page_element=open_btn&source_channel=0&refer_page_name=goods_detail&refer_page_id=10014_" +
// BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + Randomx.GetNumber(3) + "_" + Randomx.GetWordNumber(10) + "&refer_page_sn=10014";
buyOrderForm.pnlBuy.Visible = true;
buyOrderForm.pnlMap.Visible = false;
}
if (isAbnormalOrder)
buyOrderForm.AbnormalTransitWarehouseOrderInfo = orderItem.ItemTransitOrder;
buyOrderForm.ShowDialog();
OrderListCtrl.IsAutoBuy = buyOrderForm.IsAutoBuy;
if (buyOrderForm.IsBuySuccess)
{
Task.Run(async () =>
{
if (orderItem.BuyGoodsBtnTxt == "云仓拍单" && !isAbnormalOrder) // 异常拍单不改变订单供应商
{
try
{
await SetSendOrderSupplier(orderItem, "wxfc630d60a1af6c6f", "29供货商");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError(ex.Message);
return;
}
}
});
}
if (GlobalConfig.CurrentBuyPlatform == "pdd")
PddBuyOrder(orderItem, isAbnormalOrder, isAutoBuy);
else if (GlobalConfig.CurrentBuyPlatform == "tb")
TbBuyOrder(orderItem, isAbnormalOrder, isAutoBuy);
}));
});
}
public static void TbBuyOrder(oms_wei_order_item_info orderItem, bool isAbnormalOrder, bool isAutoBuy)
{
TaobaoBuyOrderCtrl taobaoBuyView = new TaobaoBuyOrderCtrl(GlobalConfig.CurrentTaobaoBuyer, orderItem);
taobaoBuyView.ViewModel.InitUrl = "https://s.taobao.com/search?";
new DialogWindow()
{
Title = "淘宝买手登录",
Content = taobaoBuyView,
}.ShowDialog();
}
public static void PddBuyOrder(oms_wei_order_item_info orderItem, bool isAbnormalOrder, bool isAutoBuy)
{
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance, orderItem, GlobalConfig.CurrentPddBuyer, orderItem.PddBuyMap);
buyOrderForm.IsAutoBuy = isAutoBuy;
buyOrderForm.TitleText = "买手拍单 - 当前买手 " + GlobalConfig.CurrentPddBuyer.buyer_nick;
// 未关联拍单的跳到所有订单页面
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/orders.html"; //"?type=0&comment_tab=1&combine_orders=1&main_orders=1&refer_page_name=personal&refer_page_id=10001_1782219035613_a9ulipk4k3&refer_page_sn=10001";
buyOrderForm.pnlBuy.Visible = false;
// 已有拍单关联的跳的到订单确认界面
if (orderItem.PddBuyMap != null)
{
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
// "&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + +orderItem.sku_cnt +
// "&page_from=101&detail_id=" + Randomx.GetNumber(11) + "&_oak_rcto=YW" +
// Randomx.GetWordNumber("JvLXvJ8Fx9mUIW34yn103TOlATJGk5PaZshD6pY1bsVrsIjWdxWwjCoNX3IGT".Length) + "_VWkP5_q-1QNqGg" +
// "&order_extra_type=1&refer_page_element=open_btn&source_channel=0&refer_page_name=goods_detail" +
// "&refer_page_id=10014_" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + Randomx.GetNumber(3) + "_tny5ifswls&refer_page_sn=10014";
buyOrderForm.ShowBuyMask = true;
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.PddBuyMap.map_sku_id +
"&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.PddBuyMap.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
"&page_from=101";
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
// "&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
// "&page_from=0&refer_page_element=open_btn&source_channel=0&refer_page_name=goods_detail&refer_page_id=10014_" +
// BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + Randomx.GetNumber(3) + "_" + Randomx.GetWordNumber(10) + "&refer_page_sn=10014";
buyOrderForm.pnlBuy.Visible = true;
buyOrderForm.pnlMap.Visible = false;
}
if (isAbnormalOrder)
buyOrderForm.AbnormalTransitWarehouseOrderInfo = orderItem.ItemTransitOrder;
buyOrderForm.ShowDialog();
OrderListCtrl.IsAutoBuy = buyOrderForm.IsAutoBuy;
if (buyOrderForm.IsBuySuccess)
{
Task.Run(async () =>
{
if (orderItem.BuyGoodsBtnTxt == "云仓拍单" && !isAbnormalOrder) // 异常拍单不改变订单供应商
{
try
{
await SetSendOrderSupplier(orderItem, "wxfc630d60a1af6c6f", "29供货商");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError(ex.Message);
}
}
});
}
}
/// <summary>
///
/// </summary>
@@ -785,7 +797,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
}
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance,
orderItem, buyer, orderItem.BuyMap);
orderItem, buyer, orderItem.PddBuyMap);
buyOrderForm.TitleText = "订单查看 - 当前买手 " + buyer.buyer_nick;
//所有订单页面
@@ -793,7 +805,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
buyOrderForm.pnlBuy.Visible = false;
//已有拍单关联的控制界面显示隐藏
if (orderItem.BuyMap != null)
if (orderItem.PddBuyMap != null)
{
buyOrderForm.pnlBuy.Visible = true;
buyOrderForm.pnlMap.Visible = false;
@@ -845,7 +857,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
}
//PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance, orderItem, buyer, orderItem.BuyMap);
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(null, null, orderItem, buyer, orderItem.BuyMap);
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(null, null, orderItem, buyer, orderItem.PddBuyMap);
buyOrderForm.BuyType = "direct";
buyOrderForm.TitleText = "直发订单查看 - 当前买手 " + buyer.buyer_nick;
@@ -854,7 +866,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
buyOrderForm.pnlBuy.Visible = false;
//已有拍单关联的控制界面显示隐藏
if (orderItem.BuyMap != null)
if (orderItem.PddBuyMap != null)
{
buyOrderForm.pnlBuy.Visible = true;
buyOrderForm.pnlMap.Visible = false;
@@ -1404,7 +1416,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
btnBuyOrder.Cursor = Cursors.Hand;
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance,
orderItem, GlobalConfig.CurrentPddBuyer, orderItem.BuyMap);
orderItem, GlobalConfig.CurrentPddBuyer, orderItem.PddBuyMap);
buyOrderForm.TitleText = "买手直发拍单 - 当前买手 " + GlobalConfig.CurrentPddBuyer.buyer_nick;
buyOrderForm.BuyType = "direct";
@@ -1419,11 +1431,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
// 已有拍单关联的跳的到订单确认界面
if (orderItem.BuyMap != null)
if (orderItem.PddBuyMap != null)
{
buyOrderForm.ShowBuyMask = true;
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.BuyMap.map_sku_id +
"&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.BuyMap.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.PddBuyMap.map_sku_id +
"&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.PddBuyMap.map_goods_id + "&goods_number=" + orderItem.sku_cnt +
"&page_from=101";
buyOrderForm.pnlBuy.Visible = true;