解决cef 138版本多开软件报错问题
This commit is contained in:
1 parent
66a2d815be
commit
0492e87aee
6 files changed
+90
-72
No files matched your search
@@ -27,8 +27,8 @@ namespace AllBase
|
||||
/// <summary>
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
public static int VersionCount = 523;
|
||||
//public static int VersionCount = 523;
|
||||
public static int VersionCount = 525;
|
||||
//public static int VersionCount = 525;
|
||||
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
|
||||
@@ -251,7 +251,7 @@ namespace KJD_Web.BLL
|
||||
user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name");
|
||||
string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name");
|
||||
string login_pass = RegexUtils.GetStringQuery(ref inputData, "login_pass");
|
||||
string sub_user_name = RegexUtils.GetStringQuery(ref inputData, "sub_user_name");
|
||||
string sub_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_user_name"));
|
||||
string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie");
|
||||
string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2");
|
||||
string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id");
|
||||
@@ -309,7 +309,7 @@ namespace KJD_Web.BLL
|
||||
user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name");
|
||||
string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name");
|
||||
string login_pass = RegexUtils.GetStringQuery(ref inputData, "login_pass");
|
||||
string sub_user_name = RegexUtils.GetStringQuery(ref inputData, "sub_user_name");
|
||||
string sub_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_user_name"));
|
||||
string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie");
|
||||
string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2");
|
||||
string new_shop_id = RegexUtils.GetStringQuery(ref inputData, "new_shop_id");
|
||||
|
||||
@@ -318,7 +318,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
|
||||
if (jsonRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
||||
{
|
||||
tryCount++;
|
||||
Thread.Sleep(Randomx.GetId(3000, 5000));
|
||||
Thread.Sleep(Randomx.GetId(5000, 7000));
|
||||
goto tryAgain;
|
||||
}
|
||||
|
||||
@@ -580,7 +580,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
|
||||
if ((jsonRst.Contains("当前操作人数太多,请稍后重试") || jsonRst.Contains("too quickly")) && tryCount < 5)
|
||||
{
|
||||
tryCount++;
|
||||
Thread.Sleep(Randomx.GetId(3000, 5000));
|
||||
Thread.Sleep(Randomx.GetId(5000, 7000));
|
||||
goto tryAgain;
|
||||
}
|
||||
if (!jsonRst.Contains("\"success\":true"))
|
||||
@@ -884,7 +884,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
|
||||
if ((jsonRst.Contains("当前操作人数太多,请稍后重试") || jsonRst.Contains("too quickly")) && tryCount < 5)
|
||||
{
|
||||
tryCount++;
|
||||
Thread.Sleep(Randomx.GetId(3000, 5000));
|
||||
Thread.Sleep(Randomx.GetId(5000, 7000));
|
||||
goto tryAgain;
|
||||
}
|
||||
|
||||
@@ -989,11 +989,11 @@ namespace TemuKJD.KJDForms.SalesCenterForms
|
||||
}
|
||||
string data = JsonHelper.SerializeObject(activityParam);
|
||||
string submitRst = "";
|
||||
Thread.Sleep(Randomx.GetId(1000, 5000));
|
||||
Thread.Sleep(Randomx.GetId(3000, 6000));
|
||||
submitRst = SubmitActivity(shop, activityParam.activityType, activityParam.activityThematicId, data);
|
||||
for (int j = 0; j < 4 && (jsonRst.Contains("当前操作人数太多,请稍后重试") || jsonRst.Contains("too quickly")); j++)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(5000, 7500));
|
||||
Thread.Sleep(Randomx.GetId(6000, 10000));
|
||||
submitRst = SubmitActivity(shop, activityParam.activityType, activityParam.activityThematicId, data);
|
||||
}
|
||||
|
||||
|
||||
+51
-49
@@ -40,7 +40,6 @@
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnSearch = new TemuKJD.UserControls.ButtonEx();
|
||||
this.txtNotes = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtShopName = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
@@ -52,8 +51,6 @@
|
||||
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();
|
||||
@@ -77,6 +74,9 @@
|
||||
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();
|
||||
this.cmbNotes = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -118,7 +118,7 @@
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1063, 637);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1264, 637);
|
||||
this.splitContainer1.SplitterDistance = 46;
|
||||
this.splitContainer1.TabIndex = 33;
|
||||
//
|
||||
@@ -134,7 +134,7 @@
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 1;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(1063, 46);
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(1264, 46);
|
||||
this.tableLayoutPanel2.TabIndex = 37;
|
||||
//
|
||||
// panel5
|
||||
@@ -142,7 +142,7 @@
|
||||
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);
|
||||
this.panel5.Location = new System.Drawing.Point(1032, 3);
|
||||
this.panel5.Name = "panel5";
|
||||
this.panel5.Size = new System.Drawing.Size(229, 40);
|
||||
this.panel5.TabIndex = 1;
|
||||
@@ -197,9 +197,9 @@
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
this.panel4.Controls.Add(this.cmbNotes);
|
||||
this.panel4.Controls.Add(this.pnlEmpty);
|
||||
this.panel4.Controls.Add(this.btnSearch);
|
||||
this.panel4.Controls.Add(this.txtNotes);
|
||||
this.panel4.Controls.Add(this.label4);
|
||||
this.panel4.Controls.Add(this.txtShopName);
|
||||
this.panel4.Controls.Add(this.label3);
|
||||
@@ -210,7 +210,7 @@
|
||||
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel4.Location = new System.Drawing.Point(3, 3);
|
||||
this.panel4.Name = "panel4";
|
||||
this.panel4.Size = new System.Drawing.Size(822, 40);
|
||||
this.panel4.Size = new System.Drawing.Size(1023, 40);
|
||||
this.panel4.TabIndex = 0;
|
||||
//
|
||||
// pnlEmpty
|
||||
@@ -218,7 +218,7 @@
|
||||
this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.pnlEmpty.Location = new System.Drawing.Point(769, 9);
|
||||
this.pnlEmpty.Location = new System.Drawing.Point(799, 9);
|
||||
this.pnlEmpty.Name = "pnlEmpty";
|
||||
this.pnlEmpty.Size = new System.Drawing.Size(66, 26);
|
||||
this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -244,7 +244,7 @@
|
||||
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSearch.ForeColor = System.Drawing.Color.White;
|
||||
this.btnSearch.Location = new System.Drawing.Point(698, 9);
|
||||
this.btnSearch.Location = new System.Drawing.Point(728, 9);
|
||||
this.btnSearch.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnSearch.Name = "btnSearch";
|
||||
this.btnSearch.Size = new System.Drawing.Size(66, 26);
|
||||
@@ -253,21 +253,14 @@
|
||||
this.btnSearch.UseVisualStyleBackColor = false;
|
||||
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
|
||||
//
|
||||
// txtNotes
|
||||
//
|
||||
this.txtNotes.Location = new System.Drawing.Point(574, 11);
|
||||
this.txtNotes.Name = "txtNotes";
|
||||
this.txtNotes.Size = new System.Drawing.Size(110, 23);
|
||||
this.txtNotes.TabIndex = 376;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(538, 14);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(44, 17);
|
||||
this.label4.Size = new System.Drawing.Size(68, 17);
|
||||
this.label4.TabIndex = 377;
|
||||
this.label4.Text = "备注:";
|
||||
this.label4.Text = "分组备注:";
|
||||
//
|
||||
// txtShopName
|
||||
//
|
||||
@@ -353,7 +346,7 @@
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.chkAutoDrag);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1063, 587);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1264, 587);
|
||||
this.splitContainer2.SplitterDistance = 555;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
@@ -378,7 +371,7 @@
|
||||
//
|
||||
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
|
||||
this.pbLoading.Location = new System.Drawing.Point(506, 252);
|
||||
this.pbLoading.Location = new System.Drawing.Point(607, 252);
|
||||
this.pbLoading.Name = "pbLoading";
|
||||
this.pbLoading.Size = new System.Drawing.Size(50, 50);
|
||||
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
@@ -432,35 +425,10 @@
|
||||
this.dgvShop.Name = "dgvShop";
|
||||
this.dgvShop.ReadOnly = true;
|
||||
this.dgvShop.RowTemplate.Height = 23;
|
||||
this.dgvShop.Size = new System.Drawing.Size(1055, 555);
|
||||
this.dgvShop.Size = new System.Drawing.Size(1256, 555);
|
||||
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.Bottom;
|
||||
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, -1);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1063, 29);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// colSelect
|
||||
//
|
||||
this.colSelect.FillWeight = 26F;
|
||||
@@ -648,11 +616,45 @@
|
||||
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(1108, 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.Bottom;
|
||||
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, -1);
|
||||
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Size = new System.Drawing.Size(1264, 29);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// cmbNotes
|
||||
//
|
||||
this.cmbNotes.FormattingEnabled = true;
|
||||
this.cmbNotes.Location = new System.Drawing.Point(597, 10);
|
||||
this.cmbNotes.Name = "cmbNotes";
|
||||
this.cmbNotes.Size = new System.Drawing.Size(120, 25);
|
||||
this.cmbNotes.TabIndex = 413;
|
||||
this.cmbNotes.Text = "全部";
|
||||
//
|
||||
// ShopListForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(1063, 637);
|
||||
this.ClientSize = new System.Drawing.Size(1264, 637);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
@@ -703,7 +705,6 @@
|
||||
private System.Windows.Forms.TextBox txtShopId;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private UserControls.ButtonEx btnSearch;
|
||||
private System.Windows.Forms.TextBox txtNotes;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private DevComponents.DotNetBar.PanelEx pnlEmpty;
|
||||
private UserControls.ButtonEx btnRefreshShop;
|
||||
@@ -730,5 +731,6 @@
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
|
||||
private System.Windows.Forms.ComboBox cmbNotes;
|
||||
}
|
||||
}
|
||||
@@ -437,6 +437,15 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
//BaseMsgForm.ShowError("当前正在加载,请稍等");
|
||||
return;
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
cmbNotes.Items.Clear();
|
||||
var notes = GlobalConfig.ShopLoginList.Select(s => s.Notes).Distinct();
|
||||
cmbNotes.Items.Add("全部");
|
||||
cmbNotes.Items.AddRange(notes.ToArray());
|
||||
}));
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
isLoading = true;
|
||||
@@ -449,18 +458,21 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
|| GlobalConfig.ShopLoginList.Where(ss=>ss.LoginName == s.LoginName).Count() == 1)
|
||||
.OrderBy(s=>s.LoginName).ToList();
|
||||
|
||||
if (!string.IsNullOrEmpty(txtNotes.Text))
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
shopList = shopList.Where(s => s.Notes.ParseToString().ToLower().Contains(txtNotes.Text.ToLower())).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtShopId.Text))
|
||||
{
|
||||
shopList = shopList.Where(s => s.ShopId.ParseToString().ToLower().Contains(txtShopId.Text.ToLower())).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtShopName.Text))
|
||||
{
|
||||
shopList = shopList.Where(s => s.ShopAccount.ParseToString().ToLower().Contains(txtShopName.Text.ToLower())).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(cmbNotes.Text) && cmbNotes.Text.Trim() != "全部")
|
||||
{
|
||||
shopList = shopList.Where(s => s.Notes.ParseToString().ToLower().Contains(cmbNotes.Text.ToLower())).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtShopId.Text))
|
||||
{
|
||||
shopList = shopList.Where(s => s.ShopId.ParseToString().ToLower().Contains(txtShopId.Text.ToLower())).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtShopName.Text))
|
||||
{
|
||||
shopList = shopList.Where(s => s.ShopAccount.ParseToString().ToLower().Contains(txtShopName.Text.ToLower())).ToList();
|
||||
}
|
||||
}));
|
||||
|
||||
List<string> shopIdList = GetCheckedShopIdList();
|
||||
this.Invoke(new Action(() =>
|
||||
@@ -1125,7 +1137,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
|
||||
private void btnEmpty_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.txtNotes.Text = "";
|
||||
this.cmbNotes.Text = "全部";
|
||||
this.txtShopId.Text = "";
|
||||
this.txtShopName.Text = "";
|
||||
}
|
||||
|
||||
+6
-2
@@ -157,8 +157,12 @@ namespace TemuKJD
|
||||
settings.IgnoreCertificateErrors = true;
|
||||
settings.Locale = "zh-CN";
|
||||
settings.LogSeverity = LogSeverity.Disable;
|
||||
//settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache");
|
||||
settings.CachePath = null; //禁止缓存
|
||||
|
||||
var pName = Process.GetCurrentProcess().ProcessName;
|
||||
var pCount = Process.GetProcesses().Count(p => p.ProcessName == pName);
|
||||
//138版cef自己不会分缓存,会因占用导致报错,手动分缓存
|
||||
settings.CachePath = Path.Combine(Environment.CurrentDirectory, "Cache\\" + pCount);
|
||||
//settings.CachePath = null; //禁止缓存
|
||||
//settings.CefCommandLineArgs.Add("enable-javascript", "1");
|
||||
//settings.CefCommandLineArgs.Add("disable-features", "NetworkService,NetworkServiceInProcess");
|
||||
Cef.Initialize(settings);
|
||||
|
||||
Reference in new issue
Block a user