Преглед изворни кода

增加公众号阅读

增加公众号阅读
changtuiqie пре 7 година
родитељ
комит
12babb81dc

BIN
.vs/Ipad/v15/.suo


BIN
.vs/Ipad/v15/Server/sqlite3/storage.ide


BIN
.vs/Ipad/v15/Server/sqlite3/storage.ide-wal


+ 36 - 1
IPADDemo/FormDemo.Designer.cs

@@ -186,6 +186,9 @@
             this.txt_orderUrl = new System.Windows.Forms.TextBox();
             this.button43 = new System.Windows.Forms.Button();
             this.button44 = new System.Windows.Forms.Button();
+            this.txt_gzhUrl = new System.Windows.Forms.TextBox();
+            this.label47 = new System.Windows.Forms.Label();
+            this.button45 = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.tabControl1.SuspendLayout();
             this.tabPage1.SuspendLayout();
@@ -1257,6 +1260,9 @@
             // 
             // tabPage8
             // 
+            this.tabPage8.Controls.Add(this.button45);
+            this.tabPage8.Controls.Add(this.txt_gzhUrl);
+            this.tabPage8.Controls.Add(this.label47);
             this.tabPage8.Controls.Add(this.button40);
             this.tabPage8.Controls.Add(this.txt_gzhKey);
             this.tabPage8.Controls.Add(this.label43);
@@ -1278,7 +1284,7 @@
             // 
             // button40
             // 
-            this.button40.Location = new System.Drawing.Point(375, 154);
+            this.button40.Location = new System.Drawing.Point(594, 77);
             this.button40.Name = "button40";
             this.button40.Size = new System.Drawing.Size(138, 39);
             this.button40.TabIndex = 10;
@@ -1761,6 +1767,32 @@
             this.button44.UseVisualStyleBackColor = true;
             this.button44.Click += new System.EventHandler(this.button44_Click);
             // 
+            // txt_gzhUrl
+            // 
+            this.txt_gzhUrl.Location = new System.Drawing.Point(375, 168);
+            this.txt_gzhUrl.Name = "txt_gzhUrl";
+            this.txt_gzhUrl.Size = new System.Drawing.Size(198, 25);
+            this.txt_gzhUrl.TabIndex = 12;
+            // 
+            // label47
+            // 
+            this.label47.AutoSize = true;
+            this.label47.Location = new System.Drawing.Point(322, 171);
+            this.label47.Name = "label47";
+            this.label47.Size = new System.Drawing.Size(47, 15);
+            this.label47.TabIndex = 11;
+            this.label47.Text = "url: ";
+            // 
+            // button45
+            // 
+            this.button45.Location = new System.Drawing.Point(594, 168);
+            this.button45.Name = "button45";
+            this.button45.Size = new System.Drawing.Size(121, 25);
+            this.button45.TabIndex = 13;
+            this.button45.Text = "阅读";
+            this.button45.UseVisualStyleBackColor = true;
+            this.button45.Click += new System.EventHandler(this.button45_Click);
+            // 
             // FormDemo
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -1967,5 +1999,8 @@
         private System.Windows.Forms.Label label46;
         private System.Windows.Forms.Label label45;
         private System.Windows.Forms.Button button44;
+        private System.Windows.Forms.TextBox txt_gzhUrl;
+        private System.Windows.Forms.Label label47;
+        private System.Windows.Forms.Button button45;
     }
 }

+ 7 - 0
IPADDemo/FormDemo.cs

@@ -299,6 +299,11 @@ namespace IPADDemo
             txt_gzhlog.Text = weChatThread.Wx_SubscriptionCommand(txt_gzhid.Text, uint.Parse(txt_gzhUin.Text), txt_gzhKey.Text);
         }
 
+        private void button45_Click(object sender, EventArgs e)
+        {
+            txt_gzhlog.Text = weChatThread.Wx_RequestUrl(txt_gzhUrl.Text, txt_gzhUin.Text, txt_gzhKey.Text);
+        }
+
         private void button25_Click(object sender, EventArgs e)
         {
             string str = weChatThread.Wx_GetContactLabelList();
@@ -399,5 +404,7 @@ namespace IPADDemo
             var res = weChatThread.Wx_ExtDeviceLoginOK(txt_orderUrl.Text);
             txt_qrcodeLog.Text = res.ConvertToString();
         }
+
+       
     }
 }

+ 20 - 0
IPADDemo/WeChat/XzyWeChatThread.cs

@@ -1791,6 +1791,26 @@ namespace IPADDemo.WeChat
             return result;
         }
 
+        /// <summary>
+        /// 阅读链接
+        /// </summary>
+        /// <param name="url"></param>
+        /// <param name="uin"></param>
+        /// <param name="key"></param>
+        /// <returns></returns>
+        public unsafe string Wx_RequestUrl(string url, string uin, string key)
+        {
+            var result = "";
+            fixed (int* WxUser1 = &pointerWxUser, msgptr1 = &msgPtr)
+            {
+                XzyWxApis.WXRequestUrl(pointerWxUser, url, key, uin, (int)msgptr1);
+                var datas = MarshalNativeToManaged((IntPtr)msgPtr);
+                result = datas.ToString();
+                Wx_ReleaseEX(ref msgPtr);
+            }
+            return result;
+        }
+
         /// <summary>
         /// 后期所有标签
         /// </summary>