index.vue 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017
  1. <template>
  2. <div class="home-content-stack">
  3. <section class="home-section home-guide">
  4. <div class="home-guide-inner">
  5. <div class="home-guide-heading">
  6. <div class="home-guide-title">3 步接入,5 分钟上手</div>
  7. <div class="home-guide-subtitle">MCP 协议 / CLI 命令行一键接入,共用一套 Token</div>
  8. </div>
  9. <div class="home-guide-timeline">
  10. <div class="home-guide-timeline-item">
  11. <div class="home-guide-timeline-dot">1</div>
  12. <div class="home-guide-timeline-name">获取 Token</div>
  13. <div class="home-guide-timeline-desc">生成访问令牌</div>
  14. </div>
  15. <div class="home-guide-timeline-line home-guide-timeline-line-1"></div>
  16. <div class="home-guide-timeline-item">
  17. <div class="home-guide-timeline-dot">2</div>
  18. <div class="home-guide-timeline-name">选择 AI 工具</div>
  19. <div class="home-guide-timeline-desc">MCP 一键接入/CLI命令行接入</div>
  20. </div>
  21. <div class="home-guide-timeline-line home-guide-timeline-line-2"></div>
  22. <div class="home-guide-timeline-item">
  23. <div class="home-guide-timeline-dot">3</div>
  24. <div class="home-guide-timeline-name">验证接入</div>
  25. <div class="home-guide-timeline-desc">发送问题验证接入是否成功</div>
  26. </div>
  27. </div>
  28. <div class="home-guide-block home-guide-block-token">
  29. <div class="home-guide-block-head">
  30. <div class="home-guide-block-num">1</div>
  31. <div class="home-guide-block-copy">
  32. <div class="home-guide-block-title">获取 Token</div>
  33. <div class="home-guide-block-desc">登录平台后生成访问令牌,适用于 MCP 协议与 CLI 接入</div>
  34. </div>
  35. <div class="home-guide-token">
  36. <div v-if="guideToken" class="home-guide-token-bar">
  37. <span class="home-guide-token-tag">Bearer</span>
  38. <span class="home-guide-token-value">
  39. <template v-if="guideTokenVisible">{{ guideToken }}</template>
  40. <template v-else>
  41. <span>{{ guideTokenMasked.head }}</span><span class="home-guide-token-mask">{{
  42. guideTokenMasked.middle }}</span><span>{{ guideTokenMasked.tail }}</span>
  43. </template>
  44. </span>
  45. <div class="home-guide-token-icons">
  46. <icon-svg :name="guideTokenVisible ? 'eye_not_displayed' : 'eye_show'" size="24px"
  47. class="home-guide-token-icon" @click="guideTokenVisible = !guideTokenVisible" />
  48. <icon-svg name="http_copy" size="14px" class="home-guide-token-icon" @click="copyText(`Bearer ${guideToken}`)" />
  49. </div>
  50. </div>
  51. <button
  52. v-else
  53. type="button"
  54. class="home-guide-token-btn"
  55. @click="createToken"
  56. >
  57. <icon-svg name="gain_token" size="14px" class="home-guide-token-btn-icon" />
  58. <span>获取 Token</span>
  59. </button>
  60. </div>
  61. </div>
  62. <div class="home-guide-features">
  63. <div class="home-guide-feature">
  64. <icon-svg name="Mcp_general" size="38px" />
  65. <div>
  66. <div class="home-guide-feature-title">MCP 通用配置</div>
  67. <div class="home-guide-feature-desc">3 个 Server 共用同一套 Token</div>
  68. </div>
  69. </div>
  70. <div class="home-guide-feature">
  71. <icon-svg name="token_general" size="38px" />
  72. <div>
  73. <div class="home-guide-feature-title">一套 Token 通用</div>
  74. <div class="home-guide-feature-desc">MCP 客户端与 CLI 命令行均使用同一令牌</div>
  75. </div>
  76. </div>
  77. <div class="home-guide-feature">
  78. <icon-svg name="Core_scenario" size="38px" />
  79. <div>
  80. <div class="home-guide-feature-title">覆盖环境知识核心场景</div>
  81. <div class="home-guide-feature-desc">环境法规检索 / 标准导则查询 / 政策问答</div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="home-guide-block home-guide-block-tools">
  87. <div class="home-guide-block-head">
  88. <div class="home-guide-block-num">2</div>
  89. <div class="home-guide-block-copy">
  90. <div class="home-guide-block-title">选择你的 AI 工具并复制配置</div>
  91. <div class="home-guide-block-desc">推荐使用 WorkBuddy 一键接入</div>
  92. </div>
  93. </div>
  94. <div class="home-guide-access-tabs">
  95. <button type="button" class="home-guide-access-tab" :class="{ 'is-active': guideAccessTab === 'mcp' }"
  96. @click="guideAccessTab = 'mcp'">
  97. MCP 接入
  98. </button>
  99. <button type="button" class="home-guide-access-tab" :class="{ 'is-active': guideAccessTab === 'cli' }"
  100. @click="guideAccessTab = 'cli'">
  101. CLI 命令行接入
  102. </button>
  103. </div>
  104. <div class="home-guide-tool-panel">
  105. <template v-if="guideAccessTab === 'mcp'">
  106. <div class="home-guide-tool-tabs">
  107. <button v-for="tool in guideTools" :key="tool.key" type="button" class="home-guide-tool-tab"
  108. :class="{ 'is-active': guideToolTab === tool.key }" @click="guideToolTab = tool.key">
  109. <icon-svg :name="tool.iconName" size="20px" class="home-guide-tool-tab-icon" />
  110. <span>{{ tool.label }}</span>
  111. </button>
  112. </div>
  113. <div v-if="guideToolTab === 'workbuddy'" class="home-guide-tool-body">
  114. <div class="home-guide-tool-steps">
  115. <div class="home-guide-tool-step">
  116. <div class="home-guide-tool-step-num">1</div>
  117. <div class="home-guide-tool-step-copy">
  118. <div class="home-guide-tool-step-title">自定义 MCP 配置</div>
  119. <div class="home-guide-tool-step-desc">
  120. 复制右侧 JSON → 对话框发送「这是环评云助手的 MCP 服务 JSON,帮我配置自定义的 mcp」并粘贴
  121. </div>
  122. </div>
  123. </div>
  124. <div class="home-guide-tool-step">
  125. <div class="home-guide-tool-step-num">2</div>
  126. <div class="home-guide-tool-step-copy">
  127. <div class="home-guide-tool-step-title">验证接入是否成功</div>
  128. <div class="home-guide-tool-step-desc">
  129. 在对话中发送「用环评云助手MCP检索《陶瓷工业大气污染物排放标准》对氮氧化物的分级控制要求」
  130. </div>
  131. </div>
  132. </div>
  133. <div class="home-guide-note">
  134. <div class="home-guide-note-head">
  135. <div class="home-guide-note-icon-box">
  136. <icon-svg name="WorkBuddy_attention" size="12px" class="home-guide-note-icon" />
  137. </div>
  138. <div class="home-guide-note-title">注意事项</div>
  139. </div>
  140. <ul class="home-guide-note-list">
  141. <li>自定义接入时 type 字段为 streamableHttp(H 大写)</li>
  142. <li>不需要在 URL 末尾添加 /mcp 后缀</li>
  143. <li>{{ guideToken ? "JSON 配置文件已自动填入真实 Token" : "将 YOUR_ACCESS_TOKEN 替换为真实 Token" }}</li>
  144. <li>若工具未立即出现,完全退出并重新打开 WorkBuddy 后再验证</li>
  145. </ul>
  146. </div>
  147. </div>
  148. <div class="home-guide-workbuddy-right">
  149. <div class="home-guide-workbuddy-carousel">
  150. <div
  151. class="home-guide-workbuddy-track"
  152. :style="{ transform: `translateX(-${workbuddySlideIndex * 100}%)` }"
  153. >
  154. <div class="home-guide-workbuddy-slide home-guide-workbuddy-slide--code">
  155. <div class="home-guide-code">
  156. <div class="home-guide-code-bar">
  157. <div class="home-guide-code-dots">
  158. <span></span>
  159. <span></span>
  160. <span></span>
  161. </div>
  162. <div class="home-guide-code-title">mcp.prompt</div>
  163. <button type="button" class="home-guide-code-copy" @click="copyGuideMcpJson">
  164. <icon-svg name="copy_icon_white" size="14px" class="home-guide-code-copy-icon" />
  165. <span>复制</span>
  166. </button>
  167. </div>
  168. <div class="home-guide-code-body">
  169. <div class="home-guide-code-lines">
  170. <span v-for="line in guideWorkbuddyMcpLines" :key="line">{{ line }}</span>
  171. </div>
  172. <pre class="home-guide-code-pre" v-html="guideWorkbuddyMcpJsonHtml"></pre>
  173. </div>
  174. </div>
  175. </div>
  176. <div class="home-guide-workbuddy-slide home-guide-workbuddy-slide--img">
  177. <img
  178. src="@/assets/images/WorkBuddy_img.png"
  179. alt="WorkBuddy 配置示意"
  180. class="home-guide-workbuddy-img"
  181. />
  182. </div>
  183. </div>
  184. <button
  185. type="button"
  186. class="home-guide-workbuddy-arrow is-prev"
  187. aria-label="上一张"
  188. @click="setWorkbuddySlide(workbuddySlideIndex - 1)"
  189. >
  190. </button>
  191. <button
  192. type="button"
  193. class="home-guide-workbuddy-arrow is-next"
  194. aria-label="下一张"
  195. @click="setWorkbuddySlide(workbuddySlideIndex + 1)"
  196. >
  197. </button>
  198. <div class="home-guide-workbuddy-indicators">
  199. <button
  200. v-for="(_, index) in 2"
  201. :key="index"
  202. type="button"
  203. class="home-guide-workbuddy-dot"
  204. :class="{ 'is-active': workbuddySlideIndex === index }"
  205. :aria-label="`切换到第 ${index + 1} 张`"
  206. @click="setWorkbuddySlide(index)"
  207. />
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. <div v-else-if="guideToolTab === 'doubao'" class="home-guide-tool-body home-guide-doubao-body">
  213. <div class="home-guide-ima-left">
  214. <div class="home-guide-ima-alert">
  215. <icon-svg name="ima_wps_warning" size="16px" class="home-guide-ima-alert-icon" />
  216. <div class="home-guide-ima-alert-text">
  217. {{ guideDoubaoContent.alert }}
  218. </div>
  219. </div>
  220. <div class="home-guide-ima-steps">
  221. <div v-for="step in guideDoubaoContent.steps" :key="step.num" class="home-guide-ima-step">
  222. <div class="home-guide-ima-step-num">{{ step.num }}</div>
  223. <div class="home-guide-ima-step-title">{{ step.title }}</div>
  224. </div>
  225. </div>
  226. <div class="home-guide-ima-notes">
  227. <div class="home-guide-ima-notes-title">注意事项</div>
  228. <ul class="home-guide-ima-notes-list">
  229. <li v-for="(item, index) in guideDoubaoNotes" :key="index">
  230. {{ item }}
  231. </li>
  232. </ul>
  233. </div>
  234. </div>
  235. <div class="home-guide-doubao-right">
  236. <div class="home-guide-doubao-form">
  237. <div class="home-guide-doubao-form-head">
  238. <div class="home-guide-doubao-form-title">编辑自定义连接器</div>
  239. <div class="home-guide-doubao-form-sub">自定义连接器仅支持在本地电脑中使用</div>
  240. </div>
  241. <div class="home-guide-doubao-form-row">
  242. <div class="home-guide-doubao-form-field">
  243. <div class="home-guide-doubao-form-label">
  244. 服务器名称 <span class="is-required">*</span>
  245. </div>
  246. <div class="home-guide-doubao-form-select" @click.stop>
  247. <div
  248. class="home-guide-doubao-form-input"
  249. :class="{ 'is-open': doubaoSelectOpen }"
  250. @click="toggleDoubaoSelect"
  251. >
  252. <span>{{ doubaoServerName }}</span>
  253. <div class="home-guide-doubao-form-icons">
  254. <button
  255. type="button"
  256. class="home-guide-doubao-form-copy"
  257. @click.stop="copyText(doubaoServerName)"
  258. >
  259. <icon-svg name="http_copy" size="16px" />
  260. </button>
  261. <icon-svg name="icon_arrow_server" size="12px" class="home-guide-doubao-form-arrow" />
  262. </div>
  263. </div>
  264. <Transition name="home-guide-doubao-dropdown">
  265. <div v-if="doubaoSelectOpen" class="home-guide-doubao-form-dropdown">
  266. <button
  267. v-for="item in doubaoServerList"
  268. :key="item.id"
  269. type="button"
  270. class="home-guide-doubao-form-option"
  271. :class="{ 'is-active': String(item.id) === doubaoSelectedId }"
  272. @click="selectDoubaoServer(item)"
  273. >
  274. {{ item.name }}
  275. </button>
  276. </div>
  277. </Transition>
  278. </div>
  279. </div>
  280. <div class="home-guide-doubao-form-field home-guide-doubao-form-field--type">
  281. <div class="home-guide-doubao-form-label">传输类型</div>
  282. <div class="home-guide-doubao-form-input">HTTP</div>
  283. </div>
  284. </div>
  285. <div class="home-guide-doubao-form-field">
  286. <div class="home-guide-doubao-form-label">
  287. 服务器 URL <span class="is-required">*</span>
  288. </div>
  289. <div class="home-guide-doubao-form-input">
  290. <span>{{ doubaoServerUrl }}</span>
  291. <button
  292. type="button"
  293. class="home-guide-doubao-form-copy"
  294. @click="copyText(doubaoServerUrl)"
  295. >
  296. <icon-svg name="http_copy" size="16px" />
  297. </button>
  298. </div>
  299. </div>
  300. <div class="home-guide-doubao-form-field">
  301. <div class="home-guide-doubao-form-label">自定义 Headers</div>
  302. <div class="home-guide-doubao-form-headers">
  303. <div class="home-guide-doubao-form-input">
  304. <span>Authorization</span>
  305. <button
  306. type="button"
  307. class="home-guide-doubao-form-copy"
  308. @click="copyText('Authorization')"
  309. >
  310. <icon-svg name="http_copy" size="16px" />
  311. </button>
  312. </div>
  313. <button
  314. v-if="!guideToken"
  315. type="button"
  316. class="home-guide-doubao-form-token"
  317. @click="createToken"
  318. >
  319. 点击获取token
  320. </button>
  321. <div v-else class="home-guide-doubao-form-input home-guide-doubao-form-token-value">
  322. <span>
  323. <template v-if="guideTokenVisible">{{ guideToken }}</template>
  324. <template v-else>{{ guideTokenMasked.head }}{{ guideTokenMasked.middle }}{{ guideTokenMasked.tail }}</template>
  325. </span>
  326. <button
  327. type="button"
  328. class="home-guide-doubao-form-copy"
  329. @click="guideTokenVisible = !guideTokenVisible"
  330. >
  331. <icon-svg
  332. :name="guideTokenVisible ? 'eye_not_displayed' : 'eye_show'"
  333. size="24px"
  334. />
  335. </button>
  336. <button
  337. type="button"
  338. class="home-guide-doubao-form-copy"
  339. @click="copyText(`Bearer ${guideToken}`)"
  340. >
  341. <icon-svg name="http_copy" size="16px" />
  342. </button>
  343. </div>
  344. </div>
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <div v-else-if="guideToolTab === 'qianwen'" class="home-guide-tool-body">
  350. <div class="home-guide-tool-steps">
  351. <div class="home-guide-tool-step">
  352. <div class="home-guide-tool-step-num">1</div>
  353. <div class="home-guide-tool-step-copy">
  354. <div class="home-guide-tool-step-title">打开配置入口</div>
  355. <div class="home-guide-tool-step-desc">
  356. 左侧「扩展」→「连接器」→ 右上角「+ 添加」→「粘贴 JSON 配置」
  357. </div>
  358. </div>
  359. </div>
  360. <div class="home-guide-tool-step">
  361. <div class="home-guide-tool-step-num">2</div>
  362. <div class="home-guide-tool-step-copy">
  363. <div class="home-guide-tool-step-title">粘贴 MCP 配置</div>
  364. <div class="home-guide-tool-step-desc">
  365. 在「通过 JSON 导入」对话框粘贴右侧全量 JSON → 点击「导入」
  366. </div>
  367. </div>
  368. </div>
  369. <div class="home-guide-note">
  370. <div class="home-guide-note-head">
  371. <div class="home-guide-note-icon-box">
  372. <icon-svg name="WorkBuddy_attention" size="12px" class="home-guide-note-icon" />
  373. </div>
  374. <div class="home-guide-note-title">注意事项</div>
  375. </div>
  376. <ul class="home-guide-note-list">
  377. <li>{{ guideToken ? "JSON 配置文件已自动填入真实 Token" : "将 YOUR_ACCESS_TOKEN 替换为页面「获取 Token」生成的真实 Token" }}</li>
  378. <li>导入后可在「连接器 → 已安装」查看安装状态</li>
  379. </ul>
  380. </div>
  381. </div>
  382. <div class="home-guide-code">
  383. <div class="home-guide-code-bar">
  384. <div class="home-guide-code-dots">
  385. <span></span>
  386. <span></span>
  387. <span></span>
  388. </div>
  389. <div class="home-guide-code-title">mcp.json</div>
  390. <button type="button" class="home-guide-code-copy" @click="copyGuideMcpJson">
  391. <icon-svg name="copy_icon_white" size="14px" class="home-guide-code-copy-icon" />
  392. <span>复制</span>
  393. </button>
  394. </div>
  395. <div class="home-guide-code-body">
  396. <div class="home-guide-code-lines">
  397. <span v-for="line in guideMcpLines" :key="line">{{ line }}</span>
  398. </div>
  399. <pre class="home-guide-code-pre" v-html="guideMcpJsonHtml"></pre>
  400. </div>
  401. </div>
  402. </div>
  403. <div v-else-if="guideToolTab === 'qoderwork'" class="home-guide-tool-body">
  404. <div class="home-guide-tool-steps">
  405. <div class="home-guide-tool-step">
  406. <div class="home-guide-tool-step-num">1</div>
  407. <div class="home-guide-tool-step-copy">
  408. <div class="home-guide-tool-step-title">打开配置入口</div>
  409. <div class="home-guide-tool-step-desc">
  410. 左侧「扩展」→「连接器」→ 右上角「+ 添加」→「粘贴 JSON 配置」→ 在「通过 JSON 导入」对话框粘贴下方全量 JSON → 点击「导入」
  411. </div>
  412. </div>
  413. </div>
  414. <div class="home-guide-tool-step">
  415. <div class="home-guide-tool-step-num">2</div>
  416. <div class="home-guide-tool-step-copy">
  417. <div class="home-guide-tool-step-title">粘贴 MCP 配置</div>
  418. <div class="home-guide-tool-step-desc">
  419. 将右侧「配置」中的 JSON 粘贴到客户端对应位置并保存
  420. </div>
  421. </div>
  422. </div>
  423. <div class="home-guide-tool-step">
  424. <div class="home-guide-tool-step-num">3</div>
  425. <div class="home-guide-tool-step-copy">
  426. <div class="home-guide-tool-step-title">配置文件位置</div>
  427. <div class="home-guide-tool-step-desc">
  428. macOS:~/.qoderwork/mcp.json Windows:C:\Users\用户名\.qoderwork\mcp.json
  429. </div>
  430. </div>
  431. </div>
  432. <div class="home-guide-note">
  433. <div class="home-guide-note-head">
  434. <div class="home-guide-note-icon-box">
  435. <icon-svg name="WorkBuddy_attention" size="12px" class="home-guide-note-icon" />
  436. </div>
  437. <div class="home-guide-note-title">注意事项</div>
  438. </div>
  439. <ul class="home-guide-note-list">
  440. <li>type 字段为 "streamableHttp"(H 大写),与 WorkBuddy 一致</li>
  441. <li>不需要在 URL 末尾添加 /mcp 后缀</li>
  442. <li>{{ guideToken ? "JSON 配置文件已自动填入真实 Token" : "将 YOUR_ACCESS_TOKEN 替换为页面「获取 Token」生成的真实 Token" }}</li>
  443. <li>导入后可在「连接器 → 已安装」查看状态;改配置后需完全退出并重启 QoderWork</li>
  444. </ul>
  445. </div>
  446. </div>
  447. <div class="home-guide-code">
  448. <div class="home-guide-code-bar">
  449. <div class="home-guide-code-dots">
  450. <span></span>
  451. <span></span>
  452. <span></span>
  453. </div>
  454. <div class="home-guide-code-title">mcp.json</div>
  455. <button type="button" class="home-guide-code-copy" @click="copyGuideMcpJson">
  456. <icon-svg name="copy_icon_white" size="14px" class="home-guide-code-copy-icon" />
  457. <span>复制</span>
  458. </button>
  459. </div>
  460. <div class="home-guide-code-body">
  461. <div class="home-guide-code-lines">
  462. <span v-for="line in guideMcpLines" :key="line">{{ line }}</span>
  463. </div>
  464. <pre class="home-guide-code-pre" v-html="guideMcpJsonHtml"></pre>
  465. </div>
  466. </div>
  467. </div>
  468. <div v-else-if="guideToolTab === 'wps'" class="home-guide-tool-body home-guide-ima-body">
  469. <div class="home-guide-ima-left">
  470. <div class="home-guide-ima-alert">
  471. <icon-svg name="ima_wps_warning" size="16px" class="home-guide-ima-alert-icon" />
  472. <div class="home-guide-ima-alert-text">
  473. {{ guideWpsContent.alert }}
  474. </div>
  475. </div>
  476. <div class="home-guide-ima-steps">
  477. <div v-for="step in guideWpsContent.steps" :key="step.num" class="home-guide-ima-step">
  478. <div class="home-guide-ima-step-num">{{ step.num }}</div>
  479. <div class="home-guide-ima-step-title">{{ step.title }}</div>
  480. </div>
  481. </div>
  482. <div class="home-guide-ima-notes">
  483. <div class="home-guide-ima-notes-title">注意事项</div>
  484. <ul class="home-guide-ima-notes-list">
  485. <li v-for="item in guideWpsContent.notes" :key="item">
  486. {{ item }}
  487. </li>
  488. </ul>
  489. </div>
  490. </div>
  491. <div class="home-guide-ima-right">
  492. <div class="home-guide-ima-panel home-guide-ima-panel--config">
  493. <div class="home-guide-ima-panel-title">【配置】</div>
  494. <div v-for="line in guideWpsContent.configLines" :key="line" class="home-guide-ima-panel-line">
  495. {{ line }}
  496. </div>
  497. </div>
  498. <div class="home-guide-ima-panel home-guide-ima-panel--verify">
  499. <div class="home-guide-ima-panel-title">【验证】</div>
  500. <div class="home-guide-ima-panel-hint">
  501. {{ guideWpsContent.verifyIntro }}
  502. </div>
  503. <div class="home-guide-ima-quote">{{ guideWpsContent.verifyQuote }}</div>
  504. <div class="home-guide-ima-panel-hint">
  505. {{ guideWpsContent.verifyResult }}
  506. </div>
  507. <div class="home-guide-ima-check">
  508. <span class="home-guide-ima-check-marks">
  509. <span>√</span>
  510. <span>√</span>
  511. </span>
  512. <span class="home-guide-ima-check-text">{{ guideWpsContent.verifyCheck }}</span>
  513. </div>
  514. </div>
  515. </div>
  516. </div>
  517. </template>
  518. <template v-else>
  519. <div class="home-guide-cli-body">
  520. <div class="home-guide-cli-head">
  521. <icon-svg name="systemLogoCircle" size="38px" class="home-guide-cli-logo-icon" />
  522. <div class="home-guide-cli-head-copy">
  523. <div class="home-guide-cli-name">
  524. <span class="home-guide-cli-pkg">hpyzs-mcp</span>
  525. <span class="home-guide-cli-sep">·</span>
  526. <span class="home-guide-cli-alias">环评云助手命令行工具</span>
  527. </div>
  528. <div class="home-guide-cli-tip">npm 全局安装 · 纯命令行执行 · 结果为原始 JSON</div>
  529. </div>
  530. </div>
  531. <div class="home-guide-cli-steps-title">接入步骤</div>
  532. <div class="home-guide-cli-steps">
  533. <div v-for="step in guideCliSteps" :key="step.num" class="home-guide-cli-step">
  534. <div class="home-guide-cli-step-num">{{ step.num }}</div>
  535. <div class="home-guide-cli-step-copy">
  536. <div class="home-guide-cli-step-title">{{ step.title }}</div>
  537. <div class="home-guide-cli-step-desc">{{ step.desc }}</div>
  538. </div>
  539. </div>
  540. </div>
  541. <div class="home-guide-cli-panel">
  542. <div class="home-guide-cli-list">
  543. <div v-for="command in guideCliCommands" :key="command.label" class="home-guide-cli-command">
  544. <div class="home-guide-cli-command-main">
  545. <div class="home-guide-cli-command-label">
  546. <span class="home-guide-cli-command-dot"></span>
  547. <span>{{ command.label }}</span>
  548. </div>
  549. <code class="home-guide-cli-command-text">{{ command.text }}</code>
  550. </div>
  551. <button type="button" class="home-guide-cli-command-copy" @click="copyText(command.text)">
  552. <icon-svg name="copy_icon_violet" size="12px" class="home-guide-cli-command-copy-icon" />
  553. <span>复制</span>
  554. </button>
  555. </div>
  556. </div>
  557. <div class="home-guide-cli-footer">
  558. <span class="home-guide-cli-footer-tip">{{ guideCliFooterTip }}</span>
  559. <button type="button" class="home-guide-cli-copy-all" @click="copyAllCliCommands">
  560. <icon-svg name="copy_icon_white" size="12px" class="home-guide-cli-copy-all-icon" />
  561. <span>全部复制</span>
  562. </button>
  563. </div>
  564. </div>
  565. </div>
  566. </template>
  567. </div>
  568. </div>
  569. <div class="home-guide-block home-guide-block-verify">
  570. <div class="home-guide-block-head">
  571. <div class="home-guide-block-num">3</div>
  572. <div class="home-guide-block-copy">
  573. <div class="home-guide-block-title">验证接入</div>
  574. <div class="home-guide-block-desc">在对话框中分别发送以下指令验证接入是否成功</div>
  575. </div>
  576. </div>
  577. <div class="home-guide-verify">
  578. <div v-for="card in guideVerifyCards" :key="card.title" class="home-guide-verify-card">
  579. <div class="home-guide-verify-line"></div>
  580. <div class="home-guide-verify-head">
  581. <div class="home-guide-verify-icon-box">
  582. <icon-svg :name="card.icon" size="16px" />
  583. </div>
  584. <div class="home-guide-verify-title">{{ card.title }}</div>
  585. </div>
  586. <div class="home-guide-verify-list">
  587. <div v-for="(question, questionIndex) in card.questions" :key="`${card.title}-${questionIndex}`"
  588. class="home-guide-verify-item">
  589. <span>{{ question }}</span>
  590. <icon-svg name="Connection_Copy" size="13px" class="home-guide-verify-copy"
  591. @click="copyText(question)" />
  592. </div>
  593. </div>
  594. </div>
  595. </div>
  596. </div>
  597. </div>
  598. </section>
  599. </div>
  600. </template>
  601. <script setup>
  602. import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue";
  603. import { ElMessage } from "element-plus";
  604. import { getMcpToken, createMcpToken, getMcpServerList } from "@/api/mcp";
  605. import { requireUserLogin } from "@/utils/auth";
  606. import globalStore from "@/store/modules/global";
  607. const global = globalStore();
  608. const guideToken = computed(() => global.mcpToken || "");
  609. const guideTokenVisible = ref(false);
  610. const guideTokenMasked = computed(() => {
  611. const token = guideToken.value;
  612. if (!token || token.length <= 15) {
  613. return { head: token, middle: "", tail: "" };
  614. }
  615. return {
  616. head: token.slice(0, 9),
  617. middle: "*".repeat(token.length - 15),
  618. tail: token.slice(-6),
  619. };
  620. });
  621. const applyToken = (data) => {
  622. // 兼容 data 为字符串,或 { token, expireTime, status, ... } 对象
  623. const token =
  624. typeof data === "string"
  625. ? data
  626. : data && typeof data === "object"
  627. ? data.token
  628. : "";
  629. if (token === null || token === undefined || token === "") {
  630. global.setMcpToken("");
  631. return;
  632. }
  633. global.setMcpToken(String(token));
  634. };
  635. const fetchMcpToken = async () => {
  636. try {
  637. const res = await getMcpToken();
  638. applyToken(res?.data);
  639. } catch (error) {
  640. console.error(error);
  641. }
  642. };
  643. const createToken = async () => {
  644. if (!requireUserLogin("请先登录", { redirect: true })) return;
  645. if (guideToken.value) {
  646. ElMessage.warning("Token 已存在,无需重复获取");
  647. return;
  648. }
  649. try {
  650. const res = await createMcpToken();
  651. applyToken(res?.data);
  652. } catch (error) {
  653. console.error(error);
  654. }
  655. };
  656. onMounted(() => {
  657. fetchMcpToken();
  658. fetchDoubaoServerList();
  659. document.addEventListener("click", closeDoubaoSelect);
  660. });
  661. onBeforeUnmount(() => {
  662. document.removeEventListener("click", closeDoubaoSelect);
  663. stopWorkbuddyAutoScroll();
  664. });
  665. const guideAccessTab = ref("mcp");
  666. const guideToolTab = ref("qianwen");
  667. const workbuddySlideIndex = ref(0);
  668. let workbuddyAutoScrollTimer = null;
  669. const setWorkbuddySlide = (index) => {
  670. const total = 2;
  671. workbuddySlideIndex.value = ((index % total) + total) % total;
  672. };
  673. const stopWorkbuddyAutoScroll = () => {
  674. if (workbuddyAutoScrollTimer != null) {
  675. clearTimeout(workbuddyAutoScrollTimer);
  676. workbuddyAutoScrollTimer = null;
  677. }
  678. };
  679. const startWorkbuddyAutoScroll = () => {
  680. stopWorkbuddyAutoScroll();
  681. workbuddySlideIndex.value = 0;
  682. workbuddyAutoScrollTimer = setTimeout(() => {
  683. workbuddyAutoScrollTimer = null;
  684. workbuddySlideIndex.value = 1;
  685. }, 3000);
  686. };
  687. watch(
  688. [guideAccessTab, guideToolTab],
  689. ([accessTab, toolTab]) => {
  690. if (accessTab === "mcp" && toolTab === "workbuddy") {
  691. startWorkbuddyAutoScroll();
  692. return;
  693. }
  694. stopWorkbuddyAutoScroll();
  695. },
  696. { immediate: true },
  697. );
  698. const guideTools = [
  699. { key: "qianwen", label: "千问办公", iconName: "qianwen_icon" },
  700. { key: "workbuddy", label: "WorkBuddy", iconName: "WorkBuddy_icon" },
  701. { key: "doubao", label: "豆包", iconName: "doubao_icon" },
  702. { key: "qoderwork", label: "Qoderwork", iconName: "Qoderwork_icon" },
  703. ];
  704. const guideDoubaoContent = {
  705. alert: "豆包只能通过新建自定义连接器接入,不支持直接粘贴 JSON 配置。",
  706. steps: [
  707. {
  708. num: 1,
  709. title:
  710. "打开 豆包 → 找到「 技能·连接器·伙伴 」→ 点击「新建」→ 选择「 新建自定义连接器」 ",
  711. },
  712. {
  713. num: 2,
  714. title: "请按右侧示列复制服务器名称、 URL 链接、自定义 Headers 到豆包内对应位置→ 点击保存完成链接",
  715. },
  716. {
  717. num: 3,
  718. title:
  719. "验证是否成功——在对话中发送「用环评云助手MCP检索《陶瓷工业大气污染物排放标准》对氮氧化物的分级控制要求」",
  720. },
  721. ],
  722. notes: [
  723. "请参照右图依次填入参数,每个服务对应一个URL",
  724. "请在豆包-工作-连接器中选择对应的MCP进行检索",
  725. "自定义 Headers 内需要填写页面「获取 Token」生成的真实 Token",
  726. ],
  727. };
  728. const guideDoubaoNotes = computed(() => {
  729. const notes = [...guideDoubaoContent.notes];
  730. if (guideToken.value) {
  731. notes[2] = "右侧输入框内已自动填入真实 Token ,请复制到豆包内使用";
  732. }
  733. return notes;
  734. });
  735. const doubaoServerList = ref([]);
  736. const doubaoSelectedId = ref("");
  737. const doubaoSelectOpen = ref(false);
  738. const doubaoSelectedServer = computed(
  739. () =>
  740. doubaoServerList.value.find((item) => String(item.id) === doubaoSelectedId.value) ||
  741. doubaoServerList.value[0] ||
  742. null,
  743. );
  744. const doubaoServerName = computed(() => {
  745. const name = doubaoSelectedServer.value?.name || "法规导则-关键词检索";
  746. return `环评云助手MCP(${name})`;
  747. });
  748. const doubaoServerUrl = computed(
  749. () => doubaoSelectedServer.value?.url || "https://mcp.eiacloud.com/law-keyword",
  750. );
  751. const fetchDoubaoServerList = async () => {
  752. try {
  753. let list = Array.isArray(global.mcpServerList) ? global.mcpServerList : [];
  754. if (!list.length) {
  755. const res = await getMcpServerList();
  756. list = Array.isArray(res?.data) ? res.data : [];
  757. if (list.length) global.setMcpServerList(list);
  758. }
  759. const openList = list.filter(
  760. (item) => item.openStatus == null || Number(item.openStatus) === 1,
  761. );
  762. doubaoServerList.value = openList;
  763. const exists = openList.some((item) => String(item.id) === doubaoSelectedId.value);
  764. if (!exists && openList[0]) {
  765. doubaoSelectedId.value = String(openList[0].id || "");
  766. }
  767. } catch (error) {
  768. console.error(error);
  769. }
  770. };
  771. const toggleDoubaoSelect = () => {
  772. if (!doubaoServerList.value.length) return;
  773. doubaoSelectOpen.value = !doubaoSelectOpen.value;
  774. };
  775. const selectDoubaoServer = (item) => {
  776. doubaoSelectedId.value = String(item?.id || "");
  777. doubaoSelectOpen.value = false;
  778. };
  779. const closeDoubaoSelect = () => {
  780. doubaoSelectOpen.value = false;
  781. };
  782. const guideWpsContent = {
  783. alert:
  784. "仅支持内置连接:WPS Comate 只能通过内置「环评云助手」连接接入,不支持粘贴 JSON 或自定义 MCP 配置。",
  785. steps: [
  786. {
  787. num: 1,
  788. title: "打开 WPS Comate → 进入「连接」→ 找到「环评云助手」→ 点击「连接」",
  789. },
  790. {
  791. num: 2,
  792. title: "按提示完成登录授权并启用连接即可使用,无需粘贴 JSON / Token",
  793. },
  794. {
  795. num: 3,
  796. title:
  797. "验证是否成功——在对话中发送「用环评云助手检索《大气污染物综合排放标准》中关于 VOCs 排放限值的规定」——返回的是权威法规数据,非网络搜索结果。",
  798. },
  799. ],
  800. notes: [
  801. "仅支持内置连接,无需手动粘贴 JSON 或自定义 MCP 配置",
  802. "首次使用需完成环评云助手账号登录授权,授权后连接长期有效",
  803. ],
  804. configLines: [
  805. "# 本平台仅支持内置「环评云助手」连接",
  806. "# 发现 → MCP → 环评云助手 → 一键连接并完成授权即可使用",
  807. ],
  808. verifyIntro: "# 在对话框中发一句:",
  809. verifyQuote:
  810. "「用环评云助手检索《大气污染物综合排放标准》中关于 VOCs 排放限值的规定」",
  811. verifyResult: " # → 看到法规检索工具运行成功 → 返回限值 = 接入成功",
  812. verifyCheck: "返回的是权威法规数据,非网络搜索",
  813. };
  814. const guideAccessToken = computed(
  815. () => guideToken.value || "YOUR_ACCESS_TOKEN",
  816. );
  817. const buildGuideServerKey = (code) => {
  818. const value = String(code || "mcp-server");
  819. return value.startsWith("hpyzs-") ? value : `hpyzs-${value}`;
  820. };
  821. const guideMcpJson = computed(() => {
  822. const token = guideAccessToken.value;
  823. const list = Array.isArray(global.mcpServerList) ? global.mcpServerList : [];
  824. const mcpServers = {};
  825. list.forEach((item) => {
  826. const serverKey = buildGuideServerKey(item?.code);
  827. mcpServers[serverKey] = {
  828. url: item?.url || "",
  829. headers: {
  830. Authorization: `Bearer ${token}`,
  831. },
  832. };
  833. });
  834. return JSON.stringify({ mcpServers }, null, 2);
  835. });
  836. const escapeGuideHtml = (str) =>
  837. String(str)
  838. .replace(/&/g, "&amp;")
  839. .replace(/</g, "&lt;")
  840. .replace(/>/g, "&gt;")
  841. .replace(/"/g, "&quot;");
  842. const highlightGuideJson = (jsonText) => {
  843. const text = String(jsonText ?? "");
  844. const re =
  845. /("(?:\\.|[^"\\])*")\s*:|"((?:\\.|[^"\\])*)"|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)|\b(true|false|null)\b|([{}[\],:])/g;
  846. let last = 0;
  847. let html = "";
  848. let match;
  849. while ((match = re.exec(text)) !== null) {
  850. if (match.index > last) {
  851. html += `<span class="code-punct">${escapeGuideHtml(text.slice(last, match.index))}</span>`;
  852. }
  853. if (match[1] !== undefined) {
  854. html += `<span class="code-key">${escapeGuideHtml(match[1])}</span><span class="code-punct">:</span>`;
  855. } else if (match[2] !== undefined) {
  856. html += `<span class="code-string">"${escapeGuideHtml(match[2])}"</span>`;
  857. } else if (match[3] !== undefined || match[4] !== undefined) {
  858. html += `<span class="code-string">${escapeGuideHtml(match[0])}</span>`;
  859. } else {
  860. html += `<span class="code-punct">${escapeGuideHtml(match[0])}</span>`;
  861. }
  862. last = re.lastIndex;
  863. }
  864. if (last < text.length) {
  865. html += `<span class="code-punct">${escapeGuideHtml(text.slice(last))}</span>`;
  866. }
  867. return html;
  868. };
  869. const guideMcpJsonHtml = computed(() => highlightGuideJson(guideMcpJson.value));
  870. const guideWorkbuddyMcpJsonHtml = computed(
  871. () =>
  872. `<span class="code-string">这是环评云助手的MCP服务JSON,帮我配置自定义的mcp</span>\n${guideMcpJsonHtml.value}`,
  873. );
  874. const guideMcpLines = computed(() =>
  875. Array.from({ length: guideMcpJson.value.split("\n").length }, (_, i) => i + 1),
  876. );
  877. const guideWorkbuddyMcpLines = computed(() => guideMcpLines.value.length + 1);
  878. const copyText = async (text) => {
  879. if (!text) {
  880. ElMessage.warning("暂无内容可复制");
  881. return;
  882. }
  883. try {
  884. if (navigator.clipboard?.writeText) {
  885. await navigator.clipboard.writeText(text);
  886. } else {
  887. const textarea = document.createElement("textarea");
  888. textarea.value = text;
  889. textarea.setAttribute("readonly", "");
  890. textarea.style.position = "fixed";
  891. textarea.style.left = "-9999px";
  892. document.body.appendChild(textarea);
  893. textarea.select();
  894. const ok = document.execCommand("copy");
  895. document.body.removeChild(textarea);
  896. if (!ok) throw new Error("execCommand copy failed");
  897. }
  898. ElMessage.success("复制成功");
  899. } catch (error) {
  900. console.error(error);
  901. ElMessage.error("复制失败");
  902. }
  903. };
  904. const copyGuideMcpJson = () => copyText(guideMcpJson.value);
  905. const guideCliSteps = [
  906. {
  907. num: 1,
  908. title: "控制台获取 Token(与 MCP 共用)",
  909. desc: "在第一步生成或复制 Token,CLI 与 MCP 使用同一套鉴权。",
  910. },
  911. {
  912. num: 2,
  913. title: "npm 全局安装环评云助手 CLI",
  914. desc: "npm install -g hpyzs-mcp",
  915. },
  916. {
  917. num: 3,
  918. title: "绑定 Token",
  919. desc: "右侧初始化命令已自动填入真实 Token,复制执行即可",
  920. },
  921. {
  922. num: 4,
  923. title: "命令行直接查询,返回原始 JSON",
  924. desc: "不经过 LLM,适合自动化流程与数据验证。",
  925. },
  926. ];
  927. const guideCliCommands = computed(() => {
  928. const token = guideAccessToken.value;
  929. return [
  930. {
  931. label: "安装 CLI",
  932. text: "npm install -g hpyzs-mcp",
  933. },
  934. {
  935. label: "绑定 Token",
  936. text: `hpyzs-mcp init --authorization "Bearer ${token}"`,
  937. },
  938. {
  939. label: "执行查询",
  940. text: 'hpyzs-mcp law-keyword search_keyword_standard --name "地表水环境治疗标准"',
  941. },
  942. ];
  943. });
  944. const guideCliFooterTip = computed(() =>
  945. guideToken.value
  946. ? "初始化命令已自动填入真实 Token"
  947. : "将 YOUR_ACCESS_TOKEN 替换为页面「获取 Token」生成的真实 Token",
  948. );
  949. const copyAllCliCommands = () =>
  950. copyText(guideCliCommands.value.map((item) => item.text).join("\n"));
  951. const guideVerifyCards = [
  952. {
  953. icon: "environmental_legislation",
  954. title: "政策法规",
  955. questions: [
  956. "大气污染防治法第118条餐饮油烟怎么罚?",
  957. "环办政法函〔2017〕40号答复了什么?",
  958. "大气污染防治法2018修订何时施行?",
  959. ],
  960. },
  961. {
  962. icon: "Standard_guidelines",
  963. title: "标准导则",
  964. questions: [
  965. "GB16297表2二氧化硫二级浓度?",
  966. "GB16297排气筒最低高度要求?",
  967. "GB16297颗粒物无组织监控限值?",
  968. ],
  969. },
  970. {
  971. icon: "Policy_QA",
  972. title: "问答检索",
  973. questions: [
  974. "重大变动如何重新报批环评?",
  975. "排污许可证内容变更如何重新办理?",
  976. "环评批复几年不开工作废?",
  977. ],
  978. },
  979. ];
  980. </script>
  981. <style scoped lang="less">
  982. .home-section {
  983. width: 100%;
  984. }
  985. .home-content-stack {
  986. width: 100%;
  987. box-sizing: border-box;
  988. min-width: 0;
  989. --guide-inline-padding: 40px;
  990. }
  991. .home-guide {
  992. box-sizing: border-box;
  993. width: 100%;
  994. min-width: 0;
  995. padding: var(--guide-inline-padding);
  996. background: #FFFFFF;
  997. box-shadow: 0px 4px 24px 0px rgba(15, 23, 42, 0.06);
  998. border-radius: 8px 8px 8px 8px;
  999. overflow-x: hidden;
  1000. }
  1001. .home-guide-inner {
  1002. width: 100%;
  1003. min-width: 0;
  1004. display: flex;
  1005. flex-direction: column;
  1006. align-items: stretch;
  1007. gap: 32px;
  1008. }
  1009. .home-guide-heading {
  1010. display: flex;
  1011. flex-direction: column;
  1012. align-items: center;
  1013. gap: 8px;
  1014. }
  1015. .home-guide-title {
  1016. font-family: PingFang SC, PingFang SC;
  1017. font-weight: 600;
  1018. font-size: 32px;
  1019. color: #1E293B;
  1020. line-height: 40px;
  1021. text-align: center;
  1022. }
  1023. .home-guide-subtitle {
  1024. font-family: PingFang SC, PingFang SC;
  1025. font-weight: 400;
  1026. font-size: 16px;
  1027. color: #64748B;
  1028. line-height: 24px;
  1029. text-align: center;
  1030. }
  1031. .home-guide-timeline {
  1032. display: flex;
  1033. align-items: flex-start;
  1034. justify-content: center;
  1035. margin-top: 8px;
  1036. width: 100%;
  1037. max-width: 100%;
  1038. min-width: 0;
  1039. }
  1040. .home-guide-timeline-item {
  1041. flex: 1 1 0;
  1042. min-width: 0;
  1043. max-width: 210px;
  1044. display: flex;
  1045. flex-direction: column;
  1046. align-items: center;
  1047. }
  1048. .home-guide-timeline-dot {
  1049. display: flex;
  1050. align-items: center;
  1051. justify-content: center;
  1052. width: 52px;
  1053. height: 52px;
  1054. border-radius: 52px;
  1055. font-family: PingFang SC, PingFang SC;
  1056. font-weight: 600;
  1057. font-size: 22px;
  1058. color: #FFFFFF;
  1059. line-height: 30px;
  1060. text-align: center;
  1061. }
  1062. .home-guide-timeline-item:nth-child(1) .home-guide-timeline-dot {
  1063. background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  1064. box-shadow: 0px 8px 24px 0px rgba(5, 150, 105, 0.3);
  1065. }
  1066. .home-guide-timeline-item:nth-child(3) .home-guide-timeline-dot {
  1067. background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
  1068. box-shadow: 0px 8px 24px 0px rgba(59, 130, 246, 0.28);
  1069. }
  1070. .home-guide-timeline-item:nth-child(5) .home-guide-timeline-dot {
  1071. background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
  1072. box-shadow: 0px 8px 24px 0px rgba(139, 92, 246, 0.28);
  1073. }
  1074. .home-guide-timeline-name {
  1075. margin-top: 10px;
  1076. width: 100%;
  1077. font-family: PingFang SC, PingFang SC;
  1078. font-weight: 600;
  1079. font-size: 20px;
  1080. line-height: 28px;
  1081. text-align: center;
  1082. }
  1083. .home-guide-timeline-item:nth-child(1) .home-guide-timeline-name {
  1084. color: #059669;
  1085. }
  1086. .home-guide-timeline-item:nth-child(3) .home-guide-timeline-name {
  1087. color: #3B82F6;
  1088. }
  1089. .home-guide-timeline-item:nth-child(5) .home-guide-timeline-name {
  1090. color: #8B5CF6;
  1091. }
  1092. .home-guide-timeline-desc {
  1093. margin-top: 2px;
  1094. width: 100%;
  1095. padding: 0 4px;
  1096. box-sizing: border-box;
  1097. font-family: PingFang SC, PingFang SC;
  1098. font-weight: 400;
  1099. font-size: 14px;
  1100. color: #64748B;
  1101. line-height: 20px;
  1102. text-align: center;
  1103. word-break: break-word;
  1104. }
  1105. .home-guide-timeline-line {
  1106. flex: 1 1 0;
  1107. min-width: 24px;
  1108. max-width: 245px;
  1109. height: 4px;
  1110. margin-top: 24px;
  1111. border-radius: 2px;
  1112. }
  1113. .home-guide-timeline-line-1 {
  1114. background: linear-gradient(270deg, #059669 0%, #3B82F6 100%);
  1115. }
  1116. .home-guide-timeline-line-2 {
  1117. background: linear-gradient(270deg, #3B82F6 0%, #8B5CF6 100%);
  1118. }
  1119. .home-guide-block {
  1120. background: #FFFFFF;
  1121. border-radius: 16px;
  1122. padding: 24px;
  1123. }
  1124. .home-guide-block-head {
  1125. display: flex;
  1126. align-items: flex-start;
  1127. gap: 12px;
  1128. }
  1129. .home-guide-block-num {
  1130. display: flex;
  1131. align-items: center;
  1132. justify-content: center;
  1133. width: 24px;
  1134. height: 24px;
  1135. flex-shrink: 0;
  1136. border-radius: 50%;
  1137. background: #10B981;
  1138. color: #FFFFFF;
  1139. font-size: 13px;
  1140. font-weight: 600;
  1141. }
  1142. .home-guide-block:nth-child(3) .home-guide-block-num {
  1143. background: #10B981;
  1144. }
  1145. .home-guide-block:nth-child(4) .home-guide-block-num {
  1146. background: #3B82F6;
  1147. }
  1148. .home-guide-block:nth-child(5) .home-guide-block-num {
  1149. background: #A78BFA;
  1150. }
  1151. .home-guide-block-copy {
  1152. flex: 1;
  1153. min-width: 0;
  1154. }
  1155. .home-guide-block-title {
  1156. font-size: 18px;
  1157. font-weight: 600;
  1158. color: #0F172A;
  1159. line-height: 25px;
  1160. }
  1161. .home-guide-block-desc {
  1162. margin-top: 4px;
  1163. font-size: 14px;
  1164. color: #64748B;
  1165. line-height: 20px;
  1166. }
  1167. .home-guide-token {
  1168. display: flex;
  1169. align-items: center;
  1170. gap: 8px;
  1171. flex-shrink: 0;
  1172. }
  1173. .home-guide-token-value {
  1174. padding: 8px 12px;
  1175. border-radius: 8px;
  1176. background: #0F172A;
  1177. color: #FFFFFF;
  1178. font-size: 12px;
  1179. }
  1180. .home-guide-token-btn {
  1181. padding: 8px 16px;
  1182. border: none;
  1183. border-radius: 8px;
  1184. background: #1678FF;
  1185. color: #FFFFFF;
  1186. font-size: 13px;
  1187. cursor: pointer;
  1188. }
  1189. .home-guide-block-token .home-guide-block-head {
  1190. align-items: center;
  1191. gap: 16px;
  1192. }
  1193. .home-guide-block-token .home-guide-block-num {
  1194. width: 46px;
  1195. height: 46px;
  1196. background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  1197. box-shadow: 0px 8px 20px 0px rgba(5, 150, 105, 0.24);
  1198. border-radius: 14px;
  1199. font-family: PingFang SC, PingFang SC;
  1200. font-weight: 600;
  1201. font-size: 20px;
  1202. color: #FFFFFF;
  1203. line-height: 26px;
  1204. text-align: center;
  1205. }
  1206. .home-guide-block-token .home-guide-block-title {
  1207. font-family: PingFang SC, PingFang SC;
  1208. font-weight: 600;
  1209. font-size: 22px;
  1210. color: #0F172A;
  1211. line-height: 30px;
  1212. text-align: left;
  1213. }
  1214. .home-guide-block-token .home-guide-block-desc {
  1215. font-family: PingFang SC, PingFang SC;
  1216. font-weight: 400;
  1217. font-size: 14px;
  1218. color: #64748B;
  1219. line-height: 20px;
  1220. text-align: left;
  1221. }
  1222. .home-guide-block-token .home-guide-token {
  1223. display: flex;
  1224. align-items: center;
  1225. gap: 16px;
  1226. margin-left: auto;
  1227. }
  1228. .home-guide-token-bar {
  1229. box-sizing: border-box;
  1230. display: flex;
  1231. align-items: center;
  1232. flex: 0 0 auto;
  1233. width: auto;
  1234. max-width: none;
  1235. min-width: 0;
  1236. height: 44px;
  1237. padding: 12px 14px;
  1238. background: #1E293B;
  1239. border-radius: 6px;
  1240. white-space: nowrap;
  1241. }
  1242. .home-guide-token-tag {
  1243. flex-shrink: 0;
  1244. background: #1678FF;
  1245. border-radius: 4px;
  1246. padding: 3px 8px;
  1247. font-family: PingFang SC, PingFang SC;
  1248. font-weight: 600;
  1249. font-size: 11px;
  1250. color: #FFFFFF;
  1251. line-height: 14px;
  1252. text-align: center;
  1253. }
  1254. .home-guide-block-token .home-guide-token-value {
  1255. margin-left: 8px;
  1256. padding: 0;
  1257. background: transparent;
  1258. border-radius: 0;
  1259. font-family: PingFang SC, PingFang SC;
  1260. font-weight: 500;
  1261. font-size: 13px;
  1262. color: #E5E7EB;
  1263. line-height: 18px;
  1264. text-align: left;
  1265. white-space: nowrap;
  1266. flex: 0 0 auto;
  1267. }
  1268. .home-guide-token-icons {
  1269. display: flex;
  1270. align-items: center;
  1271. gap: 10px;
  1272. margin-left: 20px;
  1273. flex-shrink: 0;
  1274. }
  1275. .home-guide-token-icon {
  1276. width: 24px;
  1277. height: 24px;
  1278. color: #FFFFFF;
  1279. cursor: pointer;
  1280. }
  1281. .home-guide-block-token .home-guide-token-btn {
  1282. display: inline-flex;
  1283. align-items: center;
  1284. justify-content: center;
  1285. gap: 6px;
  1286. flex-shrink: 0;
  1287. box-sizing: border-box;
  1288. min-height: 44px;
  1289. padding: 12px 16px;
  1290. border: none;
  1291. border-radius: 8px;
  1292. background: linear-gradient(107deg, #3B82F6 0%, #6366F1 100%);
  1293. box-shadow: 0px 2px 8px 0px rgba(59, 130, 246, 0.25);
  1294. font-family: PingFang SC, PingFang SC;
  1295. font-weight: 500;
  1296. font-size: 14px;
  1297. color: #FFFFFF;
  1298. line-height: 20px;
  1299. white-space: nowrap;
  1300. cursor: pointer;
  1301. }
  1302. .home-guide-token-btn-icon {
  1303. width: 14px;
  1304. height: 14px;
  1305. }
  1306. .home-guide-features {
  1307. display: flex;
  1308. align-items: flex-start;
  1309. justify-content: space-between;
  1310. gap: 40px;
  1311. margin-top: 16px;
  1312. padding: 30px 24px;
  1313. background: #F8FAFC;
  1314. border-radius: 12px;
  1315. border: 1px solid #E2E8F0;
  1316. }
  1317. .home-guide-feature {
  1318. flex: 0 1 auto;
  1319. display: flex;
  1320. align-items: flex-start;
  1321. gap: 12px;
  1322. min-width: 0;
  1323. :deep(.svg-icon) {
  1324. width: 38px;
  1325. height: 38px;
  1326. flex-shrink: 0;
  1327. }
  1328. > div {
  1329. flex: 0 1 auto;
  1330. min-width: 0;
  1331. }
  1332. }
  1333. .home-guide-feature-title {
  1334. font-family: PingFang SC, PingFang SC;
  1335. font-weight: 500;
  1336. font-size: 18px;
  1337. color: #0F172A;
  1338. line-height: 26px;
  1339. text-align: left;
  1340. white-space: nowrap;
  1341. }
  1342. .home-guide-feature-desc {
  1343. font-family: PingFang SC, PingFang SC;
  1344. font-weight: 400;
  1345. font-size: 14px;
  1346. color: #64748B;
  1347. line-height: 20px;
  1348. text-align: left;
  1349. white-space: nowrap;
  1350. }
  1351. .home-guide-access-tabs {
  1352. display: flex;
  1353. gap: 24px;
  1354. margin-top: 20px;
  1355. }
  1356. .home-guide-access-tab {
  1357. padding: 0;
  1358. border: none;
  1359. background: transparent;
  1360. font-size: 14px;
  1361. color: #64748B;
  1362. cursor: pointer;
  1363. }
  1364. .home-guide-access-tab.is-active {
  1365. color: #1678FF;
  1366. font-weight: 600;
  1367. }
  1368. .home-guide-block-tools .home-guide-block-head {
  1369. align-items: center;
  1370. gap: 16px;
  1371. }
  1372. .home-guide-block-tools .home-guide-block-num {
  1373. width: 46px;
  1374. height: 46px;
  1375. background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
  1376. box-shadow: 0px 8px 20px 0px rgba(59, 130, 246, 0.24);
  1377. border-radius: 14px;
  1378. font-family: PingFang SC, PingFang SC;
  1379. font-weight: 600;
  1380. font-size: 20px;
  1381. color: #FFFFFF;
  1382. line-height: 26px;
  1383. text-align: center;
  1384. }
  1385. .home-guide-block-tools .home-guide-block-title {
  1386. font-family: PingFang SC, PingFang SC;
  1387. font-weight: 600;
  1388. font-size: 22px;
  1389. color: #0F172A;
  1390. line-height: 30px;
  1391. text-align: left;
  1392. }
  1393. .home-guide-block-tools .home-guide-block-desc {
  1394. font-family: PingFang SC, PingFang SC;
  1395. font-weight: 400;
  1396. font-size: 14px;
  1397. color: #64748B;
  1398. line-height: 20px;
  1399. text-align: left;
  1400. }
  1401. .home-guide-block-tools .home-guide-access-tabs {
  1402. gap: 32px;
  1403. margin-top: 26px;
  1404. }
  1405. .home-guide-block-tools .home-guide-access-tab {
  1406. position: relative;
  1407. padding: 0 0 13px;
  1408. font-family: PingFang SC, PingFang SC;
  1409. font-weight: 400;
  1410. font-size: 18px;
  1411. color: #0F172A;
  1412. line-height: 25px;
  1413. text-align: center;
  1414. }
  1415. .home-guide-block-tools .home-guide-access-tab.is-active {
  1416. font-weight: 600;
  1417. color: #1678FF;
  1418. }
  1419. .home-guide-block-tools .home-guide-access-tab.is-active::after {
  1420. content: "";
  1421. position: absolute;
  1422. left: 0;
  1423. right: 0;
  1424. bottom: 0;
  1425. height: 3px;
  1426. background: #1678FF;
  1427. }
  1428. .home-guide-tool-panel {
  1429. margin-top: 16px;
  1430. padding: 20px;
  1431. background: #F8FAFC;
  1432. border-radius: 12px;
  1433. border: 1px solid #E2E8F0;
  1434. }
  1435. .home-guide-tool-tabs {
  1436. display: flex;
  1437. justify-content: center;
  1438. gap: 12px;
  1439. }
  1440. .home-guide-tool-tab {
  1441. display: inline-flex;
  1442. align-items: center;
  1443. justify-content: center;
  1444. gap: 8px;
  1445. margin: 0;
  1446. padding: 10px 20px;
  1447. border: 1px solid #E2E8F0;
  1448. border-radius: 12px;
  1449. background: #FFFFFF;
  1450. font-family: PingFang SC, PingFang SC;
  1451. font-weight: 500;
  1452. font-size: 14px;
  1453. color: #475569;
  1454. line-height: 20px;
  1455. text-align: center;
  1456. cursor: pointer;
  1457. }
  1458. .home-guide-tool-tab-icon {
  1459. width: 20px;
  1460. height: 20px;
  1461. flex-shrink: 0;
  1462. }
  1463. .home-guide-tool-tab.is-active {
  1464. border: none;
  1465. background: linear-gradient(107deg, #3B82F6 0%, #6366F1 100%);
  1466. box-shadow: 0px 4px 14px 0px rgba(59, 130, 246, 0.24);
  1467. font-weight: 600;
  1468. color: #FFFFFF;
  1469. }
  1470. .home-guide-tool-body {
  1471. display: flex;
  1472. gap: 20px;
  1473. margin-top: 20px;
  1474. align-items: stretch;
  1475. min-width: 0;
  1476. }
  1477. .home-guide-ima-body {
  1478. align-items: stretch;
  1479. }
  1480. .home-guide-ima-left,
  1481. .home-guide-ima-right {
  1482. flex: 1;
  1483. min-width: 0;
  1484. display: flex;
  1485. flex-direction: column;
  1486. }
  1487. .home-guide-doubao-body {
  1488. align-items: stretch;
  1489. min-width: 0;
  1490. }
  1491. .home-guide-doubao-body .home-guide-ima-left {
  1492. flex: 1 1 0;
  1493. min-width: 0;
  1494. }
  1495. .home-guide-doubao-right {
  1496. flex: 1 1 0;
  1497. min-width: 0;
  1498. max-width: 608px;
  1499. display: flex;
  1500. }
  1501. .home-guide-doubao-form {
  1502. box-sizing: border-box;
  1503. display: flex;
  1504. flex-direction: column;
  1505. gap: 16px;
  1506. width: 100%;
  1507. height: 100%;
  1508. padding: 16px;
  1509. background: #FFFFFF;
  1510. box-shadow: 0px 4px 24px 0px rgba(15, 23, 42, 0.06);
  1511. border-radius: 8px;
  1512. }
  1513. .home-guide-doubao-form-head {
  1514. display: flex;
  1515. flex-direction: column;
  1516. gap: 4px;
  1517. }
  1518. .home-guide-doubao-form-title {
  1519. font-family: PingFang SC, PingFang SC;
  1520. font-weight: 600;
  1521. font-size: 18px;
  1522. color: #1E293B;
  1523. line-height: 26px;
  1524. text-align: left;
  1525. font-style: normal;
  1526. }
  1527. .home-guide-doubao-form-sub {
  1528. font-family: PingFang SC, PingFang SC;
  1529. font-weight: 400;
  1530. font-size: 13px;
  1531. color: #6B7280;
  1532. line-height: 20px;
  1533. text-align: left;
  1534. font-style: normal;
  1535. }
  1536. .home-guide-doubao-form-row {
  1537. display: flex;
  1538. gap: 24px;
  1539. min-width: 0;
  1540. }
  1541. .home-guide-doubao-form-field {
  1542. min-width: 0;
  1543. flex: 1;
  1544. display: flex;
  1545. flex-direction: column;
  1546. gap: 8px;
  1547. }
  1548. .home-guide-doubao-form-row .home-guide-doubao-form-field:not(.home-guide-doubao-form-field--type) {
  1549. flex: 2 1 0;
  1550. }
  1551. .home-guide-doubao-form-field--type {
  1552. flex: 1 1 0;
  1553. }
  1554. .home-guide-doubao-form-label {
  1555. font-family: PingFang SC, PingFang SC;
  1556. font-weight: 600;
  1557. font-size: 14px;
  1558. color: #1E293B;
  1559. line-height: 20px;
  1560. text-align: left;
  1561. }
  1562. .home-guide-doubao-form-label .is-required {
  1563. color: #EF4444;
  1564. }
  1565. .home-guide-doubao-form-input {
  1566. display: flex;
  1567. align-items: center;
  1568. gap: 8px;
  1569. box-sizing: border-box;
  1570. padding: 10px 12px;
  1571. background: #FFFFFF;
  1572. border-radius: 8px;
  1573. border: 1px solid #E5E7EB;
  1574. font-family: PingFang SC, PingFang SC;
  1575. font-weight: 400;
  1576. font-size: 14px;
  1577. color: #1F2937;
  1578. line-height: 20px;
  1579. text-align: left;
  1580. font-style: normal;
  1581. word-break: break-all;
  1582. }
  1583. .home-guide-doubao-form-input span {
  1584. flex: 1;
  1585. min-width: 0;
  1586. }
  1587. .home-guide-doubao-form-copy {
  1588. display: inline-flex;
  1589. align-items: center;
  1590. justify-content: center;
  1591. margin: 0;
  1592. padding: 0;
  1593. border: none;
  1594. background: transparent;
  1595. color: #94A3B8;
  1596. cursor: pointer;
  1597. }
  1598. .home-guide-doubao-form-icons {
  1599. display: inline-flex;
  1600. align-items: center;
  1601. gap: 14px;
  1602. flex-shrink: 0;
  1603. }
  1604. .home-guide-doubao-form-arrow {
  1605. flex-shrink: 0;
  1606. color: #94A3B8;
  1607. pointer-events: none;
  1608. transition: transform 0.2s ease;
  1609. }
  1610. .home-guide-doubao-form-input.is-open .home-guide-doubao-form-arrow {
  1611. transform: rotate(180deg);
  1612. }
  1613. .home-guide-doubao-form-select {
  1614. position: relative;
  1615. min-width: 0;
  1616. }
  1617. .home-guide-doubao-form-select .home-guide-doubao-form-input {
  1618. cursor: pointer;
  1619. }
  1620. .home-guide-doubao-form-dropdown {
  1621. position: absolute;
  1622. top: calc(100% + 4px);
  1623. left: 0;
  1624. right: 0;
  1625. z-index: 20;
  1626. box-sizing: border-box;
  1627. max-height: 220px;
  1628. overflow-y: auto;
  1629. padding: 6px;
  1630. background: #FFFFFF;
  1631. border: 1px solid #E5E7EB;
  1632. border-radius: 8px;
  1633. box-shadow: 0px 4px 24px 0px rgba(15, 23, 42, 0.06);
  1634. }
  1635. .home-guide-doubao-dropdown-enter-active,
  1636. .home-guide-doubao-dropdown-leave-active {
  1637. transition: opacity 0.2s ease, transform 0.2s ease;
  1638. }
  1639. .home-guide-doubao-dropdown-enter-from,
  1640. .home-guide-doubao-dropdown-leave-to {
  1641. opacity: 0;
  1642. transform: translateY(-6px);
  1643. }
  1644. .home-guide-doubao-form-option {
  1645. display: block;
  1646. width: 100%;
  1647. margin: 0;
  1648. padding: 8px 12px;
  1649. border: none;
  1650. border-radius: 6px;
  1651. background: transparent;
  1652. font-family: PingFang SC, PingFang SC;
  1653. font-weight: 400;
  1654. font-size: 14px;
  1655. color: #1F2937;
  1656. line-height: 20px;
  1657. text-align: left;
  1658. cursor: pointer;
  1659. }
  1660. .home-guide-doubao-form-option:hover,
  1661. .home-guide-doubao-form-option.is-active {
  1662. background: #EEF4FF;
  1663. color: #1678FF;
  1664. }
  1665. .home-guide-doubao-form-headers {
  1666. display: flex;
  1667. gap: 8px;
  1668. min-width: 0;
  1669. }
  1670. .home-guide-doubao-form-headers .home-guide-doubao-form-input:first-child {
  1671. flex: 0 0 auto;
  1672. }
  1673. .home-guide-doubao-form-headers .home-guide-doubao-form-input:first-child span {
  1674. flex: none;
  1675. white-space: nowrap;
  1676. }
  1677. .home-guide-doubao-form-token,
  1678. .home-guide-doubao-form-token-value {
  1679. flex: 1 1 0;
  1680. min-width: 0;
  1681. }
  1682. .home-guide-doubao-form-token {
  1683. min-width: 0;
  1684. margin: 0;
  1685. padding: 10px 12px;
  1686. background: #FFFFFF;
  1687. border-radius: 8px;
  1688. border: 1px solid #E5E7EB;
  1689. font-family: PingFang SC, PingFang SC;
  1690. font-weight: 400;
  1691. font-size: 14px;
  1692. color: #1678FF;
  1693. line-height: 20px;
  1694. text-align: left;
  1695. font-style: normal;
  1696. cursor: pointer;
  1697. }
  1698. .home-guide-ima-right {
  1699. gap: 16px;
  1700. }
  1701. .home-guide-ima-alert {
  1702. display: flex;
  1703. align-items: center;
  1704. gap: 10px;
  1705. padding: 12px 16px;
  1706. background: #FFF7E6;
  1707. border-radius: 12px;
  1708. border: 1px solid #FFD591;
  1709. }
  1710. .home-guide-ima-alert-icon {
  1711. width: 16px;
  1712. height: 16px;
  1713. flex-shrink: 0;
  1714. color: #F59E0B;
  1715. }
  1716. .home-guide-ima-alert-text {
  1717. flex: 1;
  1718. min-width: 0;
  1719. font-family: PingFang SC, PingFang SC;
  1720. font-weight: 400;
  1721. font-size: 13px;
  1722. color: #78350F;
  1723. line-height: 20px;
  1724. text-align: left;
  1725. }
  1726. .home-guide-ima-steps {
  1727. display: flex;
  1728. flex-direction: column;
  1729. gap: 18px;
  1730. margin-top: 18px;
  1731. }
  1732. .home-guide-ima-step {
  1733. display: flex;
  1734. align-items: center;
  1735. gap: 16px;
  1736. }
  1737. .home-guide-ima-step-num {
  1738. display: flex;
  1739. align-items: center;
  1740. justify-content: center;
  1741. flex-shrink: 0;
  1742. width: 32px;
  1743. height: 32px;
  1744. background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
  1745. box-shadow: 0px 4px 12px 0px rgba(59, 130, 246, 0.3);
  1746. border-radius: 10px;
  1747. font-family: PingFang SC, PingFang SC;
  1748. font-weight: 600;
  1749. font-size: 15px;
  1750. color: #FFFFFF;
  1751. line-height: 20px;
  1752. text-align: center;
  1753. }
  1754. .home-guide-ima-step-title {
  1755. flex: 1;
  1756. min-width: 0;
  1757. font-family: PingFang SC, PingFang SC;
  1758. font-weight: 400;
  1759. font-size: 14px;
  1760. color: #1F2937;
  1761. line-height: 22px;
  1762. text-align: left;
  1763. }
  1764. .home-guide-ima-notes {
  1765. margin-top: 20px;
  1766. }
  1767. .home-guide-ima-notes-title {
  1768. font-family: PingFang SC, PingFang SC;
  1769. font-weight: 600;
  1770. font-size: 14px;
  1771. color: #1F2937;
  1772. line-height: 20px;
  1773. text-align: left;
  1774. }
  1775. .home-guide-ima-notes-list {
  1776. display: flex;
  1777. flex-direction: column;
  1778. gap: 8px;
  1779. margin: 8px 0 0;
  1780. padding: 0;
  1781. list-style: none;
  1782. }
  1783. .home-guide-ima-notes-list li {
  1784. display: flex;
  1785. align-items: flex-start;
  1786. gap: 8px;
  1787. font-family: PingFang SC, PingFang SC;
  1788. font-weight: 400;
  1789. font-size: 13px;
  1790. color: #6B7280;
  1791. line-height: 20px;
  1792. text-align: left;
  1793. }
  1794. .home-guide-ima-notes-list li::before {
  1795. content: "";
  1796. flex-shrink: 0;
  1797. width: 6px;
  1798. height: 6px;
  1799. margin-top: 7px;
  1800. background: #1678FF;
  1801. border-radius: 6px;
  1802. }
  1803. .home-guide-ima-panel {
  1804. display: flex;
  1805. flex-direction: column;
  1806. padding: 20px;
  1807. background: #1E293B;
  1808. border-radius: 12px;
  1809. }
  1810. .home-guide-ima-panel--config {
  1811. gap: 10px;
  1812. }
  1813. .home-guide-ima-panel--verify {
  1814. gap: 12px;
  1815. }
  1816. .home-guide-ima-panel-title {
  1817. font-family: PingFang SC, PingFang SC;
  1818. font-weight: 600;
  1819. font-size: 12px;
  1820. color: #94A3B8;
  1821. line-height: 16px;
  1822. text-align: left;
  1823. }
  1824. .home-guide-ima-panel-line {
  1825. font-family: PingFang SC, PingFang SC;
  1826. font-weight: 400;
  1827. font-size: 13px;
  1828. color: #E2E8F0;
  1829. line-height: 20px;
  1830. text-align: left;
  1831. }
  1832. .home-guide-ima-panel-hint {
  1833. font-family: PingFang SC, PingFang SC;
  1834. font-weight: 400;
  1835. font-size: 13px;
  1836. color: #94A3B8;
  1837. line-height: 20px;
  1838. text-align: left;
  1839. }
  1840. .home-guide-ima-quote {
  1841. width: fit-content;
  1842. max-width: 100%;
  1843. box-sizing: border-box;
  1844. padding: 6px 16px;
  1845. background: #213040;
  1846. border-radius: 4px;
  1847. border: 1px solid #454E5A;
  1848. font-family: PingFang SC, PingFang SC;
  1849. font-weight: 600;
  1850. font-size: 12px;
  1851. color: #86EFAC;
  1852. line-height: 16px;
  1853. text-align: center;
  1854. }
  1855. .home-guide-ima-check {
  1856. display: flex;
  1857. align-items: center;
  1858. gap: 9px;
  1859. }
  1860. .home-guide-ima-check-marks {
  1861. display: inline-flex;
  1862. align-items: center;
  1863. gap: 9px;
  1864. flex-shrink: 0;
  1865. font-family: PingFang SC, PingFang SC;
  1866. font-weight: 400;
  1867. font-size: 13px;
  1868. color: #10B981;
  1869. line-height: 20px;
  1870. }
  1871. .home-guide-ima-check-text {
  1872. font-family: PingFang SC, PingFang SC;
  1873. font-weight: 400;
  1874. font-size: 13px;
  1875. color: #E2E8F0;
  1876. line-height: 20px;
  1877. text-align: left;
  1878. }
  1879. .home-guide-cli-body {
  1880. display: grid;
  1881. grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  1882. grid-template-areas:
  1883. "head ."
  1884. "title panel"
  1885. "steps panel";
  1886. column-gap: 20px;
  1887. row-gap: 20px;
  1888. }
  1889. .home-guide-cli-head {
  1890. grid-area: head;
  1891. display: flex;
  1892. align-items: center;
  1893. gap: 14px;
  1894. }
  1895. .home-guide-cli-logo-icon {
  1896. width: 38px;
  1897. height: 38px;
  1898. flex-shrink: 0;
  1899. }
  1900. .home-guide-cli-head-copy {
  1901. min-width: 0;
  1902. }
  1903. .home-guide-cli-name {
  1904. display: flex;
  1905. align-items: center;
  1906. flex-wrap: wrap;
  1907. }
  1908. .home-guide-cli-pkg {
  1909. font-family: Menlo, Menlo;
  1910. font-weight: 700;
  1911. font-size: 14px;
  1912. color: #0F172A;
  1913. line-height: 20px;
  1914. text-align: left;
  1915. }
  1916. .home-guide-cli-sep {
  1917. margin: 0 8px;
  1918. font-family: PingFang SC, PingFang SC;
  1919. font-weight: 400;
  1920. font-size: 14px;
  1921. color: #64748B;
  1922. line-height: 20px;
  1923. }
  1924. .home-guide-cli-alias {
  1925. font-family: PingFang SC, PingFang SC;
  1926. font-weight: 400;
  1927. font-size: 14px;
  1928. color: #64748B;
  1929. line-height: 20px;
  1930. text-align: left;
  1931. }
  1932. .home-guide-cli-tip {
  1933. margin-top: 2px;
  1934. font-family: PingFang SC, PingFang SC;
  1935. font-weight: 400;
  1936. font-size: 12px;
  1937. color: #94A3B8;
  1938. line-height: 16px;
  1939. text-align: left;
  1940. }
  1941. .home-guide-cli-steps-title {
  1942. grid-area: title;
  1943. margin: 0;
  1944. font-family: PingFang SC, PingFang SC;
  1945. font-weight: 500;
  1946. font-size: 16px;
  1947. color: #0F172A;
  1948. line-height: 24px;
  1949. text-align: left;
  1950. }
  1951. .home-guide-cli-steps {
  1952. grid-area: steps;
  1953. min-width: 0;
  1954. }
  1955. .home-guide-cli-panel {
  1956. grid-area: panel;
  1957. align-self: stretch;
  1958. min-width: 0;
  1959. display: flex;
  1960. flex-direction: column;
  1961. overflow: hidden;
  1962. border-radius: 12px;
  1963. background: #1E293B;
  1964. }
  1965. .home-guide-cli-step {
  1966. display: flex;
  1967. align-items: flex-start;
  1968. gap: 12px;
  1969. padding: 20px 0;
  1970. border-bottom: 1px solid #E2E8F0;
  1971. }
  1972. .home-guide-cli-step:first-child {
  1973. padding-top: 0;
  1974. }
  1975. .home-guide-cli-step:last-child {
  1976. border-bottom: none;
  1977. padding-bottom: 0;
  1978. }
  1979. .home-guide-cli-step-num {
  1980. display: flex;
  1981. align-items: center;
  1982. justify-content: center;
  1983. flex-shrink: 0;
  1984. width: 32px;
  1985. height: 32px;
  1986. background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
  1987. box-shadow: 0px 4px 12px 0px rgba(139, 92, 246, 0.3);
  1988. border-radius: 10px;
  1989. font-family: PingFang SC, PingFang SC;
  1990. font-weight: 600;
  1991. font-size: 15px;
  1992. color: #FFFFFF;
  1993. line-height: 20px;
  1994. text-align: center;
  1995. }
  1996. .home-guide-cli-step-copy {
  1997. min-width: 0;
  1998. }
  1999. .home-guide-cli-step-title {
  2000. font-family: PingFang SC, PingFang SC;
  2001. font-weight: 500;
  2002. font-size: 16px;
  2003. color: #0F172A;
  2004. line-height: 24px;
  2005. text-align: left;
  2006. }
  2007. .home-guide-cli-step-desc {
  2008. font-family: PingFang SC, PingFang SC;
  2009. font-weight: 400;
  2010. font-size: 14px;
  2011. color: #64748B;
  2012. line-height: 20px;
  2013. text-align: left;
  2014. }
  2015. .home-guide-cli-list {
  2016. display: flex;
  2017. flex-direction: column;
  2018. gap: 10px;
  2019. padding: 14px 16px;
  2020. background: #1E293B;
  2021. }
  2022. .home-guide-cli-command {
  2023. display: flex;
  2024. align-items: flex-start;
  2025. justify-content: space-between;
  2026. gap: 12px;
  2027. padding: 12px;
  2028. background: #0F172A;
  2029. border-radius: 10px;
  2030. }
  2031. .home-guide-cli-command-main {
  2032. min-width: 0;
  2033. flex: 1;
  2034. }
  2035. .home-guide-cli-command-label {
  2036. display: flex;
  2037. align-items: center;
  2038. gap: 6px;
  2039. font-family: PingFang SC, PingFang SC;
  2040. font-weight: 600;
  2041. font-size: 11px;
  2042. color: #94A3B8;
  2043. line-height: 16px;
  2044. text-align: left;
  2045. white-space: nowrap;
  2046. }
  2047. .home-guide-cli-command-dot {
  2048. width: 6px;
  2049. height: 6px;
  2050. flex-shrink: 0;
  2051. background: #A78BFA;
  2052. border-radius: 6px;
  2053. }
  2054. .home-guide-cli-command-text {
  2055. display: block;
  2056. margin-top: 6px;
  2057. min-width: 0;
  2058. white-space: pre-wrap;
  2059. word-break: break-all;
  2060. font-family: Consolas, Monaco, monospace;
  2061. font-size: 13px;
  2062. color: #7DD3FC;
  2063. line-height: 18px;
  2064. }
  2065. .home-guide-cli-command-copy {
  2066. display: inline-flex;
  2067. align-items: center;
  2068. gap: 4px;
  2069. margin: 0;
  2070. padding: 4px 8px;
  2071. border: none;
  2072. border-radius: 6px;
  2073. background: rgba(139, 92, 246, 0.2);
  2074. font-family: PingFang SC, PingFang SC;
  2075. font-weight: 600;
  2076. font-size: 11px;
  2077. color: #A78BFA;
  2078. line-height: 14px;
  2079. text-align: left;
  2080. cursor: pointer;
  2081. white-space: nowrap;
  2082. }
  2083. .home-guide-cli-command-copy-icon {
  2084. width: 12px;
  2085. height: 12px;
  2086. }
  2087. .home-guide-cli-footer {
  2088. display: flex;
  2089. align-items: center;
  2090. justify-content: space-between;
  2091. gap: 12px;
  2092. margin-top: auto;
  2093. padding: 18px 16px;
  2094. background: #0F172A;
  2095. border: 0 solid #334155;
  2096. }
  2097. .home-guide-cli-footer-tip {
  2098. font-family: PingFang SC, PingFang SC;
  2099. font-weight: 400;
  2100. font-size: 12px;
  2101. color: #94A3B8;
  2102. line-height: 16px;
  2103. text-align: left;
  2104. }
  2105. .home-guide-cli-copy-all {
  2106. display: inline-flex;
  2107. align-items: center;
  2108. gap: 6px;
  2109. margin: 0;
  2110. padding: 6px 12px;
  2111. border: none;
  2112. border-radius: 8px;
  2113. background: #1678FF;
  2114. font-family: PingFang SC, PingFang SC;
  2115. font-weight: 600;
  2116. font-size: 12px;
  2117. color: #FFFFFF;
  2118. line-height: 16px;
  2119. text-align: left;
  2120. cursor: pointer;
  2121. }
  2122. .home-guide-cli-copy-all-icon {
  2123. width: 12px;
  2124. height: 12px;
  2125. }
  2126. .home-guide-tool-steps,
  2127. .home-guide-code,
  2128. .home-guide-workbuddy-right {
  2129. flex: 1;
  2130. min-width: 0;
  2131. }
  2132. .home-guide-workbuddy-right {
  2133. display: flex;
  2134. flex-direction: column;
  2135. min-height: 0;
  2136. }
  2137. .home-guide-workbuddy-carousel {
  2138. position: relative;
  2139. flex: 1;
  2140. min-width: 0;
  2141. min-height: 0;
  2142. overflow: hidden;
  2143. border-radius: 12px;
  2144. }
  2145. .home-guide-workbuddy-track {
  2146. display: flex;
  2147. height: 100%;
  2148. transition: transform 0.35s ease;
  2149. }
  2150. .home-guide-workbuddy-slide {
  2151. flex: 0 0 100%;
  2152. width: 100%;
  2153. min-width: 100%;
  2154. min-height: 0;
  2155. }
  2156. .home-guide-workbuddy-slide--code {
  2157. display: flex;
  2158. }
  2159. .home-guide-workbuddy-slide--code .home-guide-code {
  2160. flex: 1;
  2161. min-width: 0;
  2162. min-height: 0;
  2163. height: 100%;
  2164. }
  2165. .home-guide-workbuddy-slide--img {
  2166. display: flex;
  2167. align-items: stretch;
  2168. overflow: hidden;
  2169. background: #FFFFFF;
  2170. border: 1px solid #E2E8F0;
  2171. border-radius: 12px;
  2172. box-sizing: border-box;
  2173. }
  2174. .home-guide-workbuddy-img {
  2175. display: block;
  2176. width: 100%;
  2177. height: 100%;
  2178. object-fit: contain;
  2179. object-position: center;
  2180. background: #F8FAFC;
  2181. }
  2182. .home-guide-workbuddy-arrow {
  2183. position: absolute;
  2184. top: 50%;
  2185. z-index: 2;
  2186. display: inline-flex;
  2187. align-items: center;
  2188. justify-content: center;
  2189. width: 28px;
  2190. height: 28px;
  2191. margin: 0;
  2192. padding: 0;
  2193. border: none;
  2194. border-radius: 50%;
  2195. background: rgba(15, 23, 42, 0.55);
  2196. color: #FFFFFF;
  2197. font-size: 20px;
  2198. line-height: 1;
  2199. cursor: pointer;
  2200. opacity: 0;
  2201. pointer-events: none;
  2202. transform: translateY(-50%);
  2203. transition: opacity 0.2s ease;
  2204. }
  2205. .home-guide-workbuddy-arrow.is-prev {
  2206. left: 10px;
  2207. }
  2208. .home-guide-workbuddy-arrow.is-next {
  2209. right: 10px;
  2210. }
  2211. .home-guide-workbuddy-carousel:hover .home-guide-workbuddy-arrow {
  2212. opacity: 1;
  2213. pointer-events: auto;
  2214. }
  2215. .home-guide-workbuddy-indicators {
  2216. position: absolute;
  2217. left: 0;
  2218. right: 0;
  2219. bottom: 10px;
  2220. z-index: 2;
  2221. display: flex;
  2222. align-items: center;
  2223. justify-content: center;
  2224. gap: 6px;
  2225. pointer-events: none;
  2226. }
  2227. .home-guide-workbuddy-dot {
  2228. width: 7px;
  2229. height: 7px;
  2230. margin: 0;
  2231. padding: 0;
  2232. border: none;
  2233. border-radius: 50%;
  2234. background: rgba(148, 163, 184, 0.7);
  2235. cursor: pointer;
  2236. pointer-events: auto;
  2237. }
  2238. .home-guide-workbuddy-dot.is-active {
  2239. background: #1678FF;
  2240. }
  2241. .home-guide-tool-steps {
  2242. display: flex;
  2243. flex-direction: column;
  2244. }
  2245. .home-guide-tool-step+.home-guide-tool-step {
  2246. margin-top: 18px;
  2247. }
  2248. .home-guide-tool-step {
  2249. display: flex;
  2250. align-items: flex-start;
  2251. gap: 16px;
  2252. }
  2253. .home-guide-tool-step-num {
  2254. display: flex;
  2255. align-items: center;
  2256. justify-content: center;
  2257. flex-shrink: 0;
  2258. width: 32px;
  2259. height: 32px;
  2260. background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
  2261. box-shadow: 0px 4px 12px 0px rgba(59, 130, 246, 0.3);
  2262. border-radius: 10px;
  2263. font-family: PingFang SC, PingFang SC;
  2264. font-weight: 600;
  2265. font-size: 15px;
  2266. color: #FFFFFF;
  2267. line-height: 20px;
  2268. text-align: center;
  2269. }
  2270. .home-guide-tool-step-copy {
  2271. flex: 1;
  2272. min-width: 0;
  2273. }
  2274. .home-guide-tool-step-title {
  2275. font-family: PingFang SC, PingFang SC;
  2276. font-weight: 500;
  2277. font-size: 16px;
  2278. color: #0F172A;
  2279. line-height: 24px;
  2280. text-align: left;
  2281. }
  2282. .home-guide-tool-step-desc {
  2283. font-family: PingFang SC, PingFang SC;
  2284. font-weight: 400;
  2285. font-size: 14px;
  2286. color: #64748B;
  2287. line-height: 20px;
  2288. text-align: left;
  2289. }
  2290. .home-guide-note {
  2291. margin-top: 20px;
  2292. padding: 16px;
  2293. background: linear-gradient(107deg, #FFFBEB 0%, #FEF3C7 100%);
  2294. border-radius: 12px;
  2295. border: 1px solid #FDE68A;
  2296. }
  2297. .home-guide-note-head {
  2298. display: flex;
  2299. align-items: center;
  2300. gap: 8px;
  2301. }
  2302. .home-guide-note-icon-box {
  2303. display: flex;
  2304. align-items: center;
  2305. justify-content: center;
  2306. flex-shrink: 0;
  2307. padding: 6px;
  2308. background: #F59E0B;
  2309. border-radius: 6px;
  2310. }
  2311. .home-guide-note-icon {
  2312. width: 12px;
  2313. height: 12px;
  2314. color: #FFFFFF;
  2315. }
  2316. .home-guide-note-title {
  2317. font-family: PingFang SC, PingFang SC;
  2318. font-weight: 500;
  2319. font-size: 15px;
  2320. color: #92400E;
  2321. line-height: 22px;
  2322. text-align: left;
  2323. }
  2324. .home-guide-note-list {
  2325. margin: 10px 0 0;
  2326. padding-left: 18px;
  2327. list-style: disc;
  2328. font-family: PingFang SC, PingFang SC;
  2329. font-weight: 400;
  2330. font-size: 13px;
  2331. color: #78350F;
  2332. line-height: 20px;
  2333. text-align: left;
  2334. }
  2335. .home-guide-note-list li {
  2336. margin-bottom: 10px;
  2337. }
  2338. .home-guide-note-list li:last-child {
  2339. margin-bottom: 0;
  2340. }
  2341. .home-guide-note-list li::marker {
  2342. color: #D97706;
  2343. }
  2344. .home-guide-code {
  2345. position: relative;
  2346. overflow: hidden;
  2347. border-radius: 12px;
  2348. background: #1E293B;
  2349. box-shadow: 0px 8px 24px 0px rgba(15, 23, 42, 0.18);
  2350. /* 高度由左侧步骤区撑开,代码内容不撑高整块区域 */
  2351. }
  2352. .home-guide-code-bar {
  2353. position: absolute;
  2354. top: 0;
  2355. left: 0;
  2356. right: 0;
  2357. z-index: 1;
  2358. display: flex;
  2359. align-items: center;
  2360. justify-content: space-between;
  2361. padding: 12px 14px;
  2362. border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  2363. background: #1E293B;
  2364. }
  2365. .home-guide-code-dots {
  2366. display: flex;
  2367. align-items: center;
  2368. gap: 6px;
  2369. width: 72px;
  2370. }
  2371. .home-guide-code-dots span {
  2372. width: 10px;
  2373. height: 10px;
  2374. border-radius: 50%;
  2375. }
  2376. .home-guide-code-dots span:nth-child(1) {
  2377. background: #FF5F57;
  2378. }
  2379. .home-guide-code-dots span:nth-child(2) {
  2380. background: #FEBC2E;
  2381. }
  2382. .home-guide-code-dots span:nth-child(3) {
  2383. background: #28C840;
  2384. }
  2385. .home-guide-code-title {
  2386. position: absolute;
  2387. left: 50%;
  2388. transform: translateX(-50%);
  2389. font-family: PingFang SC, PingFang SC;
  2390. font-weight: 500;
  2391. font-size: 13px;
  2392. color: #94A3B8;
  2393. line-height: 18px;
  2394. }
  2395. .home-guide-code-copy {
  2396. display: inline-flex;
  2397. align-items: center;
  2398. gap: 4px;
  2399. margin: 0;
  2400. padding: 6px 10px;
  2401. border: none;
  2402. border-radius: 6px;
  2403. background: #1678FF;
  2404. font-family: PingFang SC, PingFang SC;
  2405. font-weight: 500;
  2406. font-size: 12px;
  2407. color: #FFFFFF;
  2408. line-height: 16px;
  2409. cursor: pointer;
  2410. }
  2411. .home-guide-code-copy-icon {
  2412. width: 14px;
  2413. height: 14px;
  2414. }
  2415. .home-guide-code-body {
  2416. position: absolute;
  2417. top: 49px;
  2418. right: 0;
  2419. bottom: 0;
  2420. left: 0;
  2421. display: flex;
  2422. gap: 14px;
  2423. padding: 14px 16px 18px;
  2424. overflow: auto;
  2425. }
  2426. .home-guide-code-lines {
  2427. display: flex;
  2428. flex-direction: column;
  2429. flex-shrink: 0;
  2430. font-family: Consolas, Monaco, monospace;
  2431. font-size: 13px;
  2432. color: #64748B;
  2433. line-height: 22px;
  2434. text-align: right;
  2435. user-select: none;
  2436. }
  2437. .home-guide-code-pre {
  2438. margin: 0;
  2439. flex: 1;
  2440. min-width: 0;
  2441. font-family: Consolas, Monaco, monospace;
  2442. font-size: 13px;
  2443. line-height: 22px;
  2444. white-space: pre;
  2445. color: #E2E8F0;
  2446. }
  2447. .home-guide-code-pre :deep(.code-key) {
  2448. color: #7DD3FC;
  2449. }
  2450. .home-guide-code-pre :deep(.code-string) {
  2451. color: #86EFAC;
  2452. }
  2453. .home-guide-code-pre :deep(.code-punct) {
  2454. color: #CBD5E1;
  2455. }
  2456. .home-guide-block-verify .home-guide-block-head {
  2457. align-items: center;
  2458. gap: 12px;
  2459. }
  2460. .home-guide-block-verify .home-guide-block-num {
  2461. width: 46px;
  2462. height: 46px;
  2463. background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
  2464. box-shadow: 0px 8px 20px 0px rgba(139, 92, 246, 0.24);
  2465. border-radius: 14px;
  2466. font-family: PingFang SC, PingFang SC;
  2467. font-weight: 600;
  2468. font-size: 20px;
  2469. color: #FFFFFF;
  2470. line-height: 26px;
  2471. text-align: center;
  2472. }
  2473. .home-guide-block-verify .home-guide-block-title {
  2474. font-family: PingFang SC, PingFang SC;
  2475. font-weight: 600;
  2476. font-size: 20px;
  2477. color: #0F172A;
  2478. line-height: 28px;
  2479. text-align: left;
  2480. }
  2481. .home-guide-block-verify .home-guide-block-desc {
  2482. margin-top: 2px;
  2483. font-family: PingFang SC, PingFang SC;
  2484. font-weight: 400;
  2485. font-size: 14px;
  2486. color: #64748B;
  2487. line-height: 20px;
  2488. text-align: left;
  2489. }
  2490. .home-guide-verify {
  2491. display: flex;
  2492. gap: 16px;
  2493. margin-top: 16px;
  2494. }
  2495. .home-guide-verify-card {
  2496. flex: 1;
  2497. min-width: 0;
  2498. padding: 20px;
  2499. background: #F8FAFC;
  2500. border-radius: 12px;
  2501. border: 1px solid #E2E8F0;
  2502. }
  2503. .home-guide-verify-line {
  2504. height: 4px;
  2505. border-radius: 0;
  2506. }
  2507. .home-guide-verify-card:nth-child(1) .home-guide-verify-line {
  2508. background: linear-gradient(270deg, #059669 0%, #10B981 100%);
  2509. }
  2510. .home-guide-verify-card:nth-child(2) .home-guide-verify-line {
  2511. background: linear-gradient(270deg, #3B82F6 0%, #60A5FA 100%);
  2512. }
  2513. .home-guide-verify-card:nth-child(3) .home-guide-verify-line {
  2514. background: linear-gradient(270deg, #8B5CF6 0%, #A78BFA 100%);
  2515. }
  2516. .home-guide-verify-head {
  2517. display: flex;
  2518. align-items: center;
  2519. gap: 10px;
  2520. margin-top: 10px;
  2521. }
  2522. .home-guide-verify-icon-box {
  2523. display: flex;
  2524. align-items: center;
  2525. justify-content: center;
  2526. flex-shrink: 0;
  2527. padding: 10px;
  2528. border-radius: 10px;
  2529. }
  2530. .home-guide-verify-card:nth-child(1) .home-guide-verify-icon-box {
  2531. background: #ECFDF5;
  2532. }
  2533. .home-guide-verify-card:nth-child(2) .home-guide-verify-icon-box {
  2534. background: #DBEAFE;
  2535. }
  2536. .home-guide-verify-card:nth-child(3) .home-guide-verify-icon-box {
  2537. background: #F3E8FF;
  2538. }
  2539. .home-guide-verify-title {
  2540. font-family: PingFang SC, PingFang SC;
  2541. font-weight: 600;
  2542. font-size: 16px;
  2543. color: #0F172A;
  2544. line-height: 24px;
  2545. text-align: left;
  2546. }
  2547. .home-guide-verify-list {
  2548. display: flex;
  2549. flex-direction: column;
  2550. gap: 10px;
  2551. margin-top: 10px;
  2552. }
  2553. .home-guide-verify-item {
  2554. display: flex;
  2555. align-items: center;
  2556. justify-content: space-between;
  2557. gap: 8px;
  2558. padding: 12px 10px;
  2559. background: #FFFFFF;
  2560. border-radius: 10px;
  2561. font-family: PingFang SC, PingFang SC;
  2562. font-weight: 500;
  2563. font-size: 13px;
  2564. color: #334155;
  2565. line-height: 20px;
  2566. text-align: left;
  2567. }
  2568. .home-guide-verify-item span {
  2569. flex: 1;
  2570. min-width: 0;
  2571. white-space: nowrap;
  2572. overflow: hidden;
  2573. text-overflow: ellipsis;
  2574. }
  2575. .home-guide-verify-copy {
  2576. flex-shrink: 0;
  2577. color: #94A3B8;
  2578. cursor: pointer;
  2579. }
  2580. @media (max-width: 1200px) {
  2581. .home-content-stack {
  2582. --guide-inline-padding: 24px;
  2583. }
  2584. .home-guide-timeline-item {
  2585. max-width: 160px;
  2586. }
  2587. .home-guide-timeline-dot {
  2588. width: 44px;
  2589. height: 44px;
  2590. font-size: 18px;
  2591. line-height: 26px;
  2592. }
  2593. .home-guide-timeline-name {
  2594. margin-top: 8px;
  2595. font-size: 16px;
  2596. line-height: 22px;
  2597. }
  2598. .home-guide-timeline-desc {
  2599. font-size: 12px;
  2600. line-height: 18px;
  2601. }
  2602. .home-guide-timeline-line {
  2603. max-width: 100px;
  2604. margin-top: 20px;
  2605. }
  2606. .home-guide-block-token .home-guide-block-head {
  2607. flex-wrap: wrap;
  2608. row-gap: 16px;
  2609. }
  2610. .home-guide-block-token .home-guide-block-copy {
  2611. flex: 1 1 0;
  2612. min-width: 0;
  2613. }
  2614. .home-guide-block-token .home-guide-token {
  2615. flex: 1 1 100%;
  2616. width: 100%;
  2617. margin-left: 0;
  2618. flex-wrap: nowrap;
  2619. min-width: 0;
  2620. }
  2621. .home-guide-token-bar {
  2622. flex: 0 0 auto;
  2623. width: auto;
  2624. max-width: none;
  2625. }
  2626. .home-guide-block-token .home-guide-token-btn {
  2627. flex-shrink: 0;
  2628. }
  2629. .home-guide-doubao-body {
  2630. flex-direction: column;
  2631. align-items: stretch;
  2632. }
  2633. .home-guide-doubao-right {
  2634. max-width: 100%;
  2635. justify-content: center;
  2636. }
  2637. .home-guide-tool-body:not(.home-guide-ima-body) {
  2638. flex-direction: column;
  2639. align-items: stretch;
  2640. }
  2641. .home-guide-tool-body:not(.home-guide-ima-body) .home-guide-tool-steps {
  2642. flex: none;
  2643. width: 100%;
  2644. }
  2645. .home-guide-tool-body:not(.home-guide-ima-body) .home-guide-workbuddy-right {
  2646. flex: none;
  2647. width: 100%;
  2648. }
  2649. .home-guide-tool-body:not(.home-guide-ima-body) .home-guide-code {
  2650. flex: none;
  2651. width: 100%;
  2652. min-height: 360px;
  2653. }
  2654. .home-guide-ima-body {
  2655. flex-direction: column;
  2656. align-items: stretch;
  2657. }
  2658. .home-guide-cli-body {
  2659. grid-template-columns: 1fr;
  2660. grid-template-areas:
  2661. "head"
  2662. "title"
  2663. "steps"
  2664. "panel";
  2665. }
  2666. }
  2667. @media (max-width: 768px) {
  2668. .home-content-stack {
  2669. --guide-inline-padding: 16px;
  2670. }
  2671. .home-guide-inner {
  2672. gap: 24px;
  2673. }
  2674. .home-guide-title {
  2675. font-size: 24px;
  2676. line-height: 32px;
  2677. }
  2678. .home-guide-subtitle {
  2679. font-size: 14px;
  2680. line-height: 22px;
  2681. }
  2682. .home-guide-timeline-item {
  2683. max-width: 108px;
  2684. }
  2685. .home-guide-timeline-dot {
  2686. width: 40px;
  2687. height: 40px;
  2688. font-size: 16px;
  2689. line-height: 24px;
  2690. }
  2691. .home-guide-timeline-name {
  2692. font-size: 14px;
  2693. line-height: 20px;
  2694. }
  2695. .home-guide-timeline-desc {
  2696. font-size: 11px;
  2697. line-height: 16px;
  2698. }
  2699. .home-guide-timeline-line {
  2700. min-width: 12px;
  2701. max-width: 48px;
  2702. margin-top: 18px;
  2703. height: 3px;
  2704. }
  2705. .home-guide-features {
  2706. flex-direction: column;
  2707. gap: 16px;
  2708. padding: 20px 16px;
  2709. }
  2710. .home-guide-feature {
  2711. width: 100%;
  2712. }
  2713. .home-guide-tool-tabs {
  2714. flex-wrap: wrap;
  2715. }
  2716. .home-guide-verify {
  2717. flex-direction: column;
  2718. }
  2719. .home-guide-block {
  2720. padding: 16px;
  2721. }
  2722. .home-guide-block-token .home-guide-token {
  2723. flex-direction: column;
  2724. align-items: stretch;
  2725. }
  2726. .home-guide-token-bar {
  2727. width: 100%;
  2728. }
  2729. .home-guide-block-token .home-guide-token-btn {
  2730. width: 100%;
  2731. justify-content: center;
  2732. }
  2733. }
  2734. </style>