oem账户管理问题修复 微信食品标签图
This commit is contained in:
1 parent
ba502650ab
commit
c7ab757152
10 files changed
+663
-478
No files matched your search
@@ -1,7 +1,15 @@
|
||||
using AllBase;
|
||||
using AllBase.Extension;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Config;
|
||||
using AllBase.Model.Param.WXParam;
|
||||
using AllBase.Model.Result;
|
||||
using AllBase.Model.Result.PDDResult;
|
||||
using AllBase.Model.Result.WXResult;
|
||||
using CefSharp;
|
||||
using NaiBa.Util;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -12,25 +20,18 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.Extension;
|
||||
using TemuKJD.BaseForms;
|
||||
using TemuKJD.ToolForms;
|
||||
using Work;
|
||||
using TemuKJD.BLL;
|
||||
using System.Text.RegularExpressions;
|
||||
using TemuKJD.Extension;
|
||||
using TemuKJD.PDDForms.ProductSelectForms;
|
||||
using TemuKJD.ToolForms;
|
||||
using TemuKJD.WXForms.ShopForms;
|
||||
using AllBase.Model.Result.PDDResult;
|
||||
using AllBase.Model.Param.WXParam;
|
||||
using AllBase.Model.Result.WXResult;
|
||||
using Newtonsoft.Json;
|
||||
using NaiBa.Util;
|
||||
using AllBase.Model.Config;
|
||||
using CefSharp;
|
||||
using AllBase.Extension;
|
||||
using Work;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
@@ -4601,16 +4602,41 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
bookStr += address + "\r\n" + "\r\n";
|
||||
bookStr += Storage + "\r\n" + "\r\n";
|
||||
|
||||
var bookImg = new Bitmap(800, 800);
|
||||
int width = 800;
|
||||
int height = 1000;
|
||||
var bookImg = new Bitmap(width, height);
|
||||
using (Graphics g = Graphics.FromImage(bookImg))
|
||||
{
|
||||
g.Clear(Color.White);
|
||||
//Font font = new Font("宋体", 15, FontStyle.Bold);
|
||||
Font font = new Font("微软雅黑", 15, FontStyle.Regular);
|
||||
Brush textBrush = Brushes.Black;
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
RectangleF rectF = new RectangleF(80, 80, 800 - 80, 800 - 80);
|
||||
g.DrawString(bookStr, font, textBrush, rectF);
|
||||
g.Clear(Color.Gray);
|
||||
|
||||
Brush borderBrush = Brushes.Gray;
|
||||
Brush contentBrush = Brushes.White;
|
||||
g.FillRectangle(contentBrush, new RectangleF(8, 8, width - 16, height - 16));
|
||||
g.FillRectangle(borderBrush, new RectangleF(18, 18, width - 36, height - 36));
|
||||
g.FillRectangle(contentBrush, new RectangleF(22, 22, width - 44, height - 44));
|
||||
g.FillRectangle(borderBrush, new RectangleF(40, 140, width - 80, 4));
|
||||
|
||||
SizeF textSize;
|
||||
{
|
||||
Font font = new Font("微软雅黑", 30, FontStyle.Regular);
|
||||
Brush textBrush = Brushes.DarkRed;
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
// 测量文本的宽度
|
||||
textSize = g.MeasureString("商 品 标 签", font);
|
||||
float x = (width - textSize.Width) / 2;
|
||||
|
||||
RectangleF rectF = new RectangleF(x, 50, width - x, height - 200);
|
||||
g.DrawString("商 品 标 签", font, textBrush, rectF);
|
||||
}
|
||||
|
||||
{
|
||||
//Font font = new Font("宋体", 15, FontStyle.Bold);
|
||||
Font font = new Font("微软雅黑", 15, FontStyle.Regular);
|
||||
Brush textBrush = Brushes.Black;
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||
RectangleF rectF = new RectangleF(80, 120 + textSize.Height, width - 160, height - 80 - 120 - textSize.Height);
|
||||
g.DrawString(bookStr, font, textBrush, rectF);
|
||||
}
|
||||
}
|
||||
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
@@ -5674,8 +5700,8 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
}));
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
//if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
// html = GetHtml.PostUtf8(url, data);
|
||||
//if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
// html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
|
||||
Reference in new issue
Block a user