1调整temu直通车 2调整pdd上货
This commit is contained in:
1 parent
0b2befef57
commit
ab99113f09
6 files changed
+195
-54
No files matched your search
@@ -27,7 +27,7 @@ namespace AllBase
|
||||
/// <summary>
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
public static int VersionCount = 770;
|
||||
public static int VersionCount = 772;
|
||||
//public static int VersionCount = 613;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -60,11 +60,92 @@ namespace AllBase.Model.Result.TemuResult
|
||||
public object site_price_info_list { get; set; } // null,
|
||||
public object site_status_info_list { get; set; } // null,
|
||||
public object group { get; set; } // null
|
||||
/// <summary>
|
||||
/// 效果统计数值
|
||||
/// </summary>
|
||||
public summary_info summary { get; set; }
|
||||
|
||||
// 自定义参数
|
||||
public string shopId { get; set; }
|
||||
}
|
||||
|
||||
public class summary_info
|
||||
{
|
||||
/// <summary>
|
||||
/// 花费
|
||||
/// </summary>
|
||||
public summary_values_info spend { get; set; }
|
||||
/// <summary>
|
||||
/// 申报价销售额
|
||||
/// </summary>
|
||||
public summary_values_info order_pay_amt { get; set; }
|
||||
/// <summary>
|
||||
/// 投资回报率 (ROAS)
|
||||
/// </summary>
|
||||
public summary_values_info roas { get; set; }
|
||||
/// <summary>
|
||||
/// 费比
|
||||
/// </summary>
|
||||
public summary_values_info acos { get; set; }
|
||||
/// <summary>
|
||||
/// 每笔成交花费
|
||||
/// </summary>
|
||||
public summary_values_info transaction_cost { get;set; }
|
||||
/// <summary>
|
||||
/// 曝光量
|
||||
/// </summary>
|
||||
public summary_values_info impr_cnt { get; set; }
|
||||
/// <summary>
|
||||
/// 点击量
|
||||
/// </summary>
|
||||
public summary_values_info clk_cnt { get; set; }
|
||||
/// <summary>
|
||||
/// 子订单量
|
||||
/// </summary>
|
||||
public summary_values_info order_pay_cnt { get; set; }
|
||||
/// <summary>
|
||||
/// 件数
|
||||
/// </summary>
|
||||
public summary_values_info goods_num { get; set; }
|
||||
/// <summary>
|
||||
/// 点击率
|
||||
/// </summary>
|
||||
public summary_values_info ctr { get; set; }
|
||||
/// <summary>
|
||||
/// 转化率
|
||||
/// </summary>
|
||||
public summary_values_info cvr { get; set; }
|
||||
/// <summary>
|
||||
/// 加入购物车数
|
||||
/// </summary>
|
||||
public summary_values_info cart_cnt { get; set; }
|
||||
}
|
||||
|
||||
public class summary_values_info
|
||||
{
|
||||
/// <summary>
|
||||
/// 值
|
||||
/// </summary>
|
||||
public reports_summary_dto_item_info ad { get; set; }
|
||||
public reports_summary_dto_item_info total { get; set; }
|
||||
/// <summary>
|
||||
/// 净值
|
||||
/// </summary>
|
||||
public reports_summary_dto_item_info net_ad { get; set; }
|
||||
public reports_summary_dto_item_info ad7d { get;set;}
|
||||
public reports_summary_dto_item_info total7d { get; set; }
|
||||
public reports_summary_dto_item_info ad_growth7d { get; set; }
|
||||
public reports_summary_dto_item_info ad_growth_rate7d { get; set; }
|
||||
/// <summary>
|
||||
/// 自然周
|
||||
/// </summary>
|
||||
public reports_summary_dto_item_info nature_week_ad { get; set; }
|
||||
/// <summary>
|
||||
/// 自然周目标
|
||||
/// </summary>
|
||||
public reports_summary_dto_item_info nature_week_plan { get; set; }
|
||||
}
|
||||
|
||||
public class ad_roas_info
|
||||
{
|
||||
public int? real_order_cnt { get; set; } // 0,
|
||||
|
||||
@@ -22,7 +22,9 @@ namespace KJD_Web.BLL
|
||||
"202801", "202802", "202803", "202804", "202805", "202806", "202807", "202808", "202809", "202810", "202811", "202812",
|
||||
"202901", "202902", "202903", "202904", "202905", "202906", "202907", "202908", "202909", "202910", "202911", "202912",
|
||||
"203001", "203002", "203003", "203004", "203005", "203006", "203007", "203008", "203009", "203010", "203011", "203012",
|
||||
"203101", "203102", "203103", "203104", "203105", "203106", "203107", "203108", "203109", "203110", "203111", "203112" };
|
||||
"203101", "203102", "203103", "203104", "203105", "203106", "203107", "203108", "203109", "203110", "203111", "203112",
|
||||
"203201", "203202", "203203", "203204", "203205", "203206", "203207", "203208", "203209", "203210", "203211", "203212",
|
||||
"203301", "203302", "203303", "203304", "203305", "203306", "203307", "203308", "203309", "203310", "203311", "203312" };
|
||||
public string AddOrder(string inputData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
|
||||
@@ -720,18 +720,30 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
adsInfo.budget_str, // 广告日预算
|
||||
adsInfo.roas_str, // 目标roas
|
||||
"改",
|
||||
adsInfo.reports_summary_dto.ad_spend_all.trans_val, //adsInfo.used_budget * 0.01, // 总花费
|
||||
adsInfo.reports_summary_dto.order_pay_amt_all.trans_val, //adsInfo.supply_price_sale.ParseToInt() * 0.01, // 申报价销售额
|
||||
adsInfo.reports_summary_dto.roas_all.trans_val, //adsInfo.real_roas * 0.001, // 广告投资回报率 (ROAS)
|
||||
adsInfo.reports_summary_dto.acos_all.trans_val, //adsInfo.acos * 0.01, // 广告费比(广告)
|
||||
adsInfo.reports_summary_dto.transaction_cost.trans_val, // 每笔成交花费
|
||||
adsInfo.reports_summary_dto.impr_cnt_all.trans_val, //adsInfo.impr_num, // 曝光量
|
||||
adsInfo.reports_summary_dto.clk_cnt_all.trans_val, // 点击量
|
||||
adsInfo.reports_summary_dto.order_pay_cnt_all.trans_val, // 订单量
|
||||
adsInfo.reports_summary_dto.goods_num.trans_val, // 件数
|
||||
adsInfo.reports_summary_dto.ctr_all.trans_val, // 点击率(CTR)
|
||||
adsInfo.reports_summary_dto.cvr.trans_val, // 转化率(CVR)
|
||||
adsInfo.reports_summary_dto.cart_cnt_all.trans_val, // 加入购物车数
|
||||
//adsInfo.reports_summary_dto?.ad_spend_all.trans_val, //adsInfo.used_budget * 0.01, // 总花费
|
||||
//adsInfo.reports_summary_dto?.order_pay_amt_all.trans_val, //adsInfo.supply_price_sale.ParseToInt() * 0.01, // 申报价销售额
|
||||
//adsInfo.reports_summary_dto?.roas_all.trans_val, //adsInfo.real_roas * 0.001, // 广告投资回报率 (ROAS)
|
||||
//adsInfo.reports_summary_dto?.acos_all.trans_val, //adsInfo.acos * 0.01, // 广告费比(广告)
|
||||
//adsInfo.reports_summary_dto?.transaction_cost.trans_val, // 每笔成交花费
|
||||
//adsInfo.reports_summary_dto?.impr_cnt_all.trans_val, //adsInfo.impr_num, // 曝光量
|
||||
//adsInfo.reports_summary_dto?.clk_cnt_all.trans_val, // 点击量
|
||||
//adsInfo.reports_summary_dto?.order_pay_cnt_all.trans_val, // 订单量
|
||||
//adsInfo.reports_summary_dto?.goods_num.trans_val, // 件数
|
||||
//adsInfo.reports_summary_dto?.ctr_all.trans_val, // 点击率(CTR)
|
||||
//adsInfo.reports_summary_dto?.cvr.trans_val, // 转化率(CVR)
|
||||
//adsInfo.reports_summary_dto?.cart_cnt_all.trans_val, // 加入购物车数
|
||||
adsInfo.summary?.spend?.ad?.trans_val ?? adsInfo.reports_summary_dto?.ad_spend_all.trans_val, // 总花费
|
||||
adsInfo.summary?.order_pay_amt?.ad?.trans_val ?? adsInfo.reports_summary_dto?.order_pay_amt_all.trans_val, // 申报价销售额
|
||||
adsInfo.summary?.roas?.ad?.trans_val ?? adsInfo.reports_summary_dto?.roas_all.trans_val, // 广告投资回报率 (ROAS)
|
||||
adsInfo.summary?.acos?.ad?.trans_val ?? adsInfo.reports_summary_dto?.acos_all.trans_val, // 广告费比(广告)
|
||||
adsInfo.summary?.transaction_cost?.ad?.trans_val ?? adsInfo.reports_summary_dto?.transaction_cost.trans_val, // 每笔成交花费
|
||||
adsInfo.summary?.impr_cnt?.ad?.trans_val ?? adsInfo.reports_summary_dto?.impr_cnt_all.trans_val, // 曝光量
|
||||
adsInfo.summary?.clk_cnt?.ad?.trans_val ?? adsInfo.reports_summary_dto?.clk_cnt_all.trans_val, // 点击量
|
||||
adsInfo.summary?.order_pay_cnt?.ad?.trans_val ?? adsInfo.reports_summary_dto?.order_pay_cnt_all.trans_val, // 订单量
|
||||
adsInfo.summary?.goods_num?.ad?.trans_val ?? adsInfo.reports_summary_dto?.goods_num.trans_val, // 件数
|
||||
adsInfo.summary?.ctr?.ad?.trans_val ?? adsInfo.reports_summary_dto?.ctr_all.trans_val, // 点击率(CTR)
|
||||
adsInfo.summary?.cvr?.ad?.trans_val ?? adsInfo.reports_summary_dto?.cvr.trans_val, // 转化率(CVR)
|
||||
adsInfo.summary?.cart_cnt?.ad?.trans_val ?? adsInfo.reports_summary_dto?.cart_cnt_all.trans_val, // 加入购物车数
|
||||
"" // 操作结果,状态
|
||||
); ;
|
||||
|
||||
@@ -2329,6 +2341,8 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
return "手动暂停";
|
||||
if (statusId == 5)
|
||||
return "审核驳回";
|
||||
if (statusId == 2)
|
||||
return "商品售罄";
|
||||
if (statusId == 0)
|
||||
return "账户资金不足";
|
||||
return "未投放 详情请后台查看";
|
||||
|
||||
+32
-32
@@ -29,8 +29,8 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
@@ -40,6 +40,8 @@
|
||||
this.btnLoginSelect = new TemuKJD.UserControls.ButtonEx();
|
||||
this.btnCheck = new TemuKJD.UserControls.ButtonEx();
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
this.txtSubAccount = new System.Windows.Forms.TextBox();
|
||||
this.lblSubAccount = new System.Windows.Forms.Label();
|
||||
this.cmbNotes = new System.Windows.Forms.ComboBox();
|
||||
this.pnlEmpty = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnSearch = new TemuKJD.UserControls.ButtonEx();
|
||||
@@ -80,8 +82,6 @@
|
||||
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
|
||||
this.chkAutoDrag = new System.Windows.Forms.CheckBox();
|
||||
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
|
||||
this.txtSubAccount = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -214,7 +214,7 @@
|
||||
// panel4
|
||||
//
|
||||
this.panel4.Controls.Add(this.txtSubAccount);
|
||||
this.panel4.Controls.Add(this.label5);
|
||||
this.panel4.Controls.Add(this.lblSubAccount);
|
||||
this.panel4.Controls.Add(this.cmbNotes);
|
||||
this.panel4.Controls.Add(this.pnlEmpty);
|
||||
this.panel4.Controls.Add(this.btnSearch);
|
||||
@@ -231,6 +231,22 @@
|
||||
this.panel4.Size = new System.Drawing.Size(910, 40);
|
||||
this.panel4.TabIndex = 0;
|
||||
//
|
||||
// txtSubAccount
|
||||
//
|
||||
this.txtSubAccount.Location = new System.Drawing.Point(666, 10);
|
||||
this.txtSubAccount.Name = "txtSubAccount";
|
||||
this.txtSubAccount.Size = new System.Drawing.Size(101, 23);
|
||||
this.txtSubAccount.TabIndex = 417;
|
||||
//
|
||||
// lblSubAccount
|
||||
//
|
||||
this.lblSubAccount.AutoSize = true;
|
||||
this.lblSubAccount.Location = new System.Drawing.Point(618, 13);
|
||||
this.lblSubAccount.Name = "lblSubAccount";
|
||||
this.lblSubAccount.Size = new System.Drawing.Size(56, 17);
|
||||
this.lblSubAccount.TabIndex = 418;
|
||||
this.lblSubAccount.Text = "子账户:";
|
||||
//
|
||||
// cmbNotes
|
||||
//
|
||||
this.cmbNotes.FormattingEnabled = true;
|
||||
@@ -409,20 +425,20 @@
|
||||
//
|
||||
this.dgvShop.AllowUserToAddRows = false;
|
||||
this.dgvShop.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dgvShop.AutoRowNumber = true;
|
||||
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.colSelect,
|
||||
@@ -677,22 +693,6 @@
|
||||
this.statusBar.Size = new System.Drawing.Size(1264, 29);
|
||||
this.statusBar.TabIndex = 1;
|
||||
//
|
||||
// txtSubAccount
|
||||
//
|
||||
this.txtSubAccount.Location = new System.Drawing.Point(666, 10);
|
||||
this.txtSubAccount.Name = "txtSubAccount";
|
||||
this.txtSubAccount.Size = new System.Drawing.Size(101, 23);
|
||||
this.txtSubAccount.TabIndex = 417;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(618, 13);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(56, 17);
|
||||
this.label5.TabIndex = 418;
|
||||
this.label5.Text = "子账户:";
|
||||
//
|
||||
// ShopListForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -779,6 +779,6 @@
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
|
||||
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
|
||||
private System.Windows.Forms.TextBox txtSubAccount;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label lblSubAccount;
|
||||
}
|
||||
}
|
||||
@@ -160,12 +160,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
isLowPriceSku = chkLowPriceSku.Checked;
|
||||
|
||||
dgvSelectProduct.Columns["colSkuFakeImg"].Visible = false;
|
||||
//#if DEBUG
|
||||
|
||||
if (BaseClass.SaLevel == 1)
|
||||
{
|
||||
dgvSelectProduct.Columns["colSkuFakeImg"].Visible = true;
|
||||
}
|
||||
//#endif
|
||||
#if DEBUG
|
||||
dgvSelectProduct.Columns["colSkuFakeImg"].Visible = true;
|
||||
#endif
|
||||
|
||||
IsLoadComplate = true;
|
||||
}
|
||||
@@ -3134,21 +3136,41 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
if (signId == 20981 && sign20981)
|
||||
{
|
||||
var activityRst = activity_goods_info(shop, prodParam.goods_id.ParseToString(), "20981");
|
||||
if (!activityRst.Contains("\"success\":true"))
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(11200, 11800));
|
||||
activityRst = activity_goods_info(shop, prodParam.goods_id.ParseToString(), "20981");
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(2000, 4500));
|
||||
}
|
||||
if (signId == 15996 && sign15996)
|
||||
{
|
||||
var activityRst = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 15996, 18);
|
||||
if (!activityRst.Contains("\"success\":true"))
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(11200, 11800));
|
||||
activityRst = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 15996, 18);
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(2000, 4500));
|
||||
}
|
||||
if (signId == 21365 && sign21365)
|
||||
{
|
||||
var activityRst = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 21365, 27);
|
||||
if (!activityRst.Contains("\"success\":true"))
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(11200, 11800));
|
||||
activityRst = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 21365, 27);
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(2000, 4500));
|
||||
}
|
||||
if (signId == 22347 && sign22347)
|
||||
{
|
||||
var activityRst = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 22347, 27);
|
||||
if (!activityRst.Contains("\"success\":true"))
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(1200, 1800));
|
||||
activityRst = activity_goods_price_rule(shop, prodParam.goods_id.ParseToString(), 22347, 27);
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(2000, 4500));
|
||||
}
|
||||
}
|
||||
@@ -4073,9 +4095,20 @@ namespace TemuKJD.PDDForms.ProductSelectForms
|
||||
}
|
||||
|
||||
// 保存图片到文件系统
|
||||
string imgName = "";
|
||||
string imgPath = "";
|
||||
try
|
||||
{
|
||||
image.Save("D:\\图片1.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
string dirverName = "D:";
|
||||
if (!DriveInfo.GetDrives().Any(d => d.Name.StartsWith(dirverName)))
|
||||
dirverName = "E:";
|
||||
if (!DriveInfo.GetDrives().Any(d => d.Name.StartsWith(dirverName)))
|
||||
dirverName = "C:";
|
||||
if (!Directory.Exists(dirverName + "\\img_tmp"))
|
||||
Directory.CreateDirectory(dirverName + "\\img_tmp");
|
||||
imgName = "图片" + Randomx.GetId(1000, 10000) + ".jpg";
|
||||
imgPath = dirverName + "\\img_tmp\\" + imgName;
|
||||
image.Save(imgPath, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -4088,10 +4121,10 @@ Content-Disposition: form-data; name=""upload_sign""
|
||||
|
||||
" + img_signature + @"
|
||||
------WebKitFormBoundaryi5f9ydbgu8bo3yVD
|
||||
Content-Disposition: form-data; name=""image""; filename=""图片1.jpg""
|
||||
Content-Disposition: form-data; name=""image""; filename=""" + imgName + @"""
|
||||
Content-Type: image/jpeg
|
||||
|
||||
<!>D:\图片1.jpg<!>
|
||||
<!>" + imgPath + @"<!>
|
||||
------WebKitFormBoundaryi5f9ydbgu8bo3yVD
|
||||
Content-Disposition: form-data; name=""pic_operations""
|
||||
|
||||
@@ -5376,22 +5409,33 @@ Content-Disposition: form-data; name=""pic_operations""
|
||||
// img_base64 = "/9j/4AAQSkZJRgABAQEAAAAAAAD/2wBDAAgFBgcGBQgHBgcJCAgJDBMMDAsLDBgREg4THBgdHRsYGxofIywlHyEqIRobJjQnKi4vMTIxHiU2OjYwOiwwMTD/2wBDAQgJCQwKDBcMDBcwIBsgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDD/wAARCAMgAyADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD1kdeKU9OaQHmkLUyxccUqnHekB46UZ9qAHUlGaKAF70tJSnpQAhyR1oxgY3U0DB5pxA9KAF3YpC2e9N74ozg8CgB/OKQnApaRh0oAYeeT1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aADPPU07qKbmjJoAUikIUdaQknvQSB15oAd8uOlAINNDjP/1qN3pQA7ilzTC3pRuwOtADw2aQmmhh2NAOaBjwaUHFRlqQk+tAEu5aQkVGDS59aAHZ9aWoyaXdx1oAcT7Unf5fypu7Pel3Y+tADt208rg+tLuBqMsT3zQWIGc0ASHFGKi3Z70b8dTk0ASEDqRQxOcAVE0hA6U2ORsnd+FAFjFIcd6jLj1pN4oAk47UmPembvSjeaAPHIImuHaJJ5JNxOVAO4L1+9wK0LMxRpvS5f7wBhnGA2eygdveqkTrI+2TmPkhGGxiMcHceP61bVlwrMJ4Qucq6hkVMdBjkmtCBb19u6RmjEuCqqgBQKc9B6j1NZc8mzP2eHy+gjdyHJXu3tV24eBPmiSKW4ZfkMJKqqHJOc9aoSZkByVVSf3ar6DqDSAikdY0VV3Oo+YYH3ievNY2pFUV8Ju3jaGPbvWqjfxRfNniNSMY9cVS1SNWQD7yhf3Sk88feqGBlxHzE2+gwT716f8ACTVjNo8tlK2Wt3yFLc7TXl8DxB5P7zYIVeldH8PL37F4qSNjhJ1I+9xntQgPbYpAe9TK46ZqhBIMDNW0IyCKCifNLmmginDFAAeelJz1xRnBoLc0wGDqTigkgU7Iz0pjDINADrb/AFZ+tLSW3+rP1paADGR0qtOMKcGppCQODVGe429RmgBbNWW3fd6Hk9axNJ/4/Zfr/WumU2xtS6yDbiuY0Y5u5D75qBnWW/3BUneo7c5QGpOLine truncated
|
||||
byte[] imageBytes = Convert.FromBase64String(img_base64);
|
||||
// 使用MemoryStream创建图片对象
|
||||
string imgName = "";
|
||||
string imgPath = "";
|
||||
using (MemoryStream ms = new MemoryStream(imageBytes))
|
||||
{
|
||||
Image image = Image.FromStream(ms);
|
||||
// 保存图片到文件系统
|
||||
try
|
||||
{
|
||||
image.Save("D:\\图片1.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
string dirverName = "D:";
|
||||
if (!DriveInfo.GetDrives().Any(d => d.Name.StartsWith(dirverName)))
|
||||
dirverName = "E:";
|
||||
if (!DriveInfo.GetDrives().Any(d => d.Name.StartsWith(dirverName)))
|
||||
dirverName = "C:";
|
||||
if (!Directory.Exists(dirverName + "\\img_tmp"))
|
||||
Directory.CreateDirectory(dirverName + "\\img_tmp");
|
||||
imgName = "图片" + Randomx.GetId(1000, 10000) + ".jpg";
|
||||
imgPath = dirverName + "\\img_tmp\\" + imgName;
|
||||
image.Save(imgPath, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
}
|
||||
catch (Exception ex) { return "存图失败 " + ex.Message; }
|
||||
}
|
||||
string boundary = "----WebKitFormBoundaryFqcwRDsfAuvxgM4a";
|
||||
string body = @"------WebKitFormBoundaryFqcwRDsfAuvxgM4a
|
||||
Content-Disposition: form-data; name=""file""; filename=""图片1.jpg""
|
||||
Content-Disposition: form-data; name=""file""; filename=""" + imgName + @"""
|
||||
Content-Type: image/jpeg
|
||||
|
||||
<!>D:\图片1.jpg<!>
|
||||
<!>" + imgPath + @"<!>
|
||||
------WebKitFormBoundaryFqcwRDsfAuvxgM4a--
|
||||
";
|
||||
|
||||
|
||||
Reference in new issue
Block a user