{"id":116541,"date":"2020-06-11T13:02:14","date_gmt":"2020-06-11T05:02:14","guid":{"rendered":"http:\/\/4563.org\/?p=116541"},"modified":"2020-06-11T13:02:14","modified_gmt":"2020-06-11T05:02:14","slug":"%e6%b1%82%e6%95%99%e4%b8%80%e4%b8%aajs%e7%9a%84%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=116541","title":{"rendered":"\u6c42\u6559\u4e00\u4e2aJS\u7684\u4ee3\u7801"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>fcurrk<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u6c42\u6559\u4e00\u4e2aJS\u7684\u4ee3\u7801<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 fcurrk \u4e8e 2020-6-11 13:12 \u7f16\u8f91 <\/p>\n<p> $(&#8216;#submit&#8217;).click(function(){<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;var data = {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;num:$(&#8216;#num&#8217;).val(),<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;};<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;$.post(&quot;.\/admin.php?a=invitation_code_create&quot;,data,function(res){<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if (res.code == 0) {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; layer.closeAll();<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; layui.use(&#8216;table&#8217;, function(){<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;var table = layui.table;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;table.reload(&#8216;table&#8217;, { \/\/\u8868\u683c\u7684id<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;url:&quot;.\/admin.php?a=invitation_code_list&quot;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;});<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; })<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;}<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;layer.msg(res.msg);<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;},&#8217;json&#8217;);<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })<\/p>\n<p>  \u5404\u4f4d\u5927\u4f6c\uff0c\u8fd9\u4e2aJS\u4ee3\u7801\u4f20\u9012\u5230invitation_code_create\u65f6\u53ea\u4f20\u4e86\u4e00\u4e2a\u53c2\u6570\uff0c\u6211\u60f3\u589e\u52a0\u4e00\u4e2a\u4f20\u9012\u7684\u6570\uff0c\u5728PHP\u90a3\u8fb9\u63a5\u6536\uff0c\u5e94\u8be5\u600e\u4e48\u4fee\u6539\u554a\uff1f\u6c42\u6307\u6559\u3002\u3002<\/p>\n<p>  \u6211\u5e0c\u671b\u7684\u662f<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;var data = {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;num:$(&#8216;#num&#8217;).val(),<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;txt:$(&#8216;#txt&#8217;).val(),<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;};<br \/>  \u80fd\u628a\u8fd9\u4e24\u4e2a\u6570\u90fd\u4f20\u8fc7\u6765\u8ba9PHP\u80fd\u63a5\u6536\u5230https:\/\/cdn.jsdelivr.net\/gh\/hishis\/forum-master\/public\/images\/patch.gif\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>inkedus<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e0d\u662f\u5f88\u61c2\uff0c\u697c\u4e0b\u89e3\u7b54https:\/\/cdn.jsdelivr.net\/gh\/hishis\/forum-master\/public\/images\/patch.gif\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yemingtu<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tvar data = {<br \/>  num: $(&quot;#num&quot;).val(),<br \/>  txt: $(&quot;#txt&quot;).val()<br \/>  }<\/p>\n<p>  \u4f60\u6e90\u7801\u8f6c\u6210\u8868\u60c5\u4e86\u770b\u4e0d\u5230\uff0c\u6211\u731c\u5e94\u8be5\u8fd9\u6837\u5199\u5c31\u597d\u4e86\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yrj<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u697c\u4e0a\u8bf4\u7684\u6ca1\u9519:lol\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h20<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5c31\u662f\u4f60\u60f3\u7684\u90a3\u6837\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>fcurrk<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tyemingtu \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-6-11 13:18<br \/>  \u4f60\u6e90\u7801\u8f6c\u6210\u8868\u60c5\u4e86\u770b\u4e0d\u5230\uff0c\u6211\u731c\u5e94\u8be5\u8fd9\u6837\u5199\u5c31\u597d\u4e86\u3002<\/p>\n<p> \u6211\u4e5f\u8fd9\u6837\u8bd5\u8fc7\uff0c\u4f46post\u5230php\u91cc\u4e00\u4e2a\u90fd\u6536\u4e0d\u5230https:\/\/cdn.jsdelivr.net\/gh\/hishis\/forum-master\/public\/images\/patch.gif\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>fcurrk \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u6c42\u6559&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/116541"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=116541"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/116541\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=116541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=116541"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=116541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}