<bdo id="ilkw0"><tbody id="ilkw0"></tbody></bdo>
    1. <s id="ilkw0"></s>
    2. \r\n    \r\n      分組管理<\/p>\r\n      \r\n        \r\n          新建分組<\/span>\r\n          \r\n            關(guān)閉\r\n          <\/a>\r\n        <\/p>\r\n        \r\n          30字符以?xún)?nèi)\r\n\r\n        <\/p>\r\n        \r\n        \r\n          \r\n            確定創(chuàng)建\r\n          <\/p>\r\n\r\n        <\/asp:LinkButton>\r\n      <\/p>\r\n      <\/p>\r\n      \r\n        \r\n          \r\n            \r\n              序號(hào)<\/th>\r\n              ID編號(hào)<\/th>\r\n              分組名稱(chēng)<\/th>\r\n              分組人數(shù)<\/th>\r\n              操作<\/th>\r\n            <\/tr>\r\n          <\/HeaderTemplate>\r\n          \r\n            '>\r\n              <\/asp:Label><\/td>\r\n              <%# Eval(\"Group_ID\") %><\/td>\r\n              <%# Eval(\"Group_Name\") %><\/td>\r\n              <%# Eval(\"Group_Count\") %><\/td>\r\n              \r\n                ', '<%# Eval(\"Group_Name\") %>'); \">修改分組名稱(chēng)<\/a>\r\n                ' CssClass=\"button blue\">刪除分組<\/asp:LinkButton>\r\n\r\n                ' CssClass=\"button blue\">此分組消息群發(fā)<\/asp:LinkButton>\r\n\r\n                ' CssClass=\"button blue\">移動(dòng)分組<\/asp:LinkButton>\r\n              <\/td>\r\n            <\/tr>\r\n          <\/ItemTemplate>\r\n        <\/asp:Repeater>\r\n      <\/table>\r\n       ┼ 新建分組<\/p><\/a>\r\n    <\/form>\r\n  <\/body>\r\n<\/html><\/pre>

      WX.aspx.cs代碼:<\/p>

      public partial class WX : System.Web.UI.Page\r\n  {\r\n    protected void Page_Load(object sender, EventArgs e)\r\n    {\r\n      BindGroupList();\r\n      this.DataBind();\r\n    }\r\n\r\n\r\n    private void BindGroupList()\r\n    {\r\n      WeiXinServer wxs = new WeiXinServer();\r\n\r\n      \/\/從緩存讀取accesstoken\r\n      string Access_token = Cache[\"Access_token\"] as string;\r\n\r\n      if (Access_token == null)\r\n      {\r\n        \/\/如果為空,重新獲取\r\n        Access_token = wxs.GetAccessToken();\r\n        \/\/設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期\r\n        Cache.Insert(\"Access_token\", Access_token, null, DateTime.Now.AddSeconds(7000),\r\n          System.Web.Caching.Cache.NoSlidingExpiration);\r\n      }\r\n\r\n      string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);\r\n\r\n      string jsonres = \"\";\r\n\r\n      string content = Cache[\"AllGroups_content\"] as string;\r\n\r\n      if (content == null)\r\n      {\r\n        jsonres = \"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/get?access_token=\" + Access_tokento;\r\n\r\n        HttpWebRequest myRequest = (HttpWebRequest) WebRequest.Create(jsonres);\r\n        myRequest.Method = \"GET\";\r\n        HttpWebResponse myResponse = (HttpWebResponse) myRequest.GetResponse();\r\n        StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);\r\n        content = reader.ReadToEnd();\r\n        reader.Close();\r\n\r\n        \/\/設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期\r\n        Cache.Insert(\"AllGroups_content\", content, null, DateTime.Now.AddSeconds(7000),\r\n          System.Web.Caching.Cache.NoSlidingExpiration);\r\n      }\r\n\r\n      \/\/使用前需要引用Newtonsoft.json文件\r\n      JObject jsonObj = JObject.Parse(content);\r\n\r\n\r\n      int groupsnum = jsonObj[\"groups\"].Count();\r\n\r\n\r\n      List wxgrouplist = new List();\r\n\r\n      for (int i = 0; i < groupsnum; i++)\r\n      {\r\n        WxGroupsInfo wginfo = new WxGroupsInfo();\r\n\r\n        wginfo.Group_ID = jsonObj[\"groups\"][i][\"id\"].ToString();\r\n\r\n        wginfo.Group_Name = jsonObj[\"groups\"][i][\"name\"].ToString();\r\n\r\n        wginfo.Group_Count = jsonObj[\"groups\"][i][\"count\"].ToString();\r\n\r\n        wxgrouplist.Add(wginfo);\r\n      }\r\n\r\n      this.RepeaterGroupList.DataSource = wxgrouplist;\r\n      this.RepeaterGroupList.DataBind();\r\n    }\r\n\r\n\r\n    \/\/\/ \r\n    \/\/\/ 綁定事件\r\n    \/\/\/ <\/summary>\r\n    \/\/\/ <\/param>\r\n    \/\/\/ <\/param>\r\n    protected void RepeaterGroupList_ItemDataBound(object sender, RepeaterItemEventArgs e)\r\n    {\r\n      if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)\r\n      {\r\n        Label lbXuHao = e.Item.FindControl(\"lbXuHao\") as Label;\r\n\r\n        int num = 1;\r\n\r\n        lbXuHao.Text = num.ToString();\r\n\r\n        for (int i = 0; i < this.RepeaterGroupList.Items.Count; i++)\r\n        {\r\n          num += 1;\r\n          lbXuHao.Text = num.ToString();\r\n        }\r\n\r\n\r\n        LinkButton LinkBtnDeleteGroup = e.Item.FindControl(\"LinkBtnDeleteGroup\") as LinkButton;\r\n        LinkButton LinkBtnSendByGroup = e.Item.FindControl(\"LinkBtnSendByGroup\") as LinkButton;\r\n\r\n        LinkBtnDeleteGroup.Attributes.Add(\"OnClick\", \"return confirm('您確定要?jiǎng)h除該分組?刪除后該分組內(nèi)的人員即將恢復(fù)到默認(rèn)分組!')\");\r\n        LinkBtnDeleteGroup.Attributes.Add(\"OnClick\", \"return confirm('您確定要群發(fā)消息到該分組?')\");\r\n      }\r\n    }\r\n\r\n    \/\/\/ \r\n    \/\/\/ 執(zhí)行事件\r\n    \/\/\/ <\/summary>\r\n    \/\/\/ <\/param>\r\n    \/\/\/ <\/param>\r\n    protected void RepeaterGroupList_ItemCommand(object source, RepeaterCommandEventArgs e)\r\n    { \r\n      if (e.CommandName == \"DeleteGroups\")\r\n      {\r\n        WeiXinServer wxs = new WeiXinServer();\r\n        string res = \"\";\r\n\r\n        \/\/從緩存讀取accesstoken\r\n        string Access_token = Cache[\"Access_token\"] as string;\r\n\r\n        if (Access_token == null)\r\n        {\r\n          \/\/如果為空,重新獲取\r\n          Access_token = wxs.GetAccessToken();\r\n\r\n          \/\/設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期\r\n          Cache.Insert(\"Access_token\", Access_token, null, DateTime.Now.AddSeconds(7000),\r\n            System.Web.Caching.Cache.NoSlidingExpiration);\r\n        }\r\n\r\n        string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);\r\n\r\n\r\n        string posturl = \"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/delete?access_token=\" + Access_tokento;\r\n\r\n\r\n        \/\/POST數(shù)據(jù)例子: POST數(shù)據(jù)例子:{\"group\":{\"id\":108}}\r\n\r\n        string groupid = e.CommandArgument.ToString();\r\n\r\n        string postData = \"{\\\"group\\\":{\\\"id\\\":\\\"\" + groupid + \"\\\"}}\";\r\n\r\n        res = wxs.GetPage(posturl, postData);\r\n\r\n        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\",\r\n          \"alert('刪除成功!由于緩存問(wèn)題,您可能需要重新登錄才能看到效果!');location='WxGroupManageList.aspx';\", true);\r\n      }\r\n\r\n      if (e.CommandName == \"SendByGroups\")\r\n      {\r\n        WeiXinServer wxs = new WeiXinServer();\r\n        string res = \"\";\r\n\r\n        \/\/從緩存讀取accesstoken\r\n        string Access_token = Cache[\"Access_token\"] as string;\r\n\r\n        if (Access_token == null)\r\n        {\r\n          \/\/如果為空,重新獲取\r\n          Access_token = wxs.GetAccessToken();\r\n\r\n          \/\/設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期\r\n          Cache.Insert(\"Access_token\", Access_token, null, DateTime.Now.AddSeconds(7000),\r\n            System.Web.Caching.Cache.NoSlidingExpiration);\r\n        }\r\n\r\n        string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);\r\n\r\n\r\n        string posturl = \"https:\/\/api.weixin.qq.com\/cgi-bin\/message\/mass\/sendall?access_token=\" + Access_tokento;\r\n\r\n        string groupid = e.CommandArgument.ToString();\r\n\r\n        \/\/string postData = \"{\\\"group\\\":{\\\"id\\\":\\\"\" + groupid.ToString() + \"\\\"}}\";\r\n\r\n        JObject postData = new JObject();\r\n                JObject filter = new JObject();\r\n                filter.Add(\"is_to_all\", false);\r\n                filter.Add(\"group_id\", groupid);\r\n\r\n                JObject text = new JObject();\r\n                text.Add(\"content\", \"測(cè)試內(nèi)容!\");\r\n\r\n                postData.Add(\"filter\", filter);\r\n                postData.Add(\"text\", text);\r\n                postData.Add(\"msgtype\", \"text\"); \r\n\r\n        res = wxs.GetPage(posturl, postData.ToString());\r\n\r\n        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\",\r\n          \"alert('群發(fā)成功!由于緩存問(wèn)題,您可能需要重新登錄才能看到效果!');location='WxGroupManageList.aspx';\", true);\r\n      }\r\n\r\n      if (e.CommandName == \"MoveUserToGroup\")\r\n      {\r\n        WeiXinServer wxs = new WeiXinServer();\r\n        string res = \"\";\r\n        string Access_token = Cache[\"Access_token\"] as string;\r\n\r\n        if (Access_token == null)\r\n        {\r\n          Access_token = wxs.GetAccessToken();\r\n          Cache.Insert(\"Access_token\", Access_token, null, DateTime.Now.AddSeconds(7000), System.Web.Caching.Cache.NoSlidingExpiration);\r\n        }\r\n\r\n        string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);\r\n        string posturl = \"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/members\/update?access_token=\" + Access_tokento;\r\n\r\n        string UserListurl = \"https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=\" + Access_tokento + \"&next_openid=\";\r\n\r\n\r\n        \/\/{\"total\":2,\"count\":2,\"data\":{\"openid\":[\"\",\"OPENID1\",\"OPENID2\"]},\"next_openid\":\"NEXT_OPENID\"}\r\n        res = wxs.GetPage(UserListurl,\"\");\r\n        UserList userList= JsonConvert.DeserializeObject(res);\r\n        String openid=userList.data.openid.FirstOrDefault();\r\n        int togroup_id = 101;\/\/輸入分組ID\r\n        string postData = \"{\\\"openid\\\":\\\"\" + openid + \"\\\",\\\"to_groupid\\\":\" + togroup_id + \"}\";\r\n        res = wxs.GetPage(posturl, postData);\r\n\r\n        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\",\r\n          \"alert('移動(dòng)分組成功!由于緩存問(wèn)題,您可能需要重新登錄才能看到效果!');location='WxGroupManageList.aspx';\", true);\r\n      }\r\n    }\r\n\r\n    \/\/\/ \r\n    \/\/\/ 創(chuàng)建分組\r\n    \/\/\/ <\/summary>\r\n    \/\/\/ <\/param>\r\n    \/\/\/ <\/param>\r\n    protected void LinkBtnCreateGroup_Click(object sender, EventArgs e)\r\n    {\r\n      if (this.txtgroupsName.Value.Equals(\"分組名稱(chēng)\"))\r\n      {\r\n        \/\/\/\/\r\n        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\", \"alert('不能為空!')\", true);\r\n        this.txtgroupsName.Focus();\r\n        return;\r\n      }\r\n\r\n\r\n      WeiXinServer wxs = new WeiXinServer();\r\n      string res = \"\";\r\n\r\n      \/\/\/從緩存讀取accesstoken\r\n      string Access_token = Cache[\"Access_token\"] as string;\r\n\r\n      if (Access_token == null)\r\n      {\r\n        \/\/如果為空,重新獲取\r\n        Access_token = wxs.GetAccessToken();\r\n\r\n        \/\/設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期\r\n        Cache.Insert(\"Access_token\", Access_token, null, DateTime.Now.AddSeconds(7000),\r\n          System.Web.Caching.Cache.NoSlidingExpiration);\r\n      }\r\n\r\n      string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);\r\n\r\n\r\n      string posturl = \"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/create?access_token=\" + Access_tokento;\r\n\r\n      string postData = \"{\\\"group\\\":{\\\"name\\\":\\\"\" + this.txtgroupsName.Value.ToString().Trim() + \"\\\"}}\"; \r\n      res = wxs.GetPage(posturl, postData); \r\n      ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\",\r\n        \"alert('創(chuàng)建成功!如未顯示,請(qǐng)退出重新登錄即可!');location='WxGroupManageList.aspx';\", true);\r\n    }\r\n  }<\/pre>

      WeiXinServer.cs代碼:<\/p>

      \/\/\/ \r\n  \/\/\/ 微信服務(wù)類(lèi)\r\n  \/\/\/ <\/summary>\r\n  public class WeiXinServer\r\n  {\r\n    \/\/\/ \r\n    \/\/\/ 獲取通行證\r\n    \/\/\/ <\/summary>\r\n    \/\/\/ <\/returns>\r\n    public string GetAccessToken()\r\n    {\r\n      string url_token =\r\n        \"https:\/\/api.weixin.qq.com\/cgi-bin\/token?grant_type=client_credential&appid=wx3eb5bf1290db2ca0&secret=e6013be0a7338c7d3e02877db116e231\";\r\n      HttpWebRequest myRequest = (HttpWebRequest) WebRequest.Create(url_token);\r\n      myRequest.Method = \"GET\";\r\n      HttpWebResponse myResponse = (HttpWebResponse) myRequest.GetResponse();\r\n      StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);\r\n      string content = reader.ReadToEnd();\r\n      reader.Close();\r\n      return content;\r\n    }\r\n\r\n    public string GetPage(string p, string postData)\r\n    {\r\n      Stream outstream = null;\r\n      Stream instream = null;\r\n      StreamReader sr = null;\r\n      HttpWebResponse response = null;\r\n      HttpWebRequest request = null;\r\n      Encoding encoding = Encoding.UTF8;\r\n      byte[] data = encoding.GetBytes(postData);\r\n      \/\/ 準(zhǔn)備請(qǐng)求...\r\n      try\r\n      {\r\n        \/\/ 設(shè)置參數(shù)\r\n        request = WebRequest.Create(p) as HttpWebRequest;\r\n        CookieContainer cookieContainer = new CookieContainer();\r\n        request.CookieContainer = cookieContainer;\r\n        request.AllowAutoRedirect = true;\r\n        request.Method = \"POST\";\r\n        request.ContentType = \"application\/x-www-form-urlencoded\";\r\n        request.ContentLength = data.Length;\r\n        outstream = request.GetRequestStream();\r\n        outstream.Write(data, 0, data.Length);\r\n        outstream.Close();\r\n        \/\/發(fā)送請(qǐng)求并獲取相應(yīng)回應(yīng)數(shù)據(jù)\r\n        response = request.GetResponse() as HttpWebResponse;\r\n        \/\/直到request.GetResponse()程序才開(kāi)始向目標(biāo)網(wǎng)頁(yè)發(fā)送Post請(qǐng)求\r\n        instream = response.GetResponseStream();\r\n        sr = new StreamReader(instream, encoding);\r\n        \/\/返回結(jié)果網(wǎng)頁(yè)(html)代碼\r\n        string content = sr.ReadToEnd();\r\n        string err = string.Empty;\r\n        return content;\r\n      }\r\n      catch (Exception ex)\r\n      {\r\n        string err = ex.Message;\r\n        return string.Empty;\r\n      }\r\n    }\r\n  }<\/pre>

      Edit.aspx內(nèi)容:<\/p>

      <%@ Page Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"Edit.aspx.cs\" Inherits=\"test.Edit\" %>\r\n\r\n\r\n  \r\n    \r\n    <\/title>\r\n    <style type=\"text\/css\">\r\n      .inputstyle {\r\n        height: 35px;\r\n        line-height: 35px;\r\n        text-indent: 5px;\r\n        width: 280px;\r\n        background-image: url('images\/inputbg.gif');\r\n        background-repeat: repeat-x;\r\n        border-top: solid 1px #a7b5bc;\r\n        border-left: solid 1px #a7b5bc;\r\n        border-right: solid 1px #ced9df;\r\n        border-bottom: solid 1px #ced9df;\r\n        float: left;\r\n        margin: auto 5px auto 5px;\r\n      }\r\n\r\n    <\/style>\r\n  <\/head>\r\n  <body>
      <h1><a href="http://www.miracleart.cn/">国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂</a></h1>\r\n    <form id=\"form1\" runat=\"server\">\r\n      <table border=\"1\" style=\"width: 500px; border-collapse: collapse; margin: 20px auto 20px auto; line-height: 40px;\">\r\n        <tr>\r\n          <td style=\"text-align: right;\">分組編號(hào):<\/td>\r\n          <td> <asp:TextBox ID=\"txtGroupId\" CssClass=\"inputstyle\" Enabled=\"false\" runat=\"server\"><\/asp:TextBox><\/td>\r\n        <\/tr>\r\n        <tr>\r\n          <td style=\"text-align: right;\">分組名稱(chēng):<\/td>\r\n          <td> \r\n            <asp:TextBox ID=\"txtGroupName\" CssClass=\"inputstyle\" runat=\"server\"><\/asp:TextBox>\r\n          <\/td>\r\n        <\/tr>\r\n        <tr>\r\n          <td><\/td>\r\n          <td>\r\n            <asp:LinkButton ID=\"LinkBtnSet\" runat=\"server\" OnClick=\"LinkBtnSet_Click\" ><p style=\"background-image: url('images\/buttonbg.png'); width: 111px; height: 35px; line-height: 35px; float: left; font-weight: bold; text-align: center; color: #fff;\"> 設(shè) 置<\/p><\/asp:LinkButton><\/td>\r\n        <\/tr>\r\n      <\/table>\r\n    <\/form>\r\n  <\/body>\r\n<\/html><\/pre><p>Edit.aspx.cs代碼:<\/p><pre class='brush:php;toolbar:false;'> public partial class Edit : System.Web.UI.Page\r\n  {\r\n    protected void Page_Load(object sender, EventArgs e)\r\n    {\r\n      if (!Page.IsPostBack)\r\n      {\r\n        if (Request.QueryString[\"id\"] != null)\r\n        {\r\n          string group_id = Request.QueryString[\"id\"].ToString();\r\n          string group_name = Request.QueryString[\"name\"].ToString();\r\n          this.txtGroupId.Text = group_id.ToString();\r\n          this.txtGroupName.Text = group_name.ToString();\r\n          this.txtGroupName.Focus();\r\n        }\r\n      }\r\n    }\r\n\r\n    \/\/\/ <summary>\r\n    \/\/\/ 設(shè)置\r\n    \/\/\/ <\/summary>\r\n    \/\/\/ <param name=\"sender\"><\/param>\r\n    \/\/\/ <param name=\"e\"><\/param>\r\n    protected void LinkBtnSet_Click(object sender, EventArgs e)\r\n    {\r\n      if (String.IsNullOrWhiteSpace(this.txtGroupName.Text.ToString().Trim()))\r\n      {\r\n        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\", \"alert('不能為空!');\", true);\r\n        this.txtGroupName.Focus();\r\n        return;\r\n      }\r\n      if (this.txtGroupName.Text.Trim().Length > 30)\r\n      {\r\n        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\", \"alert('組名稱(chēng)應(yīng)在30個(gè)字符之內(nèi)!');\", true);\r\n        this.txtGroupName.Focus();\r\n        return;\r\n      }\r\n\r\n      WeiXinServer wxs = new WeiXinServer();\r\n      string res = \"\";\r\n\r\n      \/\/從緩存讀取accesstoken\r\n      string Access_token = Cache[\"Access_token\"] as string;\r\n\r\n      if (Access_token == null)\r\n      {\r\n        \/\/如果為空,重新獲取\r\n        Access_token = wxs.GetAccessToken();\r\n\r\n        \/\/設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期\r\n        Cache.Insert(\"Access_token\", Access_token, null, DateTime.Now.AddSeconds(7000),\r\n          System.Web.Caching.Cache.NoSlidingExpiration);\r\n      }\r\n\r\n      string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);\r\n\r\n      string posturl = \"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/update?access_token=\" + Access_tokento;\r\n\r\n      \/\/POST數(shù)據(jù)例子:POST數(shù)據(jù)例子:{\"group\":{\"id\":108,\"name\":\"test2_modify2\"}}\r\n\r\n      string postData = \"{\\\"group\\\":{\\\"id\\\":\\\"\" + txtGroupId.Text + \"\\\",\\\"name\\\":\\\"\" + this.txtGroupName.Text +\r\n               \"\\\"}}\";\r\n      res = wxs.GetPage(posturl, postData);\r\n\r\n      \/\/使用Newtonsoft.json\r\n      JObject jsonObj = JObject.Parse(res);\r\n\r\n      \/\/獲取返回結(jié)果的正確|true|false,\r\n      string isright = jsonObj[\"errcode\"].ToString(); \/\/0\r\n      string istrueorfalse = jsonObj[\"errmsg\"].ToString(); \/\/ok\r\n      if (isright.Equals(\"0\") && istrueorfalse.Equals(\"ok\"))\r\n      {\r\n        \/\/修改成功之后,刷新父窗體,關(guān)閉本頁(yè)\r\n        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\",\r\n          \"alert('修改成功!如未正常顯示,屬緩存問(wèn)題,請(qǐng)重新登錄即可!');window.open![這里寫(xiě)圖片描述](http:\/\/img.blog.csdn.net\/20161008103126694)er.location.reload();this.close();\", true);\r\n      }\r\n      else\r\n      {\r\n        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), \"\", \"alert('修改失??!');this.close();\",\r\n          true);\r\n      }\r\n    }\r\n  }<\/pre><p>buttonbg.png<\/p>\n<p><img id=\"theimg\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/001\/505\/de69ee9675bb005f32cc303b1bef81dd-0.jpg\" alt=\"\"><\/p>\n<p>結(jié)果如圖:<\/p>\n<p style=\"text-align: center;\"><img id=\"theimg\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/001\/505\/605df3b5117e96790c5a939998db109a-1.jpg\" alt=\"\"><\/p>"}	</script>
      	
      <meta http-equiv="Cache-Control" content="no-transform" />
      <meta http-equiv="Cache-Control" content="no-siteapp" />
      <script>var V_PATH="/";window.onerror=function(){ return true; };</script>
      </head>
      
      <body data-commit-time="2023-12-28T14:50:12+08:00" class="editor_body body2_2">
      	<link rel="stylesheet" type="text/css" href="/static/csshw/stylehw.css">
      <header>
          <div   id="377j5v51b"   class="head">
              <div   id="377j5v51b"   class="haed_left">
                  <div   id="377j5v51b"   class="haed_logo">
                      <a href="http://www.miracleart.cn/zh/" title="" class="haed_logo_a">
                          <img src="/static/imghw/logo.png" alt="" class="haed_logoimg">
                      </a>
                  </div>
                  <div   id="377j5v51b"   class="head_nav">
                      <div   id="377j5v51b"   class="head_navs">
                          <a href="javascript:;" title="社區(qū)" class="head_nava head_nava-template1">社區(qū)</a>
                          <div   class="377j5v51b"   id="dropdown-template1" style="display: none;">
                              <div   id="377j5v51b"   class="languagechoose">
                                  <a href="http://www.miracleart.cn/zh/article.html" title="文章" class="languagechoosea on">文章</a>
                                  <a href="http://www.miracleart.cn/zh/faq/zt" title="合集" class="languagechoosea">合集</a>
                                  <a href="http://www.miracleart.cn/zh/wenda.html" title="問(wèn)答" class="languagechoosea">問(wèn)答</a>
                              </div>
                          </div>
                      </div>
      
                      <div   id="377j5v51b"   class="head_navs">
                          <a href="javascript:;" title="學(xué)習(xí)" class="head_nava head_nava-template1_1">學(xué)習(xí)</a>
                          <div   class="377j5v51b"   id="dropdown-template1_1" style="display: none;">
                              <div   id="377j5v51b"   class="languagechoose">
                                  <a href="http://www.miracleart.cn/zh/course.html" title="課程" class="languagechoosea on">課程</a>
                                  <a href="http://www.miracleart.cn/zh/dic/" title="編程詞典" class="languagechoosea">編程詞典</a>
                              </div>
                          </div>
                      </div>
      
                      <div   id="377j5v51b"   class="head_navs">
                          <a href="javascript:;" title="工具庫(kù)" class="head_nava head_nava-template1_2">工具庫(kù)</a>
                          <div   class="377j5v51b"   id="dropdown-template1_2" style="display: none;">
                              <div   id="377j5v51b"   class="languagechoose">
                                  <a href="http://www.miracleart.cn/zh/toolset/development-tools" title="開(kāi)發(fā)工具" class="languagechoosea on">開(kāi)發(fā)工具</a>
                                  <a href="http://www.miracleart.cn/zh/toolset/website-source-code" title="網(wǎng)站源碼" class="languagechoosea">網(wǎng)站源碼</a>
                                  <a href="http://www.miracleart.cn/zh/toolset/php-libraries" title="PHP 庫(kù)" class="languagechoosea">PHP 庫(kù)</a>
                                  <a href="http://www.miracleart.cn/zh/toolset/js-special-effects" title="JS特效" class="languagechoosea on">JS特效</a>
                                  <a href="http://www.miracleart.cn/zh/toolset/website-materials" title="網(wǎng)站素材" class="languagechoosea on">網(wǎng)站素材</a>
                                  <a href="http://www.miracleart.cn/zh/toolset/extension-plug-ins" title="擴(kuò)展插件" class="languagechoosea on">擴(kuò)展插件</a>
                              </div>
                          </div>
                      </div>
      
                      <div   id="377j5v51b"   class="head_navs">
                          <a href="http://www.miracleart.cn/zh/ai" title="AI工具" class="head_nava head_nava-template1_3">AI工具</a>
                      </div>
      
                      <div   id="377j5v51b"   class="head_navs">
                          <a href="javascript:;" title="休閑" class="head_nava head_nava-template1_3">休閑</a>
                          <div   class="377j5v51b"   id="dropdown-template1_3" style="display: none;">
                              <div   id="377j5v51b"   class="languagechoose">
                                  <a href="http://www.miracleart.cn/zh/game" title="游戲下載" class="languagechoosea on">游戲下載</a>
                                  <a href="http://www.miracleart.cn/zh/mobile-game-tutorial/" title="游戲教程" class="languagechoosea">游戲教程</a>
      
                              </div>
                          </div>
                      </div>
                  </div>
              </div>
                          <div   id="377j5v51b"   class="head_search">
                      <input id="key_words"  onkeydown="if (event.keyCode == 13) searchs('zh')" class="search-input" type="text" autocomplete="off" name="keywords" required="required" placeholder="Block,address,transaction,news" value="">
                      <a href="javascript:;" title="搜索"  onclick="searchs('zh')"><img src="/static/imghw/find.png" alt="搜索"></a>
                  </div>
                      <div   id="377j5v51b"   class="head_right">
                  <div   id="377j5v51b"   class="haed_language">
                      <a href="javascript:;" class="layui-btn haed_language_btn">簡(jiǎn)體中文<i class="layui-icon layui-icon-triangle-d"></i></a>
                      <div   class="377j5v51b"   id="dropdown-template" style="display: none;">
                          <div   id="377j5v51b"   class="languagechoose">
                                                      <a href="javascript:;" title="簡(jiǎn)體中文" class="languagechoosea">簡(jiǎn)體中文</a>
                                                      <a href="javascript:setlang('en');" title="English" class="languagechoosea">English</a>
                                                      <a href="javascript:setlang('zh-tw');" title="繁體中文" class="languagechoosea">繁體中文</a>
                                                      <a href="javascript:setlang('ja');" title="日本語(yǔ)" class="languagechoosea">日本語(yǔ)</a>
                                                      <a href="javascript:setlang('ko');" title="???" class="languagechoosea">???</a>
                                                      <a href="javascript:setlang('ms');" title="Melayu" class="languagechoosea">Melayu</a>
                                                      <a href="javascript:setlang('fr');" title="Fran?ais" class="languagechoosea">Fran?ais</a>
                                                      <a href="javascript:setlang('de');" title="Deutsch" class="languagechoosea">Deutsch</a>
                                                  </div>
                      </div>
                  </div>
                  <span id="377j5v51b"    class="head_right_line"></span>
                                  <div style="display: block;" id="login" class="haed_login ">
                          <a href="javascript:;"  title="Login" class="haed_logina ">Login</a>
                      </div>
                      <div style="display: block;" id="reg" class="head_signup login">
                          <a href="javascript:;"  title="singup" class="head_signupa">singup</a>
                      </div>
                  
              </div>
          </div>
      </header>
      
      	
      	<main>
      		<div   id="377j5v51b"   class="Article_Details_main">
      			<div   id="377j5v51b"   class="Article_Details_main1">
      							<div   id="377j5v51b"   class="Article_Details_main1M">
      					<div   id="377j5v51b"   class="phpgenera_Details_mainL1">
      						<a href="http://www.miracleart.cn/zh/" title="首頁(yè)"
      							class="phpgenera_Details_mainL1a">首頁(yè)</a>
      						<img src="/static/imghw/top_right.png" alt="" />
      												<a href="http://www.miracleart.cn/zh/weixin-marketing.html"
      							class="phpgenera_Details_mainL1a">微信小程序</a>
      						<img src="/static/imghw/top_right.png" alt="" />
      												<a href="http://www.miracleart.cn/zh/weixin-kaifa.html"
      							class="phpgenera_Details_mainL1a">微信開(kāi)發(fā)</a>
      						<img src="/static/imghw/top_right.png" alt="" />
      						<span>微信公眾號(hào)中用戶分組管理.NET實(shí)例詳解</span>
      					</div>
      					
      					<div   id="377j5v51b"   class="Articlelist_txts">
      						<div   id="377j5v51b"   class="Articlelist_txts_info">
      							<h1 class="Articlelist_txts_title">微信公眾號(hào)中用戶分組管理.NET實(shí)例詳解</h1>
      							<div   id="377j5v51b"   class="Articlelist_txts_info_head">
      								<div   id="377j5v51b"   class="author_info">
      									<a href="http://www.miracleart.cn/zh/member/1505.html"  class="author_avatar">
      									<img class="lazy"  data-src="https://img.php.cn/upload/avatar/000/001/505/591951e7e5d04837.png" src="/static/imghw/default1.png" alt="Y2J">
      									</a>
      									<div   id="377j5v51b"   class="author_detail">
      																			<a href="http://www.miracleart.cn/zh/member/1505.html" class="author_name">Y2J</a>
                                      										</div>
      								</div>
                      			</div>
      							<span id="377j5v51b"    class="Articlelist_txts_time">Apr 26, 2017 am	 10:13 AM</span>
      															<div   id="377j5v51b"   class="Articlelist_txts_infos">
      																			<span id="377j5v51b"    class="Articlelist_txts_infoss on">.net</span>
      																			<span id="377j5v51b"    class="Articlelist_txts_infoss ">微信公眾號(hào)</span>
      																	</div>
      														
      						</div>
      					</div>
      					<hr />
      					<div   id="377j5v51b"   class="article_main php-article">
      						<div   id="377j5v51b"   class="article-list-left detail-content-wrap content">
      						<ins class="adsbygoogle"
      							style="display:block; text-align:center;"
      							data-ad-layout="in-article"
      							data-ad-format="fluid"
      							data-ad-client="ca-pub-5902227090019525"
      							data-ad-slot="3461856641">
      						</ins>
      						
      
      					<p>Model層實(shí)體類(lèi):</p><pre class='brush:php;toolbar:false;'> public class UserList
        {
          public string total { get; set; }
          public string count { get; set; }
          public userlistopenid data { get; set; }
          public string next_openid { get; set; }
        }</pre><pre class='brush:php;toolbar:false;'>  public class userlistopenid
        {
          public List<string> openid { get; set; }
        }</pre><pre class='brush:php;toolbar:false;'> public class WxGroupsInfo
        {
          public string Group_ID { get; set; }//分組編號(hào)
          public string Group_Name { get; set; }//分組名稱(chēng)
          public string Group_Count { get; set; }//分組人數(shù)
        }</pre><p>WX.aspx內(nèi)容:</p><pre class='brush:php;toolbar:false;'><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WX.aspx.cs" Inherits="test.WX" %>
      
      <!DOCTYPE html>
      
      <html xmlns="http://www.w3.org/1999/xhtml">
        <head runat="server">
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
          <style type="text/css">
            .inputstyle {
              height: 35px;
              line-height: 35px;
              text-indent: 5px;
              width: 350px;
              background-image: url(&#39;images/inputbg.gif&#39;);
              background-repeat: repeat-x;
              border-top: solid 1px #a7b5bc;
              border-left: solid 1px #a7b5bc;
              border-right: solid 1px #ced9df;
              border-bottom: solid 1px #ced9df;
              margin: 15px auto 15px auto;
            }
      
      
            .g_title {
              width: 100%;
              border-bottom: 2px solid #ced9df;
              font-size: 20px;
              font-weight: bold;
              text-align: left;
              text-indent: 5px;
              height: 40px;
              line-height: 40px;
            }
      
            th {
              height: 35px;
              background-color: #31bb34;
              background-repeat: repeat-x;
            }
      
            tr { height: 30px; }
      
            #shownewgroup {
              width: 300px;
              height: 200px;
              background-color: white;
              z-index: 9999;
              border: 2px solid #DDD;
              top: 40%;
              left: 40%;
              background-color: #fff;
              position: fixed;
              margin: -100px auto auto -100px;
              display: none;
            }
      
            #shownewgroupzhezhaoceng {
              height: 200%;
              width: 200%;
              left: 0px;
              top: 0px;
              position: fixed;
              z-index: 9998;
              background: rgb(50, 50, 50);
              background: rgba(0, 0, 0, 0.5);
              display: none;
            }
      
            .closeLogin {
              height: 30px;
              border-bottom: 2px solid #31bb34;
              text-align: right;
              line-height: 30px;
              font-size: 14px;
              font-weight: bold;
            }
      
            a:hover { cursor: pointer; }
      
            .inputstyle22 {
              height: 35px;
              line-height: 35px;
              text-indent: 5px;
              width: 280px;
              background-image: url(&#39;images/inputbg.gif&#39;);
              background-repeat: repeat-x;
              border-top: solid 1px #a7b5bc;
              border-left: solid 1px #a7b5bc;
              border-right: solid 1px #ced9df;
              border-bottom: solid 1px #ced9df;
              float: left;
              margin: auto 5px auto 5px;
            }
      
      
          </style>
      
          <style type="text/css">
      
            .button {
              font: 15px Calibri, Arial, sans-serif; 
              text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
      
              text-decoration: none !important;
              white-space: nowrap;
      
              display: inline-block;
              vertical-align: baseline;
              position: relative;
              cursor: pointer;
              padding: 4px 20px;
      
              background-repeat: no-repeat; 
              background-position: bottom left;
              background-image: url(&#39;button_bg.png&#39;);
      
              background-position: bottom left, top right, 0 0, 0 0;
              background-clip: border-box;
      
              -moz-border-radius: 8px;
              -webkit-border-radius: 8px;
              border-radius: 8px;
      
              -moz-box-shadow: 0 0 1px #fff inset;
              -webkit-box-shadow: 0 0 1px #fff inset;
              box-shadow: 0 0 1px #fff inset;
      
              -webkit-transition: background-position 1s;
              -moz-transition: background-position 1s;
              transition: background-position 1s;
            }
      
      
            .blue.button {
              color: #0f4b6d !important;
      
              border: 1px solid #84acc3 !important;
      
              background-color: #48b5f2;
      
              background-image: url(&#39;button_bg.png&#39;), url(&#39;button_bg.png&#39;),
                       -moz-radial-gradient(center bottom, circle,
                                  rgba(89, 208, 244, 1) 0, rgba(89, 208, 244, 0) 100px),
                       -moz-linear-gradient(#4fbbf7, #3faeeb);
      
              background-image: url(&#39;button_bg.png&#39;), url(&#39;button_bg.png&#39;),
                       -webkit-gradient(radial, 50% 100%, 0, 50% 100%, 100,
                                from(rgba(89, 208, 244, 1)), to(rgba(89, 208, 244, 0))),
                       -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4fbbf7), to(#3faeeb));
            }
      
            .blue.button:hover {
              background-color: #63c7fe;
      
              background-image: url(&#39;button_bg.png&#39;), url(&#39;button_bg.png&#39;),
                       -moz-radial-gradient(center bottom, circle,
                                  rgba(109, 217, 250, 1) 0, rgba(109, 217, 250, 0) 100px),
                       -moz-linear-gradient(#63c7fe, #58bef7);
      
              background-image: url(&#39;button_bg.png&#39;), url(&#39;button_bg.png&#39;),
                       -webkit-gradient(radial, 50% 100%, 0, 50% 100%, 100,
                                from(rgba(109, 217, 250, 1)), to(rgba(109, 217, 250, 0))),
                       -webkit-gradient(linear, 0% 0%, 0% 100%, from(#63c7fe), to(#58bef7));
            }
      
      
          </style>
          <script src="js/jquery-1.11.2.min.js"></script>
          <script type="text/javascript">
      
            //修改分組名稱(chēng)調(diào)用的函數(shù)
            function EditRoster(PayNo, name) {
      
              //alert(PayNo+":"+name);
              var url = &#39;Edit.aspx?id=&#39; + PayNo + "&name=" + name; //轉(zhuǎn)向網(wǎng)頁(yè)的地址; 
              var name = &#39;add&#39;; //網(wǎng)頁(yè)名稱(chēng),可為空; 
              var iWidth = 600; //彈出窗口的寬度; 
              var iHeight = 300; //彈出窗口的高度; 
              //獲得窗口的垂直位置 
              var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
              //獲得窗口的水平位置 
              var iLeft = (window.screen.availWidth - 10 - iWidth) / 2;
              window.open(url, name, &#39;height=&#39; + iHeight + &#39;,innerHeight=&#39; + iHeight + &#39;,width=&#39; + iWidth + &#39;,innerWidth=&#39; + iWidth + &#39;,top=&#39; + iTop + &#39;,left=&#39; + iLeft + &#39;,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no&#39;);
            }
      
            $(document).ready(function() {
      
              $(".newGroups").click(function() {
                  $("#shownewgroupzhezhaoceng").show();
                  $("#shownewgroup").show();
                }),
                $(&#39;.closeloginpage&#39;).click(function() {
                  $("#shownewgroupzhezhaoceng").hide();
                  $("#shownewgroup").hide();
                });
            });
          </script>
        </head>
        <body>
          <form id="form1" runat="server">
            <p class="g_title">分組管理</p>
            <p id="shownewgroup">
              <p class="closeLogin">
                <span style="float: left; color: #08a5e0; font-size: 18px; text-indent: 5px;">新建分組</span>
                <a class="closeloginpage button blue ">
                  關(guān)閉
                </a>
              </p>
              <p style="font-size: 12px; height: 40px; color: red; line-height: 40px;">
                30字符以?xún)?nèi)
      
              </p>
              <input type="text" id="txtgroupsName" name="txtgroupsName" class="inputstyle22" maxlength="30" runat="server" value="分組名稱(chēng)" onfocus="if(value==defaultValue){value=&#39;&#39;;this.style.color=&#39;#000&#39;}" onblur="if(!value){value=defaultValue;this.style.color=&#39;#999&#39;}" style="color: #999"/>
              <asp:LinkButton ID="LinkBtnCreateGroup" runat="server" OnClick="LinkBtnCreateGroup_Click">
                <p style="background-image: url(&#39;images/buttonbg.png&#39;); width: 111px; height: 35px; line-height: 35px; font-weight: bold; float: left; margin-top: 20px; margin-left: 5px; text-align: center; color: #fff;">
                  確定創(chuàng)建
                </p>
      
              </asp:LinkButton>
            </p>
            <p id="shownewgroupzhezhaoceng"></p>
            <table style="width: 1124px; margin: 10px auto 10px auto; border: 1px solid #ecd9df; text-align: center;">
              <asp:Repeater ID="RepeaterGroupList" runat="server" OnItemCommand="RepeaterGroupList_ItemCommand" OnItemDataBound="RepeaterGroupList_ItemDataBound">
                <HeaderTemplate>
                  <tr>
                    <th>序號(hào)</th>
                    <th>ID編號(hào)</th>
                    <th>分組名稱(chēng)</th>
                    <th>分組人數(shù)</th>
                    <th>操作</th>
                  </tr>
                </HeaderTemplate>
                <ItemTemplate>
                  <tr style=&#39;background-color: <%#(Container.ItemIndex%2 == 0) ? "#fff" : "#ced9ff" %>&#39;>
                    <td><asp:Label ID="lbXuHao" runat="server" Text=""></asp:Label></td>
                    <td><%# Eval("Group_ID") %></td>
                    <td><%# Eval("Group_Name") %></td>
                    <td><%# Eval("Group_Count") %></td>
                    <td>
                      <a class="button blue" onclick=" EditRoster(&#39;<%# Eval("Group_ID") %>&#39;, &#39;<%# Eval("Group_Name") %>&#39;); ">修改分組名稱(chēng)</a>
                      <asp:LinkButton ID="LinkBtnDeleteGroup" runat="server" CommandName="DeleteGroups" CommandArgument=&#39;<%# Eval("Group_ID") %>&#39; CssClass="button blue">刪除分組</asp:LinkButton>
      
                      <asp:LinkButton ID="LinkBtnSendByGroup" runat="server" CommandName="SendByGroups" CommandArgument=&#39;<%# Eval("Group_ID") %>&#39; CssClass="button blue">此分組消息群發(fā)</asp:LinkButton>
      
                      <asp:LinkButton ID="LinkBtnMoveUserToGroup" runat="server" CommandName="MoveUserToGroup" CommandArgument=&#39;<%# Eval("Group_ID") %>&#39; CssClass="button blue">移動(dòng)分組</asp:LinkButton>
                    </td>
                  </tr>
                </ItemTemplate>
              </asp:Repeater>
            </table>
            <a class="newGroups"><p style="background-image: url(&#39;images/buttonbg.png&#39;); width: 111px; height: 35px; line-height: 35px; margin: 10px auto 10px 28px; font-weight: bold; float: left; text-align: center; color: #fff;"> ┼ 新建分組</p></a>
          </form>
        </body>
      </html></pre><p>WX.aspx.cs代碼:</p><pre class='brush:php;toolbar:false;'>public partial class WX : System.Web.UI.Page
        {
          protected void Page_Load(object sender, EventArgs e)
          {
            BindGroupList();
            this.DataBind();
          }
      
      
          private void BindGroupList()
          {
            WeiXinServer wxs = new WeiXinServer();
      
            //從緩存讀取accesstoken
            string Access_token = Cache["Access_token"] as string;
      
            if (Access_token == null)
            {
              //如果為空,重新獲取
              Access_token = wxs.GetAccessToken();
              //設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期
              Cache.Insert("Access_token", Access_token, null, DateTime.Now.AddSeconds(7000),
                System.Web.Caching.Cache.NoSlidingExpiration);
            }
      
            string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);
      
            string jsonres = "";
      
            string content = Cache["AllGroups_content"] as string;
      
            if (content == null)
            {
              jsonres = "https://api.weixin.qq.com/cgi-bin/groups/get?access_token=" + Access_tokento;
      
              HttpWebRequest myRequest = (HttpWebRequest) WebRequest.Create(jsonres);
              myRequest.Method = "GET";
              HttpWebResponse myResponse = (HttpWebResponse) myRequest.GetResponse();
              StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
              content = reader.ReadToEnd();
              reader.Close();
      
              //設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期
              Cache.Insert("AllGroups_content", content, null, DateTime.Now.AddSeconds(7000),
                System.Web.Caching.Cache.NoSlidingExpiration);
            }
      
            //使用前需要引用Newtonsoft.json文件
            JObject jsonObj = JObject.Parse(content);
      
      
            int groupsnum = jsonObj["groups"].Count();
      
      
            List<WxGroupsInfo> wxgrouplist = new List<WxGroupsInfo>();
      
            for (int i = 0; i < groupsnum; i++)
            {
              WxGroupsInfo wginfo = new WxGroupsInfo();
      
              wginfo.Group_ID = jsonObj["groups"][i]["id"].ToString();
      
              wginfo.Group_Name = jsonObj["groups"][i]["name"].ToString();
      
              wginfo.Group_Count = jsonObj["groups"][i]["count"].ToString();
      
              wxgrouplist.Add(wginfo);
            }
      
            this.RepeaterGroupList.DataSource = wxgrouplist;
            this.RepeaterGroupList.DataBind();
          }
      
      
          /// <summary>
          /// 綁定事件
          /// </summary>
          /// <param name="sender"></param>
          /// <param name="e"></param>
          protected void RepeaterGroupList_ItemDataBound(object sender, RepeaterItemEventArgs e)
          {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
              Label lbXuHao = e.Item.FindControl("lbXuHao") as Label;
      
              int num = 1;
      
              lbXuHao.Text = num.ToString();
      
              for (int i = 0; i < this.RepeaterGroupList.Items.Count; i++)
              {
                num += 1;
                lbXuHao.Text = num.ToString();
              }
      
      
              LinkButton LinkBtnDeleteGroup = e.Item.FindControl("LinkBtnDeleteGroup") as LinkButton;
              LinkButton LinkBtnSendByGroup = e.Item.FindControl("LinkBtnSendByGroup") as LinkButton;
      
              LinkBtnDeleteGroup.Attributes.Add("OnClick", "return confirm(&#39;您確定要?jiǎng)h除該分組?刪除后該分組內(nèi)的人員即將恢復(fù)到默認(rèn)分組!&#39;)");
              LinkBtnDeleteGroup.Attributes.Add("OnClick", "return confirm(&#39;您確定要群發(fā)消息到該分組?&#39;)");
            }
          }
      
          /// <summary>
          /// 執(zhí)行事件
          /// </summary>
          /// <param name="source"></param>
          /// <param name="e"></param>
          protected void RepeaterGroupList_ItemCommand(object source, RepeaterCommandEventArgs e)
          { 
            if (e.CommandName == "DeleteGroups")
            {
              WeiXinServer wxs = new WeiXinServer();
              string res = "";
      
              //從緩存讀取accesstoken
              string Access_token = Cache["Access_token"] as string;
      
              if (Access_token == null)
              {
                //如果為空,重新獲取
                Access_token = wxs.GetAccessToken();
      
                //設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期
                Cache.Insert("Access_token", Access_token, null, DateTime.Now.AddSeconds(7000),
                  System.Web.Caching.Cache.NoSlidingExpiration);
              }
      
              string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);
      
      
              string posturl = "https://api.weixin.qq.com/cgi-bin/groups/delete?access_token=" + Access_tokento;
      
      
              //POST數(shù)據(jù)例子: POST數(shù)據(jù)例子:{"group":{"id":108}}
      
              string groupid = e.CommandArgument.ToString();
      
              string postData = "{\"group\":{\"id\":\"" + groupid + "\"}}";
      
              res = wxs.GetPage(posturl, postData);
      
              ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "",
                "alert(&#39;刪除成功!由于緩存問(wèn)題,您可能需要重新登錄才能看到效果!&#39;);location=&#39;WxGroupManageList.aspx&#39;;", true);
            }
      
            if (e.CommandName == "SendByGroups")
            {
              WeiXinServer wxs = new WeiXinServer();
              string res = "";
      
              //從緩存讀取accesstoken
              string Access_token = Cache["Access_token"] as string;
      
              if (Access_token == null)
              {
                //如果為空,重新獲取
                Access_token = wxs.GetAccessToken();
      
                //設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期
                Cache.Insert("Access_token", Access_token, null, DateTime.Now.AddSeconds(7000),
                  System.Web.Caching.Cache.NoSlidingExpiration);
              }
      
              string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);
      
      
              string posturl = "https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=" + Access_tokento;
      
              string groupid = e.CommandArgument.ToString();
      
              //string postData = "{\"group\":{\"id\":\"" + groupid.ToString() + "\"}}";
      
              JObject postData = new JObject();
                      JObject filter = new JObject();
                      filter.Add("is_to_all", false);
                      filter.Add("group_id", groupid);
      
                      JObject text = new JObject();
                      text.Add("content", "測(cè)試內(nèi)容!");
      
                      postData.Add("filter", filter);
                      postData.Add("text", text);
                      postData.Add("msgtype", "text"); 
      
              res = wxs.GetPage(posturl, postData.ToString());
      
              ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "",
                "alert(&#39;群發(fā)成功!由于緩存問(wèn)題,您可能需要重新登錄才能看到效果!&#39;);location=&#39;WxGroupManageList.aspx&#39;;", true);
            }
      
            if (e.CommandName == "MoveUserToGroup")
            {
              WeiXinServer wxs = new WeiXinServer();
              string res = "";
              string Access_token = Cache["Access_token"] as string;
      
              if (Access_token == null)
              {
                Access_token = wxs.GetAccessToken();
                Cache.Insert("Access_token", Access_token, null, DateTime.Now.AddSeconds(7000), System.Web.Caching.Cache.NoSlidingExpiration);
              }
      
              string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);
              string posturl = "https://api.weixin.qq.com/cgi-bin/groups/members/update?access_token=" + Access_tokento;
      
              string UserListurl = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=" + Access_tokento + "&next_openid=";
      
      
              //{"total":2,"count":2,"data":{"openid":["","OPENID1","OPENID2"]},"next_openid":"NEXT_OPENID"}
              res = wxs.GetPage(UserListurl,"");
              UserList userList= JsonConvert.DeserializeObject<UserList>(res);
              String openid=userList.data.openid.FirstOrDefault();
              int togroup_id = 101;//輸入分組ID
              string postData = "{\"openid\":\"" + openid + "\",\"to_groupid\":" + togroup_id + "}";
              res = wxs.GetPage(posturl, postData);
      
              ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "",
                "alert(&#39;移動(dòng)分組成功!由于緩存問(wèn)題,您可能需要重新登錄才能看到效果!&#39;);location=&#39;WxGroupManageList.aspx&#39;;", true);
            }
          }
      
          /// <summary>
          /// 創(chuàng)建分組
          /// </summary>
          /// <param name="sender"></param>
          /// <param name="e"></param>
          protected void LinkBtnCreateGroup_Click(object sender, EventArgs e)
          {
            if (this.txtgroupsName.Value.Equals("分組名稱(chēng)"))
            {
              ////
              ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "", "alert(&#39;不能為空!&#39;)", true);
              this.txtgroupsName.Focus();
              return;
            }
      
      
            WeiXinServer wxs = new WeiXinServer();
            string res = "";
      
            ///從緩存讀取accesstoken
            string Access_token = Cache["Access_token"] as string;
      
            if (Access_token == null)
            {
              //如果為空,重新獲取
              Access_token = wxs.GetAccessToken();
      
              //設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期
              Cache.Insert("Access_token", Access_token, null, DateTime.Now.AddSeconds(7000),
                System.Web.Caching.Cache.NoSlidingExpiration);
            }
      
            string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);
      
      
            string posturl = "https://api.weixin.qq.com/cgi-bin/groups/create?access_token=" + Access_tokento;
      
            string postData = "{\"group\":{\"name\":\"" + this.txtgroupsName.Value.ToString().Trim() + "\"}}"; 
            res = wxs.GetPage(posturl, postData); 
            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "",
              "alert(&#39;創(chuàng)建成功!如未顯示,請(qǐng)退出重新登錄即可!&#39;);location=&#39;WxGroupManageList.aspx&#39;;", true);
          }
        }</pre><p>WeiXinServer.cs代碼:</p><pre class='brush:php;toolbar:false;'>/// <summary>
        /// 微信服務(wù)類(lèi)
        /// </summary>
        public class WeiXinServer
        {
          /// <summary>
          /// 獲取通行證
          /// </summary>
          /// <returns></returns>
          public string GetAccessToken()
          {
            string url_token =
              "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx3eb5bf1290db2ca0&secret=e6013be0a7338c7d3e02877db116e231";
            HttpWebRequest myRequest = (HttpWebRequest) WebRequest.Create(url_token);
            myRequest.Method = "GET";
            HttpWebResponse myResponse = (HttpWebResponse) myRequest.GetResponse();
            StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.UTF8);
            string content = reader.ReadToEnd();
            reader.Close();
            return content;
          }
      
          public string GetPage(string p, string postData)
          {
            Stream outstream = null;
            Stream instream = null;
            StreamReader sr = null;
            HttpWebResponse response = null;
            HttpWebRequest request = null;
            Encoding encoding = Encoding.UTF8;
            byte[] data = encoding.GetBytes(postData);
            // 準(zhǔn)備請(qǐng)求...
            try
            {
              // 設(shè)置參數(shù)
              request = WebRequest.Create(p) as HttpWebRequest;
              CookieContainer cookieContainer = new CookieContainer();
              request.CookieContainer = cookieContainer;
              request.AllowAutoRedirect = true;
              request.Method = "POST";
              request.ContentType = "application/x-www-form-urlencoded";
              request.ContentLength = data.Length;
              outstream = request.GetRequestStream();
              outstream.Write(data, 0, data.Length);
              outstream.Close();
              //發(fā)送請(qǐng)求并獲取相應(yīng)回應(yīng)數(shù)據(jù)
              response = request.GetResponse() as HttpWebResponse;
              //直到request.GetResponse()程序才開(kāi)始向目標(biāo)網(wǎng)頁(yè)發(fā)送Post請(qǐng)求
              instream = response.GetResponseStream();
              sr = new StreamReader(instream, encoding);
              //返回結(jié)果網(wǎng)頁(yè)(html)代碼
              string content = sr.ReadToEnd();
              string err = string.Empty;
              return content;
            }
            catch (Exception ex)
            {
              string err = ex.Message;
              return string.Empty;
            }
          }
        }</pre><p>Edit.aspx內(nèi)容:</p><pre class='brush:php;toolbar:false;'><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="test.Edit" %>
      
      <html >
        <head runat="server">
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
          <title></title>
          <style type="text/css">
            .inputstyle {
              height: 35px;
              line-height: 35px;
              text-indent: 5px;
              width: 280px;
              background-image: url(&#39;images/inputbg.gif&#39;);
              background-repeat: repeat-x;
              border-top: solid 1px #a7b5bc;
              border-left: solid 1px #a7b5bc;
              border-right: solid 1px #ced9df;
              border-bottom: solid 1px #ced9df;
              float: left;
              margin: auto 5px auto 5px;
            }
      
          </style>
        </head>
        <body>
          <form id="form1" runat="server">
            <table border="1" style="width: 500px; border-collapse: collapse; margin: 20px auto 20px auto; line-height: 40px;">
              <tr>
                <td style="text-align: right;">分組編號(hào):</td>
                <td> <asp:TextBox ID="txtGroupId" CssClass="inputstyle" Enabled="false" runat="server"></asp:TextBox></td>
              </tr>
              <tr>
                <td style="text-align: right;">分組名稱(chēng):</td>
                <td> 
                  <asp:TextBox ID="txtGroupName" CssClass="inputstyle" runat="server"></asp:TextBox>
                </td>
              </tr>
              <tr>
                <td></td>
                <td>
                  <asp:LinkButton ID="LinkBtnSet" runat="server" OnClick="LinkBtnSet_Click" ><p style="background-image: url(&#39;images/buttonbg.png&#39;); width: 111px; height: 35px; line-height: 35px; float: left; font-weight: bold; text-align: center; color: #fff;"> 設(shè) 置</p></asp:LinkButton></td>
              </tr>
            </table>
          </form>
        </body>
      </html></pre><p>Edit.aspx.cs代碼:</p><pre class='brush:php;toolbar:false;'> public partial class Edit : System.Web.UI.Page
        {
          protected void Page_Load(object sender, EventArgs e)
          {
            if (!Page.IsPostBack)
            {
              if (Request.QueryString["id"] != null)
              {
                string group_id = Request.QueryString["id"].ToString();
                string group_name = Request.QueryString["name"].ToString();
                this.txtGroupId.Text = group_id.ToString();
                this.txtGroupName.Text = group_name.ToString();
                this.txtGroupName.Focus();
              }
            }
          }
      
          /// <summary>
          /// 設(shè)置
          /// </summary>
          /// <param name="sender"></param>
          /// <param name="e"></param>
          protected void LinkBtnSet_Click(object sender, EventArgs e)
          {
            if (String.IsNullOrWhiteSpace(this.txtGroupName.Text.ToString().Trim()))
            {
              ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "", "alert(&#39;不能為空!&#39;);", true);
              this.txtGroupName.Focus();
              return;
            }
            if (this.txtGroupName.Text.Trim().Length > 30)
            {
              ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "", "alert(&#39;組名稱(chēng)應(yīng)在30個(gè)字符之內(nèi)!&#39;);", true);
              this.txtGroupName.Focus();
              return;
            }
      
            WeiXinServer wxs = new WeiXinServer();
            string res = "";
      
            //從緩存讀取accesstoken
            string Access_token = Cache["Access_token"] as string;
      
            if (Access_token == null)
            {
              //如果為空,重新獲取
              Access_token = wxs.GetAccessToken();
      
              //設(shè)置緩存的數(shù)據(jù)7000秒后過(guò)期
              Cache.Insert("Access_token", Access_token, null, DateTime.Now.AddSeconds(7000),
                System.Web.Caching.Cache.NoSlidingExpiration);
            }
      
            string Access_tokento = Access_token.Substring(17, Access_token.Length - 37);
      
            string posturl = "https://api.weixin.qq.com/cgi-bin/groups/update?access_token=" + Access_tokento;
      
            //POST數(shù)據(jù)例子:POST數(shù)據(jù)例子:{"group":{"id":108,"name":"test2_modify2"}}
      
            string postData = "{\"group\":{\"id\":\"" + txtGroupId.Text + "\",\"name\":\"" + this.txtGroupName.Text +
                     "\"}}";
            res = wxs.GetPage(posturl, postData);
      
            //使用Newtonsoft.json
            JObject jsonObj = JObject.Parse(res);
      
            //獲取返回結(jié)果的正確|true|false,
            string isright = jsonObj["errcode"].ToString(); //0
            string istrueorfalse = jsonObj["errmsg"].ToString(); //ok
            if (isright.Equals("0") && istrueorfalse.Equals("ok"))
            {
              //修改成功之后,刷新父窗體,關(guān)閉本頁(yè)
              ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "",
                "alert(&#39;修改成功!如未正常顯示,屬緩存問(wèn)題,請(qǐng)重新登錄即可!&#39;);window.open![這里寫(xiě)圖片描述](http://img.blog.csdn.net/20161008103126694)er.location.reload();this.close();", true);
            }
            else
            {
              ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "", "alert(&#39;修改失??!&#39;);this.close();",
                true);
            }
          }
        }</pre><p>buttonbg.png</p>
      <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/001/505/de69ee9675bb005f32cc303b1bef81dd-0.jpg" class="lazy" id="theimg" alt=""></p>
      <p>結(jié)果如圖:</p>
      <p style="text-align: center;"><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/001/505/605df3b5117e96790c5a939998db109a-1.jpg" class="lazy" id="theimg" alt=""></p><p>以上是微信公眾號(hào)中用戶分組管理.NET實(shí)例詳解的詳細(xì)內(nèi)容。更多信息請(qǐng)關(guān)注PHP中文網(wǎng)其他相關(guān)文章!</p>
      
      
      						</div>
      					</div>
      					<div   id="377j5v51b"   class="wzconShengming_sp">
      						<div   id="377j5v51b"   class="bzsmdiv_sp">本站聲明</div>
      						<div>本文內(nèi)容由網(wǎng)友自發(fā)貢獻(xiàn),版權(quán)歸原作者所有,本站不承擔(dān)相應(yīng)法律責(zé)任。如您發(fā)現(xiàn)有涉嫌抄襲侵權(quán)的內(nèi)容,請(qǐng)聯(lián)系admin@php.cn</div>
      					</div>
      				</div>
      
      				<ins class="adsbygoogle"
           style="display:block"
           data-ad-format="autorelaxed"
           data-ad-client="ca-pub-5902227090019525"
           data-ad-slot="2507867629"></ins>
      
      
      
      				<div   id="377j5v51b"   class="AI_ToolDetails_main4sR">
      
      
      				<ins class="adsbygoogle"
              style="display:block"
              data-ad-client="ca-pub-5902227090019525"
              data-ad-slot="3653428331"
              data-ad-format="auto"
              data-full-width-responsive="true"></ins>
          
      
      
      					<!-- <div   id="377j5v51b"   class="phpgenera_Details_mainR4">
      						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
      							<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
      								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      									src="/static/imghw/hotarticle2.png" alt="" />
      								<h2>熱門(mén)文章</h2>
      							</div>
      							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796832397.html" title="Grass Wonder Build Guide |烏瑪媽媽漂亮的德比" class="phpgenera_Details_mainR4_bottom_title">Grass Wonder Build Guide |烏瑪媽媽漂亮的德比</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>1 個(gè)月前</span>
      										<span>By Jack chen</span>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796833110.html" title="<??>:在森林里99夜 - 所有徽章以及如何解鎖" class="phpgenera_Details_mainR4_bottom_title"><??>:在森林里99夜 - 所有徽章以及如何解鎖</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>4 周前</span>
      										<span>By DDD</span>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796831605.html" title="烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)" class="phpgenera_Details_mainR4_bottom_title">烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>1 個(gè)月前</span>
      										<span>By Jack chen</span>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796836699.html" title="Rimworld Odyssey溫度指南和Gravtech" class="phpgenera_Details_mainR4_bottom_title">Rimworld Odyssey溫度指南和Gravtech</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>3 周前</span>
      										<span>By Jack chen</span>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796831905.html" title="Windows安全是空白或不顯示選項(xiàng)" class="phpgenera_Details_mainR4_bottom_title">Windows安全是空白或不顯示選項(xiàng)</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>1 個(gè)月前</span>
      										<span>By 下次還敢</span>
      									</div>
      								</div>
      														</div>
      							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
      								<a href="http://www.miracleart.cn/zh/article.html">顯示更多</a>
      							</div>
      						</div>
      					</div> -->
      
      
      											<div   id="377j5v51b"   class="phpgenera_Details_mainR3">
      							<div   id="377j5v51b"   class="phpmain1_4R_readrank">
      								<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/hottools2.png" alt="" />
      									<h2>熱AI工具</h2>
      								</div>
      								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_bottom">
      																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title">
      													<h3>Undress AI Tool</h3>
      												</a>
      												<p>免費(fèi)脫衣服圖片</p>
      											</div>
      										</div>
      																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title">
      													<h3>Undresser.AI Undress</h3>
      												</a>
      												<p>人工智能驅(qū)動(dòng)的應(yīng)用程序,用于創(chuàng)建逼真的裸體照片</p>
      											</div>
      										</div>
      																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title">
      													<h3>AI Clothes Remover</h3>
      												</a>
      												<p>用于從照片中去除衣服的在線人工智能工具。</p>
      											</div>
      										</div>
      																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title">
      													<h3>Clothoff.io</h3>
      												</a>
      												<p>AI脫衣機(jī)</p>
      											</div>
      										</div>
      																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173414504068133.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Video Face Swap" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title">
      													<h3>Video Face Swap</h3>
      												</a>
      												<p>使用我們完全免費(fèi)的人工智能換臉工具輕松在任何視頻中換臉!</p>
      											</div>
      										</div>
      																</div>
      								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
      									<a href="http://www.miracleart.cn/zh/ai">顯示更多</a>
      								</div>
      							</div>
      						</div>
      					
      
      
      					<div   id="377j5v51b"   class="phpgenera_Details_mainR4">
      						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
      							<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
      								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      									src="/static/imghw/hotarticle2.png" alt="" />
      								<h2>熱門(mén)文章</h2>
      							</div>
      							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796832397.html" title="Grass Wonder Build Guide |烏瑪媽媽漂亮的德比" class="phpgenera_Details_mainR4_bottom_title">Grass Wonder Build Guide |烏瑪媽媽漂亮的德比</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>1 個(gè)月前</span>
      										<span>By Jack chen</span>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796833110.html" title="<??>:在森林里99夜 - 所有徽章以及如何解鎖" class="phpgenera_Details_mainR4_bottom_title"><??>:在森林里99夜 - 所有徽章以及如何解鎖</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>4 周前</span>
      										<span>By DDD</span>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796831605.html" title="烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)" class="phpgenera_Details_mainR4_bottom_title">烏瑪?shù)姆劢z漂亮的德比橫幅日程(2025年7月)</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>1 個(gè)月前</span>
      										<span>By Jack chen</span>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796836699.html" title="Rimworld Odyssey溫度指南和Gravtech" class="phpgenera_Details_mainR4_bottom_title">Rimworld Odyssey溫度指南和Gravtech</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>3 周前</span>
      										<span>By Jack chen</span>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/1796831905.html" title="Windows安全是空白或不顯示選項(xiàng)" class="phpgenera_Details_mainR4_bottom_title">Windows安全是空白或不顯示選項(xiàng)</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<span>1 個(gè)月前</span>
      										<span>By 下次還敢</span>
      									</div>
      								</div>
      														</div>
      							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
      								<a href="http://www.miracleart.cn/zh/article.html">顯示更多</a>
      							</div>
      						</div>
      					</div>
      
      
      											<div   id="377j5v51b"   class="phpgenera_Details_mainR3">
      							<div   id="377j5v51b"   class="phpmain1_4R_readrank">
      								<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/hottools2.png" alt="" />
      									<h2>熱工具</h2>
      								</div>
      								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_bottom">
      																		<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/toolset/development-tools/92" title="記事本++7.3.1" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="記事本++7.3.1" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/toolset/development-tools/92" title="記事本++7.3.1" class="phpmain_tab2_mids_title">
      													<h3>記事本++7.3.1</h3>
      												</a>
      												<p>好用且免費(fèi)的代碼編輯器</p>
      											</div>
      										</div>
      																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3漢化版" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_title">
      													<h3>SublimeText3漢化版</h3>
      												</a>
      												<p>中文版,非常好用</p>
      											</div>
      										</div>
      																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/toolset/development-tools/121" title="禪工作室 13.0.1" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="禪工作室 13.0.1" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/toolset/development-tools/121" title="禪工作室 13.0.1" class="phpmain_tab2_mids_title">
      													<h3>禪工作室 13.0.1</h3>
      												</a>
      												<p>功能強(qiáng)大的PHP集成開(kāi)發(fā)環(huán)境</p>
      											</div>
      										</div>
      																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title">
      													<h3>Dreamweaver CS6</h3>
      												</a>
      												<p>視覺(jué)化網(wǎng)頁(yè)開(kāi)發(fā)工具</p>
      											</div>
      										</div>
      																			<div   id="377j5v51b"   class="phpmain_tab2_mids_top">
      											<a href="http://www.miracleart.cn/zh/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_top_img">
      												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac版" />
      											</a>
      											<div   id="377j5v51b"   class="phpmain_tab2_mids_info">
      												<a href="http://www.miracleart.cn/zh/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_title">
      													<h3>SublimeText3 Mac版</h3>
      												</a>
      												<p>神級(jí)代碼編輯軟件(SublimeText3)</p>
      											</div>
      										</div>
      																	</div>
      								<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
      									<a href="http://www.miracleart.cn/zh/ai">顯示更多</a>
      								</div>
      							</div>
      						</div>
      										
      
      					
      					<div   id="377j5v51b"   class="phpgenera_Details_mainR4">
      						<div   id="377j5v51b"   class="phpmain1_4R_readrank">
      							<div   id="377j5v51b"   class="phpmain1_4R_readrank_top">
      								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      									src="/static/imghw/hotarticle2.png" alt="" />
      								<h2>熱門(mén)話題</h2>
      							</div>
      							<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottom">
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/laravel-tutori" title="Laravel 教程" class="phpgenera_Details_mainR4_bottom_title">Laravel 教程</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
      											<img src="/static/imghw/eyess.png" alt="" />
      											<span>1600</span>
      										</div>
      										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
      											<img src="/static/imghw/tiezi.png" alt="" />
      											<span>29</span>
      										</div>
      									</div>
      								</div>
      															<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms">
      									<a href="http://www.miracleart.cn/zh/faq/php-tutorial" title="PHP教程" class="phpgenera_Details_mainR4_bottom_title">PHP教程</a>
      									<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_info">
      										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
      											<img src="/static/imghw/eyess.png" alt="" />
      											<span>1502</span>
      										</div>
      										<div   id="377j5v51b"   class="phpgenera_Details_mainR4_bottoms_infos">
      											<img src="/static/imghw/tiezi.png" alt="" />
      											<span>276</span>
      										</div>
      									</div>
      								</div>
      														</div>
      							<div   id="377j5v51b"   class="phpgenera_Details_mainR3_more">
      								<a href="http://www.miracleart.cn/zh/faq/zt">顯示更多</a>
      							</div>
      						</div>
      					</div>
      				</div>
      			</div>
      							<div   id="377j5v51b"   class="Article_Details_main2">
      					<div   id="377j5v51b"   class="phpgenera_Details_mainL4">
      						<div   id="377j5v51b"   class="phpmain1_2_top">
      							<a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img
      									src="/static/imghw/index2_title2.png" alt="" /></a>
      						</div>
      						<div   id="377j5v51b"   class="phpgenera_Details_mainL4_info">
      
      													<div   id="377j5v51b"   class="phphistorical_Version2_mids">
      								<a href="http://www.miracleart.cn/zh/faq/564399.html" title="Scrapy實(shí)現(xiàn)微信公眾號(hào)文章爬取和分析" class="phphistorical_Version2_mids_img">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/000/887/227/168739808722992.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Scrapy實(shí)現(xiàn)微信公眾號(hào)文章爬取和分析" />
      								</a>
      								<a href="http://www.miracleart.cn/zh/faq/564399.html" title="Scrapy實(shí)現(xiàn)微信公眾號(hào)文章爬取和分析" class="phphistorical_Version2_mids_title">Scrapy實(shí)現(xiàn)微信公眾號(hào)文章爬取和分析</a>
      								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 22, 2023 am	 09:41 AM</span>
      								<p class="Articlelist_txts_p">Scrapy實(shí)現(xiàn)微信公眾號(hào)文章爬取和分析微信是近年來(lái)備受歡迎的社交媒體應(yīng)用,在其中運(yùn)營(yíng)的公眾號(hào)也扮演著非常重要的角色。眾所周知,微信公眾號(hào)是一個(gè)信息和知識(shí)的海洋,因?yàn)槠渲忻總€(gè)公眾號(hào)都可以發(fā)布文章、圖文消息等信息。這些信息可以被廣泛地應(yīng)用在很多領(lǐng)域中,比如媒體報(bào)道、學(xué)術(shù)研究等。那么,本篇文章將介紹如何使用Scrapy框架來(lái)實(shí)現(xiàn)微信公眾號(hào)文章的爬取和分析。Scr</p>
      							</div>
      														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
      								<a href="http://www.miracleart.cn/zh/faq/610839.html" title="微信公眾號(hào)認(rèn)證和不認(rèn)證有哪些區(qū)別" class="phphistorical_Version2_mids_img">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/202309/19/2023091914120917199.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="微信公眾號(hào)認(rèn)證和不認(rèn)證有哪些區(qū)別" />
      								</a>
      								<a href="http://www.miracleart.cn/zh/faq/610839.html" title="微信公眾號(hào)認(rèn)證和不認(rèn)證有哪些區(qū)別" class="phphistorical_Version2_mids_title">微信公眾號(hào)認(rèn)證和不認(rèn)證有哪些區(qū)別</a>
      								<span id="377j5v51b"    class="Articlelist_txts_time">Sep 19, 2023 pm	 02:15 PM</span>
      								<p class="Articlelist_txts_p">微信公眾號(hào)認(rèn)證和不認(rèn)證的區(qū)別在認(rèn)證標(biāo)識(shí)、功能權(quán)限、推送頻率、接口權(quán)限和用戶信任度等方面。詳細(xì)介紹:1、認(rèn)證標(biāo)識(shí),認(rèn)證公眾號(hào)會(huì)獲得官方頒發(fā)的認(rèn)證標(biāo)識(shí),即藍(lán)色V標(biāo)志,這個(gè)標(biāo)志可以增加公眾號(hào)的可信度和權(quán)威性,讓用戶更容易辨別真實(shí)的官方公眾號(hào);2、功能權(quán)限,認(rèn)證公眾號(hào)相比未認(rèn)證的公眾號(hào)擁有更多的功能和權(quán)限,例如認(rèn)證公眾號(hào)可以申請(qǐng)開(kāi)通微信支付功能,實(shí)現(xiàn)在線支付和商業(yè)化運(yùn)營(yíng)等等。</p>
      							</div>
      														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
      								<a href="http://www.miracleart.cn/zh/faq/778235.html" title="分享幾個(gè).NET開(kāi)源的AI和LLM相關(guān)項(xiàng)目框架" class="phphistorical_Version2_mids_img">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/000/465/014/171498499633372.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="分享幾個(gè).NET開(kāi)源的AI和LLM相關(guān)項(xiàng)目框架" />
      								</a>
      								<a href="http://www.miracleart.cn/zh/faq/778235.html" title="分享幾個(gè).NET開(kāi)源的AI和LLM相關(guān)項(xiàng)目框架" class="phphistorical_Version2_mids_title">分享幾個(gè).NET開(kāi)源的AI和LLM相關(guān)項(xiàng)目框架</a>
      								<span id="377j5v51b"    class="Articlelist_txts_time">May 06, 2024 pm	 04:43 PM</span>
      								<p class="Articlelist_txts_p">當(dāng)今人工智能(AI)技術(shù)的發(fā)展如火如荼,它們?cè)诟鱾€(gè)領(lǐng)域都展現(xiàn)出了巨大的潛力和影響力。今天大姚給大家分享4個(gè).NET開(kāi)源的AI模型LLM相關(guān)的項(xiàng)目框架,希望能為大家提供一些參考。https://github.com/YSGStudyHards/DotNetGuide/blob/main/docs/DotNet/DotNetProjectPicks.mdSemanticKernelSemanticKernel是一種開(kāi)源的軟件開(kāi)發(fā)工具包(SDK),旨在將大型語(yǔ)言模型(LLM)如OpenAI、Azure</p>
      							</div>
      														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
      								<a href="http://www.miracleart.cn/zh/faq/620378.html" title="C#的就業(yè)前景如何" class="phphistorical_Version2_mids_img">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/202310/19/2023101911023538865.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="C#的就業(yè)前景如何" />
      								</a>
      								<a href="http://www.miracleart.cn/zh/faq/620378.html" title="C#的就業(yè)前景如何" class="phphistorical_Version2_mids_title">C#的就業(yè)前景如何</a>
      								<span id="377j5v51b"    class="Articlelist_txts_time">Oct 19, 2023 am	 11:02 AM</span>
      								<p class="Articlelist_txts_p">無(wú)論您是初學(xué)者還是有經(jīng)驗(yàn)的專(zhuān)業(yè)人士,掌握C#將為您的職業(yè)發(fā)展鋪平道路。</p>
      							</div>
      														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
      								<a href="http://www.miracleart.cn/zh/faq/557109.html" title="Python中的爬蟲(chóng)實(shí)戰(zhàn):微信公眾號(hào)爬蟲(chóng)" class="phphistorical_Version2_mids_img">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/000/887/227/168635890032444.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Python中的爬蟲(chóng)實(shí)戰(zhàn):微信公眾號(hào)爬蟲(chóng)" />
      								</a>
      								<a href="http://www.miracleart.cn/zh/faq/557109.html" title="Python中的爬蟲(chóng)實(shí)戰(zhàn):微信公眾號(hào)爬蟲(chóng)" class="phphistorical_Version2_mids_title">Python中的爬蟲(chóng)實(shí)戰(zhàn):微信公眾號(hào)爬蟲(chóng)</a>
      								<span id="377j5v51b"    class="Articlelist_txts_time">Jun 10, 2023 am	 09:01 AM</span>
      								<p class="Articlelist_txts_p">Python是一種優(yōu)雅的編程語(yǔ)言,擁有強(qiáng)大的數(shù)據(jù)處理和網(wǎng)絡(luò)爬蟲(chóng)功能。在這個(gè)數(shù)字化時(shí)代,互聯(lián)網(wǎng)上充滿了大量的數(shù)據(jù),爬蟲(chóng)已成為獲取數(shù)據(jù)的重要手段,因此,Python爬蟲(chóng)在數(shù)據(jù)分析和挖掘方面有著廣泛的應(yīng)用。在本文中,我們將介紹如何使用Python爬蟲(chóng)來(lái)獲取微信公眾號(hào)文章信息。微信公眾號(hào)是一種流行的社交媒體平臺(tái),用于在線發(fā)布文章,是許多公司和自媒體推廣和營(yíng)銷(xiāo)的重要工</p>
      							</div>
      														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
      								<a href="http://www.miracleart.cn/zh/faq/1796805198.html" title=".NET Core快速入門(mén)教程 1、開(kāi)篇:說(shuō)說(shuō).NET Core的那些事兒" class="phphistorical_Version2_mids_img">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/503/042/174657925712967.png?x-oss-process=image/resize,m_fill,h_207,w_330" alt=".NET Core快速入門(mén)教程 1、開(kāi)篇:說(shuō)說(shuō).NET Core的那些事兒" />
      								</a>
      								<a href="http://www.miracleart.cn/zh/faq/1796805198.html" title=".NET Core快速入門(mén)教程 1、開(kāi)篇:說(shuō)說(shuō).NET Core的那些事兒" class="phphistorical_Version2_mids_title">.NET Core快速入門(mén)教程 1、開(kāi)篇:說(shuō)說(shuō).NET Core的那些事兒</a>
      								<span id="377j5v51b"    class="Articlelist_txts_time">May 07, 2025 pm	 04:54 PM</span>
      								<p class="Articlelist_txts_p">一、.NETCore的起源談到.NETCore,就不能不提它的前身.NET。當(dāng)年Java風(fēng)頭正盛,微軟也對(duì)Java青睞有加,Windows平臺(tái)上的Java虛擬機(jī)就是微軟依據(jù)JVM標(biāo)準(zhǔn)開(kāi)發(fā)的,據(jù)稱(chēng)是當(dāng)時(shí)性能最佳的Java虛擬機(jī)。然而,微軟有自己的小算盤(pán),試圖將Java與Windows平臺(tái)捆綁,增加一些Windows特有的功能。Sun公司對(duì)此不滿,導(dǎo)致雙方關(guān)系破裂,微軟隨后推出了.NET。.NET從誕生之初就借鑒了Java的許多特性,并在語(yǔ)言特性和窗體開(kāi)發(fā)等方面逐漸超越了Java。Java在1.6版</p>
      							</div>
      														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
      								<a href="http://www.miracleart.cn/zh/faq/538202.html" title="用PHP構(gòu)建一個(gè)微信公眾號(hào)API接口" class="phphistorical_Version2_mids_img">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/202305/13/2023051312014794715.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="用PHP構(gòu)建一個(gè)微信公眾號(hào)API接口" />
      								</a>
      								<a href="http://www.miracleart.cn/zh/faq/538202.html" title="用PHP構(gòu)建一個(gè)微信公眾號(hào)API接口" class="phphistorical_Version2_mids_title">用PHP構(gòu)建一個(gè)微信公眾號(hào)API接口</a>
      								<span id="377j5v51b"    class="Articlelist_txts_time">May 13, 2023 pm	 12:01 PM</span>
      								<p class="Articlelist_txts_p">在當(dāng)今互聯(lián)網(wǎng)時(shí)代,微信公眾號(hào)成為了越來(lái)越多企業(yè)的重要營(yíng)銷(xiāo)渠道。想要自己的微信公眾號(hào)實(shí)現(xiàn)更多的功能,常常需要編寫(xiě)相應(yīng)的接口。本文將以PHP語(yǔ)言為例,介紹如何構(gòu)建一個(gè)微信公眾號(hào)API接口。一、前置準(zhǔn)備在編寫(xiě)微信公眾號(hào)API接口之前,需要開(kāi)發(fā)者擁有一個(gè)微信公眾號(hào)的賬號(hào),并且在微信公眾平臺(tái)中申請(qǐng)開(kāi)發(fā)者接口權(quán)限。申請(qǐng)成功后,可以獲取到相關(guān)的開(kāi)發(fā)者AppID和AppSe</p>
      							</div>
      														<div   id="377j5v51b"   class="phphistorical_Version2_mids">
      								<a href="http://www.miracleart.cn/zh/faq/1796801961.html" title="C#.NET:使用.NET生態(tài)系統(tǒng)構(gòu)建應(yīng)用程序" class="phphistorical_Version2_mids_img">
      									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
      										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/174568393023063.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="C#.NET:使用.NET生態(tài)系統(tǒng)構(gòu)建應(yīng)用程序" />
      								</a>
      								<a href="http://www.miracleart.cn/zh/faq/1796801961.html" title="C#.NET:使用.NET生態(tài)系統(tǒng)構(gòu)建應(yīng)用程序" class="phphistorical_Version2_mids_title">C#.NET:使用.NET生態(tài)系統(tǒng)構(gòu)建應(yīng)用程序</a>
      								<span id="377j5v51b"    class="Articlelist_txts_time">Apr 27, 2025 am	 12:12 AM</span>
      								<p class="Articlelist_txts_p">如何利用.NET構(gòu)建應(yīng)用?使用.NET構(gòu)建應(yīng)用可以通過(guò)以下步驟實(shí)現(xiàn):1)了解.NET基礎(chǔ)知識(shí),包括C#語(yǔ)言和跨平臺(tái)開(kāi)發(fā)支持;2)學(xué)習(xí)核心概念,如.NET生態(tài)系統(tǒng)的組件和工作原理;3)掌握基本和高級(jí)用法,從簡(jiǎn)單控制臺(tái)應(yīng)用到復(fù)雜的WebAPI和數(shù)據(jù)庫(kù)操作;4)熟悉常見(jiàn)錯(cuò)誤與調(diào)試技巧,如配置和數(shù)據(jù)庫(kù)連接問(wèn)題;5)應(yīng)用性能優(yōu)化與最佳實(shí)踐,如異步編程和緩存。</p>
      							</div>
      													</div>
      
      													<a href="http://www.miracleart.cn/zh/weixin-marketing.html" class="phpgenera_Details_mainL4_botton">
      								<span>See all articles</span>
      								<img src="/static/imghw/down_right.png" alt="" />
      							</a>
      											</div>
      				</div>
      					</div>
      	</main>
      	<footer>
          <div   id="377j5v51b"   class="footer">
              <div   id="377j5v51b"   class="footertop">
                  <img src="/static/imghw/logo.png" alt="">
                  <p>公益在線PHP培訓(xùn),幫助PHP學(xué)習(xí)者快速成長(zhǎng)!</p>
              </div>
              <div   id="377j5v51b"   class="footermid">
                  <a href="http://www.miracleart.cn/zh/about/us.html">關(guān)于我們</a>
                  <a href="http://www.miracleart.cn/zh/about/disclaimer.html">免責(zé)聲明</a>
                  <a href="http://www.miracleart.cn/zh/update/article_0_1.html">Sitemap</a>
              </div>
              <div   id="377j5v51b"   class="footerbottom">
                  <p>
                      ? php.cn All rights reserved
                  </p>
              </div>
          </div>
      </footer>
      
      <input type="hidden" id="verifycode" value="/captcha.html">
      
      
      
      
      		<link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' />
      	
      	
      	
      	
      	
      
      	
      	
      
      
      
      
      
      
      <footer>
      <div class="friendship-link">
      <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p>
      <a href="http://www.miracleart.cn/" title="国产av日韩一区二区三区精品">国产av日韩一区二区三区精品</a>
      
      <div class="friend-links">
      
      
      </div>
      </div>
      
      </footer>
      
      
      <script>
      (function(){
          var bp = document.createElement('script');
          var curProtocol = window.location.protocol.split(':')[0];
          if (curProtocol === 'https') {
              bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
          }
          else {
              bp.src = 'http://push.zhanzhang.baidu.com/push.js';
          }
          var s = document.getElementsByTagName("script")[0];
          s.parentNode.insertBefore(bp, s);
      })();
      </script>
      </body><div id="74b9q" class="pl_css_ganrao" style="display: none;"><fieldset id="74b9q"></fieldset><td id="74b9q"></td><table id="74b9q"></table><tbody id="74b9q"><strike id="74b9q"><tbody id="74b9q"></tbody></strike></tbody><option id="74b9q"></option><table id="74b9q"></table><thead id="74b9q"></thead><kbd id="74b9q"><strong id="74b9q"></strong></kbd><strike id="74b9q"></strike><div id="74b9q"><rp id="74b9q"></rp></div><tbody id="74b9q"><strike id="74b9q"><abbr id="74b9q"></abbr></strike></tbody><optgroup id="74b9q"></optgroup><dd id="74b9q"></dd><blockquote id="74b9q"><code id="74b9q"></code></blockquote><code id="74b9q"><menuitem id="74b9q"><code id="74b9q"><tr id="74b9q"></tr></code></menuitem></code><wbr id="74b9q"></wbr><button id="74b9q"><input id="74b9q"><dfn id="74b9q"></dfn></input></button><ruby id="74b9q"></ruby><menu id="74b9q"></menu><strong id="74b9q"></strong><dd id="74b9q"></dd><strong id="74b9q"></strong><xmp id="74b9q"><li id="74b9q"><mark id="74b9q"><strong id="74b9q"></strong></mark></li></xmp><s id="74b9q"><b id="74b9q"></b></s><code id="74b9q"></code><track id="74b9q"></track><var id="74b9q"></var><abbr id="74b9q"></abbr><option id="74b9q"><object id="74b9q"><u id="74b9q"></u></object></option><small id="74b9q"><progress id="74b9q"><track id="74b9q"></track></progress></small><nobr id="74b9q"></nobr><font id="74b9q"></font><xmp id="74b9q"><bdo id="74b9q"><tbody id="74b9q"></tbody></bdo></xmp><sub id="74b9q"></sub><tt id="74b9q"><style id="74b9q"><delect id="74b9q"><cite id="74b9q"></cite></delect></style></tt><acronym id="74b9q"></acronym><dfn id="74b9q"><em id="74b9q"></em></dfn><dl id="74b9q"><button id="74b9q"><dl id="74b9q"></dl></button></dl><ul id="74b9q"><strike id="74b9q"><ins id="74b9q"></ins></strike></ul><blockquote id="74b9q"></blockquote><dd id="74b9q"></dd><code id="74b9q"><tr id="74b9q"><dfn id="74b9q"></dfn></tr></code><video id="74b9q"><strike id="74b9q"><abbr id="74b9q"><form id="74b9q"></form></abbr></strike></video><rt id="74b9q"><small id="74b9q"></small></rt><sup id="74b9q"></sup><ul id="74b9q"></ul><dd id="74b9q"></dd><button id="74b9q"><input id="74b9q"><dfn id="74b9q"></dfn></input></button><acronym id="74b9q"><sup id="74b9q"><button id="74b9q"><input id="74b9q"></input></button></sup></acronym><samp id="74b9q"><tbody id="74b9q"><dfn id="74b9q"></dfn></tbody></samp><center id="74b9q"></center><pre id="74b9q"></pre><ol id="74b9q"></ol><th id="74b9q"></th><ol id="74b9q"><font id="74b9q"><object id="74b9q"></object></font></ol><pre id="74b9q"><menu id="74b9q"></menu></pre><abbr id="74b9q"></abbr><pre id="74b9q"><ol id="74b9q"></ol></pre><small id="74b9q"><progress id="74b9q"></progress></small><dfn id="74b9q"></dfn><form id="74b9q"><p id="74b9q"><mark id="74b9q"></mark></p></form><span id="74b9q"><small id="74b9q"></small></span><xmp id="74b9q"></xmp><legend id="74b9q"></legend><tr id="74b9q"><noframes id="74b9q"><thead id="74b9q"></thead></noframes></tr><dfn id="74b9q"></dfn><ruby id="74b9q"><strong id="74b9q"><sup id="74b9q"></sup></strong></ruby><thead id="74b9q"><abbr id="74b9q"><fieldset id="74b9q"><option id="74b9q"></option></fieldset></abbr></thead><menu id="74b9q"><font id="74b9q"><strong id="74b9q"><dd id="74b9q"></dd></strong></font></menu><blockquote id="74b9q"><code id="74b9q"><menuitem id="74b9q"><code id="74b9q"></code></menuitem></code></blockquote><fieldset id="74b9q"></fieldset><em id="74b9q"><s id="74b9q"><form id="74b9q"></form></s></em><dfn id="74b9q"></dfn><optgroup id="74b9q"></optgroup><em id="74b9q"></em><abbr id="74b9q"><fieldset id="74b9q"><option id="74b9q"></option></fieldset></abbr><tr id="74b9q"><noframes id="74b9q"><span id="74b9q"></span></noframes></tr><s id="74b9q"><b id="74b9q"></b></s><tr id="74b9q"><nav id="74b9q"><thead id="74b9q"></thead></nav></tr><video id="74b9q"></video><noframes id="74b9q"><rt id="74b9q"><optgroup id="74b9q"></optgroup></rt></noframes><code id="74b9q"></code><option id="74b9q"><wbr id="74b9q"><u id="74b9q"></u></wbr></option><s id="74b9q"></s><table id="74b9q"></table><s id="74b9q"></s><source id="74b9q"></source><noframes id="74b9q"><rt id="74b9q"><optgroup id="74b9q"></optgroup></rt></noframes><optgroup id="74b9q"></optgroup><label id="74b9q"></label><sup id="74b9q"></sup><small id="74b9q"><tfoot id="74b9q"><dfn id="74b9q"></dfn></tfoot></small><tt id="74b9q"></tt><pre id="74b9q"></pre><ol id="74b9q"></ol><pre id="74b9q"></pre><strong id="74b9q"></strong><code id="74b9q"></code><delect id="74b9q"><style id="74b9q"><progress id="74b9q"></progress></style></delect><sup id="74b9q"><thead id="74b9q"><input id="74b9q"><xmp id="74b9q"></xmp></input></thead></sup></div>
      
      </html>