商品选品数据库列表 商品选品申请功能 优化cookie存取
This commit is contained in:
1 parent
a77278c6d1
commit
f2135af339
37 files changed
+3221
-296
No files matched your search
+9
-5
@@ -35,14 +35,16 @@
|
||||
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("素材库管理");
|
||||
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("超级店铺管理");
|
||||
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("超级用户管理");
|
||||
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
|
||||
System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("选品数据管理");
|
||||
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1,
|
||||
treeNode2,
|
||||
treeNode3,
|
||||
treeNode4,
|
||||
treeNode5,
|
||||
treeNode6,
|
||||
treeNode7});
|
||||
treeNode7,
|
||||
treeNode8});
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -147,10 +149,12 @@
|
||||
treeNode6.Text = "超级店铺管理";
|
||||
treeNode7.Name = "超级用户管理";
|
||||
treeNode7.Text = "超级用户管理";
|
||||
treeNode8.Name = "店铺管理";
|
||||
treeNode8.Text = "店铺管理";
|
||||
treeNode8.Name = "选品数据管理";
|
||||
treeNode8.Text = "选品数据管理";
|
||||
treeNode9.Name = "店铺管理";
|
||||
treeNode9.Text = "店铺管理";
|
||||
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode8});
|
||||
treeNode9});
|
||||
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
|
||||
this.tv.Size = new System.Drawing.Size(140, 461);
|
||||
this.tv.TabIndex = 1;
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.KJDForms.AdminForms;
|
||||
using TemuKJD.KJDForms.ProductSelectForms;
|
||||
|
||||
namespace TemuKJD.KJDForms.ShopForms
|
||||
{
|
||||
@@ -22,6 +23,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
public Lazy<MaterialManageForm> materialManageForm = new Lazy<MaterialManageForm>();
|
||||
public Lazy<AdminAccountForm> adminAccountForm = new Lazy<AdminAccountForm>();
|
||||
public Lazy<AdminShopForm> adminShopForm = new Lazy<AdminShopForm>();
|
||||
public Lazy<DbProductListForm> dbProductListForm = new Lazy<DbProductListForm>();
|
||||
|
||||
public ShopForm()
|
||||
{
|
||||
@@ -32,7 +34,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||
tv.ExpandGroup(tv.Nodes[0].Name);
|
||||
|
||||
List<string> hideName = new List<string>() { "用户管理", "高级运费模板", "运费模板", "素材库管理", "超级用户管理", "超级店铺管理" };
|
||||
List<string> hideName = new List<string>() { "用户管理", "高级运费模板", "运费模板", "素材库管理", "超级用户管理", "超级店铺管理", "选品数据管理" };
|
||||
|
||||
if (BaseClass.GroupId == 3)
|
||||
{
|
||||
@@ -41,6 +43,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
{
|
||||
hideName.Remove("超级用户管理");
|
||||
hideName.Remove("超级店铺管理");
|
||||
hideName.Remove("选品数据管理");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +91,9 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
case "超级店铺管理":
|
||||
SetForm(adminShopForm.Value);
|
||||
break;
|
||||
case "选品数据管理":
|
||||
SetForm(dbProductListForm.Value);
|
||||
break;
|
||||
}
|
||||
}));
|
||||
}).Start();
|
||||
|
||||
+75
-56
@@ -35,7 +35,7 @@
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel5 = new System.Windows.Forms.Panel();
|
||||
this.btnRefreshAuth = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnRefreshShop = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnLoginSelect = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnCheck = new TemuKJD.UserControls.ButtonEx();
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
@@ -50,10 +50,9 @@
|
||||
this.btnImport = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnAddShop = new TemuKJD.UserControls.ButtonEx();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
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.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -76,6 +75,8 @@
|
||||
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();
|
||||
@@ -138,7 +139,7 @@
|
||||
//
|
||||
// panel5
|
||||
//
|
||||
this.panel5.Controls.Add(this.btnRefreshAuth);
|
||||
this.panel5.Controls.Add(this.btnRefreshShop);
|
||||
this.panel5.Controls.Add(this.btnLoginSelect);
|
||||
this.panel5.Controls.Add(this.btnCheck);
|
||||
this.panel5.Location = new System.Drawing.Point(831, 3);
|
||||
@@ -146,22 +147,21 @@
|
||||
this.panel5.Size = new System.Drawing.Size(229, 40);
|
||||
this.panel5.TabIndex = 1;
|
||||
//
|
||||
// btnRefreshAuth
|
||||
// btnRefreshCookie
|
||||
//
|
||||
this.btnRefreshAuth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnRefreshAuth.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRefreshAuth.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnRefreshAuth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnRefreshAuth.ForeColor = System.Drawing.Color.White;
|
||||
this.btnRefreshAuth.Location = new System.Drawing.Point(15, 9);
|
||||
this.btnRefreshAuth.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnRefreshAuth.Name = "btnRefreshAuth";
|
||||
this.btnRefreshAuth.Size = new System.Drawing.Size(66, 26);
|
||||
this.btnRefreshAuth.TabIndex = 374;
|
||||
this.btnRefreshAuth.Text = "刷新授权";
|
||||
this.btnRefreshAuth.UseVisualStyleBackColor = false;
|
||||
this.btnRefreshAuth.Visible = false;
|
||||
this.btnRefreshAuth.Click += new System.EventHandler(this.btnRefreshAuth_Click);
|
||||
this.btnRefreshShop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRefreshShop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnRefreshShop.ForeColor = System.Drawing.Color.White;
|
||||
this.btnRefreshShop.Location = new System.Drawing.Point(21, 9);
|
||||
this.btnRefreshShop.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnRefreshShop.Name = "btnRefreshCookie";
|
||||
this.btnRefreshShop.Size = new System.Drawing.Size(66, 26);
|
||||
this.btnRefreshShop.TabIndex = 375;
|
||||
this.btnRefreshShop.Text = "刷新店铺";
|
||||
this.btnRefreshShop.UseVisualStyleBackColor = false;
|
||||
this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshCookie_Click);
|
||||
//
|
||||
// btnLoginSelect
|
||||
//
|
||||
@@ -170,7 +170,7 @@
|
||||
this.btnLoginSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnLoginSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnLoginSelect.ForeColor = System.Drawing.Color.White;
|
||||
this.btnLoginSelect.Location = new System.Drawing.Point(155, 9);
|
||||
this.btnLoginSelect.Location = new System.Drawing.Point(162, 9);
|
||||
this.btnLoginSelect.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnLoginSelect.Name = "btnLoginSelect";
|
||||
this.btnLoginSelect.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -186,7 +186,7 @@
|
||||
this.btnCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnCheck.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnCheck.ForeColor = System.Drawing.Color.White;
|
||||
this.btnCheck.Location = new System.Drawing.Point(85, 9);
|
||||
this.btnCheck.Location = new System.Drawing.Point(92, 9);
|
||||
this.btnCheck.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnCheck.Name = "btnCheck";
|
||||
this.btnCheck.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -308,7 +308,7 @@
|
||||
this.btnImport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnImport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnImport.ForeColor = System.Drawing.Color.White;
|
||||
this.btnImport.Location = new System.Drawing.Point(78, 9);
|
||||
this.btnImport.Location = new System.Drawing.Point(71, 9);
|
||||
this.btnImport.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnImport.Name = "btnImport";
|
||||
this.btnImport.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -324,7 +324,7 @@
|
||||
this.btnAddShop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnAddShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnAddShop.ForeColor = System.Drawing.Color.White;
|
||||
this.btnAddShop.Location = new System.Drawing.Point(8, 9);
|
||||
this.btnAddShop.Location = new System.Drawing.Point(1, 9);
|
||||
this.btnAddShop.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnAddShop.Name = "btnAddShop";
|
||||
this.btnAddShop.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -344,6 +344,7 @@
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer2.Panel1.Controls.Add(this.btnRefreshAuth);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.pbLoading);
|
||||
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
|
||||
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
@@ -356,6 +357,23 @@
|
||||
this.splitContainer2.SplitterDistance = 555;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// btnRefreshAuth
|
||||
//
|
||||
this.btnRefreshAuth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnRefreshAuth.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRefreshAuth.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnRefreshAuth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnRefreshAuth.ForeColor = System.Drawing.Color.White;
|
||||
this.btnRefreshAuth.Location = new System.Drawing.Point(11, 35);
|
||||
this.btnRefreshAuth.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnRefreshAuth.Name = "btnRefreshAuth";
|
||||
this.btnRefreshAuth.Size = new System.Drawing.Size(66, 26);
|
||||
this.btnRefreshAuth.TabIndex = 374;
|
||||
this.btnRefreshAuth.Text = "刷新授权";
|
||||
this.btnRefreshAuth.UseVisualStyleBackColor = false;
|
||||
this.btnRefreshAuth.Visible = false;
|
||||
this.btnRefreshAuth.Click += new System.EventHandler(this.btnRefreshAuth_Click);
|
||||
//
|
||||
// pbLoading
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
@@ -419,31 +437,6 @@
|
||||
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(907, 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.Fill;
|
||||
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, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1063, 28);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.FillWeight = 26F;
|
||||
@@ -455,14 +448,14 @@
|
||||
//
|
||||
// colLoginName
|
||||
//
|
||||
this.colLoginName.FillWeight = 69.426F;
|
||||
this.colLoginName.FillWeight = 69.42599F;
|
||||
this.colLoginName.HeaderText = "店铺登录号码";
|
||||
this.colLoginName.Name = "colLoginName";
|
||||
this.colLoginName.ReadOnly = true;
|
||||
//
|
||||
// colShopId
|
||||
//
|
||||
this.colShopId.FillWeight = 69.426F;
|
||||
this.colShopId.FillWeight = 69.42599F;
|
||||
this.colShopId.HeaderText = "店铺Id";
|
||||
this.colShopId.Name = "colShopId";
|
||||
this.colShopId.ReadOnly = true;
|
||||
@@ -495,7 +488,7 @@
|
||||
//
|
||||
// colGroupName
|
||||
//
|
||||
this.colGroupName.FillWeight = 69.426F;
|
||||
this.colGroupName.FillWeight = 69.42599F;
|
||||
this.colGroupName.HeaderText = "店铺分组";
|
||||
this.colGroupName.Name = "colGroupName";
|
||||
this.colGroupName.ReadOnly = true;
|
||||
@@ -503,7 +496,7 @@
|
||||
//
|
||||
// colUploadAccount
|
||||
//
|
||||
this.colUploadAccount.FillWeight = 69.426F;
|
||||
this.colUploadAccount.FillWeight = 69.42599F;
|
||||
this.colUploadAccount.HeaderText = "上货账户";
|
||||
this.colUploadAccount.Name = "colUploadAccount";
|
||||
this.colUploadAccount.ReadOnly = true;
|
||||
@@ -511,7 +504,7 @@
|
||||
//
|
||||
// colBuyAccount
|
||||
//
|
||||
this.colBuyAccount.FillWeight = 69.426F;
|
||||
this.colBuyAccount.FillWeight = 69.42599F;
|
||||
this.colBuyAccount.HeaderText = "采购账户";
|
||||
this.colBuyAccount.Name = "colBuyAccount";
|
||||
this.colBuyAccount.ReadOnly = true;
|
||||
@@ -519,7 +512,7 @@
|
||||
//
|
||||
// colChatAccount
|
||||
//
|
||||
this.colChatAccount.FillWeight = 69.426F;
|
||||
this.colChatAccount.FillWeight = 69.42599F;
|
||||
this.colChatAccount.HeaderText = "客服账户";
|
||||
this.colChatAccount.Name = "colChatAccount";
|
||||
this.colChatAccount.ReadOnly = true;
|
||||
@@ -572,7 +565,7 @@
|
||||
//
|
||||
// colApiAuth
|
||||
//
|
||||
this.colApiAuth.FillWeight = 69.426F;
|
||||
this.colApiAuth.FillWeight = 69.42599F;
|
||||
this.colApiAuth.HeaderText = "上货授权";
|
||||
this.colApiAuth.Name = "colApiAuth";
|
||||
this.colApiAuth.ReadOnly = true;
|
||||
@@ -582,7 +575,7 @@
|
||||
//
|
||||
// colBuyApiAuth
|
||||
//
|
||||
this.colBuyApiAuth.FillWeight = 69.426F;
|
||||
this.colBuyApiAuth.FillWeight = 69.42599F;
|
||||
this.colBuyApiAuth.HeaderText = "拍单授权";
|
||||
this.colBuyApiAuth.Name = "colBuyApiAuth";
|
||||
this.colBuyApiAuth.ReadOnly = true;
|
||||
@@ -624,6 +617,31 @@
|
||||
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(907, 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.Fill;
|
||||
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, 0);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1063, 28);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// ShopListForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
@@ -705,5 +723,6 @@
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
|
||||
private UserControls.ButtonEx btnRefreshShop;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Work;
|
||||
using NaiBa.Util;
|
||||
|
||||
namespace TemuKJD.KJDForms.ShopForms
|
||||
{
|
||||
@@ -83,6 +84,60 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void UpdateShop()
|
||||
{
|
||||
// 获取本地店铺和服务端店铺。将服务端相关信息与本地店铺合并后暂时存在内存中(不保存敏感信息)。
|
||||
GlobalConfig.ShopLoginList = new ConcurrentList<ShopLoginInfo>();
|
||||
// 获取服务端店铺
|
||||
var serverDouShopList = KJDForms.ShopForms.ShopListForm.GetServerShop();
|
||||
var localDouShopList = NaiBa.Util.Helper.ConfigHelper.LoadConfig<ConcurrentList<ShopLoginInfo>>("dou_shop_login");
|
||||
if (localDouShopList == null)
|
||||
localDouShopList = new ConcurrentList<ShopLoginInfo>();
|
||||
foreach (var serverShop in serverDouShopList)
|
||||
{
|
||||
var localShop = localDouShopList.FirstOrDefault(s => s.LoginName == serverShop.LoginName && s.ShopId == serverShop.ShopId);
|
||||
if (localShop == null)
|
||||
{
|
||||
localDouShopList.Add(serverShop);
|
||||
}
|
||||
}
|
||||
//var localDouShopList = new ConcurrentList<DouShopLoginInfo>();
|
||||
//localDouShopList.AddRange(serverDouShopList);
|
||||
foreach (var localShop in localDouShopList)
|
||||
{
|
||||
if (GlobalConfig.ShopLoginList.Any(s => s.LoginName == localShop.LoginName && s.ShopId == localShop.ShopId))
|
||||
continue;
|
||||
|
||||
var serverShop = serverDouShopList.FirstOrDefault(s => s.LoginName == localShop.LoginName && s.ShopId == localShop.ShopId);
|
||||
if (serverShop != null)
|
||||
{
|
||||
localShop.ShopAccount = serverShop.ShopAccount;
|
||||
localShop.LoginName = serverShop.LoginName;
|
||||
localShop.Password = serverShop.Password;
|
||||
localShop.Cookies = serverShop.Cookies;
|
||||
localShop.DbId = serverShop.DbId;
|
||||
localShop.UserName = serverShop.UserName;
|
||||
localShop.SubUserName = serverShop.SubUserName;
|
||||
localShop.ApiAuthInfoList = new List<AuthInfo>();
|
||||
localShop.ApiAuthInfoList.AddRange(serverShop.ApiAuthInfoList);
|
||||
localShop.BuyApiAuth.AccessToken = serverShop.BuyApiAuth.AccessToken;
|
||||
localShop.BuyApiAuth.AddTime = serverShop.BuyApiAuth.AddTime;
|
||||
localShop.BuyApiAuth.AppKey = serverShop.BuyApiAuth.AppKey;
|
||||
localShop.BuyApiAuth.ExpiresTime = serverShop.BuyApiAuth.ExpiresTime;
|
||||
localShop.BuyApiAuth.RefreshToken = serverShop.BuyApiAuth.RefreshToken;
|
||||
localShop.PayStatus = serverShop.PayStatus;
|
||||
localShop.GroupName = serverShop.GroupName;
|
||||
localShop.Notes = serverShop.Notes;
|
||||
localShop.LoginStatus = serverShop.LoginStatus;
|
||||
if (localShop.TrialUploadCount < 0)
|
||||
localShop.TrialUploadCount = 0;
|
||||
GlobalConfig.ShopLoginList.Add(localShop);
|
||||
}
|
||||
}
|
||||
GlobalConfig.DouShopLoginOtherUserShopList = new ConcurrentList<ShopLoginInfo>();
|
||||
GlobalConfig.DouShopLoginOtherUserShopList.AddRange(localDouShopList.Where(l => !GlobalConfig.ShopLoginList.Any(s => s.LoginName == l.LoginName)));
|
||||
}
|
||||
|
||||
public static List<ShopLoginInfo> GetServerShop()
|
||||
{
|
||||
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
||||
@@ -800,10 +855,23 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
//cookJs += "\r\nsetTimeout(() => { window.location.href='https://seller.kuajingmaihuo.com'; }, 200)";
|
||||
|
||||
string cookJs = "";
|
||||
foreach(var cookie in shop.Cookies.Split(';'))
|
||||
foreach (var shopCook in shop.Cookies.Split(';'))
|
||||
{
|
||||
var cookie = shopCook.Trim();
|
||||
if (cookie.StartsWith("mc-pc-cookie-captcha-token="))
|
||||
continue;
|
||||
//if (!cookie.StartsWith("SUB_PASS_ID") && !cookie.StartsWith("_nano_fp"))
|
||||
cookJs += "\r\ndocument.cookie='" + cookie.Trim() + "';";
|
||||
cookJs += "\r\ndocument.cookie='" + cookie.Substring(0, Math.Max(0, cookie.IndexOf("="))) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';";
|
||||
}
|
||||
foreach (var shopCook in shop.Cookies.Split(';'))
|
||||
{
|
||||
var cookie = shopCook.Trim();
|
||||
if (cookie.StartsWith("mc-pc-cookie-captcha-token="))
|
||||
continue;
|
||||
if (!cookie.StartsWith("SUB_PASS_ID") && !cookie.StartsWith("_nano_fp"))
|
||||
cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.kuajingmaihuo.com;';";
|
||||
else
|
||||
cookJs += "\r\ndocument.cookie='" + cookie + "; domain=seller.kuajingmaihuo.com;';";
|
||||
}
|
||||
cookJs += "\r\nsetTimeout(() => { window.location.href='https://seller.kuajingmaihuo.com'; }, 200)";
|
||||
Clipboard.SetDataObject(cookJs);
|
||||
@@ -890,14 +958,58 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
return;
|
||||
}
|
||||
|
||||
Task.Run(() =>
|
||||
this.pbLoading.Visible = true;
|
||||
this.btnCheck.Enabled = false;
|
||||
var t = Task.Run(() =>
|
||||
{
|
||||
UpdateShop();
|
||||
CheckShopListLogin(shopNameList.Distinct().ToArray());
|
||||
RefreshDataGridView(false);
|
||||
});
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
if (t.IsCompleted || t.IsCanceled || t.IsFaulted)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
this.btnCheck.Enabled = true;
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void btnRefreshCookie_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.pbLoading.Visible = true;
|
||||
this.btnRefreshShop.Enabled = false;
|
||||
var t = Task.Run(() =>
|
||||
{
|
||||
UpdateShop();
|
||||
RefreshDataGridView(false);
|
||||
});
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
if (t.IsCompleted || t.IsCanceled || t.IsFaulted)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
this.btnRefreshShop.Enabled = true;
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private List<string> GetCheckedList()
|
||||
{
|
||||
List<string> shopNameList = new List<string>();
|
||||
@@ -1037,5 +1149,6 @@ function setCookie(name, value, daysToLive, path, domain, secure, httpOnly, same
|
||||
}
|
||||
document.cookie = cookie;
|
||||
}";
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user