{"id":29563,"date":"2024-11-25T16:05:06","date_gmt":"2024-11-25T08:05:06","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29563\/"},"modified":"2024-11-25T16:05:06","modified_gmt":"2024-11-25T08:05:06","slug":"24%e5%b0%8f%e6%97%b6%e5%bc%80%e5%8f%91%e9%98%b4%e9%98%b3%e5%b8%88%e5%b0%8f%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29563\/","title":{"rendered":"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f"},"content":{"rendered":"<p><strong>0.\u5e8f<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u73a9\u9634\u9633\u5e08\u7684\u809d\u5e1d\u4eec\u90fd\u77e5\u9053\uff0c\u6bcf\u5929\u65e9\u4e0a5\u70b9\u548c\u4e0b\u53486\u70b9\u4f1a\u5237\u65b0\u4e24\u6b21\u5c01\u5370\u4efb\u52a1\uff0c\u6bcf\u6b21\u505a\u4efb\u52a1\u65f6\u6700\u86cb\u75bc\u7684\u5c31\u662f\u627e\u5404\u79cd\u602a\u7269\u5bf9\u5e94\u7684\u526f\u672c\u4ee5\u53ca\u795e\u79d8\u7ebf\u7d22\u3002 \u9634\u9633\u5e08\u63d0\u4f9b\u4e86 \u7f51\u6613\u7cbe\u7075 \u53ef\u4ee5\u8fdb\u884c\u4e00\u4e9b\u6570\u636e\u67e5\u8be2\uff0c\u4f46\u4f53\u9a8c\u5b9e\u5728\u592a\u611f\u4eba\uff0c\u6240\u4ee5\u5927\u591a\u6570\u4eba\u9009\u62e9\u4f7f\u7528\u641c\u7d20\u5f15\u64ce\u641c\u7d22\u602a\u7269\u5206\u5e03\u53ca\u795e\u79d8\u7ebf\u7d22\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u800c\u6bcf\u6b21\u4f7f\u7528\u641c\u7d22\u5f15\u64ce\u67e5\u627e\u53c8\u5341\u5206\u4e0d\u65b9\u4fbf\uff0c\u6240\u4ee5\u7b14\u8005\u51b3\u5b9a\u5199\u4e00\u4e2a\u67e5\u8be2\u9634\u9633\u5e08\u5996\u602a\u5206\u5e03\u7684\u5c0f\u7a0b\u5e8f\uff0c\u529b\u6c42\u505a\u5230\u4f7f\u7528\u5feb\u6377\u4f53\u9a8c\u66f4\u5feb\u6377\uff0c\u628a\u66f4\u591a\u7684\u65f6\u95f4\u7559\u7ed9\u72d7\u7cae\u548c\u5fa1\u9b42\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u6070\u597d\u4e0a\u5468\u672b\u6709\u4e24\u5929\u65f6\u95f4\uff0c\u6240\u4ee5\u7acb\u9a6c\u5f00\u5199\u3002<\/span><\/span><\/span><\/p>\n<p><strong>1.\u6784\u601d\u4e0e\u8bbe\u8ba1 ( 3\u5c0f\u65f6 )<\/strong><strong>1.1 \u6784\u601d<\/strong><\/p>\n<ul>\n<li>\n<p>\u8981\u505a\u7684\u5c0f\u7a0b\u5e8f\u4e3b\u8981\u529f\u80fd\u5c31\u662f\u67e5\u8be2\u529f\u80fd\uff0c\u6240\u4ee5\u4e3b\u9875\u5e94\u8be5\u50cf\u641c\u7d22\u5f15\u64ce\u4e00\u6837\u7b80\u6d01\uff0c\u641c\u7d22\u6846\u662f\u80af\u5b9a\u9700\u8981\u7684\uff1b<\/p>\n<\/li>\n<li>\n<p>\u4e3b\u9875\u5305\u542b\u70ed\u95e8\u641c\u7d22\uff0c\u7f13\u5b58\u6700\u70ed\u5f0f\u795e\u7684\u641c\u7d22\uff1b<\/p>\n<\/li>\n<li>\n<p>\u641c\u7d22\u652f\u6301\u5b8c\u6574\u5339\u914d\u6216\u8005\u5355\u5b57\u5339\u914d\uff1b<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u641c\u7d22\u7ed3\u679c\u76f4\u63a5\u8df3\u8f6c\u5230\u5f0f\u795e\u8be6\u60c5\u9875\uff1b53. \u5f0f\u795e\u8be6\u60c5\u9875\u5e94\u8be5\u5305\u542b\u5f0f\u795e\u7684\u56fe\u9274\u3001\u540d\u79f0\u3001\u7a00\u6709\u5ea6\u3001\u51fa\u6ca1\u5730\u70b9\uff0c\u5e76\u4e14\u51fa\u6ca1\u5730\u70b9\u6309\u5996\u602a\u6570\u91cf\u4ece\u591a\u5230\u5c11\u6392\u5e8f\uff1b<\/p>\n<\/li>\n<li>\n<p>\u52a0\u5165\u6570\u636e\u62a5\u9519\u53ca\u63d0\u5efa\u8bae\u7684\u529f\u80fd\uff1b<\/p>\n<\/li>\n<li>\n<p>\u652f\u6301\u7528\u6237\u4e2a\u4eba\u7684\u641c\u7d22\u5386\u53f2\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5c0f\u7a0b\u5e8f\u7684\u540d\u5b57\uff0c\u7efc\u5408\u8003\u8651\u5c0f\u7a0b\u5e8f\u7684\u529f\u80fd\u6700\u540e\u51b3\u5b9a\u53eb\u505a \u5f0f\u795e\u730e\u624b ( \u5176\u5b9e\u8fd9\u662f\u6700\u540e\u5f00\u53d1\u5b8c\u6210\u540e\u624d\u60f3\u597d\u7684 )\uff1b<\/p>\n<\/li>\n<\/ul>\n<p><strong>1.2 \u8bbe\u8ba1<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u6784\u601d\u597d\u540e\u7b14\u8005\u5c31\u5f00\u59cb\u7528\u7b14\u8005\u534a\u540a\u5b50\u7684 PS \u6c34\u5e73\u8bbe\u8ba1\u4e86\u4e0b\u8349\u56fe\uff0c\u5927\u6982\u662f\u8fd9\u4e2a\u6837\u5b50\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:center\"><span><span style=\"quot\"><span style=\"font-size:16px\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/007\/9426091d39ba9e6c22736b51ad81dfd7-0.jpg\" title=\"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u63d2\u56fe\" alt=\"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u63d2\u56fe\" \/><br \/><\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u55ef\uff0c\u6700\u4e3b\u8981\u7684\u9996\u9875\u548c\u8be6\u60c5\u9875\u8bbe\u8ba1\u597d\u5c31\u884c\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u5f00\u59cb\u5177\u4f53\u8003\u8651\u600e\u4e48\u505a\u4e86\uff01<\/span><\/span><\/span><\/p>\n<p><strong>1.3 \u6280\u672f\u67b6\u6784<\/strong><\/p>\n<ul>\n<li>\n<p>\u524d\u7aef\u6beb\u65e0\u7591\u95ee\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u54af\uff1b<\/p>\n<\/li>\n<li>\n<p>\u540e\u7aef\u4f7f\u7528 Django \u63d0\u4f9b Restful API \u670d\u52a1\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5f53\u524d\u6700\u70ed\u641c\u7d22\u7528 redis \u505a\u7f13\u5b58\u670d\u52a1\u5668\u8fdb\u884c\u7f13\u5b58\uff1b<\/p>\n<\/li>\n<li>\n<p>\u4e2a\u4eba\u641c\u7d22\u8bb0\u5f55\u5c31\u4f7f\u7528\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63d0\u4f9b\u7684 localstorage ;<\/p>\n<\/li>\n<li>\n<p>\u5f0f\u795e\u5206\u5e03\u4fe1\u606f\u4f7f\u7528\u722c\u866b\u722c\u53d6\u6e05\u6d17\uff0c\u683c\u5f0f\u5316\u4e3a json , \u5165\u5e93\u524d\u518d\u505a\u4eba\u5de5\u68c0\u67e5\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5f0f\u795e\u56fe\u7247\u53ca\u56fe\u6807\u76f4\u63a5\u722c\u53d6\u5b98\u65b9\u8d44\u6599\uff1b<\/p>\n<\/li>\n<li>\n<p>\u81ea\u5df1\u5236\u4f5c\u722c\u4e0d\u5230\u7684\u5f0f\u795e\u56fe\u7247\u53ca\u56fe\u6807\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5c0f\u7a0b\u5e8f\u8981\u6c42 HTTPS \u8fde\u63a5\uff0c\u6070\u597d\u7b14\u8005\u4e4b\u524d\u641e\u8fc7\uff0c\u53ef\u4ee5\u76f4\u63a5\u770b\u8fd9\u91cc <span><span style=\"background-color:transparent\">HTTPS \u514d\u8d39\u90e8\u7f72\u6307\u5357<\/span><\/span><\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5230\u6b64\uff0c\u6b63\u5f0f\u5f00\u53d1\u524d\u7684\u51c6\u5907\u5f97\u5f53\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f00\u59cb\u6b63\u5f0f\u5f00\u53d1\u4e86<\/span><\/span><\/span><\/p>\n<p><strong>2. API \u670d\u52a1\u5f00\u53d1 ( 5\u5c0f\u65f6 )<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">Django \u7684 API \u670d\u52a1\u5f00\u53d1\u7b14\u8005\u4e4b\u524d\u7ecf\u5e38\u505a\uff0c\u6240\u4ee5\u6709\u6bd4\u8f83\u5b8c\u6574\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u53ef\u4ee5\u53c2\u8003\u8fd9\u91cc <span><span style=\"background-color:transparent\">django-simple-serializer<\/span><\/span><\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u4e4b\u6240\u4ee5\u82b1\u4e86 5 \u4e2a\u5c0f\u65f6\u662f\u56e0\u4e3a\u8fd1 4 \u4e2a\u5c0f\u65f6\u5728\u589e\u52a0 <span><span style=\"background-color:transparent\">django-simple-serializer<\/span><\/span> \u5bf9 Django ManyToManyField \u4e2d through \u7279\u6027\u7684\u652f\u6301\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u7b80\u800c\u8a00\u4e4b\uff0c through \u7279\u6027\u5c31\u662f\u53ef\u4ee5\u4f7f\u591a\u5bf9\u591a\u5173\u7cfb\u7684\u4e2d\u95f4\u8868\u589e\u6dfb\u4e00\u4e9b\u989d\u5916\u7684\u5b57\u6bb5\u6216\u5c5e\u6027\uff0c\u4f8b\u5982: \u602a\u7269\u526f\u672c\u548c\u602a\u7269\u4e4b\u95f4\u7684\u591a\u5bf9\u591a\u5173\u7cfb\u5c31\u9700\u8981\u589e\u52a0\u4e00\u4e2a\u50a8\u5b58\u6bcf\u4e2a\u526f\u672c\u6709\u591a\u5c11\u53ea\u76f8\u5e94\u602a\u7269\u6570\u91cf\u7684\u5b57\u6bb5 count\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u641e\u5b9a through \u652f\u6301\u540e API \u7684\u6784\u5efa\u5c31\u5f88\u5feb\u5566\uff0c\u4e3b\u8981\u6709\u4e94\u4e2a API \uff1a<\/span><\/span><\/span><\/p>\n<ul>\n<li>\n<p>\u641c\u7d22\u63a5\u53e3\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5f0f\u795e\u8be6\u60c5\u63a5\u53e3\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5f0f\u795e\u526f\u672c\u63a5\u53e3\uff1b<\/p>\n<\/li>\n<li>\n<p>\u70ed\u95e8\u641c\u7d22\u63a5\u53e3\uff1b<\/p>\n<\/li>\n<li>\n<p>\u53cd\u9988\u63a5\u53e3\uff1b<\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5199\u597d\u63a5\u53e3\u540e\u6dfb\u52a0\u4e00\u4e9b mock data \u4ee5\u4f9b\u6d4b\u8bd5\uff1b<\/span><\/span><\/span><\/p>\n<p><strong>3. \u524d\u7aef\u5f00\u53d1 ( 8\u5c0f\u65f6 )<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u524d\u7aef\u82b1\u4e86\u6700\u4e45\u7684\u65f6\u95f4\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u4e00\u65b9\u9762\u7b14\u8005\u771f\u7684\u662f\u4e2a\u540e\u7aef\u5de5\u7a0b\u5e08\uff0c\u524d\u7aef\u5c5e\u4e8e\u534a\u8def\u51fa\u5bb6\uff0c\u53e6\u4e00\u65b9\u9762\u5c0f\u7a0b\u5e8f\u6709\u4e00\u4e9b\u5751\u3002 \u5f53\u7136\uff0c\u6700\u4e3b\u8981\u7684\u662f\u4e00\u76f4\u5728\u8c03\u6574\u754c\u9762\u6548\u679c\uff0c\u8fd9\u91cc\u82b1\u4e86\u5927\u91cf\u65f6\u95f4\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5199\u5c0f\u7a0b\u5e8f\u7684\u6574\u4f53\u4f53\u9a8c\u7b14\u8005\u611f\u89c9\u5c31\u548c\u5199 vue.js \u4e00\u6478\u4e00\u6837\uff0c\u53ea\u4e0d\u8fc7\u4e00\u4e9b html \u6807\u7b7e\u6ca1\u529e\u6cd5\u4f7f\u7528\uff0c\u800c\u662f\u9700\u8981\u6309\u5c0f\u7a0b\u5e8f\u5b98\u65b9\u63d0\u4f9b\u7684\u7ec4\u4ef6\u8fdb\u884c\u4e66\u5199\uff0c \u8fd9\u91cc\u6709\u4e00\u70b9\u611f\u53d7\u5c31\u662f\uff0c\u5c0f\u7a0b\u5e8f\u672c\u8eab\u7ec4\u4ef6\u5316\u7684\u8bbe\u8ba1\u601d\u8def\u5e94\u8be5\u662f\u501f\u9274\u4e86 React \u800c\u8bed\u6cd5\u4e4b\u7c7b\u7684\u5e94\u8be5\u662f\u501f\u9274\u4e86 vue.js \u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u6700\u540e\u524d\u7aef\u5f00\u53d1\u5b8c\u6bd5\u540e\u4e3b\u8981\u5206\u4e3a\u8fd9\u51e0\u4e2a\u9875\u9762\uff1a<\/span><\/span><\/span><\/p>\n<ul>\n<li>\n<p>\u4e3b\u9875 \uff08 \u641c\u7d22\u9875 \uff09\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5f0f\u795e\u8be6\u60c5\u9875\uff1b<\/p>\n<\/li>\n<li>\n<p>\u6211\u7684\u9875\u9762 \uff08 \u4e3b\u8981\u662f\u653e\u641c\u7d22\u5386\u53f2\u548c\u514d\u8d23\u7533\u660e\u7b49\u7b49\u4e1c\u897f \uff09\uff1b<\/p>\n<\/li>\n<li>\n<p>\u53cd\u9988\u754c\u9762\uff1b<\/p>\n<\/li>\n<li>\n<p>\u58f0\u660e\u754c\u9762 \uff08 \u4e3a\u4f55\u9700\u8981\u8fd9\u4e2a\u754c\u9762\uff1f \u56e0\u4e3a\u6240\u6709\u56fe\u7247\u53ca\u4e00\u4e9b\u8d44\u6e90\u90fd\u662f\u76f4\u63a5\u6293\u53d6\u9634\u9633\u5e08\u5b98\u65b9\u7684\u8d44\u6e90\uff0c\u6240\u4ee5\u8fd9\u91cc\u9700\u8981\u7533\u660e\u53ea\u662f\u975e\u76c8\u5229\u6027\u8d28\u7684\u4f7f\u7528\uff0c\u7248\u6743\u4e71\u4e03\u516b\u7cdf\u7684\u90fd\u8fd8\u662f\u9634\u9633\u5e08\u7684 \uff09\u3002<\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u54ce\uff0c\u4e11\u5ab3\u5987\u65e9\u665a\u8981\u89c1\u516c\u5a46\uff0c\u8fd9\u91cc\u4e0d\u5f97\u4e0d\u653e\u6700\u540e\u5f00\u53d1\u51fa\u6765\u7684\u754c\u9762\u56fe\u4e86<\/span><\/span><\/span><\/p>\n<p style=\"text-align:center\"><span><span style=\"quot\"><span style=\"font-size:16px\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/007\/224c299fc47b73cf60e9fb354e59ef69-1.png\" title=\"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u63d2\u56fe1\" alt=\"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u63d2\u56fe1\" \/><br \/><\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5bf9\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u5165\u95e8\u53ca\u57fa\u7840\uff0c\u7b14\u8005\u5c31\u4e0d\u5728\u8fd9\u91cc\u591a\u8bb2\u4e86\uff0c\u76f8\u4fe1\u5230\u73b0\u5728\u5bf9\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u6709\u5173\u6ce8\u7684\u5f00\u53d1\u8005\u6216\u591a\u6216\u5c11\u81ea\u5df1\u5199\u4e2a\u7b80\u5355\u7684 demo \u80af\u5b9a\u662f\u6ca1\u95ee\u9898\u7684\uff0c\u6211\u5c31\u4e3b\u8981\u8bb2\u4e00\u8bb2\u6211\u5728\u5f00\u53d1\u4e2d\u9047\u5230\u7684\u5751\uff1a<\/span><\/span><\/span><\/p>\n<p><strong>3.1 background-image \u5c5e\u6027<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5728\u5199\u5f0f\u795e\u8be6\u60c5\u9875\u7684\u65f6\u5019\u4e24\u4e2a\u5730\u65b9\u9700\u8981\u7528\u5230 background-image \u5c5e\u6027\u8bbe\u7f6e\u80cc\u666f\u56fe\uff0c\u5728\u5fae\u4fe1\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u4e00\u5207\u663e\u793a\u6b63\u5e38\uff0c\u4f46\u4e00\u5230\u771f\u673a\u8c03\u8bd5\u5c31\u6ca1\u6709\u529e\u6cd5\u663e\u793a\uff0c\u6700\u540e\u53d1\u73b0\u5c0f\u7a0b\u5e8f\u7684 background-image \u5728\u771f\u673a\u4e0d\u652f\u6301\u5f15\u7528\u672c\u5730\u8d44\u6e90\uff0c\u89e3\u51b3\u65b9\u6848\u6709\u4e24\u79cd\uff1a<\/span><\/span><\/span><\/p>\n<ul>\n<li>\n<p>\u4f7f\u7528\u7f51\u7edc\u56fe\u7247\uff1a \u8003\u8651\u5230\u80cc\u666f\u56fe\u7684\u5927\u5c0f\uff0c\u7b14\u8005\u653e\u5f03\u4e86\u8fd9\u79cd\u65b9\u6848\uff1b<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528 base64 \u7f16\u7801\u56fe\u7247\u3002<\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u6b63\u5e38\u6765\u8bb2\uff0ccss \u4e2d\u7684 background-image \u5c31\u652f\u6301 base64 \uff0c\u8fd9\u79cd\u65b9\u6848\u76f8\u5f53\u4e8e\u628a\u56fe\u7247\u76f4\u63a5\u7528 base64 \u7f16\u7801\u6210\u4e00\u6bb5 base64 \u7801\u8fdb\u884c\u50a8\u5b58\uff0c\u5728\u4f7f\u7528\u65f6\u8fd9\u6837\u4f7f\u7528\u5373\u53ef\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\"><\/span><\/span><\/span><\/p>\n<p style=\"padding:15px 0\"><\/p>\n<p style=\"font-size:12px\">[CSS] <em>\u7eaf\u6587\u672c\u67e5\u770b<\/em> <em>\u590d\u5236\u4ee3\u7801<\/em><\/p>\n<pre>background-image:&nbsp;url(data:image\/image-format;base64,XXXX);<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">image-format \u4e3a\u56fe\u7247\u672c\u8eab\u7684\u683c\u5f0f\uff0c\u800c xxxx \u5c31\u662f\u56fe\u7247\u7ecf\u8fc7 base64 \u540e\u5f97\u5230\u7684\u7f16\u7801\u3002\u8fd9\u79cd\u65b9\u5f0f\u5176\u5b9e\u662f\u4e00\u79cd\u53d8\u76f8\u5f15\u7528\u672c\u5730\u8d44\u6e90\u7684\u65b9\u5f0f\uff0c\u597d\u5904\u5728\u4e8e\u53ef\u4ee5\u51cf\u5c11\u8bf7\u6c42\u56fe\u7247\u7684\u6b21\u6570\uff0c\u800c\u7f3a\u70b9\u5219\u662f\u4f1a\u589e\u5927 css \u6587\u4ef6\u5e76\u4f7f\u5176\u4e0d\u662f\u90a3\u4e48\u597d\u770b\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u6700\u540e\u7b14\u8005\u9009\u62e9\u7b2c\u4e8c\u79cd\u65b9\u5f0f\u4e3b\u8981\u8fd8\u662f\u8003\u8651\u5230\u56fe\u7247\u7684\u5927\u5c0f\u4ee5\u53ca wxss \u7684\u589e\u5927\u5728\u53ef\u63a5\u53d7\u8303\u56f4\u5185\u3002<\/span><\/span><\/span><\/p>\n<p><strong>3.2 template<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5c0f\u7a0b\u5e8f\u652f\u6301\u6a21\u7248\uff0c\u4f46\u8981\u6ce8\u610f\u6a21\u677f\u62e5\u6709\u81ea\u5df1\u7684\u4f5c\u7528\u57df\uff0c\u53ea\u80fd\u4f7f\u7528data\u4f20\u5165\u7684\u6570\u636e\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u53e6\u5916\uff0c\u5728\u4f20\u5165\u6570\u636e\u65f6\u9700\u8981\u5c06\u76f8\u5173\u6570\u636e\u89e3\u6784\u4f20\u5165\uff0c\u5728\u6a21\u7248\u5185\u90e8\u662f\u76f4\u63a5\u4ee5 {{ xxxx }} \u7684\u5f62\u5f0f\u8fdb\u884c\u8bbf\u95ee\uff0c\u800c\u4e0d\u662f\u50cf\u5728\u5faa\u73af\u4e2d {{ item.xxx }} \u8fd9\u79cd\u8bbf\u95ee\u5f62\u5f0f\uff1b<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5173\u4e8e\u89e3\u6784\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\"><\/span><\/span><\/span><\/p>\n<p style=\"padding:15px 0\"><\/p>\n<p style=\"font-size:12px\">[XML] <em>\u7eaf\u6587\u672c\u67e5\u770b<\/em> <em>\u590d\u5236\u4ee3\u7801<\/em><\/p>\n<pre>&lt;template&gt;&lt;\/template&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u4e09\u4e2a . \u5c31\u662f\u89e3\u6784\u64cd\u4f5c\uff1b<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u4e00\u822c template \u90fd\u4f1a\u653e\u5728 \u5355\u72ec\u7684 template \u6587\u4ef6\u4e2d\u8ba9\u5176\u4ed6\u6587\u4ef6\u8fdb\u884c\u8c03\u7528\uff0c\u800c\u4e0d\u4f1a\u76f4\u63a5\u5199\u5728\u6b63\u5e38\u7684 wxml \u4e2d\u3002 \u6bd4\u5982\u7b14\u8005\u76ee\u5f55\u5927\u6982\u662f\u8fd9\u6837\u7684\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\"><\/span><\/span><\/span><\/p>\n<p style=\"padding:15px 0\"><\/p>\n<p style=\"font-size:12px\">[JavaScript] <em>\u7eaf\u6587\u672c\u67e5\u770b<\/em> <em>\u590d\u5236\u4ee3\u7801<\/em><\/p>\n<pre>\u251c\u2500\u2500&nbsp;app.js\r\n\u251c\u2500\u2500&nbsp;app.json\r\n\u251c\u2500\u2500&nbsp;app.wxss\r\n\u251c\u2500\u2500&nbsp;pages\r\n\u2502&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500&nbsp;feedback\r\n\u2502&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500&nbsp;index\r\n\u2502&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500&nbsp;my\r\n\u2502&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500&nbsp;onmyoji\r\n\u2502&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500&nbsp;statement\r\n\u2502&nbsp;&nbsp;&nbsp;\u2514\u2500\u2500&nbsp;template\r\n\u2502&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500&nbsp;template.js\r\n\u2502&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500&nbsp;template.json\r\n\u2502&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500&nbsp;template.wxml\r\n\u2502&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u2514\u2500\u2500&nbsp;template.wxss\r\n\u251c\u2500\u2500&nbsp;static\r\n\u2514\u2500\u2500&nbsp;utils<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5173\u4e8e\u5176\u4ed6\u6587\u4ef6\u8c03\u7528 template\uff0c\u76f4\u63a5\u4f7f\u7528 import \u5373\u53ef\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\"><\/span><\/span><\/span><\/p>\n<p style=\"padding:15px 0\"><\/p>\n<p style=\"font-size:12px\">[XML] <em>\u7eaf\u6587\u672c\u67e5\u770b<\/em> <em>\u590d\u5236\u4ee3\u7801<\/em><\/p>\n<pre>&lt;import&gt;&lt;\/import&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u7136\u540e\u5728\u9700\u8981\u5f15\u7528\u6a21\u7248\u7684\u5730\u65b9\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\"><\/span><\/span><\/span><\/p>\n<p style=\"padding:15px 0\"><\/p>\n<p style=\"font-size:12px\">[XML] <em>\u7eaf\u6587\u672c\u67e5\u770b<\/em> <em>\u590d\u5236\u4ee3\u7801<\/em><\/p>\n<pre>&lt;template&gt;&lt;\/template&gt;\n  <\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u8fd9\u91cc\u9047\u5230\u53e6\u4e00\u4e2a\u95ee\u9898\uff0ctemplate \u5bf9\u5e94\u7684\u6837\u5f0f\u5199\u5728 template \u5bf9\u5e94\u7684 wxss \u4e2d\u5e76\u6ca1\u6709\u4f5c\u7528\uff0c\u9700\u8981\u5199\u5728\u8c03\u7528 template \u7684\u6587\u4ef6\u7684 wxss \u4e2d\uff0c\u6bd4\u5982 index \u9700\u8981\u4f7f\u7528 template \u5219\u9700\u8981\u5c06\u5bf9\u5e94\u7684 css \u5199\u5728 my\/my.wxss \u4e2d\u3002<\/span><\/span><\/span><\/p>\n<p><strong>4. \u722c\u53d6\u56fe\u7247\u8d44\u6e90 ( 2\u5c0f\u65f6 )<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5f0f\u795e\u7684\u56fe\u6807\u53ca\u5f62\u8c61\u56fe\u57fa\u672c\u4e0a\u9634\u9633\u5e08\u5b98\u7f51\u90fd\u6709\uff0c\u8fd9\u91cc\u81ea\u5df1\u505a\u4e5f\u4e0d\u73b0\u5b9e\uff0c\u6240\u4ee5\u679c\u65ad\u5199\u722c\u866b\u722c\u4e0b\u6765\u7136\u540e\u5b58\u5230\u81ea\u5df1\u7684 cdn \u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5927\u56fe\u548c\u5c0f\u56fe\u90fd\u5728 http:\/\/yys.163.com\/shishen\/index.html \u8fd9\u91cc\u53ef\u4ee5\u627e\u5230\u3002 \u4e00\u5f00\u59cb\u8003\u8651\u722c\u53d6\u7f51\u9875\u7136\u540e beautiful soup \u63d0\u53d6\u6570\u636e\uff0c\u540e\u9762\u53d1\u73b0\u5f0f\u795e\u6570\u636e\u7adf\u7136\u662f\u5f02\u6b65\u52a0\u8f7d\u7684\uff0c\u90a3\u5c31\u66f4\u7b80\u5355\u4e86\uff0c\u5206\u6790\u7f51\u9875\u5f97\u5230 https:\/\/g37simulator.webapp.163.com\/get_heroid_list \u76f4\u63a5\u8fd4\u56de\u4e86\u5f0f\u795e\u4fe1\u606f\u7684 json \u4fe1\u606f\uff0c\u6240\u4ee5\u5f88\u5bb9\u6613\u5199\u4e2a\u722c\u866b\u5c31\u53ef\u4ee5\u641e\u5b9a\u4e86\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\"><\/span><\/span><\/span><\/p>\n<p style=\"padding:15px 0\"><\/p>\n<p style=\"font-size:12px\">[Python] <em>\u7eaf\u6587\u672c\u67e5\u770b<\/em> <em>\u590d\u5236\u4ee3\u7801<\/em><\/p>\n<pre>#&nbsp;coding:&nbsp;utf-8\r\nimport&nbsp;json\r\nimport&nbsp;requests\r\nimport&nbsp;urllib\r\nfrom&nbsp;xpinyin&nbsp;import&nbsp;Pinyin\r\n\r\nurl&nbsp;=&nbsp;\"https:\/\/g37simulator.webapp.163.com\/get_heroid_list?callback=jQuery11130959811888616583_1487429691764&amp;amp;rarity=0&amp;amp;page=1&amp;amp;per_page=200&amp;amp;_=1487429691765\"\r\nresult&nbsp;=&nbsp;requests.get(url).content.replace('jQuery11130959811888616583_1487429691764(',&nbsp;'').replace(')',&nbsp;'')\r\njson_data&nbsp;=&nbsp;json.loads(result)\r\nhellspawn_list&nbsp;=&nbsp;json_data['data']\r\np&nbsp;=&nbsp;Pinyin()\r\nfor&nbsp;k,&nbsp;v&nbsp;in&nbsp;hellspawn_list.iteritems():\r\n&nbsp;&nbsp;&nbsp;&nbsp;file_name&nbsp;=&nbsp;p.get_pinyin(v.get('name'),&nbsp;'')\r\n&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;'id:&nbsp;{0}&nbsp;name:&nbsp;{1}'.format(k,&nbsp;v.get('name'))\r\n&nbsp;&nbsp;&nbsp;&nbsp;big_url&nbsp;=&nbsp;\"https:\/\/yys.res.netease.com\/pc\/zt\/20161108171335\/data\/shishen_big\/{0}.png\".format(k)\r\n&nbsp;&nbsp;&nbsp;&nbsp;urllib.urlretrieve(big_url,&nbsp;filename='big\/{0}@big.png'.format(file_name))\r\n&nbsp;&nbsp;&nbsp;&nbsp;avatar_url&nbsp;=&nbsp;\"https:\/\/yys.res.netease.com\/pc\/gw\/20160929201016\/data\/shishen\/{0}.png\".format(k)\r\n&nbsp;&nbsp;&nbsp;&nbsp;urllib.urlretrieve(avatar_url,&nbsp;filename='icon\/{0}@icon.png'.format(file_name))<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u7136\u800c\uff0c\u722c\u5b8c\u6570\u636e\u540e\u53d1\u73b0\u4e00\u4e2a\u95ee\u9898\uff0c\u7f51\u6613\u5b98\u65b9\u7684\u56fe\u7247\u90fd\u662f\u65e0\u7801\u9ad8\u6e05\u5927\u56fe\uff0c\u5bf9\u4e8e\u7b14\u8005\u8fd9\u79cd\u7a77 ds \u5927\u56fe\u653e\u5728 cdn \u4e0a\u4e24\u5929\u5c31\u5f97\u7834\u4ea7\uff0c\u6240\u4ee5\u9700\u8981\u6279\u91cf\u5c06\u56fe\u7247\u8f6c\u6210\u65e2\u4e0d\u592a\u5927\u53c8\u80fd\u770b\u7684\u8fc7\u53bb\u3002\u55ef\uff0c\u8fd9\u91cc\u5c31\u53ef\u4ee5\u7528\u5230 ps \u7684\u6279\u5904\u7406\u80fd\u529b\u4e86\u3002<\/span><\/span><\/span><\/p>\n<ul>\n<li>\n<p>\u6253\u5f00 ps \uff0c\u7136\u540e\u9009\u62e9\u722c\u5230\u7684\u4e00\u5f20\u56fe\u7247\uff1b<\/p>\n<\/li>\n<li>\n<p>\u9009\u62e9\u83dc\u5355\u680f\u4e0a\u7684\u201c\u7a97\u53e3\u201d\u7136\u540e\u9009\u62e9\u201c\u52a8\u4f5c\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5728\u201c\u52a8\u4f5c\u201d\u9009\u9879\u4e0b\uff0c\u65b0\u5efa\u4e00\u4e2a\u52a8\u4f5c\uff1b<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u5706\u5f62\u5f55\u5236\u6309\u94ae\u5f00\u59cb\u5f55\u5236\u52a8\u4f5c\uff1b<\/p>\n<\/li>\n<li>\n<p>\u6309\u6b63\u5e38\u5904\u7406\u56fe\u7247\u7b49\u987a\u5e8f\u5c06\u4e00\u5f20\u56fe\u7247\u5b58\u4e3a web \u683c\u5f0f\uff1b<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u65b9\u5f62\u505c\u6b62\u6309\u94ae\u505c\u6b62\u5f55\u5236\u52a8\u4f5c\uff1b<\/p>\n<\/li>\n<li>\n<p>\u9009\u62e9\u83dc\u5355\u680f\u4e0a\u7684 \u6587\u4ef6\uff0d\u81ea\u52a8\uff0d\u6279\u5904\u7406\uff0d\u9009\u62e9\u4e4b\u524d\u5f55\u5236\u7684\u52a8\u4f5c\uff0d\u914d\u7f6e\u597d\u8f93\u5165\u6587\u4ef6\u5939\u548c\u8f93\u51fa\u6587\u4ef6\u5939\uff1b<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u786e\u5b9a\u5c31\u53ef\u4ee5\u5566\uff1b<\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u7b49\u6279\u5904\u7406\u7ed3\u675f\uff0c\u671f\u95f4\u5237\u4e2a\u5fa1\u9b42\u5565\u7684\u5e94\u8be5\u5c31\u597d\u4e86\uff0c\u7136\u540e\u5c06\u5f97\u5230\u7684\u6240\u6709\u56fe\u7247\u4e0a\u4f20\u5230\u9759\u6001\u8d44\u6e90\u670d\u52a1\u5668\uff0c\u56fe\u7247\u8fd9\u91cc\u5c31\u5904\u7406\u5b8c\u5566\u3002<\/span><\/span><\/span><\/p>\n<p><strong>5. \u5f0f\u795e\u6570\u636e\u722c\u53d6 ( 4\u5c0f\u65f6 )<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u5f0f\u795e\u5206\u5e03\u6570\u636e\u7f51\u4e0a\u6bd4\u8f83\u6742\u5e76\u4e14\u6570\u636e\u5f88\u591a\u6709\u504f\u5dee\uff0c\u6240\u4ee5\u659f\u914c\u518d\u4e09\u51b3\u5b9a\u91c7\u7528\u534a\u4eba\u5de5\u534a\u81ea\u52a8\u7684\u65b9\u5f0f\uff0c\u722c\u5230\u7684\u6570\u636e\u8f93\u51fa\u4e3a json\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"font-size:12px\">[JavaScript]<\/p>\n<pre>{\r\n&nbsp;&nbsp;&nbsp;&nbsp;\"scene_name\":&nbsp;\"\u63a2\u7d22\u7b2c\u4e00\u7ae0\",\r\n&nbsp;&nbsp;&nbsp;&nb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\":&nbsp;\"\u63d0\u706f\u5c0f\u50e7\",\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"count\":&nbsp;1\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}]\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"name\":&nbsp;\"\u9996\u9886\",\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"index\":&nbsp;5,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"monsters\":&nbsp;[{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"name\":&nbsp;\"\u4e5d\u547d\u732b\",\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"count\":&nbsp;3\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}]\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}]\r\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u7136\u540e\u518d\u4eba\u5de5\u68c0\u67e5\u4e00\u904d\uff0c\u5f53\u7136\u8fd8\u662f\u4f1a\u6709\u9057\u6f0f\uff0c\u6240\u4ee5\u6570\u636e\u62a5\u9519\u7684\u529f\u80fd\u5c31\u5f88\u91cd\u8981\u5566\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u8fd9\u4e00\u90e8\u5206\u5b9e\u9645\u5199\u4ee3\u7801\u7684\u65f6\u95f4\u53ef\u80fd\u53ea\u6709\u534a\u4e2a\u591a\u5c0f\u65f6\uff0c\u5269\u4e0b\u65f6\u95f4\u4e00\u76f4\u5728\u68c0\u67e5\u6570\u636e\uff1b<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u4e00\u5207\u68c0\u67e5\u7ed3\u675f\u540e\u5199\u4e2a\u811a\u672c\u76f4\u63a5\u5c06 json \u5bfc\u5165\u5230\u6570\u636e\u5e93\u4e2d\uff0c\u68c0\u67e5\u65e0\u8bef\u540e\u7528 fabric \u53d1\u5e03\u5230\u7ebf\u4e0a\u670d\u52a1\u5668\u8fdb\u884c\u6d4b\u8bd5\uff1b<\/span><\/span><\/span><\/p>\n<p><strong>6. \u6d4b\u8bd5 ( 2\u5c0f\u65f6 )<\/strong><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u6700\u540e\u4e00\u6b65\u57fa\u672c\u4e0a\u5c31\u662f\u5728\u624b\u673a\u4e0a\u4f53\u9a8c\u67e5\u9519\uff0c\u4fee\u6539\u4e00\u4e9b\u6548\u679c\uff0c\u5173\u95ed\u8c03\u8bd5\u6a21\u5f0f\u51c6\u5907\u63d0\u4ea4\u5ba1\u6838\uff1b<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u6b64\u65f6\u5df2\u7ecf\u662f\u5468\u65e5\uff0c\u54e6\uff0c\u4e0d\u5bf9\uff0c\u5e94\u8be5\u662f\u5468\u4e00\u65e9\u4e0a\u4e00\u70b9\u949f\u4e86\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:center\"><span><span style=\"quot\"><span style=\"font-size:16px\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/007\/bb374f3888068b7e0394322a92ad4a63-2.jpg\" title=\"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u63d2\u56fe2\" alt=\"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u63d2\u56fe2\" \/><br \/><\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u4e0d\u5f97\u4e0d\u8bf4\uff0c\u5c0f\u7a0b\u5e8f\u56e2\u961f\u5ba1\u6838\u901f\u5ea6\u5f88\u5feb\u554a\uff0c\u5468\u4e00\u4e0b\u5348\u5c31\u5ba1\u6838\u901a\u8fc7\u4e86\uff0c\u7136\u540e\u679c\u65ad\u4e0a\u7ebf\u3002<\/span><\/span><\/span><\/p>\n<p style=\"text-align:left\"><span><span style=\"quot\"><span style=\"font-size:16px\">\u6700\u540e\u653e\u6548\u679c\u56fe\uff1a<\/span><\/span><\/span><\/p>\n<p style=\"text-align:center\"><span><span style=\"quot\"><span style=\"font-size:16px\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/007\/bb374f3888068b7e0394322a92ad4a63-3.gif\" title=\"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u63d2\u56fe3\" alt=\"24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u63d2\u56fe3\" \/><br \/><\/span><\/span><\/span><\/p>\n<p style=\"text-align: left\"><\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f24\u5c0f\u65f6\u5f00\u53d1\u9634\u9633\u5e08\u5c0f\u7a0b\u5e8f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>0.\u5e8f \u73a9\u9634\u9633\u5e08\u7684\u809d\u5e1d\u4eec\u90fd\u77e5\u9053\uff0c\u6bcf\u5929\u65e9\u4e0a5\u70b9\u548c\u4e0b\u53486\u70b9\u4f1a\u5237\u65b0\u4e24\u6b21\u5c01\u5370\u4efb\u52a1\uff0c\u6bcf\u6b21\u505a\u4efb\u52a1\u65f6\u6700\u86cb\u75bc\u7684\u5c31\u662f\u627e\u5404\u79cd\u602a\u7269\u5bf9\u5e94\u7684\u526f\u672c\u4ee5\u53ca\u795e\u79d8\u7ebf\u7d22\u3002 \u9634\u9633\u5e08\u63d0\u4f9b\u4e86 \u7f51\u6613\u7cbe\u7075 \u53ef\u4ee5\u8fdb\u884c\u4e00\u4e9b\u6570\u636e\u67e5\u8be2\uff0c\u4f46\u4f53\u9a8c\u5b9e\u5728\u592a\u611f\u4eba\uff0c\u6240\u4ee5\u5927\u591a\u6570\u4eba\u9009\u62e9\u4f7f\u7528\u641c\u7d20\u5f15\u64ce\u641c\u7d22\u602a\u7269\u5206\u5e03\u53ca\u795e\u79d8\u7ebf\u7d22\u3002 \u800c\u6bcf\u6b21\u4f7f\u7528\u641c\u7d22\u5f15\u64ce\u67e5\u627e\u53c8\u5341\u5206\u4e0d\u65b9\u4fbf\uff0c\u6240\u4ee5\u7b14\u8005\u51b3\u5b9a\u5199\u4e00\u4e2a\u67e5\u8be2\u9634\u9633\u5e08\u5996\u602a\u5206\u5e03\u7684\u5c0f\u7a0b\u5e8f\uff0c\u529b\u6c42\u505a\u5230\u4f7f\u7528\u5feb\u6377\u4f53\u9a8c\u66f4\u5feb\u6377\uff0c\u628a\u66f4\u591a\u7684\u65f6\u95f4\u7559\u7ed9\u72d7\u7cae\u548c\u5fa1\u9b42\u3002 \u6070\u597d\u4e0a\u5468\u672b\u6709\u4e24\u5929\u65f6\u95f4\uff0c\u6240\u4ee5\u7acb\u9a6c\u5f00\u5199\u3002 1.\u6784\u601d\u4e0e\u8bbe\u8ba1 ( 3\u5c0f\u65f6 )1.1 \u6784\u601d \u8981\u505a\u7684\u5c0f\u7a0b\u5e8f\u4e3b\u8981\u529f\u80fd\u5c31\u662f\u67e5\u8be2\u529f\u80fd\uff0c\u6240\u4ee5\u4e3b\u9875\u5e94\u8be5\u50cf\u641c\u7d22\u5f15\u64ce\u4e00\u6837\u7b80\u6d01\uff0c\u641c\u7d22\u6846\u662f\u80af\u5b9a\u9700\u8981\u7684\uff1b \u4e3b\u9875\u5305\u542b\u70ed\u95e8\u641c\u7d22\uff0c\u7f13\u5b58\u6700\u70ed\u5f0f\u795e\u7684\u641c\u7d22\uff1b \u641c\u7d22\u652f\u6301\u5b8c\u6574\u5339\u914d\u6216\u8005\u5355\u5b57\u5339\u914d\uff1b \u70b9\u51fb\u641c\u7d22\u7ed3\u679c\u76f4\u63a5\u8df3\u8f6c\u5230\u5f0f\u795e\u8be6\u60c5\u9875\uff1b53. \u5f0f\u795e\u8be6\u60c5\u9875\u5e94\u8be5\u5305\u542b\u5f0f\u795e\u7684\u56fe\u9274\u3001\u540d\u79f0\u3001\u7a00\u6709\u5ea6\u3001\u51fa\u6ca1\u5730\u70b9\uff0c\u5e76\u4e14\u51fa\u6ca1\u5730\u70b9\u6309\u5996\u602a\u6570\u91cf\u4ece\u591a\u5230\u5c11\u6392\u5e8f\uff1b \u52a0\u5165\u6570\u636e\u62a5\u9519\u53ca\u63d0\u5efa\u8bae\u7684\u529f\u80fd\uff1b \u652f\u6301\u7528\u6237\u4e2a\u4eba\u7684\u641c\u7d22\u5386\u53f2\uff1b \u5c0f\u7a0b\u5e8f\u7684\u540d\u5b57\uff0c\u7efc\u5408\u8003\u8651\u5c0f\u7a0b\u5e8f\u7684\u529f\u80fd\u6700\u540e\u51b3\u5b9a\u53eb\u505a \u5f0f\u795e\u730e\u624b ( \u5176\u5b9e\u8fd9\u662f\u6700\u540e\u5f00\u53d1\u5b8c\u6210\u540e\u624d\u60f3\u597d\u7684 )\uff1b 1.2 \u8bbe\u8ba1 \u6784\u601d\u597d\u540e\u7b14\u8005\u5c31\u5f00\u59cb\u7528\u7b14\u8005\u534a\u540a\u5b50\u7684 PS \u6c34\u5e73\u8bbe\u8ba1\u4e86\u4e0b\u8349\u56fe\uff0c\u5927\u6982\u662f\u8fd9\u4e2a\u6837\u5b50\uff1a \u55ef\uff0c\u6700\u4e3b\u8981\u7684\u9996\u9875\u548c\u8be6\u60c5\u9875\u8bbe\u8ba1\u597d\u5c31\u884c\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u5f00\u59cb\u5177\u4f53\u8003\u8651\u600e\u4e48\u505a\u4e86\uff01 1.3 \u6280\u672f\u67b6\u6784 \u524d\u7aef\u6beb\u65e0\u7591\u95ee\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u54af\uff1b \u540e\u7aef\u4f7f\u7528 Django \u63d0\u4f9b Restful API \u670d\u52a1\uff1b \u5f53\u524d\u6700\u70ed\u641c\u7d22\u7528 redis \u505a\u7f13\u5b58\u670d\u52a1\u5668\u8fdb\u884c\u7f13\u5b58\uff1b \u4e2a\u4eba\u641c\u7d22\u8bb0\u5f55\u5c31\u4f7f\u7528\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63d0\u4f9b\u7684 localstorage ; \u5f0f\u795e\u5206\u5e03\u4fe1\u606f\u4f7f\u7528\u722c\u866b\u722c\u53d6\u6e05\u6d17\uff0c\u683c\u5f0f\u5316\u4e3a json , \u5165\u5e93\u524d\u518d\u505a\u4eba\u5de5\u68c0\u67e5\uff1b \u5f0f\u795e\u56fe\u7247\u53ca\u56fe\u6807\u76f4\u63a5\u722c\u53d6\u5b98\u65b9\u8d44\u6599\uff1b \u81ea\u5df1\u5236\u4f5c\u722c\u4e0d\u5230\u7684\u5f0f\u795e\u56fe\u7247\u53ca\u56fe\u6807\uff1b \u5c0f\u7a0b\u5e8f\u8981\u6c42 HTTPS \u8fde\u63a5\uff0c\u6070\u597d\u7b14\u8005\u4e4b\u524d\u641e\u8fc7\uff0c\u53ef\u4ee5\u76f4\u63a5\u770b\u8fd9\u91cc HTTPS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-29563","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29563","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=29563"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29563\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}