diff --git a/.gitignore b/.gitignore
index ded2f31..3b8d3af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ bin
*.rar
*.zip
/Update/Update/*.user
+*.user
diff --git a/29WxOrder.sln b/29WxOrder.sln
index cc24cb6..998368c 100644
--- a/29WxOrder.sln
+++ b/29WxOrder.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.36128.20
+# Visual Studio Version 17
+VisualStudioVersion = 17.14.36221.1 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "29WxOrderAllBase", "AllBase\29WxOrderAllBase.csproj", "{6461D807-B1C8-45F0-B388-E0CA1A418DE0}"
EndProject
diff --git a/29WxOrder/29WxOrder.csproj b/29WxOrder/29WxOrder.csproj
index 9c63734..60da849 100644
--- a/29WxOrder/29WxOrder.csproj
+++ b/29WxOrder/29WxOrder.csproj
@@ -22,7 +22,7 @@
- x86
+ AnyCPU
true
full
false
diff --git a/29WxOrder/FactoryExportForms/FactoryExportForm.cs b/29WxOrder/FactoryExportForms/FactoryExportForm.cs
index 5d871b3..2746cf9 100644
--- a/29WxOrder/FactoryExportForms/FactoryExportForm.cs
+++ b/29WxOrder/FactoryExportForms/FactoryExportForm.cs
@@ -17,6 +17,7 @@ using System.Windows.Forms;
using Work;
using Work.Api;
using Work.BaseForms;
+using AllBase.Helper;
namespace _29WxOrder.FactoryExportForms
{
@@ -214,7 +215,7 @@ namespace _29WxOrder.FactoryExportForms
public void UpdateOrderStatusAndEncrypt(string orderId)
{
DouYinOrderModel douYinOrderModel = this.lstDouYinOrder.Find(x => x.order_id == orderId);
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
if (douYinOrderModel != null && shop != null)
{
DouyinApi dyapi = new DouyinApi(shop);
diff --git a/29WxOrder/MainForm.cs b/29WxOrder/MainForm.cs
index 4b1f164..47b8268 100644
--- a/29WxOrder/MainForm.cs
+++ b/29WxOrder/MainForm.cs
@@ -683,7 +683,7 @@ namespace _29WxOrder
dic.Add("company", expressbase.name); // 物流公司名称
dic.Add("company_code", expressbase.code); // 物流公司code
dic.Add("logistics_code", trackingNumber); // 快递单号
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.FirstOrDefault(v => v.ShopId == item.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.ShopId == item.shop_id.ToString());
DouyinApi apix = new DouyinApi(shop);
apix.JsonData = dic;
html = apix.OrderLogisticsAdd();
@@ -834,7 +834,7 @@ namespace _29WxOrder
dic.Add("company", expname);//物流公司名称
dic.Add("company_code", expressbase.code);//物流公司code
dic.Add("logistics_code", expno);//快递单号
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.FirstOrDefault(v => v.ShopId == ordermodel.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.ShopId == ordermodel.shop_id.ToString());
DouyinApi apix = new DouyinApi(shop);
apix.JsonData = dic;
html = apix.OrderLogisticsAdd();
@@ -1241,7 +1241,7 @@ namespace _29WxOrder
{
Task.Run(() =>
{
- foreach (DouShopLoginInfo shop in CollectionClass.DouShopLoginList)
+ foreach (ShopLoginInfo shop in GlobalConfig.ShopLoginList)
{
string url = "https://fxg.jinritemai.com/ffa/morder/order/list";
if (shop.LoginStatus == "登录成功")
@@ -1334,7 +1334,7 @@ namespace _29WxOrder
///
///
///
- public void GetRealAddressSim(DouShopLoginInfo shop, DouYinOrderModel order)
+ public void GetRealAddressSim(ShopLoginInfo shop, DouYinOrderModel order)
{
addressOrderIdList.Remove(order.order_id);
var url = "https://fxg.jinritemai.com/ffa/morder/order/detail?id=" + order.order_id;
@@ -1625,7 +1625,7 @@ namespace _29WxOrder
var response_data = responseData;
var cookie = CEFBrowser.GetCookie("", cefWebBrowser.GetCookieManager());
var passport_csrf_token = BaseRegex.GetMatchRegexString(ref cookie, "passport_csrf_token=([\\s\\S]+?);");
- var shop = CollectionClass.DouShopLoginList.FirstOrDefault(s => s.Cookies.Contains(passport_csrf_token));
+ var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.Cookies.Contains(passport_csrf_token));
if (shop != null && response_data.Contains("\"st\":0") && response_data.Contains("\"data\":"))
{
JObject jObj = JObject.Parse(response_data);
@@ -1816,7 +1816,7 @@ namespace _29WxOrder
foreach (DouYinOrderModel getOrderShop in onelist)
{
if (BaseClass.is_read_commission == 1) { break; }
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == getOrderShop.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == getOrderShop.shop_id.ToString());
if (shop != null && !string.IsNullOrEmpty(shop.Cookies))
{
var td = CEFBrowser.DeleteCookieAsync(cefJuLiangWebBrowser.RequestContext.GetCookieManager(null));
@@ -2147,7 +2147,7 @@ namespace _29WxOrder
{
try
{
- foreach (DouShopLoginInfo shop in Work.CollectionClass.DouShopLoginList)
+ foreach (ShopLoginInfo shop in GlobalConfig.ShopLoginList)
{
if (!shopIds.Contains(shop.ShopId))
{
@@ -2413,15 +2413,15 @@ namespace _29WxOrder
#region 店铺
bool readshop = false;
- public List GetServerDouShop()
+ public List GetServerDouShop()
{
- List list = new List();
+ List list = new List();
if (readshop == false)
{
this.Invoke(new Action(() =>
{
dgvShop.Rows.Clear();
- Work.CollectionClass.DouShopLoginList.Clear();
+ GlobalConfig.ShopLoginList.Clear();
lbsqcount.Text = "0";
lbwsqcount.Text = "0";
splitMain.Panel1.Enabled = false;
@@ -2451,7 +2451,7 @@ namespace _29WxOrder
foreach (JObject jObj in jArr)
{
string shopStr = jObj.ToString();
- DouShopLoginInfo shop = new DouShopLoginInfo();
+ ShopLoginInfo shop = new ShopLoginInfo();
shop.DbId = BaseRegex.GetStringJson(ref shopStr, "id");
if (shop.DbId == null)
continue;
@@ -2499,7 +2499,7 @@ namespace _29WxOrder
}
}
- foreach (DouShopLoginInfo shop in list)
+ foreach (ShopLoginInfo shop in list)
{
}
@@ -2581,7 +2581,7 @@ namespace _29WxOrder
}
#endregion
}
- CollectionClass.DouShopLoginList = list;
+ GlobalConfig.ShopLoginList = list;
CheckShopLogin(list);
readshop = false;
@@ -2593,7 +2593,7 @@ namespace _29WxOrder
return list;
}
- public void ShowShopStatus(DouShopLoginInfo shop)
+ public void ShowShopStatus(ShopLoginInfo shop)
{
var row = this.dgvShop.Rows.Cast().FirstOrDefault(r => r.Cells["colShopId"].Value?.ToString() == shop.ShopId);
if (row == null)
@@ -2627,16 +2627,16 @@ namespace _29WxOrder
}
//查询授权
- public void CheckShopLogin(List shoplists, bool isShowProgress = true)
+ public void CheckShopLogin(List shoplists, bool isShowProgress = true)
{
for (int i = 0; i < shoplists.Count; i++)
{
- DouShopLoginInfo doushop = shoplists[i];
+ ShopLoginInfo doushop = shoplists[i];
var url = BaseClass.Build29WxObjString("authorization&act=order_author");
var data = UserLogin.GetSignaturex() + "×tamp=" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "&shop_id=" + doushop.ShopId;
var result = GetHtml.PostUtf8(url, data);
- var shop = Work.CollectionClass.DouShopLoginList.FirstOrDefault(v => v.ShopName == doushop.ShopName);
+ var shop = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.ShopName == doushop.ShopName);
if (shop != null)
{
var loginResult = GetShopStatus(shop);
@@ -2730,7 +2730,7 @@ namespace _29WxOrder
}));
}
}
- private string GetShopStatus(DouShopLoginInfo shop)
+ private string GetShopStatus(ShopLoginInfo shop)
{
var timeStamp = AllBase.BaseClass.ConvertDateTimeInt(DateTime.Now);
var _lid = timeStamp.ToString().Substring(5) + Randomx.GetId(10) + Randomx.GetId(10) + Randomx.GetId(10) + Randomx.GetId(10);
@@ -3055,7 +3055,7 @@ namespace _29WxOrder
/// 店铺ID
public void chaqi(string orderid, int color, string shopid)
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == shopid);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == shopid);
if (shop != null)
{
DouyinApi apix = new DouyinApi(shop);
@@ -3238,7 +3238,7 @@ namespace _29WxOrder
if (text == "店铺账号")
{
string shopname = dgvShop.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.UserName == shopname);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.UserName == shopname);
ShopBrower shopBrower = new ShopBrower();
shopBrower.TitleText = "店铺后台";
shopBrower.shop = shop;
@@ -3721,7 +3721,7 @@ namespace _29WxOrder
{
//3513538240521087498
- var shop = Work.CollectionClass.DouShopLoginList.FirstOrDefault(s => s.ShopId == "20445141");
+ var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == "20445141");
if (shop == null)
return;
//\"shop_order_list\":[]
@@ -3821,7 +3821,7 @@ namespace _29WxOrder
private void btn电子面单测试_Click(object sender, EventArgs e)
{
- foreach (DouShopLoginInfo shop in Work.CollectionClass.DouShopLoginList)
+ foreach (ShopLoginInfo shop in GlobalConfig.ShopLoginList)
{
if (shop.ShopName == "开箱小店")
{
diff --git a/29WxOrder/OrderForms/AfterSaleOrderListForm.cs b/29WxOrder/OrderForms/AfterSaleOrderListForm.cs
index 42b62e6..7dae59a 100644
--- a/29WxOrder/OrderForms/AfterSaleOrderListForm.cs
+++ b/29WxOrder/OrderForms/AfterSaleOrderListForm.cs
@@ -1,8 +1,9 @@
-using AllBase;
-using AllBase.DouYinModel.Result;
-using AllBase.Model.Result;
-using _29WxOrder.BuyForms;
+using _29WxOrder.BuyForms;
using _29WxOrder.ShopForms;
+using AllBase;
+using AllBase.DouYinModel.Result;
+using AllBase.Helper;
+using AllBase.Model.Result;
using NaiBa.Util;
using NaiBa.Util.Helper;
using Newtonsoft.Json;
@@ -108,7 +109,7 @@ namespace _29WxOrder.OrderForms
LstFinishedOrderId.Clear();
isread = true;
- foreach (var shop in CollectionClass.DouShopLoginList)
+ foreach (var shop in GlobalConfig.ShopLoginList)
{
Invoke(new Action(() => { this.mainform.lblMsg.Text = "正在读取售后:" + shop.ShopName; }));
int size = 10;
@@ -604,7 +605,7 @@ namespace _29WxOrder.OrderForms
string name = DgvSaleOrderList.Columns[e.ColumnIndex].HeaderText;
if (name == "售后订单编号")
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == shopid);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == shopid);
ShopBrower shopBrower = new ShopBrower();
shopBrower.TitleText = "店铺后台-售后";
shopBrower.shop = shop;
@@ -614,7 +615,7 @@ namespace _29WxOrder.OrderForms
}
else if (name == "订单号")
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == shopid);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == shopid);
if (shop != null)
{
ShopForms.ShopBrower shopBrower = new ShopForms.ShopBrower();
@@ -752,7 +753,7 @@ namespace _29WxOrder.OrderForms
{
IEnumerable enumerableList = this.DgvSaleOrderList.Rows.Cast();
List list = (from item in enumerableList where item.Cells["col_order_id"].Value.ToString() == orderid select item).ToList();
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == DgvSaleOrderList.Rows[mouseEvent.RowIndex].Cells["shopId"].Value.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == DgvSaleOrderList.Rows[mouseEvent.RowIndex].Cells["shopId"].Value.ToString());
if (shop != null)
{
DouyinApi dyapi = new DouyinApi(shop);
@@ -897,7 +898,7 @@ namespace _29WxOrder.OrderForms
}
var shopid = DgvSaleOrderList.Rows[mouseEvent.RowIndex].Cells["shopId"].Value.ToString();
string aftersale_id = DgvSaleOrderList.Rows[mouseEvent.RowIndex].Cells["col_aftersale_id"].Value.ToString();
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == shopid);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == shopid);
ShopBrower shopBrower = new ShopBrower();
shopBrower.TitleText = "店铺后台-售后";
shopBrower.shop = shop;
diff --git a/29WxOrder/OrderForms/AfterSaleReturnRefundForm.cs b/29WxOrder/OrderForms/AfterSaleReturnRefundForm.cs
index 4811b7c..1aefe1a 100644
--- a/29WxOrder/OrderForms/AfterSaleReturnRefundForm.cs
+++ b/29WxOrder/OrderForms/AfterSaleReturnRefundForm.cs
@@ -1,4 +1,5 @@
using AllBase;
+using AllBase.Helper;
using AllBase.Model.Result;
using DevComponents.DotNetBar;
using Newtonsoft.Json.Linq;
@@ -81,7 +82,7 @@ namespace _29WxOrder.OrderForms
{
if (lstProvince.Count == 0)
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == _shopId);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == _shopId);
DouyinApi api = new DouyinApi(shop);
var address = api.GetAddressProvince();
//{"code":10000,"data":[{"province":"安徽省","province_id":34},{"province":"澳门特别行政区","province_id":82},{"province":"北京市","province_id":11},{"province":"重庆市","province_id":50},{"province":"福建省","province_id":35},{"province":"广东省","province_id":44},{"province":"甘肃省","province_id":62},{"province":"广西壮族自治区","province_id":45},{"province":"贵州省","province_id":52},{"province":"河北省","province_id":13},{"province":"湖北省","province_id":42},{"province":"黑龙江省","province_id":23},{"province":"河南省","province_id":41},{"province":"湖南省","province_id":43},{"province":"海南省","province_id":46},{"province":"吉林省","province_id":22},{"province":"江苏省","province_id":32},{"province":"江西省","province_id":36},{"province":"辽宁省","province_id":21},{"province":"内蒙古自治区","province_id":15},{"province":"宁夏回族自治区","province_id":64},{"province":"青海省","province_id":63},{"province":"四川省","province_id":51},{"province":"山东省","province_id":37},{"province":"上海市","province_id":31},{"province":"山西省","province_id":14},{"province":"陕西省","province_id":61},{"province":"天津市","province_id":12},{"province":"台湾省","province_id":71},{"province":"香港特别行政区","province_id":81},{"province":"新疆维吾尔自治区","province_id":65},{"province":"西藏自治区","province_id":54},{"province":"云南省","province_id":53},{"province":"浙江省","province_id":33}],"err_no":0,"log_id":"20220715142943010208016085061166AE","message":"success","msg":"success","sub_code":"","sub_msg":""}
@@ -264,7 +265,7 @@ namespace _29WxOrder.OrderForms
var prov = lstArea.FirstOrDefault(a => a.code.ToString() == item.Name);
if (prov == null)
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == _shopId);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == _shopId);
DouyinApi api = new DouyinApi(shop);
var area = api.GetAreasByProvince(item.Name.ToString());
if (area.Contains("\"message\":\"success\"") || area.Contains("\"code\":10000"))
@@ -345,7 +346,7 @@ namespace _29WxOrder.OrderForms
private void btnAcceptReturnRefund_Click(object sender, EventArgs e)
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == _shopId);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == _shopId);
var type = "101";
diff --git a/29WxOrder/OrderForms/BuyOrderForms.cs b/29WxOrder/OrderForms/BuyOrderForms.cs
index bafe7a6..cb68f8e 100644
--- a/29WxOrder/OrderForms/BuyOrderForms.cs
+++ b/29WxOrder/OrderForms/BuyOrderForms.cs
@@ -43,7 +43,7 @@ namespace _29WxOrder.OrderForms
public delegate void delegateClick(object sender, EventArgs e);
public string order_id;
public DouYinOrderModel orderDetail;
- public AllBase.Model.Result.DouShopLoginInfo shop;
+ public AllBase.Model.Result.ShopLoginInfo shop;
public string webUrl = "https://yangkeduo.com/goods.html?goods_id=";
public static string PddUid = "";
public string detailHtml = "";//商品详情
@@ -254,7 +254,7 @@ namespace _29WxOrder.OrderForms
#region 更新订单
- shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == orderDetail.shop_id.ToString());
+ shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == orderDetail.shop_id.ToString());
this.buyOrderListForm.UpdateOrderStatusAndEncrypt(orderDetail);
#endregion
diff --git a/29WxOrder/OrderForms/BuyOrderListForm.cs b/29WxOrder/OrderForms/BuyOrderListForm.cs
index 45910f9..8f3c943 100644
--- a/29WxOrder/OrderForms/BuyOrderListForm.cs
+++ b/29WxOrder/OrderForms/BuyOrderListForm.cs
@@ -1,5 +1,6 @@
using AllBase;
using AllBase.DouYinModel.Result;
+using AllBase.Helper;
using AllBase.Model.Result;
using NaiBa.Util.Extension;
using Newtonsoft.Json;
@@ -77,7 +78,7 @@ namespace _29WxOrder.OrderForms
for (int i = 0; i < CollectionClass.orderDataList.Count; i++)
{
DouYinOrderModel dymodel = CollectionClass.orderDataList[i];
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == dymodel.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == dymodel.shop_id.ToString());
if (BaseClass.isUseSimGetRealAddress && (dymodel.name.Contains("解密失败") || dymodel.mobile.Contains("#1##") || dymodel.mobile == "******"))
{
isdecryption = false;
@@ -1002,7 +1003,7 @@ namespace _29WxOrder.OrderForms
///
public void UpdateOrderStatusAndEncrypt(DouYinOrderModel douYinOrderModel, UpdateOrderType updateOrderType = UpdateOrderType.UpdateAll)
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
if (douYinOrderModel != null)
{
if (shop != null)
@@ -1341,7 +1342,7 @@ namespace _29WxOrder.OrderForms
string districtId = "";
BuyOrderForms.MatchAddress(ref address, ref province, ref provinceId, ref city, ref cityId, ref district, ref districtId);
- var shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == shopid);
+ var shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == shopid);
string data = @"{""order_id"":""" + orderid +
@""",""shop_name"":""" + GetHtml.UrlEncodeUtf8(shop.ShopName) +
@""",""up_goods_id"":""" + upproductid.Replace("pdd-", "").Replace("pd-", "") +
@@ -1403,7 +1404,7 @@ namespace _29WxOrder.OrderForms
}
else if (name == "订单号")
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == shopid);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == shopid);
if (shop != null)
{
ShopForms.ShopBrower shopBrower = new ShopForms.ShopBrower();
@@ -1418,7 +1419,7 @@ namespace _29WxOrder.OrderForms
string GetOrderStatusl(string orderid)
{
DouYinOrderModel douYinOrderModel = CollectionClass.orderDataList.Find(x => x.order_id == orderid);
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
if (douYinOrderModel != null)
{
if (shop != null)
diff --git a/29WxOrder/OrderForms/OrderEdit.cs b/29WxOrder/OrderForms/OrderEdit.cs
index 77c3a15..4ec5f45 100644
--- a/29WxOrder/OrderForms/OrderEdit.cs
+++ b/29WxOrder/OrderForms/OrderEdit.cs
@@ -1,5 +1,6 @@
using AllBase;
using AllBase.DouYinModel.Result;
+using AllBase.Helper;
using AllBase.Model.Result;
using Newtonsoft.Json.Linq;
using System;
@@ -190,7 +191,7 @@ namespace _29WxOrder.OrderForms
sb.Append("&remark=" + tbremark.Text);
sb.Append("&is_update_order=0"); // 1修改状态0不修改状态
- DouShopLoginInfo shop = Work.CollectionClass.DouShopLoginList.Find(x => x.ShopId == orderDetail.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == orderDetail.shop_id.ToString());
if (shop != null)
{
orderDetail.remark = tbremark.Text.ToString();
diff --git a/29WxOrder/OrderForms/RemarkEditForm.cs b/29WxOrder/OrderForms/RemarkEditForm.cs
index b41fe89..7c7634c 100644
--- a/29WxOrder/OrderForms/RemarkEditForm.cs
+++ b/29WxOrder/OrderForms/RemarkEditForm.cs
@@ -1,5 +1,6 @@
using AllBase;
using AllBase.DouYinModel.Result;
+using AllBase.Helper;
using AllBase.Model.Result;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -44,7 +45,7 @@ namespace _29WxOrder.OrderForms
return;
}
- DouShopLoginInfo shop = Work.CollectionClass.DouShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
if (shop != null)
{
douYinOrderModel.remark = tbremark.Text.ToString();
diff --git a/29WxOrder/OrderForms/SendOrderListForms.cs b/29WxOrder/OrderForms/SendOrderListForms.cs
index 86ec5d0..6741629 100644
--- a/29WxOrder/OrderForms/SendOrderListForms.cs
+++ b/29WxOrder/OrderForms/SendOrderListForms.cs
@@ -1,7 +1,8 @@
-using AllBase;
+using _29WxOrder.BuyForms;
+using AllBase;
using AllBase.DouYinModel.Result;
+using AllBase.Helper;
using AllBase.Model.Result;
-using _29WxOrder.BuyForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -464,7 +465,7 @@ namespace _29WxOrder.OrderForms
#region 更新订单
DouYinOrderModel douYinOrderModel = CollectionClass.orderSenderDataList.Find(x => x.order_id == orderid);
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
if (douYinOrderModel != null)
{
if (shop != null)
@@ -808,7 +809,7 @@ namespace _29WxOrder.OrderForms
{
string orderid = DgvSendOrderList.Rows[e.RowIndex].Cells["col_order_id"].Value.ToString();
string shopid = DgvSendOrderList.Rows[e.RowIndex].Cells["col_shop_id"].Value.ToString();
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == shopid);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == shopid);
if (shop != null)
{
ShopForms.ShopBrower shopBrower = new ShopForms.ShopBrower();
diff --git a/29WxOrder/OrderForms/SuccessOrderListForm.cs b/29WxOrder/OrderForms/SuccessOrderListForm.cs
index 3729dc1..6d42d84 100644
--- a/29WxOrder/OrderForms/SuccessOrderListForm.cs
+++ b/29WxOrder/OrderForms/SuccessOrderListForm.cs
@@ -67,7 +67,7 @@ namespace _29WxOrder.OrderForms
}
List orderList = new List();
- List shopList = new List();
+ List shopList = new List();
string urlx = BaseClass.LoginApiUrl + "?obj=douyin/order&act=get";
string datax = "&order_status_buy=0,4&page=" + page + "&pageSize=100";
@@ -92,7 +92,7 @@ namespace _29WxOrder.OrderForms
CollectionClass.successOrderDataList.Add(douYinOrderModel);
orderList.Add(douYinOrderModel);
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == douYinOrderModel.shop_id.ToString());
if (shop != null && douYinOrderModel.order_status != 4) // 订单状态不为4的放入列表,后面按时间段查询更新订单。
{
if (!shopList.Contains(shop))
@@ -283,7 +283,7 @@ namespace _29WxOrder.OrderForms
{
try
{
- foreach (DouShopLoginInfo shop in CollectionClass.DouShopLoginList)
+ foreach (ShopLoginInfo shop in GlobalConfig.ShopLoginList)
{
if (!shopIds.Contains(shop.ShopId) || shop.ApiAuthStatus != "授权成功")
continue;
@@ -653,7 +653,7 @@ namespace _29WxOrder.OrderForms
}
else if (name == "订单号")
{
- DouShopLoginInfo shop = CollectionClass.DouShopLoginList.Find(x => x.ShopId == shopid);
+ ShopLoginInfo shop = GlobalConfig.ShopLoginList.Find(x => x.ShopId == shopid);
if (shop != null)
{
ShopForms.ShopBrower shopBrower = new ShopForms.ShopBrower();
diff --git a/29WxOrder/ShopForms/ShopBrower.cs b/29WxOrder/ShopForms/ShopBrower.cs
index 8eefd95..e1d5cfb 100644
--- a/29WxOrder/ShopForms/ShopBrower.cs
+++ b/29WxOrder/ShopForms/ShopBrower.cs
@@ -31,7 +31,7 @@ namespace _29WxOrder.ShopForms
public ChromiumWebBrowser cefWebBrowser = null;
public string webUrl = "";
public string cookies = "";
- public DouShopLoginInfo shop;
+ public ShopLoginInfo shop;
private void ShopBrower_Load(object sender, EventArgs e)
{
this.TitleText = this.TitleText = this.Text = "后台";
diff --git a/29WxOrderWpf/29WxOrderWpf.csproj b/29WxOrderWpf/29WxOrderWpf.csproj
index 4a92a4e..1df519d 100644
--- a/29WxOrderWpf/29WxOrderWpf.csproj
+++ b/29WxOrderWpf/29WxOrderWpf.csproj
@@ -7,7 +7,7 @@
{D7884375-E42F-4B89-AA3A-D8E75508D8C7}
WinExe
_29WxOrderWpf
- 29WxOrderWpf
+ 29WxFindOrder
v4.6.2
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
@@ -35,7 +35,7 @@
true
full
false
- bin\Debug\
+ ..\..\KJD Cef138\Bin\
DEBUG;TRACE
prompt
4
@@ -44,7 +44,7 @@
AnyCPU
pdbonly
true
- bin\Release\
+ ..\..\KJD Cef138\Bin\
TRACE
prompt
4
@@ -118,10 +118,26 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -212,5 +228,14 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/29WxOrderWpf/29WxOrderWpf.csproj.user b/29WxOrderWpf/29WxOrderWpf.csproj.user
index 95a1d1a..e56288b 100644
--- a/29WxOrderWpf/29WxOrderWpf.csproj.user
+++ b/29WxOrderWpf/29WxOrderWpf.csproj.user
@@ -1,4 +1,4 @@
-
+
publish\
@@ -9,5 +9,6 @@
zh-CN
false
+ ShowAllFiles
\ No newline at end of file
diff --git a/29WxOrderWpf/App.xaml b/29WxOrderWpf/App.xaml
index 65ea705..669f635 100644
--- a/29WxOrderWpf/App.xaml
+++ b/29WxOrderWpf/App.xaml
@@ -6,10 +6,14 @@
-
-
-
+
+
+
+
+
+
+
diff --git a/29WxOrderWpf/App.xaml.cs b/29WxOrderWpf/App.xaml.cs
index df202c4..b56936c 100644
--- a/29WxOrderWpf/App.xaml.cs
+++ b/29WxOrderWpf/App.xaml.cs
@@ -5,6 +5,7 @@ using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
+using System.Windows.Media.Imaging;
namespace _29WxOrderWpf
{
@@ -13,5 +14,24 @@ namespace _29WxOrderWpf
///
public partial class App : Application
{
+ public static string[] args = new List().ToArray();
+ protected override void OnStartup(StartupEventArgs e)
+ {
+ base.OnStartup(e);
+ if (e.Args.Length > 0)
+ {
+ args = e.Args;
+ }
+
+ #region 后台修改logo
+ //// 替换字典程序logo等
+ //Uri imageUri = new Uri("pack://application:,,,/Resources/WindowBoxes/close.hover.png"); // 新的图片路径
+ //BitmapImage newBitmapImage = new BitmapImage(imageUri);
+ //// 获取资源字典
+ //ResourceDictionary dict = Application.Current.Resources;
+ //// 添加或更新资源
+ //dict["main29WeixinIcon"] = newBitmapImage;
+ #endregion
+ }
}
}
diff --git a/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml b/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml
index fcde599..66912b8 100644
--- a/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml
+++ b/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml
@@ -16,18 +16,18 @@
-
+
-
+
-
+
-
-
-
+
+
+
diff --git a/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml.cs b/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml.cs
index 951373b..8bf40a8 100644
--- a/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml.cs
+++ b/29WxOrderWpf/BaseWindows/BaseMsgWindow.xaml.cs
@@ -11,6 +11,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
+using Work.BaseForms;
namespace _29WxOrderWpf.BaseWindows
{
@@ -25,10 +26,10 @@ namespace _29WxOrderWpf.BaseWindows
this.DataContext = this;
}
- private static BaseMsgWindow CreateMsgForm(string msg, string caption, MsgWindowLevel fl)
+ private static BaseMsgWindow CreateMsgForm(string msg, string caption, MsgWindowLevel wl)
{
- BaseMsgWindow msgBox = new BaseMsgWindow { lblTitle = { Content = caption }, lblMsg = { Content = msg } };
- if (fl.Equals(MsgWindowLevel.LARGE))
+ BaseMsgWindow msgBox = new BaseMsgWindow { lblTitle = { Content = caption }, tbkMsg = { Text = msg } };
+ if (wl.Equals(MsgWindowLevel.LARGE))
{
msgBox.Width = (int)MsgWindowLevel.LARGE;
msgBox.Height = 500;
@@ -38,13 +39,35 @@ namespace _29WxOrderWpf.BaseWindows
return msgBox;
}
+ public static BaseMsgWindow ShowInfo(Window window, string msg, string caption = "", MsgWindowLevel wl = MsgWindowLevel.MEDIUM)
+ {
+ string title = string.IsNullOrEmpty(caption) ? "系统提示" : caption;
+ BaseMsgWindow msgBox = CreateMsgForm(msg, title, wl);
+ msgBox.imgTip.Source = Application.Current.Resources["imgBaseMsgInfo"] as ImageSource;
+ if (window != null)
+ msgBox.Owner = window;
+ msgBox.ShowDialog();
+ return msgBox;
+ }
+
+ public static BaseMsgWindow ShowError(Window window, string msg, string caption = "", MsgWindowLevel wl = MsgWindowLevel.MEDIUM)
+ {
+ string title = string.IsNullOrEmpty(caption) ? "系统错误" : caption;
+ BaseMsgWindow msgBox = CreateMsgForm(msg, title, wl);
+ msgBox.imgTip.Source = Application.Current.Resources["imgBaseMsgErr"] as ImageSource;
+ if (window != null)
+ msgBox.Owner = window;
+ msgBox.ShowDialog();
+ return msgBox;
+ }
+
public static BaseMsgWindow ShowConfirm(Window window, string msg, string caption = "", MsgWindowLevel fl = MsgWindowLevel.MEDIUM)
{
string title = string.IsNullOrEmpty(caption) ? "确认系统提示" : caption;
BaseMsgWindow msgBox = new BaseMsgWindow
{
lblTitle = { Content = title },
- lblMsg = { Content = msg },
+ tbkMsg = { Text = msg },
imgTip = { Source = Application.Current.Resources["imgBaseMsgQue"] as ImageSource },
};
if (fl.Equals(MsgWindowLevel.LARGE))
diff --git a/29WxOrderWpf/BaseWindows/BaseWindow.cs b/29WxOrderWpf/BaseWindows/BaseWindow.cs
index 277def3..7df74b3 100644
--- a/29WxOrderWpf/BaseWindows/BaseWindow.cs
+++ b/29WxOrderWpf/BaseWindows/BaseWindow.cs
@@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Interop;
+using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shell;
@@ -14,7 +15,8 @@ namespace _29WxOrderWpf.BaseWindows
{
public BaseWindow()
{
- this.Icon = new BitmapImage(new Uri("pack://application:,,,/Resources/29wx.ico"));
+ //this.Icon = new BitmapImage(new Uri("pack://application:,,,/Resources/29wx.ico"));
+ this.Icon = Application.Current.Resources["main29WeixinIcon"] as ImageSource;
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
WindowChrome.SetWindowChrome(this, new WindowChrome() { CaptionHeight = 8, ResizeBorderThickness = new Thickness(4), });
diff --git a/29WxOrderWpf/LoginWindows/LoginWindow.xaml b/29WxOrderWpf/LoginWindows/LoginWindow.xaml
index 5478425..710deac 100644
--- a/29WxOrderWpf/LoginWindows/LoginWindow.xaml
+++ b/29WxOrderWpf/LoginWindows/LoginWindow.xaml
@@ -6,15 +6,61 @@
xmlns:local="clr-namespace:_29WxOrderWpf.LoginWindows"
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
mc:Ignorable="d" Style="{StaticResource BaseNoneBorderWindowStyle}"
- Title="LoginWindow" Height="300" Width="400" ResizeMode="NoResize" Closing="BaseWindow_Closing">
+ x:Name="loginWindow" Title="登录" Height="300" Width="400" ResizeMode="NoResize" Loaded="loginWindow_Loaded" Closing="BaseWindow_Closing">
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/29WxOrderWpf/LoginWindows/LoginWindow.xaml.cs b/29WxOrderWpf/LoginWindows/LoginWindow.xaml.cs
index da2e927..875f0c4 100644
--- a/29WxOrderWpf/LoginWindows/LoginWindow.xaml.cs
+++ b/29WxOrderWpf/LoginWindows/LoginWindow.xaml.cs
@@ -1,4 +1,10 @@
using _29WxOrderWpf.BaseWindows;
+using _29WxOrderWpf.UserControls;
+using AllBase;
+using AllBase.DouYinModel.Param.LoginManage;
+using NaiBa.Util;
+using NaiBa.Util.Extension;
+using NaiBa.Util.Helper;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -9,10 +15,12 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
+using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
+using Work;
using Work.BaseForms;
namespace _29WxOrderWpf.LoginWindows
@@ -22,22 +30,168 @@ namespace _29WxOrderWpf.LoginWindows
///
public partial class LoginWindow : BaseWindow
{
- public LoginWindow()
+ public static ConcurrentList UserParamList { get; set; } = new ConcurrentList();
+
+ bool isLogin = false;
+
+ string[] argsuser;
+
+ public LoginWindow(string[] args)
{
InitializeComponent();
+
+ if (!string.IsNullOrEmpty(BaseClass.ProgramName))
+ {
+ lblAppName.Content = BaseClass.ProgramName;
+ }
+
+ this.Title = "用户登录";
+ argsuser = args;
}
+ private void loginWindow_Loaded(object sender, RoutedEventArgs e)
+ {
+ GetUserList();
+ foreach (var user in UserParamList)
+ {
+ cmbUserNameMobile.Items.Insert(0, user.UserName);
+ }
+
+ this.Title = "登录";
+ if (BaseClass.Remember)
+ {
+ chkRemember.IsChecked = true;
+ cmbUserNameMobile.Text = BaseClass.UserName;
+ if (!string.IsNullOrEmpty(BaseClass.PassWord))
+ txtPassword.Password = "******";
+ }
+
+ if (argsuser.Length > 1)
+ {
+ cmbUserNameMobile.Text = argsuser[0].Replace(" ", "");
+ txtPassword.Password = "******";
+ BaseClass.PassWord = argsuser[1].Replace(" ", "");
+ btnLogin_Click(null, null);
+ }
+ }
+
+
private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//if (BaseMsgForm.ShowConfirm("是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个", "请先登录或者注册").DialogResult == System.Windows.Forms.DialogResult.OK)
// Process.GetCurrentProcess().Kill();
//else
// e.Cancel = true;
+
+ if (!isLogin)
+ {
+ if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个。", "请先登录或者注册").DialogResult == true)
+ Process.GetCurrentProcess().Kill();
+ else
+ e.Cancel = true;
+ }
+ }
- if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?\r\n必须登录账户才能使用,无账户请先注册一个", "请先登录或者注册").DialogResult == true)
- Process.GetCurrentProcess().Kill();
- else
- e.Cancel = true;
+ private void btnLogin_Click(object sender, RoutedEventArgs e)
+ {
+ UserLogin ul = new UserLogin();
+ ul.Mobile = cmbUserNameMobile.Text;
+ ul.Password = txtPassword.Password;
+
+ if (cmbUserNameMobile.Text.Length != 11)
+ {
+ BaseMsgWindow.ShowError(this, "手机号不正确", "提示");
+ cmbUserNameMobile.Focus();
+ return;
+ }
+ if (txtPassword.Password.Length < 6)
+ {
+ BaseMsgWindow.ShowError(this, "密码长度不正确", "提示");
+ txtPassword.Password = "";
+ txtPassword.Focus();
+ return;
+ }
+ string message = "";
+ int weakPassword = 0;
+ int lockUserName = 0;
+ string messageInfo = "";
+ bool ok = ul.Get(ref message, out lockUserName, out weakPassword, out messageInfo);
+ if (!ok)
+ {
+ BaseMsgForm.ShowError(message, "登录失败");
+ return;
+ }
+ if (BaseClass.Remember)
+ {
+ Initialization i = new Initialization();
+ i.SaveConfig();
+
+ var eUser = UserParamList.FirstOrDefault(u => u.UserName == BaseClass.UserName);
+ if (eUser != null)
+ UserParamList.Remove(eUser);
+ UserParamList.Add(new UserParam()
+ {
+ UserName = BaseClass.UserName,
+ PasswordMd5 = BaseClass.PassWord
+ });
+ SaveUserList();
+ }
+ this.isLogin = true;
+ this.Close();
+ }
+
+ public static void SaveUserList()
+ {
+ ConfigHelper.SaveConfig("user_login_config", UserParamList);
+ }
+ public static void GetUserList()
+ {
+ #region 用户账户记忆功能
+ UserParamList = ConfigHelper.LoadConfig>("user_login_config");
+ if (UserParamList == null)
+ UserParamList = new ConcurrentList();
+ #endregion
+ }
+
+ private void btnDeleteItem_Click(object sender, RoutedEventArgs e)
+ {
+ var imgButton = sender as UcImageButton;
+ if (imgButton != null)
+ {
+ var userName = imgButton.Tag.ParseToString();
+ if (!string.IsNullOrEmpty(userName))
+ {
+ UserParamList.RemoveAll(u => u.UserName == userName);
+ SaveUserList();
+ foreach (var item in cmbUserNameMobile.Items.Cast().ToList())
+ {
+ if (item.ParseToString() == userName)
+ {
+ cmbUserNameMobile.Items.Remove(item);
+ }
+
+ }
+ //ShowUserDropDown();
+ }
+ }
+ }
+
+ private void cmbUserNameMobile_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ var userName = cmbUserNameMobile.SelectedItem.ParseToString();
+ var user = UserParamList.FirstOrDefault(u => u.UserName == userName);
+ if (user != null)
+ {
+ BaseClass.UserName = user.UserName;
+ BaseClass.PassWord = user.PasswordMd5;
+ this.cmbUserNameMobile.Text = user.UserName;
+ this.txtPassword.Password = "******";
+ }
+ }
+
+ private void chkRemember_Checked(object sender, RoutedEventArgs e)
+ {
+ BaseClass.Remember = chkRemember.IsChecked.ParseToBool();
}
}
}
diff --git a/29WxOrderWpf/MainWindow.xaml b/29WxOrderWpf/MainWindow.xaml
index 9ff5f0f..a6e3e6f 100644
--- a/29WxOrderWpf/MainWindow.xaml
+++ b/29WxOrderWpf/MainWindow.xaml
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:_29WxOrderWpf"
xmlns:orderctrls="clr-namespace:_29WxOrderWpf.OrderCtrls"
- xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
+ xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
mc:Ignorable="d" Style="{StaticResource BaseNoneBorderWindowStyle}"
Title="MainWindow" Height="450" Width="800" Loaded="Window_Loaded" Closing="BaseWindow_Closing">
@@ -17,6 +17,6 @@
-
+
diff --git a/29WxOrderWpf/MainWindow.xaml.cs b/29WxOrderWpf/MainWindow.xaml.cs
index 1aed043..5069c44 100644
--- a/29WxOrderWpf/MainWindow.xaml.cs
+++ b/29WxOrderWpf/MainWindow.xaml.cs
@@ -21,6 +21,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
+using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
@@ -49,17 +50,12 @@ namespace _29WxOrderWpf
new Thread(AutoAntiGrabbingMechanism).Start(); // 反抓包
#region 弹出登录窗口
- LoginWindows.LoginWindow loginWindow = new LoginWindows.LoginWindow();
+ LoginWindows.LoginWindow loginWindow = new LoginWindows.LoginWindow(App.args);
loginWindow.Owner = this;
loginWindow.ShowDialog();
#endregion
}
- private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
-
- }
-
#region 反抓包功能
private void AutoAntiGrabbingMechanism()
{
@@ -171,5 +167,13 @@ namespace _29WxOrderWpf
return true;
}
#endregion
+
+ private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ if (BaseMsgWindow.ShowConfirm(this, "是否关闭软件?", "退出微信小店订单管理").DialogResult == true)
+ Process.GetCurrentProcess().Kill();
+ else
+ e.Cancel = true;
+ }
}
}
diff --git a/29WxOrderWpf/Properties/AssemblyInfo.cs b/29WxOrderWpf/Properties/AssemblyInfo.cs
index 1f7b648..6502504 100644
--- a/29WxOrderWpf/Properties/AssemblyInfo.cs
+++ b/29WxOrderWpf/Properties/AssemblyInfo.cs
@@ -7,11 +7,11 @@ using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
-[assembly: AssemblyTitle("29WxOrderWpf")]
+[assembly: AssemblyTitle("29供应连-微信小店订单管理")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("29WxOrderWpf")]
+[assembly: AssemblyProduct("29供应连-微信小店订单管理")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/29WxOrderWpf/Properties/Resources.Designer.cs b/29WxOrderWpf/Properties/Resources.Designer.cs
index e2c86c7..8168220 100644
--- a/29WxOrderWpf/Properties/Resources.Designer.cs
+++ b/29WxOrderWpf/Properties/Resources.Designer.cs
@@ -1,68 +1,61 @@
//------------------------------------------------------------------------------
//
// 此代码由工具生成。
-// 运行时版本: 4.0.30319.42000
+// 运行时版本:4.0.30319.42000
//
-// 对此文件的更改可能导致不正确的行为,如果
-// 重新生成代码,则所做更改将丢失。
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
//
//------------------------------------------------------------------------------
-
-namespace _29WxOrderWpf.Properties
-{
+namespace _29WxOrderWpf.Properties {
+ using System;
+
+
///
- /// 强类型资源类,用于查找本地化字符串等。
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
///
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
- // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
+ internal class Resources {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
+ internal Resources() {
}
-
+
///
- /// 返回此类使用的缓存 ResourceManager 实例。
+ /// 返回此类使用的缓存的 ResourceManager 实例。
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("_29WxOrderWpf.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
///
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
return resourceCulture;
}
- set
- {
+ set {
resourceCulture = value;
}
}
diff --git a/29WxOrderWpf/Properties/Settings.Designer.cs b/29WxOrderWpf/Properties/Settings.Designer.cs
index 1a2880d..a436abc 100644
--- a/29WxOrderWpf/Properties/Settings.Designer.cs
+++ b/29WxOrderWpf/Properties/Settings.Designer.cs
@@ -1,27 +1,24 @@
//------------------------------------------------------------------------------
//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
//
//------------------------------------------------------------------------------
-
-namespace _29WxOrderWpf.Properties
-{
+namespace _29WxOrderWpf.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}
diff --git a/29WxOrderWpf/Resources/close_gray.png b/29WxOrderWpf/Resources/close_gray.png
new file mode 100644
index 0000000..d3d5ab7
Binary files /dev/null and b/29WxOrderWpf/Resources/close_gray.png differ
diff --git a/29WxOrderWpf/Resources/main_29weixin_icon.png b/29WxOrderWpf/Resources/main_29weixin_icon.png
new file mode 100644
index 0000000..80bbdff
Binary files /dev/null and b/29WxOrderWpf/Resources/main_29weixin_icon.png differ
diff --git a/29WxOrderWpf/Resources/order_weishop_icon.png b/29WxOrderWpf/Resources/order_weishop_icon.png
new file mode 100644
index 0000000..24e0197
Binary files /dev/null and b/29WxOrderWpf/Resources/order_weishop_icon.png differ
diff --git a/29WxOrderWpf/Styles/BaseButtonStyle.xaml b/29WxOrderWpf/Styles/BaseButtonStyle.xaml
new file mode 100644
index 0000000..d637e48
--- /dev/null
+++ b/29WxOrderWpf/Styles/BaseButtonStyle.xaml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/29WxOrderWpf/Styles/BaseComboBoxStyle.xaml b/29WxOrderWpf/Styles/BaseComboBoxStyle.xaml
new file mode 100644
index 0000000..92142c8
--- /dev/null
+++ b/29WxOrderWpf/Styles/BaseComboBoxStyle.xaml
@@ -0,0 +1,322 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/29WxOrderWpf/Styles/BaseTextBoxStyle.xaml b/29WxOrderWpf/Styles/BaseTextBoxStyle.xaml
new file mode 100644
index 0000000..f3afa27
--- /dev/null
+++ b/29WxOrderWpf/Styles/BaseTextBoxStyle.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/29WxOrderWpf/Styles/BaseWindowStyle.xaml b/29WxOrderWpf/Styles/BaseWindowStyle.xaml
index cf10728..5c3701b 100644
--- a/29WxOrderWpf/Styles/BaseWindowStyle.xaml
+++ b/29WxOrderWpf/Styles/BaseWindowStyle.xaml
@@ -2,53 +2,19 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
-
-
\ No newline at end of file
diff --git a/29WxOrderWpf/Styles/StaticColorBrushDictionary.xaml b/29WxOrderWpf/Styles/StaticColorBrushDictionary.xaml
new file mode 100644
index 0000000..541fba4
--- /dev/null
+++ b/29WxOrderWpf/Styles/StaticColorBrushDictionary.xaml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/29WxOrderWpf/Styles/StaticImageDictionary.xaml b/29WxOrderWpf/Styles/StaticImageDictionary.xaml
index 07eb6c3..c7da80e 100644
--- a/29WxOrderWpf/Styles/StaticImageDictionary.xaml
+++ b/29WxOrderWpf/Styles/StaticImageDictionary.xaml
@@ -1,5 +1,6 @@
+
@@ -8,6 +9,7 @@
+
diff --git a/AllBase/29WxOrderAllBase.csproj b/AllBase/29WxOrderAllBase.csproj
index c6150c7..321187f 100644
--- a/AllBase/29WxOrderAllBase.csproj
+++ b/AllBase/29WxOrderAllBase.csproj
@@ -58,7 +58,7 @@
DEBUG;TRACE
true
full
- AnyCPU
+ x86
false
prompt
MinimumRecommendedRules.ruleset
@@ -122,7 +122,7 @@
-
+
diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index fd330ec..0c04393 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -247,7 +247,7 @@ namespace AllBase
public static bool MustGetShopInfo = false;
public static bool MustGetFormAlive = false;
public static string ChromeChatHtml = "";
- public static string ChromeUserAgent = "";
+ public static string ChromeUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
public static string PddShopChromeUserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.4.45 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/2.6.0.26";
public static string ChromeCookies = "";
public static string ChromeJinBaoCookies = "";
diff --git a/AllBase/DouYinModel/Result/DouShopLoginInfo.cs b/AllBase/DouYinModel/Result/ShopLoginInfo.cs
similarity index 97%
rename from AllBase/DouYinModel/Result/DouShopLoginInfo.cs
rename to AllBase/DouYinModel/Result/ShopLoginInfo.cs
index 7c73ec7..4a5e4c4 100644
--- a/AllBase/DouYinModel/Result/DouShopLoginInfo.cs
+++ b/AllBase/DouYinModel/Result/ShopLoginInfo.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace AllBase.Model.Result
{
- public class DouShopLoginInfo
+ public class ShopLoginInfo
{
public string DbId { get; set; }
public string UserName { get; set; }
diff --git a/AllBase/Helper/GlobalConfig.cs b/AllBase/Helper/GlobalConfig.cs
index 78f539c..fa4190a 100644
--- a/AllBase/Helper/GlobalConfig.cs
+++ b/AllBase/Helper/GlobalConfig.cs
@@ -1,5 +1,6 @@
using AllBase.DouYinModel.Param.ConfigManage;
using AllBase.Model;
+using AllBase.Model.Result;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -10,13 +11,18 @@ namespace AllBase.Helper
{
public class GlobalConfig
{
+ ///
+ /// 店铺列表
+ ///
+ public static List ShopLoginList { get; set; } = new List();
+
public static SystemSettings SystemSettings { get; set; }
public static System.Dynamic.ExpandoObject dicLocalStorage { get; set; }
public static Dictionary> dicDgvHeadersSetting { get; set; }
- public static List LstPddPifaShop { get; set; }
+ public static List LstPddPifaShop { get; set; }
///
/// 拼多多 多买手拍单 账户列表
diff --git a/Work/Api/DouYinApi.cs b/Work/Api/DouYinApi.cs
index d269af4..78692dd 100644
--- a/Work/Api/DouYinApi.cs
+++ b/Work/Api/DouYinApi.cs
@@ -13,11 +13,11 @@ namespace Work.Api
{
public Dictionary Data = new Dictionary();
public Dictionary JsonData = new Dictionary();
- public DouShopLoginInfo Shop = null;
+ public ShopLoginInfo Shop = null;
public string Type, Name;
public string path = "";
public static string Gate = "https://openapi-fxg.jinritemai.com/";
- public DouyinApi(DouShopLoginInfo shop)
+ public DouyinApi(ShopLoginInfo shop)
{
Shop = shop;
}
diff --git a/Work/CollectionClass.cs b/Work/CollectionClass.cs
index c9fcb81..9789303 100644
--- a/Work/CollectionClass.cs
+++ b/Work/CollectionClass.cs
@@ -12,10 +12,6 @@ namespace Work
{
public class CollectionClass
{
- ///
- /// 店铺列表
- ///
- public static List DouShopLoginList = new List();
public static List ExpressList = new List();
//地址集合
public static Dictionary Province = new Dictionary();