{"id":3155,"date":"2023-10-24T09:24:13","date_gmt":"2023-10-24T01:24:13","guid":{"rendered":"https:\/\/bookmark.tw\/?p=3155"},"modified":"2025-05-04T18:50:32","modified_gmt":"2025-05-04T10:50:32","slug":"by-any-means","status":"publish","type":"post","link":"https:\/\/xinliceyan.org\/zh\/by-any-means","title":{"rendered":"\u5bf9\u4e8e\u5f97\u4e0d\u5230\u7684\u4e1c\u897f\uff0c\u4f60\u4f1a\u4e0d\u62e9\u624b\u6bb5\u5417?\u2192\u7ebf\u4e0a\u514d\u8d39\u5c0f\u6d4b\u9a8c"},"content":{"rendered":"<!-- \u5fc3\u7406\u6e2c\u9a57\u4e3b\u8981\u5185\u5bb9 -->\n<div id=\"dt-container\" class=\"dt-container\">\n  <!-- \u5f15\u5c0e\u9801 -->\n  <div id=\"dt-intro-page\" class=\"dt-page dt-active\">\n    <div class=\"dt-intro-content\">\n      <h2 class=\"dt-title\">\u5bf9\u4e8e\u5f97\u4e0d\u5230\u7684\u4e1c\u897f\uff0c\u4f60\u4f1a\u4e0d\u62e9\u624b\u6bb5\u5417\uff1f<\/h2>\n      <div class=\"dt-description\">\n        <p>\u6709\u4eba\u603b\u89c9\u5f97\uff0c\u5f97\u4e0d\u5230\u7684\u4e1c\u897f\u603b\u662f\u6700\u597d\u7684\uff0c\u6b63\u6240\u8c13\u5403\u7740\u7897\u91cc\u7684\uff0c\u770b\u7740\u9505\u91cc\u7684\u3002\u4eba\u5bb6\u7684\u7537\u670b\u53cb\u597d\uff0c\u4eba\u5bb6\u7684\u8863\u670d\u597d\u770b\uff0c\u4eba\u5bb6\u8fc7\u5f97\u6bd4\u6211\u5e78\u798f\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u4eba\u7684\u6b32\u671b\u5c31\u50cf\u4e2a\u65e0\u5e95\u6d1e\u3002<\/p>\n        <p>\u5982\u679c\u4f60\u78b0\u5230\u8fd9\u79cd\u60c5\u51b5\uff0c\u5f97\u4e0d\u5230\u53c8\u5f88\u60f3\u8981\uff0c\u4f60\u4f1a\u62a2\u5417\uff1f\u4e0b\u9762\u8fd9\u4e9b\u9898\u4f1a\u544a\u8bc9\u4f60\u7b54\u6848\u3002<\/p>\n      <\/div>\n      <button id=\"dt-start-btn\" class=\"dt-btn dt-start-btn\">\u5f00\u59cb\u6d4b\u9a8c<\/button>\n    <\/div>\n  <\/div>\n\n  <!-- \u6e2c\u9a57\u9801 -->\n  <div id=\"dt-quiz-page\" class=\"dt-page\">\n    <div class=\"dt-progress-container\" id=\"dt-progress-container\">\n      <div class=\"dt-progress-bar\">\n        <div class=\"dt-progress-fill\" id=\"dt-progress-fill\"><\/div>\n      <\/div>\n      <div class=\"dt-progress-text\" id=\"dt-progress-text\">\u95ee\u98981\/13<\/div>\n    <\/div>\n    \n    <div id=\"dt-questions-container\" class=\"dt-questions-container\">\n      <!-- \u554f\u984c\u6703\u5728\u9019\u88e1\u52d5\u614b\u751f\u6210 -->\n    <\/div>\n  <\/div>\n\n  <!-- \u7d50\u679c\u9801 -->\n  <div id=\"dt-result-page\" class=\"dt-page\">\n    <h2 class=\"dt-result-title\">\u6d4b\u9a8c\u7ed3\u679c<\/h2>\n    <div class=\"dt-result-content\" id=\"dt-result-content\">\n      <!-- \u7d50\u679c\u6703\u5728\u9019\u88e1\u52d5\u614b\u751f\u6210 -->\n    <\/div>\n    <div class=\"dt-chart-container\">\n      <canvas id=\"dt-result-chart\"><\/canvas>\n    <\/div>\n    <button id=\"dt-restart-btn\" class=\"dt-btn dt-restart-btn\">\u91cd\u65b0\u6d4b\u8bd5<\/button>\n  <\/div>\n<\/div>\n\n<style>\n\/* \u907f\u514d\u6a23\u5f0f\u885d\u7a81\u7684\u552f\u4e00\u524d\u7db4 *\/\n.dt-container {\n  font-family: 'Microsoft JhengHei', '\u5fae\u8edf\u6b63\u9ed1\u9ad4', 'Heiti TC', '\u9ed1\u9ad4-\u7e41', sans-serif;\n  max-width: 800px;\n  margin: 0 auto;\n  padding: 20px;\n  color: #333;\n  background-color: #fff;\n  border-radius: 12px;\n  box-shadow: 0 4px 20px rgba(123, 31, 162, 0.1);\n  position: relative;\n  min-height: 400px;\n}\n\n.dt-page {\n  display: none;\n  opacity: 0;\n  transition: opacity 0.5s ease;\n}\n\n.dt-active {\n  display: block;\n  opacity: 1;\n}\n\n.dt-title {\n  color: #7b1fa2;\n  text-align: center;\n  font-size: 2rem;\n  margin-bottom: 1.5rem;\n}\n\n.dt-description {\n  color: #555;\n  font-size: 1.1rem;\n  line-height: 1.6;\n  margin-bottom: 2rem;\n}\n\n.dt-description p {\n  margin-bottom: 1rem;\n  text-align: justify;\n}\n\n.dt-btn {\n  background-color: #7b1fa2;\n  color: white;\n  border: none;\n  border-radius: 50px;\n  padding: 12px 24px;\n  font-size: 1.1rem;\n  cursor: pointer;\n  transition: all 0.3s ease;\n  min-height: 44px;\n  min-width: 120px;\n  box-shadow: 0 3px 8px rgba(123, 31, 162, 0.3);\n}\n\n.dt-btn:hover {\n  background-color: #6a1b9a;\n  transform: translateY(-2px);\n  box-shadow: 0 5px 12px rgba(123, 31, 162, 0.4);\n}\n\n.dt-start-btn {\n  display: block;\n  margin: 0 auto;\n  font-size: 1.2rem;\n  padding: 15px 40px;\n}\n\n.dt-progress-container {\n  margin-bottom: 2rem;\n}\n\n.dt-progress-bar {\n  height: 10px;\n  background-color: #e1bee7;\n  border-radius: 10px;\n  overflow: hidden;\n  margin-bottom: 0.5rem;\n}\n\n.dt-progress-fill {\n  height: 100%;\n  background-color: #7b1fa2;\n  width: 0%;\n  transition: width 0.5s ease;\n}\n\n.dt-progress-text {\n  text-align: right;\n  font-size: 0.9rem;\n  color: #888;\n}\n\n.dt-question {\n  margin-bottom: 2rem;\n  opacity: 0;\n  transform: translateY(20px);\n  transition: opacity 0.5s ease, transform 0.5s ease;\n}\n\n.dt-question.dt-visible {\n  opacity: 1;\n  transform: translateY(0);\n}\n\n.dt-question-title {\n  font-size: 1.3rem;\n  margin-bottom: 1.5rem;\n  color: #333;\n  font-weight: bold;\n}\n\n.dt-options {\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n}\n\n.dt-option {\n  background-color: #f3e5f5;\n  border: 2px solid #e1bee7;\n  border-radius: 8px;\n  padding: 16px;\n  cursor: pointer;\n  transition: all 0.3s ease;\n  font-size: 1.1rem;\n  min-height: 44px;\n  display: flex;\n  align-items: center;\n}\n\n.dt-option:hover {\n  background-color: #e1bee7;\n  border-color: #ba68c8;\n  transform: translateY(-2px);\n}\n\n.dt-option.dt-selected {\n  background-color: #ba68c8;\n  color: white;\n  border-color: #7b1fa2;\n}\n\n.dt-result-title {\n  text-align: center;\n  color: #7b1fa2;\n  font-size: 1.8rem;\n  margin-bottom: 1.5rem;\n}\n\n.dt-result-content {\n  background-color: #f3e5f5;\n  border-radius: 10px;\n  padding: 20px;\n  margin-bottom: 2rem;\n  font-size: 1.1rem;\n  line-height: 1.6;\n}\n\n.dt-result-type {\n  font-size: 1.4rem;\n  color: #7b1fa2;\n  margin-bottom: 1rem;\n  font-weight: bold;\n}\n\n.dt-result-description {\n  text-align: justify;\n  margin-bottom: 1rem;\n}\n\n.dt-chart-container {\n  width: 100%;\n  max-width: 500px;\n  margin: 0 auto 2rem;\n  height: 300px;\n}\n\n.dt-restart-btn {\n  display: block;\n  margin: 0 auto;\n}\n\n.dt-intro-content {\n  text-align: center;\n  padding: 1rem;\n  max-width: 700px;\n  margin: 0 auto;\n}\n\n@media screen and (max-width: 768px) {\n  .dt-container {\n    padding: 15px;\n  }\n  \n  .dt-title {\n    font-size: 1.6rem;\n  }\n  \n  .dt-question-title {\n    font-size: 1.2rem;\n  }\n  \n  .dt-option {\n    padding: 14px;\n    font-size: 1rem;\n  }\n}\n<\/style>\n\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/Chart.js\/3.9.1\/chart.min.js\"><\/script>\n<script>\ndocument.addEventListener('DOMContentLoaded', function() {\n  \/\/ \u6a21\u7d44\u5316\u8a2d\u8a08\u4ee5\u9632\u6b62\u5168\u5c40\u8b8a\u91cf\u6c61\u67d3\n  const DesireTest = (function() {\n    \/\/ \u554f\u984c\u6578\u64da\n    const questions = [\n      {\n        id: 1,\n        question: \"\u4f60\u7684\u793e\u4ea4\u7d93\u9a57\u8c50\u5bcc\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", nextQuestion: 2 },\n          { text: \"\u5426\", nextQuestion: 3 }\n        ]\n      },\n      {\n        id: 2,\n        question: \"\u9022\u5e74\u904e\u7bc0\u5949\u627f\u4e0a\u53f8\u548c\u9577\u8f29\u7684\u4eba\u7fa4\u88e1\u9762\u6709\u4f60\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", nextQuestion: 4 },\n          { text: \"\u5426\", nextQuestion: 3 }\n        ]\n      },\n      {\n        id: 3,\n        question: \"\u4f60\u7684\u8cbc\u5fc3\u670b\u53cb\u591a\u55ce\uff1f\",\n        options: [\n          { text: \"\u591a\", nextQuestion: 5 },\n          { text: \"\u4e0d\u591a\", nextQuestion: 4 }\n        ]\n      },\n      {\n        id: 4,\n        question: \"\u4f60\u7e3d\u662f\u898b\u4e0d\u5f97\u4eba\u5bb6\u6bd4\u4f60\u597d\uff1f\",\n        options: [\n          { text: \"\u662f\", nextQuestion: 5 },\n          { text: \"\u5426\", nextQuestion: 6 }\n        ]\n      },\n      {\n        id: 5,\n        question: \"\u6703\u6709\u300c\u6bd4\u4e0a\u4e0d\u8db3\u6bd4\u4e0b\u6709\u9918\u300d\u7684\u60f3\u6cd5\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", nextQuestion: 7 },\n          { text: \"\u5426\", nextQuestion: 6 }\n        ]\n      },\n      {\n        id: 6,\n        question: \"\u4f60\u505a\u6bcf\u4ef6\u4e8b\u60c5\u90fd\u6703\u6b0a\u8861\u5229\u5bb3\u5f97\u5931\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", nextQuestion: 8 },\n          { text: \"\u5426\", nextQuestion: 7 }\n        ]\n      },\n      {\n        id: 7,\n        question: \"\u5c0d\u65bc\u4f60\u500b\u4eba\u800c\u8a00\uff0c\u53cb\u60c5\u548c\u611b\u60c5\u54ea\u500b\u66f4\u91cd\u8981\uff1f\",\n        options: [\n          { text: \"\u53cb\u60c5\", nextQuestion: 9 },\n          { text: \"\u611b\u60c5\", nextQuestion: 8 }\n        ]\n      },\n      {\n        id: 8,\n        question: \"\u4f60\u6e05\u695a\u81ea\u5df1\u7684\u80fd\u529b\u6975\u9650\u5728\u54ea\u88e1\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", nextQuestion: 9 },\n          { text: \"\u5426\", nextQuestion: 10 }\n        ]\n      },\n      {\n        id: 9,\n        question: \"\u4f60\u73cd\u60dc\u624b\u908a\u7684\u4eba\u6216\u7269\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", nextQuestion: 11 },\n          { text: \"\u5426\", nextQuestion: 10 }\n        ]\n      },\n      {\n        id: 10,\n        question: \"\u4f60\u6709\u81ea\u5df1\u57f7\u8457\u7684\u8208\u8da3\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", nextQuestion: 11 },\n          { text: \"\u5426\", nextQuestion: 12 }\n        ]\n      },\n      {\n        id: 11,\n        question: \"\u4f60\u7528\u60c5\u59cb\u7d42\u57f7\u8457\u5982\u4e00\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", result: \"C\" },\n          { text: \"\u5426\", nextQuestion: 12 }\n        ]\n      },\n      {\n        id: 12,\n        question: \"\u5f9e\u5c0f\u5230\u5927\u5468\u570d\u7684\u4eba\u90fd\u9077\u5c31\u8457\u4f60\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", result: \"A\" },\n          { text: \"\u5426\", nextQuestion: 13 }\n        ]\n      },\n      {\n        id: 13,\n        question: \"\u60f3\u8981\u7684\u6771\u897f\u5c31\u4e00\u5b9a\u8981\u5f97\u5230\u55ce\uff1f\",\n        options: [\n          { text: \"\u662f\", result: \"D\" },\n          { text: \"\u5426\", result: \"B\" }\n        ]\n      }\n    ];\n\n    const results = {\n      \"A\": {\n        title: \"\u6f5b\u610f\u8b58\u88e1\u990a\u6210\u4e86\u300c\u5f97\u4e0d\u5230\u5c31\u6436\u300d\u7684\u7fd2\u6163\",\n        description: \"\u5468\u570d\u7684\u4eba\u5c0d\u4f60\u7167\u9867\u6709\u52a0\uff0c\u53c8\u5341\u5206\u9077\u5c31\u4f60\uff0c\u990a\u6210\u4e86\u4f60\u898b\u4e0d\u5f97\u5225\u4eba\u597d\uff0c\u6703\u5c0f\u5c0f\u5730\u840c\u751f\u5ac9\u5992\u5fc3\u7406\uff0c\u9032\u800c\u53bb\u6436\u4eba\u5bb6\u6771\u897f\u7684\u7fd2\u6163\u3002\u4e0d\u7ba1\u662f\u5c0f\u6642\u5019\u7684\u73a9\u5177\uff0c\u9084\u662f\u9577\u5927\u5f8c\u7684\u670b\u53cb\uff0c\u4f60\u7e3d\u662f\u773c\u71b1\u5225\u4eba\u7684\u6771\u897f\uff0c\u537b\u5ffd\u8996\u4e86\u81ea\u5df1\u7684\u624b\u908a\u7269\u3002\u4e0d\u59a8\u56de\u5bb6\u7d30\u6578\u4e00\u4e0b\u81ea\u5df1\u6709\u5e7e\u500b\u597d\u670b\u53cb\uff0c\u6709\u591a\u5c11\u4eba\u5c0d\u4f60\u597d\uff0c\u8ddf\u4ed6\u5011\u806f\u7d61\u806f\u7d61\uff0c\u6703\u627e\u56de\u4e00\u7a2e\u7570\u6a23\u7684\u60c5\u612b\u3002\",\n        scores: {\n          \"\u4f54\u6709\u617e\": 85,\n          \"\u5ac9\u5992\u5fc3\": 78,\n          \"\u611f\u6069\u5fc3\": 35,\n          \"\u81ea\u5236\u529b\": 45\n        }\n      },\n      \"B\": {\n        title: \"\u4e5f\u8a31\u662f\u90a3\u7a2e\u300c\u5931\u6557\u4e86\u5c31\u4e0d\u8981\u4e86\u300d\u7684\u4eba\",\n        description: \"\u5468\u570d\u7684\u4eba\u7d93\u5e38\u9f13\u52f5\u4f60\uff0c\u70ba\u4f60\u589e\u52a0\u4fe1\u5fc3\uff0c\u9020\u5c31\u4e86\u4f60\u505a\u4ec0\u9ebc\u4e8b\u90fd\u4e0d\u600e\u9ebc\u5931\u6557\uff0c\u800c\u5f8c\u5c31\u8d8a\u6367\u8d8a\u9ad8\uff0c\u4f60\u88ab\u4ed6\u4eba\u4fe1\u4efb\u6709\u52a0\u3002\u5982\u679c\u4f60\u60f3\u8981\u5225\u4eba\u7684\u6771\u897f\uff0c\u901a\u5e38\u6703\u7528\u81ea\u5df1\u7684\u80fd\u529b\u53bb\u722d\u53d6\u3002\u4f46\u662f\u4eba\u5916\u6709\u4eba\uff0c\u9047\u5230\u632b\u6298\u7684\u6642\u5019\uff0c\u4f60\u5f80\u5f80\u6703\u8003\u616e\u8981\u4e0d\u8981\u518d\u6b21\u6311\u6230\u3002\u5931\u6557\u7684\u7d93\u9a57\u6703\u8b93\u4f60\u5931\u53bb\u5c0d\u8ffd\u6c42\u7684\u4e8b\u7269\u7684\u8208\u8da3\uff0c\u6240\u4ee5\u5e73\u65e5\u88e1\u591a\u70ba\u81ea\u5df1\u88fd\u9020\u5047\u60f3\u6575\uff0c\u8b93\u81ea\u5df1\u7684\u5fc3\u7406\u627f\u53d7\u529b\u518d\u7d93\u53d7\u66f4\u5f37\u7684\u78e8\u7149\u3002\",\n        scores: {\n          \"\u4f54\u6709\u617e\": 50,\n          \"\u5ac9\u5992\u5fc3\": 40,\n          \"\u611f\u6069\u5fc3\": 65,\n          \"\u81ea\u5236\u529b\": 70\n        }\n      },\n      \"C\": {\n        title: \"\u300c\u541b\u5b50\u5831\u4ec7\u5341\u5e74\u4e0d\u665a\u300d\uff0c\u8aaa\u7684\u53ef\u80fd\u5c31\u662f\u4f60\",\n        description: \"\u4f60\u7fd2\u6163\u65bc\u81ea\u5df1\u7684\u4e8b\u60c5\u81ea\u5df1\u89e3\u6c7a\uff0c\u4e0d\u8981\u5225\u4eba\u63d2\u624b\u3002\u559c\u6b61\u7684\u6771\u897f\u5f97\u4e0d\u5230\uff0c\u53ea\u662f\u56e0\u70ba\u81ea\u5df1\u73fe\u5728\u80fd\u529b\u4e0d\u5920\uff0c\u4f60\u5c0d\u81ea\u5df1\u6bcf\u968e\u6bb5\u7684\u80fd\u529b\u90fd\u6709\u5341\u5398\u6e05\u695a\u7684\u8a8d\u8b58\uff0c\u7e3d\u662f\u70ba\u4e86\u8981\u9054\u5230\u76ee\u7684\u800c\u4e0d\u65b7\u5730\u63d0\u6607\u81ea\u5df1\u7684\u80fd\u529b\u3002\u9577\u6642\u9593\u7684\u7a4d\u6fb1\u53ea\u6703\u8b93\u4f60\u5c0d\u6240\u8ffd\u6c42\u7684\u4e8b\u7269\u6709\u66f4\u6e05\u695a\u7684\u8a8d\u8b58\uff0c\u4e0d\u904e\u4f60\u559c\u6b61\u7684\u4e00\u5b9a\u662f\u597d\u6771\u897f\uff0c\u96e3\u4fdd\u4e0d\u6703\u6709\u7b2c\u4e09\u500b\u3001\u7b2c\u56db\u500b\u4eba\u4f86\u6436\uff0c\u5728\u81ea\u5df1\u9084\u6c92\u4e0b\u624b\u4e4b\u524d\uff0c\u8981\u770b\u4f4f\u54e6\u3002\",\n        scores: {\n          \"\u4f54\u6709\u617e\": 65,\n          \"\u5ac9\u5992\u5fc3\": 45,\n          \"\u611f\u6069\u5fc3\": 60,\n          \"\u81ea\u5236\u529b\": 85\n        }\n      },\n      \"D\": {\n        title: \"\u76f8\u4fe1\u300c\u6709\u9322\u80fd\u4f7f\u9b3c\u63a8\u78e8\u300d\u9019\u53e5\u8a71\",\n        description: \"\u751f\u6d3b\u7269\u8cea\u7368\u7acb\u7684\u4f60\u6703\u76f8\u4fe1\u300c\u6709\u9322\u80fd\u4f7f\u9b3c\u63a8\u78e8\u300d\u9019\u53e5\u8a71\u3002\u4f60\u5c0d\u65bc\u81ea\u5df1\u559c\u6b61\u7684\u6771\u897f\u4f54\u6709\u6b32\u975e\u5e38\u5f37\uff0c\u800c\u4ee5\u4f60\u4ee5\u5f80\u7684\u7d93\u9a57\uff0c\u8981\u5f97\u5230\u4ed6\u5011\u5c31\u5fc5\u9808\u8981\u6709\u5f37\u5927\u7684\u529b\u91cf\uff0c\u6240\u4ee5\u4f60\u7e3d\u662f\u52d5\u7528\u9019\u4e9b\u529b\u91cf\u4f86\u5f97\u5230\uff0c\u800c\u5ffd\u7565\u4e86\u52d5\u4e4b\u4ee5\u60c5\uff0c\u66c9\u4e4b\u4ee5\u7406\u3002\u5207\u8a18\uff1a\u4e0d\u7ba1\u5c0d\u4eba\u5c0d\u7269\uff0c\u90fd\u9700\u8981\u52d5\u7528\u81ea\u5df1\u7684\u60c5\u611f\uff0c\u5982\u679c\u50c5\u50c5\u7528\u7269\u8cea\u53bb\u89e3\u6c7a\uff0c\u6703\u5f97\u5230\u53cd\u6548\u679c\u3002\",\n        scores: {\n          \"\u4f54\u6709\u617e\": 90,\n          \"\u5ac9\u5992\u5fc3\": 70,\n          \"\u611f\u6069\u5fc3\": 40,\n          \"\u81ea\u5236\u529b\": 50\n        }\n      }\n    };\n    \n    \/\/ \u8ffd\u8e2a\u7576\u524d\u554f\u984c\u548c\u7e3d\u984c\u6578\n    let currentQuestionId = 1;\n    let totalQuestions = 13;\n    \n    \/\/ \u521d\u59cb\u5316\u6e2c\u9a57\n    const init = () => {\n      document.getElementById('dt-start-btn').addEventListener('click', startQuiz);\n      document.getElementById('dt-restart-btn').addEventListener('click', restartQuiz);\n    };\n    \n    \/\/ \u958b\u59cb\u6e2c\u9a57\n    const startQuiz = () => {\n      showPage('dt-quiz-page');\n      renderQuestion(currentQuestionId);\n      updateProgress();\n    };\n    \n    \/\/ \u91cd\u65b0\u958b\u59cb\u6e2c\u9a57\n    const restartQuiz = () => {\n      currentQuestionId = 1;\n      showPage('dt-intro-page');\n    };\n    \n    \/\/ \u986f\u793a\u6307\u5b9a\u9801\u9762\n    const showPage = (pageId) => {\n      document.querySelectorAll('.dt-page').forEach(page => {\n        page.classList.remove('dt-active');\n      });\n      document.getElementById(pageId).classList.add('dt-active');\n    };\n    \n    \/\/ \u6e32\u67d3\u7576\u524d\u554f\u984c\n    const renderQuestion = (questionId) => {\n      const question = questions.find(q => q.id === questionId);\n      if (!question) return;\n      \n      const container = document.getElementById('dt-questions-container');\n      container.innerHTML = '';\n      \n      const questionElement = document.createElement('div');\n      questionElement.className = 'dt-question';\n      \n      const titleElement = document.createElement('h3');\n      titleElement.className = 'dt-question-title';\n      titleElement.textContent = question.question;\n      questionElement.appendChild(titleElement);\n      \n      const optionsElement = document.createElement('div');\n      optionsElement.className = 'dt-options';\n      \n      question.options.forEach((option, index) => {\n        const optionElement = document.createElement('div');\n        optionElement.className = 'dt-option';\n        optionElement.textContent = option.text;\n        optionElement.addEventListener('click', () => {\n          selectOption(option, index);\n        });\n        optionsElement.appendChild(optionElement);\n      });\n      \n      questionElement.appendChild(optionsElement);\n      container.appendChild(questionElement);\n      \n      \/\/ \u6de1\u5165\u6548\u679c\n      setTimeout(() => {\n        questionElement.classList.add('dt-visible');\n      }, 10);\n    };\n    \n    \/\/ \u9078\u64c7\u9078\u9805\n    const selectOption = (option, optionIndex) => {\n      \/\/ \u6a19\u8a18\u9078\u4e2d\u7684\u9078\u9805\n      document.querySelectorAll('.dt-option').forEach(opt => {\n        opt.classList.remove('dt-selected');\n      });\n      \n      const selectedOption = document.querySelectorAll('.dt-option')[optionIndex];\n      if (selectedOption) {\n        selectedOption.classList.add('dt-selected');\n      }\n      \n      \/\/ \u5ef6\u9072\u5f8c\u9032\u5165\u4e0b\u4e00\u984c\u6216\u986f\u793a\u7d50\u679c\n      setTimeout(() => {\n        if (option.result) {\n          showResult(option.result);\n        } else if (option.nextQuestion) {\n          currentQuestionId = option.nextQuestion;\n          renderQuestion(currentQuestionId);\n          updateProgress();\n        }\n      }, 500);\n    };\n    \n    \/\/ \u66f4\u65b0\u9032\u5ea6\u689d\n    const updateProgress = () => {\n      const progressFill = document.getElementById('dt-progress-fill');\n      const progressText = document.getElementById('dt-progress-text');\n      \n      \/\/ \u8a08\u7b97\u9032\u5ea6 - \u4f7f\u7528\u7576\u524d\u554f\u984c\u9664\u4ee5\u7e3d\u984c\u6578\n      const progress = (currentQuestionId \/ totalQuestions) * 100;\n      progressFill.style.width = `${progress}%`;\n      progressText.textContent = `\u554f\u984c ${currentQuestionId}\/${totalQuestions}`;\n    };\n    \n    \/\/ \u986f\u793a\u6e2c\u9a57\u7d50\u679c\n    const showResult = (resultKey) => {\n      const result = results[resultKey];\n      if (!result) return;\n      \n      \/\/ \u8a2d\u7f6e\u7d50\u679c\u6a19\u984c\u548c\u5167\u5bb9\n      document.getElementById('dt-result-content').innerHTML = `\n        <div class=\"dt-result-type\">${result.title}<\/div>\n        <div class=\"dt-result-description\">${result.description}<\/div>\n      `;\n      \n      \/\/ \u986f\u793a\u7d50\u679c\u9801\n      showPage('dt-result-page');\n      \n      \/\/ \u5275\u5efa\u7d50\u679c\u5716\u8868\n      setTimeout(() => {\n        createResultChart(result.scores);\n      }, 300);\n    };\n    \n    \/\/ \u5275\u5efa\u7d50\u679c\u5716\u8868\n    const createResultChart = (scores) => {\n      const ctx = document.getElementById('dt-result-chart').getContext('2d');\n      \n      \/\/ \u5982\u679c\u5df2\u5b58\u5728\u5716\u8868\uff0c\u92b7\u6bc0\u5b83\n      if (window.resultChart) {\n        window.resultChart.destroy();\n      }\n      \n      \/\/ \u6e96\u5099\u6578\u64da\n      const labels = Object.keys(scores);\n      const data = Object.values(scores);\n      \n      \/\/ \u5275\u5efa\u689d\u5f62\u5716\n      window.resultChart = new Chart(ctx, {\n        type: 'bar',\n        data: {\n          labels: labels,\n          datasets: [{\n            label: '\u5fc3\u7406\u7279\u8cea\u5206\u6790',\n            data: data,\n            backgroundColor: [\n              'rgba(123, 31, 162, 0.7)',\n              'rgba(156, 39, 176, 0.7)',\n              'rgba(186, 104, 200, 0.7)',\n              'rgba(206, 147, 216, 0.7)'\n            ],\n            borderColor: [\n              'rgba(123, 31, 162, 1)',\n              'rgba(156, 39, 176, 1)',\n              'rgba(186, 104, 200, 1)',\n              'rgba(206, 147, 216, 1)'\n            ],\n            borderWidth: 1\n          }]\n        },\n        options: {\n          responsive: true,\n          maintainAspectRatio: false,\n          scales: {\n            y: {\n              beginAtZero: true,\n              max: 100,\n              ticks: {\n                callback: function(value) {\n                  return value + '%';\n                }\n              }\n            }\n          },\n          plugins: {\n            tooltip: {\n              callbacks: {\n                label: function(context) {\n                  return context.dataset.label + ': ' + context.raw + '%';\n                }\n              }\n            }\n          },\n          animation: {\n            duration: 1500\n          }\n        }\n      });\n    };\n    \n    \/\/ \u8fd4\u56de\u516c\u958b\u7684\u65b9\u6cd5\n    return {\n      init: init\n    };\n  })();\n  \n  \/\/ \u521d\u59cb\u5316\u6e2c\u9a57\n  DesireTest.init();\n});\n<\/script>","protected":false},"excerpt":{"rendered":"<p>\u4eba\u5bb6\u7684\u7537\u670b\u53cb\u597d\uff0c\u4eba\u5bb6\u7684\u8863\u670d\u597d\u770b\uff0c\u4eba\u5bb6\u8fc7\u5f97\u6bd4\u6211\u5e78\u798f\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u4eba\u7684\u6b32\u671b\u5c31\u50cf\u4e2a\u65e0\u5e95\u6d1e\u3002\u5982\u679c\u4f60\u78b0\u5230\u8fd9\u79cd\u60c5\u51b5\uff0c\u5f97\u4e0d\u5230\u53c8\u5f88\u60f3\u8981\uff0c\u4f60\u4f1a\u62a2\u5417\uff1f\u4e0b\u9762\u8fd9\u4e9b\u9898\u4f1a\u544a\u8bc9\u4f60\u7b54\u6848\u3002<\/p>","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"narrow-width-container","site-content-style":"unboxed","site-sidebar-style":"default","ast-global-header-display":"disabled","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":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","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":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[167],"tags":[],"class_list":["post-3155","post","type-post","status-publish","format-standard","hentry","category-personality"],"_links":{"self":[{"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/posts\/3155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/comments?post=3155"}],"version-history":[{"count":4,"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/posts\/3155\/revisions"}],"predecessor-version":[{"id":9525,"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/posts\/3155\/revisions\/9525"}],"wp:attachment":[{"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/media?parent=3155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/categories?post=3155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinliceyan.org\/zh\/wp-json\/wp\/v2\/tags?post=3155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}