{"id":49102,"date":"2024-12-02T16:11:39","date_gmt":"2024-12-02T08:11:39","guid":{"rendered":"https:\/\/fwq.ai\/blog\/49102\/"},"modified":"2024-12-02T16:11:39","modified_gmt":"2024-12-02T08:11:39","slug":"%e8%bd%ac%e7%9b%98%e6%8a%bd%e5%a5%96%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e5%8a%a8%e6%80%81%e6%9b%b4%e6%96%b0%e4%b8%ad%e5%a5%96%e4%bf%a1%e6%81%af%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/49102\/","title":{"rendered":"\u8f6c\u76d8\u62bd\u5956\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u4e2d\u5956\u4fe1\u606f\uff1f"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>\u8f6c\u76d8\u62bd\u5956\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u4e2d\u5956\u4fe1\u606f\uff1f<\/h1>\n<p>\u5bf9\u4e8e\u4e00\u4e2a\u6587\u7ae0\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u7262\u56fa\u624e\u5b9e\u7684\u57fa\u7840\u662f\u5341\u5206\u91cd\u8981\u7684\uff0c\u7c73\u4e91\u5c31\u6765\u5e26\u5927\u5bb6\u4e00\u70b9\u70b9\u7684\u638c\u63e1\u57fa\u7840\u77e5\u8bc6\u70b9\u3002\u4eca\u5929\u672c\u7bc7\u6587\u7ae0\u5e26\u5927\u5bb6\u4e86\u89e3\u300a\u8f6c\u76d8\u62bd\u5956\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u4e2d\u5956\u4fe1\u606f\uff1f\u300b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e86\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u5feb\u70b9\u6536\u85cf\u8d77\u6765\u5427\uff0c\u5426\u5219\u9700\u8981\u65f6\u5c31\u627e\u4e0d\u5230\u4e86\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241109\/1731140846672f1cee55503.jpg\" class=\"aligncenter\" title=\"\u8f6c\u76d8\u62bd\u5956\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u4e2d\u5956\u4fe1\u606f\uff1f\u63d2\u56fe\" alt=\"\u8f6c\u76d8\u62bd\u5956\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u4e2d\u5956\u4fe1\u606f\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u6c42\u5927\u795e\u89e3\u7b54\u8f6c\u76d8\u62bd\u5956<\/strong><\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8f6c\u76d8\u62bd\u5956\u7684\u95ee\u9898\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u8003\u8651\u7528\u6237\u7684\u64cd\u4f5c\u3002\u70b9\u51fb\u8f6c\u76d8\u7bad\u5934\u540e\uff0c\u6211\u4eec\u9700\u8981\u5411\u670d\u52a1\u5668\u53d1\u9001\u4e00\u4e2a\u8bf7\u6c42\uff0c\u8bf7\u6c42\u4e2d\u5305\u542b\u7528\u6237\u7684\u9009\u62e9\u3002<\/p>\n<p>\u5728\u670d\u52a1\u5668\u7aef\uff0c\u6211\u4eec\u9700\u8981\u5904\u7406\u8bf7\u6c42\uff0c\u6839\u636e\u7528\u6237\u7684\u9009\u62e9\u4ece\u6570\u636e\u5e93\u6216\u5176\u4ed6\u6570\u636e\u6e90\u4e2d\u83b7\u53d6\u4e2d\u5956\u4fe1\u606f\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06\u4e2d\u5956\u4fe1\u606f\u4f5c\u4e3a\u54cd\u5e94\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002<\/p>\n<p>\u5728\u5ba2\u6237\u7aef\uff0c\u6211\u4eec\u4f1a\u6536\u5230\u670d\u52a1\u5668\u7684\u54cd\u5e94\u5e76\u6839\u636e\u54cd\u5e94\u5185\u5bb9\u66f4\u65b0\u8f6c\u76d8\u5c55\u793a\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7f13\u52a8\u6548\u679c\u9009\u4e2d\u4e2d\u5956\u533a\u57df\uff0c\u5e76\u663e\u793a\u4e2d\u5956\u4fe1\u606f\u3002<\/p>\n<p><strong>\u4ee5\u4e0b\u662f\u4ee3\u7801\u793a\u4f8b\uff1a<\/strong><\/p>\n<p><strong>\u5ba2\u6237\u7aef\u4ee3\u7801\uff1a<\/strong><\/p>\n<pre>\/\/ \u5f53\u7528\u6237\u70b9\u51fb\u8f6c\u76d8\u7bad\u5934\u65f6\u89e6\u53d1\n$rotaryarrow.click(function() {\n  \/\/ \u5411\u670d\u52a1\u5668\u53d1\u9001\u8bf7\u6c42\uff0c\u5305\u542b\u7528\u6237\u9009\u62e9\n  $.ajax({\n    type: 'post',\n    url: 'lottery.php',\n    data: {\n      choice: '1', \/\/ \u7528\u6237\u9009\u62e9\n    },\n\n    \/\/ \u63a5\u53d7\u670d\u52a1\u5668\u54cd\u5e94\n    success: function(res) {\n      \/\/ \u66f4\u65b0\u8f6c\u76d8\u5c55\u793a\uff0c\u6839\u636e **res** \u4e2d\u7684\u4fe1\u606f\n      if (res.status === 'success') {\n        \/\/ \u9009\u4e2d\u4e2d\u5956\u533a\u57df\n        $rotaryarrow.rotate({\n          angle: 0,\n          duration: 5000,\n          animateto: res.angle + 1440,\n          callback: function() {\n            $resulttxt.html(res.text);\n            $result.show();\n          }\n        });\n      }\n    },\n  });\n});<\/pre>\n<p><strong>\u670d\u52a1\u5668\u7aef\u4ee3\u7801\uff08lottery.php\uff09\uff1a<\/strong><\/p>\n<pre>\/\/ \u83b7\u53d6\u7528\u6237\u9009\u62e9\n$choice = $_POST['choice'];\n\n\/\/ \u6839\u636e\u7528\u6237\u9009\u62e9\u83b7\u53d6\u4e2d\u5956\u4fe1\u606f\n$result = [\n  'status' =&gt; 'success', \/\/ \u72b6\u6001\n  'angle' =&gt; 134, \/\/ \u4e2d\u5956\u533a\u57df\u7684\u89d2\u5ea6\n  'text' =&gt; '&amp;lt;em&amp;gt;10&amp;lt;\/em&amp;gt;', \/\/ \u4e2d\u5956\u4fe1\u606f\n];\n\n\/\/ \u8fd4\u56de\u4e2d\u5956\u4fe1\u606f\necho json_encode($result);<\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9e\u73b0\u8f6c\u76d8\u62bd\u5956\u529f\u80fd\uff0c\u5e76\u5c06\u4e2d\u5956\u4fe1\u606f\u52a8\u6001\u5730\u66f4\u65b0\u5230\u5ba2\u6237\u7aef\u5c55\u793a\u4e2d\u3002<\/p>\n<p>\u6587\u4e2d\u5173\u4e8e\u7684\u77e5\u8bc6\u4ecb\u7ecd\uff0c\u5e0c\u671b\u5bf9\u4f60\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\uff01\u82e5\u662f\u53d7\u76ca\u532a\u6d45\uff0c\u90a3\u5c31\u52a8\u52a8\u9f20\u6807\u6536\u85cf\u8fd9\u7bc7\u300a\u8f6c\u76d8\u62bd\u5956\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u4e2d\u5956\u4fe1\u606f\uff1f\u300b\u6587\u7ae0\u5427\uff0c\u4e5f\u53ef\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\u4e86\u89e3\u76f8\u5173\u6280\u672f\u6587\u7ae0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u76d8\u62bd\u5956\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u4e2d\u5956\u4fe1\u606f\uff1f \u5bf9\u4e8e\u4e00\u4e2a\u6587\u7ae0\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u7262\u56fa\u624e\u5b9e\u7684\u57fa\u7840\u662f\u5341\u5206\u91cd\u8981\u7684\uff0c\u7c73\u4e91\u5c31\u6765\u5e26\u5927\u5bb6\u4e00\u70b9\u70b9\u7684\u638c\u63e1\u57fa\u7840\u77e5\u8bc6\u70b9\u3002\u4eca\u5929\u672c\u7bc7\u6587\u7ae0\u5e26\u5927\u5bb6\u4e86\u89e3\u300a\u8f6c\u76d8\u62bd\u5956\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u66f4\u65b0\u4e2d\u5956\u4fe1\u606f\uff1f\u300b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e86\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u5feb\u70b9\u6536\u85cf\u8d77\u6765\u5427\uff0c\u5426\u5219\u9700\u8981\u65f6\u5c31\u627e\u4e0d\u5230\u4e86\uff01 \u6c42\u5927\u795e\u89e3\u7b54\u8f6c\u76d8\u62bd\u5956 \u4e3a\u4e86\u89e3\u51b3\u8f6c\u76d8\u62bd\u5956\u7684\u95ee\u9898\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u8003\u8651\u7528\u6237\u7684\u64cd\u4f5c\u3002\u70b9\u51fb\u8f6c\u76d8\u7bad\u5934\u540e\uff0c\u6211\u4eec\u9700\u8981\u5411\u670d\u52a1\u5668\u53d1\u9001\u4e00\u4e2a\u8bf7\u6c42\uff0c\u8bf7\u6c42\u4e2d\u5305\u542b\u7528\u6237\u7684\u9009\u62e9\u3002 \u5728\u670d\u52a1\u5668\u7aef\uff0c\u6211\u4eec\u9700\u8981\u5904\u7406\u8bf7\u6c42\uff0c\u6839\u636e\u7528\u6237\u7684\u9009\u62e9\u4ece\u6570\u636e\u5e93\u6216\u5176\u4ed6\u6570\u636e\u6e90\u4e2d\u83b7\u53d6\u4e2d\u5956\u4fe1\u606f\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06\u4e2d\u5956\u4fe1\u606f\u4f5c\u4e3a\u54cd\u5e94\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002 \u5728\u5ba2\u6237\u7aef\uff0c\u6211\u4eec\u4f1a\u6536\u5230\u670d\u52a1\u5668\u7684\u54cd\u5e94\u5e76\u6839\u636e\u54cd\u5e94\u5185\u5bb9\u66f4\u65b0\u8f6c\u76d8\u5c55\u793a\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7f13\u52a8\u6548\u679c\u9009\u4e2d\u4e2d\u5956\u533a\u57df\uff0c\u5e76\u663e\u793a\u4e2d\u5956\u4fe1\u606f\u3002 \u4ee5\u4e0b\u662f\u4ee3\u7801\u793a\u4f8b\uff1a \u5ba2\u6237\u7aef\u4ee3\u7801\uff1a \/\/ \u5f53\u7528\u6237\u70b9\u51fb\u8f6c\u76d8\u7bad\u5934\u65f6\u89e6\u53d1 $rotaryarrow.click(function() { \/\/ \u5411\u670d\u52a1\u5668\u53d1\u9001\u8bf7\u6c42\uff0c\u5305\u542b\u7528\u6237\u9009\u62e9 $.ajax({ type: &#8216;post&#8217;, url: &#8216;lottery.php&#8217;, data: { choice: &#8216;1&#8217;, \/\/ \u7528\u6237\u9009\u62e9 }, \/\/ \u63a5\u53d7\u670d\u52a1\u5668\u54cd\u5e94 success: function(res) { \/\/ \u66f4\u65b0\u8f6c\u76d8\u5c55\u793a\uff0c\u6839\u636e **res** \u4e2d\u7684\u4fe1\u606f if (res.status === &#8216;success&#8217;) { \/\/ \u9009\u4e2d\u4e2d\u5956\u533a\u57df $rotaryarrow.rotate({ angle: 0, duration: 5000, animateto: res.angle + 1440, callback: function() { $resulttxt.html(res.text); [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-49102","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/49102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=49102"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/49102\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=49102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=49102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=49102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}