微信充值二维码 升级程序调整 打包程序调整
This commit is contained in:
1 parent
55528e5109
commit
025b33b478
32 files changed
+1196
-78
No files matched your search
+9
-5
@@ -40,7 +40,8 @@
|
||||
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("带货助手");
|
||||
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("图片工具");
|
||||
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("运单管理");
|
||||
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
|
||||
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("充值二维码");
|
||||
System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1,
|
||||
treeNode2,
|
||||
treeNode3,
|
||||
@@ -52,7 +53,8 @@
|
||||
treeNode9,
|
||||
treeNode10,
|
||||
treeNode11,
|
||||
treeNode12});
|
||||
treeNode12,
|
||||
treeNode13});
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -167,10 +169,12 @@
|
||||
treeNode11.Text = "图片工具";
|
||||
treeNode12.Name = "运单管理";
|
||||
treeNode12.Text = "运单管理";
|
||||
treeNode13.Name = "超级权限管理";
|
||||
treeNode13.Text = "超级权限管理";
|
||||
treeNode13.Name = "充值二维码";
|
||||
treeNode13.Text = "充值二维码";
|
||||
treeNode14.Name = "超级权限管理";
|
||||
treeNode14.Text = "超级权限管理";
|
||||
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode13});
|
||||
treeNode14});
|
||||
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
|
||||
this.tv.Size = new System.Drawing.Size(140, 446);
|
||||
this.tv.TabIndex = 1;
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
public Lazy<RandomComProductForm> randomComProductForm = new Lazy<RandomComProductForm>();
|
||||
public Lazy<WXWaybillManageForm> waybillManageForm = new Lazy<WXWaybillManageForm>();
|
||||
public Lazy<JstBanPlatformForm> banPlatformForm = new Lazy<JstBanPlatformForm>();
|
||||
public Lazy<WXAdminSetTopUpQrCodeForm> adminSetTopUpQrCodeForm = new Lazy<WXAdminSetTopUpQrCodeForm>();
|
||||
|
||||
public WXAdminForm()
|
||||
{
|
||||
@@ -119,6 +120,9 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
case "运单管理":
|
||||
SetForm(waybillManageForm.Value);
|
||||
break;
|
||||
case "充值二维码":
|
||||
SetForm(adminSetTopUpQrCodeForm.Value);
|
||||
break;
|
||||
}
|
||||
//}));
|
||||
//}).Start();
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
|
||||
namespace TemuKJD.WXForms.AdminForms
|
||||
{
|
||||
partial class WXAdminSetTopUpQrCodeForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.btnUploadImg = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnRefresh = new DevComponents.DotNetBar.PanelEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Location = new System.Drawing.Point(30, 30);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(384, 384);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 2;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// btnUploadImg
|
||||
//
|
||||
this.btnUploadImg.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnUploadImg.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnUploadImg.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnUploadImg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnUploadImg.Location = new System.Drawing.Point(330, 420);
|
||||
this.btnUploadImg.Name = "btnUploadImg";
|
||||
this.btnUploadImg.Size = new System.Drawing.Size(84, 23);
|
||||
this.btnUploadImg.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnUploadImg.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnUploadImg.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnUploadImg.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnUploadImg.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnUploadImg.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnUploadImg.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnUploadImg.Style.GradientAngle = 90;
|
||||
this.btnUploadImg.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnUploadImg.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnUploadImg.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnUploadImg.TabIndex = 1124;
|
||||
this.btnUploadImg.Text = "上传二维码";
|
||||
this.btnUploadImg.Click += new System.EventHandler(this.btnUploadImg_Click);
|
||||
//
|
||||
// btnRefresh
|
||||
//
|
||||
this.btnRefresh.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnRefresh.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRefresh.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnRefresh.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnRefresh.Location = new System.Drawing.Point(240, 420);
|
||||
this.btnRefresh.Name = "btnRefresh";
|
||||
this.btnRefresh.Size = new System.Drawing.Size(84, 23);
|
||||
this.btnRefresh.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnRefresh.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnRefresh.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnRefresh.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnRefresh.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnRefresh.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnRefresh.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnRefresh.Style.GradientAngle = 90;
|
||||
this.btnRefresh.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnRefresh.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnRefresh.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnRefresh.TabIndex = 1131;
|
||||
this.btnRefresh.Text = "刷新";
|
||||
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
|
||||
//
|
||||
// WXAdminSetTopUpQrCodeForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(800, 494);
|
||||
this.Controls.Add(this.btnRefresh);
|
||||
this.Controls.Add(this.btnUploadImg);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Name = "WXAdminSetTopUpQrCodeForm";
|
||||
this.Text = "SetTopUpQrCodeForm";
|
||||
this.Load += new System.EventHandler(this.WXAdminSetTopUpQrCodeForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private DevComponents.DotNetBar.PanelEx btnUploadImg;
|
||||
private DevComponents.DotNetBar.PanelEx btnRefresh;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
using AllBase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using Work;
|
||||
using Work.BLL.Tools;
|
||||
|
||||
namespace TemuKJD.WXForms.AdminForms
|
||||
{
|
||||
public partial class WXAdminSetTopUpQrCodeForm : Form
|
||||
{
|
||||
public WXAdminSetTopUpQrCodeForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnUploadImg_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.Multiselect = false;
|
||||
// 设置过滤条件,只显示文本文件
|
||||
openFileDialog.Filter = "图片文件 (*.jpeg;*.jpg;*.png)|*.jpeg;*.jpg;*.png|All files (*.*)|*.*";
|
||||
// 显示对话框并获取结果
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
string filePath = openFileDialog.FileName;
|
||||
Image image = Image.FromFile(filePath);
|
||||
|
||||
string imgBase64 = "";
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
image.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg);
|
||||
byte[] imageBytes = memoryStream.ToArray();
|
||||
imgBase64 = Convert.ToBase64String(imageBytes);
|
||||
}
|
||||
|
||||
var url = BaseClass.BuildWXObjString("user/update_top_up_qrcode");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
data += "&qrcode_base64=" + imgBase64;
|
||||
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
var msg = BaseRegex.GetStringJson(ref html, "msg");
|
||||
}
|
||||
|
||||
refreshQrcode();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("打开二维码图片失败 " + ex.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void WXAdminSetTopUpQrCodeForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
refreshQrcode();
|
||||
}
|
||||
|
||||
public void refreshQrcode()
|
||||
{
|
||||
|
||||
|
||||
var url = BaseClass.BuildWXObjString("user/get_top_up_qrcode");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
var msg = BaseRegex.GetStringJson(ref html, "msg");
|
||||
BaseMsgForm.ShowError(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
var base64Str = BaseRegex.GetStringJson(ref html, "qrcode_base64");
|
||||
if (!string.IsNullOrEmpty(base64Str))
|
||||
pictureBox1.Image = Base64ChangeImgUrl.Base64ToImage(base64Str);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
refreshQrcode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in new issue
Block a user