1.代运营二维码图片
This commit is contained in:
parent
cb4a64f030
commit
18588f82e1
|
@ -273,7 +273,31 @@ namespace ProductClient
|
|||
}
|
||||
|
||||
var tkl = MonitorThread.AlimamaConvertLink(comment.ItemData,
|
||||
comment.ItemData.ActivityId, out var zjyUrl, out var buyPassNoFrills); //阿里妈妈
|
||||
comment.ItemData.ActivityId, true, out var zjyUrl, out var buyPassNoFrills, out string compositeQRCode); //阿里妈妈
|
||||
|
||||
#region 朋友圈内容中追加图片
|
||||
if (!string.IsNullOrWhiteSpace(compositeQRCode))
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<media>");
|
||||
sb.Append("<id>" + Tools.GenerateRandomCode(20) + "</id>");
|
||||
sb.Append("<type>2</type>");
|
||||
sb.Append("<title></title>");
|
||||
sb.Append("<description></description>");
|
||||
sb.Append("<private>0</private>");
|
||||
sb.Append("<url type=\"1\">[图片=" + compositeQRCode + "]</url>");
|
||||
sb.Append("<thumb type=\"1\">[图片=" + compositeQRCode + "]</thumb>");
|
||||
sb.Append("<size height=\"800.0\" width=\"800.0\" totalSize=\"0\"></size>");
|
||||
sb.Append("</media>");
|
||||
|
||||
var index = content.IndexOf("</mediaList>");
|
||||
if (index != -1)
|
||||
{
|
||||
content = content.Insert(index, sb.ToString());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
////处理转链,替换变量
|
||||
//if (isTB == true && !Class1.Config.isPyTkl && comment.Contains(Resources.BuyAddress))
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
|
||||
this.comboBoxEdit3 = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.checkBox2 = new System.Windows.Forms.CheckBox();
|
||||
this.memoEdit1 = new DevExpress.XtraEditors.MemoEdit();
|
||||
|
@ -61,12 +63,11 @@
|
|||
this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.xtraTabPage3 = new DevExpress.XtraTab.XtraTabPage();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.comboBoxEdit3 = new DevExpress.XtraEditors.ComboBoxEdit();
|
||||
this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
|
||||
this.xtraTabControl1.SuspendLayout();
|
||||
this.xtraTabPage1.SuspendLayout();
|
||||
this.xtraTabPage2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit3.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.memoEdit1.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit2.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
|
@ -76,7 +77,6 @@
|
|||
((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).BeginInit();
|
||||
this.xtraTabPage3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit3.Properties)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// xtraTabControl1
|
||||
|
@ -85,7 +85,7 @@
|
|||
this.xtraTabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.xtraTabControl1.Name = "xtraTabControl1";
|
||||
this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1;
|
||||
this.xtraTabControl1.Size = new System.Drawing.Size(584, 435);
|
||||
this.xtraTabControl1.Size = new System.Drawing.Size(565, 435);
|
||||
this.xtraTabControl1.TabIndex = 0;
|
||||
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
|
||||
this.xtraTabPage1,
|
||||
|
@ -96,7 +96,7 @@
|
|||
//
|
||||
this.xtraTabPage1.Controls.Add(this.label1);
|
||||
this.xtraTabPage1.Name = "xtraTabPage1";
|
||||
this.xtraTabPage1.Size = new System.Drawing.Size(582, 409);
|
||||
this.xtraTabPage1.Size = new System.Drawing.Size(563, 409);
|
||||
this.xtraTabPage1.Text = " 公 告 ";
|
||||
//
|
||||
// label1
|
||||
|
@ -143,9 +143,28 @@
|
|||
this.xtraTabPage2.Controls.Add(this.hyperlinkLabelControl2);
|
||||
this.xtraTabPage2.Controls.Add(this.labelControl1);
|
||||
this.xtraTabPage2.Name = "xtraTabPage2";
|
||||
this.xtraTabPage2.Size = new System.Drawing.Size(582, 409);
|
||||
this.xtraTabPage2.Size = new System.Drawing.Size(563, 409);
|
||||
this.xtraTabPage2.Text = " 朋 友 圈 代 运 营 ";
|
||||
//
|
||||
// comboBoxEdit3
|
||||
//
|
||||
this.comboBoxEdit3.EditValue = "";
|
||||
this.comboBoxEdit3.Location = new System.Drawing.Point(158, 166);
|
||||
this.comboBoxEdit3.Name = "comboBoxEdit3";
|
||||
this.comboBoxEdit3.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.comboBoxEdit3.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.comboBoxEdit3.Size = new System.Drawing.Size(245, 20);
|
||||
this.comboBoxEdit3.TabIndex = 27;
|
||||
//
|
||||
// labelControl11
|
||||
//
|
||||
this.labelControl11.Location = new System.Drawing.Point(65, 169);
|
||||
this.labelControl11.Name = "labelControl11";
|
||||
this.labelControl11.Size = new System.Drawing.Size(72, 14);
|
||||
this.labelControl11.TabIndex = 26;
|
||||
this.labelControl11.Text = "商品采集源:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
|
@ -159,7 +178,7 @@
|
|||
// checkBox2
|
||||
//
|
||||
this.checkBox2.AutoSize = true;
|
||||
this.checkBox2.Location = new System.Drawing.Point(330, 184);
|
||||
this.checkBox2.Location = new System.Drawing.Point(330, 206);
|
||||
this.checkBox2.Name = "checkBox2";
|
||||
this.checkBox2.Size = new System.Drawing.Size(74, 18);
|
||||
this.checkBox2.TabIndex = 23;
|
||||
|
@ -169,15 +188,15 @@
|
|||
//
|
||||
// memoEdit1
|
||||
//
|
||||
this.memoEdit1.Location = new System.Drawing.Point(159, 208);
|
||||
this.memoEdit1.Location = new System.Drawing.Point(159, 237);
|
||||
this.memoEdit1.Name = "memoEdit1";
|
||||
this.memoEdit1.Size = new System.Drawing.Size(245, 83);
|
||||
this.memoEdit1.Size = new System.Drawing.Size(245, 60);
|
||||
this.memoEdit1.TabIndex = 22;
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(159, 184);
|
||||
this.checkBox1.Location = new System.Drawing.Point(159, 206);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(158, 18);
|
||||
this.checkBox1.TabIndex = 21;
|
||||
|
@ -239,7 +258,7 @@
|
|||
// comboBoxEdit1
|
||||
//
|
||||
this.comboBoxEdit1.EditValue = "模板A";
|
||||
this.comboBoxEdit1.Location = new System.Drawing.Point(627, 149);
|
||||
this.comboBoxEdit1.Location = new System.Drawing.Point(158, 197);
|
||||
this.comboBoxEdit1.Name = "comboBoxEdit1";
|
||||
this.comboBoxEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
|
@ -250,11 +269,10 @@
|
|||
this.comboBoxEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.comboBoxEdit1.Size = new System.Drawing.Size(245, 20);
|
||||
this.comboBoxEdit1.TabIndex = 16;
|
||||
this.comboBoxEdit1.Visible = false;
|
||||
//
|
||||
// labelControl9
|
||||
//
|
||||
this.labelControl9.Location = new System.Drawing.Point(54, 209);
|
||||
this.labelControl9.Location = new System.Drawing.Point(54, 238);
|
||||
this.labelControl9.Name = "labelControl9";
|
||||
this.labelControl9.Size = new System.Drawing.Size(84, 14);
|
||||
this.labelControl9.TabIndex = 15;
|
||||
|
@ -270,12 +288,11 @@
|
|||
//
|
||||
// labelControl4
|
||||
//
|
||||
this.labelControl4.Location = new System.Drawing.Point(534, 152);
|
||||
this.labelControl4.Location = new System.Drawing.Point(65, 200);
|
||||
this.labelControl4.Name = "labelControl4";
|
||||
this.labelControl4.Size = new System.Drawing.Size(72, 14);
|
||||
this.labelControl4.TabIndex = 15;
|
||||
this.labelControl4.Text = "优惠券模板:";
|
||||
this.labelControl4.Visible = false;
|
||||
//
|
||||
// textEdit4
|
||||
//
|
||||
|
@ -408,7 +425,7 @@
|
|||
this.xtraTabPage3.Controls.Add(this.label2);
|
||||
this.xtraTabPage3.Name = "xtraTabPage3";
|
||||
this.xtraTabPage3.PageEnabled = false;
|
||||
this.xtraTabPage3.Size = new System.Drawing.Size(582, 409);
|
||||
this.xtraTabPage3.Size = new System.Drawing.Size(563, 409);
|
||||
this.xtraTabPage3.Text = " 微 信 群 产 品 直 播 ";
|
||||
//
|
||||
// label2
|
||||
|
@ -422,30 +439,11 @@
|
|||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "内测中...";
|
||||
//
|
||||
// comboBoxEdit3
|
||||
//
|
||||
this.comboBoxEdit3.EditValue = "";
|
||||
this.comboBoxEdit3.Location = new System.Drawing.Point(158, 171);
|
||||
this.comboBoxEdit3.Name = "comboBoxEdit3";
|
||||
this.comboBoxEdit3.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
|
||||
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
|
||||
this.comboBoxEdit3.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
||||
this.comboBoxEdit3.Size = new System.Drawing.Size(245, 20);
|
||||
this.comboBoxEdit3.TabIndex = 27;
|
||||
//
|
||||
// labelControl11
|
||||
//
|
||||
this.labelControl11.Location = new System.Drawing.Point(65, 177);
|
||||
this.labelControl11.Name = "labelControl11";
|
||||
this.labelControl11.Size = new System.Drawing.Size(72, 14);
|
||||
this.labelControl11.TabIndex = 26;
|
||||
this.labelControl11.Text = "商品采集源:";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(584, 435);
|
||||
this.ClientSize = new System.Drawing.Size(565, 435);
|
||||
this.Controls.Add(this.xtraTabControl1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
|
@ -460,6 +458,7 @@
|
|||
this.xtraTabPage1.PerformLayout();
|
||||
this.xtraTabPage2.ResumeLayout(false);
|
||||
this.xtraTabPage2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit3.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.memoEdit1.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit2.Properties)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
|
@ -470,7 +469,6 @@
|
|||
((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).EndInit();
|
||||
this.xtraTabPage3.ResumeLayout(false);
|
||||
this.xtraTabPage3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit3.Properties)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ namespace ProductClient
|
|||
/// 阿里妈妈转连接
|
||||
/// </summary>
|
||||
/// <param name="itemInfo"></param>
|
||||
public static string AlimamaConvertLink(ItemData itemData, string activityId, out string zjyUrl, out string buyPassNoFrills /*bool appendQrcode, /*out string compositeQRCode*/)
|
||||
public static string AlimamaConvertLink(ItemData itemData, string activityId, bool appendQrcode, out string zjyUrl, out string buyPassNoFrills, out string compositeQRCode)
|
||||
{
|
||||
//compositeQRCode = string.Empty;
|
||||
//ZJYUrl = string.Empty;
|
||||
|
@ -263,7 +263,7 @@ namespace ProductClient
|
|||
// throw new Exception($"@解析淘宝商品Id失败:{itemUrl}");
|
||||
//}
|
||||
|
||||
var title = string.Empty;//商品标题
|
||||
//var title = string.Empty;//商品标题
|
||||
|
||||
//#region 检测连接中是否包含优惠券信息
|
||||
//var activityId = string.Empty;
|
||||
|
@ -299,11 +299,14 @@ namespace ProductClient
|
|||
{
|
||||
throw new Exception("生成防屏蔽连接为空,终止操作");
|
||||
}
|
||||
//if (appendQrcode)
|
||||
//{
|
||||
// compositeQRCode = ApiClient.GetQRImage(title, turnItem.Price.ToString("0.00"), turnItem.CouponPrice.ToString("0"), turnItem.UseCouponPrice.ToString("0.00"), turnItem.ImageUrl, ZJYUrl, Class1.Config.qrImageType);
|
||||
//}
|
||||
|
||||
if (appendQrcode)
|
||||
{
|
||||
compositeQRCode = ApiClient.GetQRImage(turnItem.ItemTitle, turnItem.Price.ToString("0.00"), turnItem.CouponPrice.ToString("0"), turnItem.UseCouponPrice.ToString("0.00"), turnItem.ImageUrl, zjyUrl, Class1.Config.qrImageType);
|
||||
}
|
||||
else
|
||||
{
|
||||
compositeQRCode = string.Empty;
|
||||
}
|
||||
return tkl;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue