{"id":157,"date":"2023-09-05T21:21:19","date_gmt":"2023-09-05T13:21:19","guid":{"rendered":"https:\/\/www.dingdongai.com\/?p=157"},"modified":"2023-09-05T21:21:19","modified_gmt":"2023-09-05T13:21:19","slug":"%e5%91%bd%e5%90%8d%e8%a7%84%e8%8c%83%ef%bc%8c%e5%8c%85%e6%8b%ac%e5%8f%98%e9%87%8f%e5%91%bd%e5%90%8d%e3%80%81%e5%87%bd%e6%95%b0%e5%91%bd%e5%90%8d%e3%80%81%e7%b1%bb%e5%91%bd%e5%90%8d%e7%ad%89","status":"publish","type":"post","link":"https:\/\/www.dingdongai.com\/?p=157","title":{"rendered":"\u547d\u540d\u89c4\u8303\uff0c\u5305\u62ec\u53d8\u91cf\u547d\u540d\u3001\u51fd\u6570\u547d\u540d\u3001\u7c7b\u547d\u540d\u7b49"},"content":{"rendered":"<p>\u667a\u80fd\u52a9\u624b\u7684\u7f16\u7a0b\u5e2e\u52a9\u4e0e\u4ee3\u7801\u8c03\u8bd5\u7684\u547d\u4ee4\u884c\u5de5\u5177\u5f00\u53d1\u7684\u4ee3\u7801\u98ce\u683c\u4e0e\u89c4\u8303\u7684\u547d\u540d\u89c4\u8303\uff0c\u5305\u62ec\u53d8\u91cf\u547d\u540d\u3001\u51fd\u6570\u547d\u540d\u3001\u7c7b\u547d\u540d\u7b49<\/p>\n<h2>\u53d8\u91cf\u547d\u540d<\/h2>\n<p>\u5728\u547d\u540d\u53d8\u91cf\u65f6\uff0c\u5e94\u8be5\u9009\u62e9\u5177\u6709\u63cf\u8ff0\u6027\u7684\u540d\u79f0\uff0c\u4ee5\u4fbf\u4e8e\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u7ef4\u62a4\u6027\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u53d8\u91cf\u547d\u540d\u89c4\u8303\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u6709\u610f\u4e49\u7684\u540d\u8bcd\u6216\u540d\u8bcd\u77ed\u8bed\u6765\u63cf\u8ff0\u53d8\u91cf\u7684\u7528\u9014\uff0c\u5982<code>userName<\/code>\u3001<code>productList<\/code>\u3002<\/li>\n<li>\u9075\u5faa\u9a7c\u5cf0\u547d\u540d\u6cd5\uff0c\u5373\u9996\u5b57\u6bcd\u5c0f\u5199\uff0c\u540e\u7eed\u5355\u8bcd\u9996\u5b57\u6bcd\u5927\u5199\uff0c\u5982<code>myVariableName<\/code>\u3002<\/li>\n<li>\u907f\u514d\u4f7f\u7528\u5355\u4e2a\u5b57\u7b26\u4f5c\u4e3a\u53d8\u91cf\u540d\uff0c\u9664\u975e\u5b83\u4eec\u662f\u5e38\u89c1\u7684\u7ea6\u5b9a\uff0c\u5982<code>i<\/code>\u7528\u4e8e\u5faa\u73af\u7d22\u5f15\u3002<\/li>\n<\/ul>\n<h2>\u51fd\u6570\u547d\u540d<\/h2>\n<p>\u51fd\u6570\u547d\u540d\u5e94\u8be5\u6e05\u6670\u5730\u8868\u8fbe\u51fd\u6570\u7684\u4f5c\u7528\u548c\u529f\u80fd\uff0c\u4ee5\u4fbf\u4e8e\u5176\u4ed6\u5f00\u53d1\u4eba\u5458\u7406\u89e3\u548c\u4f7f\u7528\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u51fd\u6570\u547d\u540d\u89c4\u8303\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u52a8\u8bcd\u6216\u52a8\u8bcd\u77ed\u8bed\u6765\u63cf\u8ff0\u51fd\u6570\u7684\u64cd\u4f5c\uff0c\u5982<code>getUserInfo<\/code>\u3001<code>calculateTotal<\/code>\u3002<\/li>\n<li>\u9075\u5faa\u9a7c\u5cf0\u547d\u540d\u6cd5\uff0c\u4e0e\u53d8\u91cf\u547d\u540d\u4e00\u81f4\uff0c\u5982<code>getUserName<\/code>\u3002<\/li>\n<li>\u907f\u514d\u4f7f\u7528\u8fc7\u4e8e\u7b80\u5355\u6216\u8fc7\u4e8e\u590d\u6742\u7684\u51fd\u6570\u540d\uff0c\u4fdd\u6301\u9002\u5ea6\u7684\u547d\u540d\u957f\u5ea6\u3002<\/li>\n<\/ul>\n<h2>\u7c7b\u547d\u540d<\/h2>\n<p>\u7c7b\u547d\u540d\u5e94\u8be5\u5177\u6709\u63cf\u8ff0\u6027\uff0c\u80fd\u591f\u6e05\u6670\u5730\u8868\u8fbe\u7c7b\u7684\u7528\u9014\u548c\u529f\u80fd\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u7c7b\u547d\u540d\u89c4\u8303\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u540d\u8bcd\u6216\u540d\u8bcd\u77ed\u8bed\u6765\u63cf\u8ff0\u7c7b\u7684\u5b9e\u4f53\uff0c\u5982<code>User<\/code>\u3001<code>Product<\/code>\u3002<\/li>\n<li>\u9075\u5faa\u5e15\u65af\u5361\u547d\u540d\u6cd5\uff0c\u5373\u6bcf\u4e2a\u5355\u8bcd\u7684\u9996\u5b57\u6bcd\u90fd\u5927\u5199\uff0c\u5982<code>MyClassName<\/code>\u3002<\/li>\n<li>\u907f\u514d\u4f7f\u7528\u7f29\u5199\u6216\u7b80\u5199\uff0c\u9664\u975e\u5b83\u4eec\u662f\u901a\u7528\u7684\u7ea6\u5b9a\uff0c\u5982<code>URL<\/code>\u3001<code>HTML<\/code>\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u547d\u540d\u89c4\u8303\uff0c\u5bf9\u4e8e\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u975e\u5e38\u91cd\u8981\u3002\u5728\u7f16\u5199\u4ee3\u7801\u65f6\uff0c\u5e94\u8be5\u9075\u5faa\u8fd9\u4e9b\u89c4\u8303\uff0c\u5e76\u4e0e\u56e2\u961f\u6210\u5458\u4fdd\u6301\u4e00\u81f4\uff0c\u4ee5\u4fbf\u4e8e\u4ee3\u7801\u7684\u534f\u4f5c\u548c\u4ea4\u6d41\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u667a\u80fd\u52a9\u624b\u7684\u7f16\u7a0b\u5e2e\u52a9\u4e0e\u4ee3\u7801\u8c03\u8bd5\u7684\u547d\u4ee4\u884c\u5de5\u5177\u5f00\u53d1\u7684\u4ee3\u7801\u98ce\u683c\u4e0e\u89c4\u8303\u7684\u547d\u540d\u89c4\u8303\uff0c\u5305\u62ec\u53d8\u91cf\u547d\u540d\u3001\u51fd\u6570\u547d\u540d\u3001\u7c7b\u547d\u540d\u7b49 \u53d8\u91cf &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.dingdongai.com\/?p=157\"> <span class=\"screen-reader-text\">\u547d\u540d\u89c4\u8303\uff0c\u5305\u62ec\u53d8\u91cf\u547d\u540d\u3001\u51fd\u6570\u547d\u540d\u3001\u7c7b\u547d\u540d\u7b49<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","footnotes":""},"categories":[1],"tags":[190,189,188,191],"class_list":["post-157","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-190","tag-189","tag-188","tag-191"],"_links":{"self":[{"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157"}],"version-history":[{"count":0,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dingdongai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}