升级方式优化
This commit is contained in:
1 parent
b762ff4c7f
commit
58c26725fb
39 files changed
+1525
-1614
No files matched your search
@@ -252,6 +252,8 @@ namespace TemuKJD.ToolForms
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
askText = textBox1.Text.Trim();
|
||||
if (chkWithTitle.Checked)
|
||||
askText = row.Cells["col_product_name"].Value.ParseToString() + "。" + textBox1.Text.Trim();
|
||||
Clipboard.SetText(askText);
|
||||
}));
|
||||
host.SendKeyEvent(new CefSharp.KeyEvent() { WindowsKeyCode = 86, Type = KeyEventType.RawKeyDown, Modifiers = CefEventFlags.ControlDown });
|
||||
@@ -259,14 +261,18 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
host.SendKeyEvent(new CefSharp.KeyEvent() { WindowsKeyCode = 13, Type = KeyEventType.RawKeyDown });
|
||||
|
||||
for (int i = 0; i < 80; i++)
|
||||
// 等待2分钟以防出现验证码等问题
|
||||
for (int i = 0; i < 120; i++)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
if (currentProd == null)
|
||||
break;
|
||||
}
|
||||
if (currentProd != null)
|
||||
{
|
||||
Invoke(new Action(() => { cell.Value = "生成失败,超时"; }));
|
||||
currentProd = null;
|
||||
}
|
||||
|
||||
Invoke(new Action(() => { cefWebBrowser.Load(Url); }));
|
||||
|
||||
@@ -304,6 +310,14 @@ namespace TemuKJD.ToolForms
|
||||
var dbId = currentProd.id;
|
||||
var rows = dgvDbProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["col_spu_id"].Value.ParseToString() == prodId).ToList();
|
||||
|
||||
if (chkWithTitle.Checked && !data.Contains(currentProd.product_name))
|
||||
{
|
||||
foreach (var row in rows)
|
||||
Invoke(new Action(() => { row.Cells["colOpResult"].Value = "标题不匹配"; }));
|
||||
currentProd = null;
|
||||
return;
|
||||
}
|
||||
|
||||
var titleStr = "";
|
||||
var stringList = data.Split(new string[] { "data:" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach(var str in stringList)
|
||||
@@ -327,6 +341,8 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
if (titleList.Count() > 50)
|
||||
{
|
||||
if (dbId.IsNullOrZero())
|
||||
dbId = 0;
|
||||
var url = BaseClass.BuildPDDObjString("product/mdy_db_product");
|
||||
var body = UserLogin.GetSignaturex() +
|
||||
"&db_id=" + dbId;
|
||||
@@ -392,7 +408,7 @@ namespace TemuKJD.ToolForms
|
||||
//dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url;
|
||||
break;
|
||||
case "主图":
|
||||
ShowImgForm imgFrom = new ShowImgForm(dgvDbProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", ""));
|
||||
ShowImgForm imgFrom = new ShowImgForm(dgvDbProduct.Rows[e.RowIndex].Cells["colMainImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", ""));
|
||||
imgFrom.ShowDialog();
|
||||
break;
|
||||
case "":
|
||||
|
||||
Reference in new issue
Block a user