| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194 |
- <template>
- <div class="home-content-stack">
- <section class="home-section home-guide">
- <div class="home-guide-inner">
- <div class="home-guide-heading">
- <div class="home-guide-title">3 步接入,5 分钟上手</div>
- <div class="home-guide-subtitle">MCP 协议 + CLI 命令行双栖接入,共用一套 Token</div>
- </div>
- <div class="home-guide-timeline">
- <div class="home-guide-timeline-item">
- <div class="home-guide-timeline-dot">1</div>
- <div class="home-guide-timeline-name">获取 Token</div>
- <div class="home-guide-timeline-desc">生成访问令牌</div>
- </div>
- <div class="home-guide-timeline-line home-guide-timeline-line-1"></div>
- <div class="home-guide-timeline-item">
- <div class="home-guide-timeline-dot">2</div>
- <div class="home-guide-timeline-name">选择 AI 工具</div>
- <div class="home-guide-timeline-desc">MCP 一键接入/CLI命令行接入</div>
- </div>
- <div class="home-guide-timeline-line home-guide-timeline-line-2"></div>
- <div class="home-guide-timeline-item">
- <div class="home-guide-timeline-dot">3</div>
- <div class="home-guide-timeline-name">验证接入</div>
- <div class="home-guide-timeline-desc">发送问题验证接入是否成功</div>
- </div>
- </div>
- <div class="home-guide-block home-guide-block-token">
- <div class="home-guide-block-head">
- <div class="home-guide-block-num">1</div>
- <div class="home-guide-block-copy">
- <div class="home-guide-block-title">获取 Token</div>
- <div class="home-guide-block-desc">登录平台后生成访问令牌,适用于 MCP 协议与 CLI 接入</div>
- </div>
- <div class="home-guide-token">
- <div v-if="guideToken" class="home-guide-token-bar">
- <span class="home-guide-token-tag">Bearer</span>
- <span class="home-guide-token-value">
- <template v-if="guideTokenVisible">{{ guideToken }}</template>
- <template v-else>
- <span>{{ guideTokenMasked.head }}</span><span class="home-guide-token-mask">{{
- guideTokenMasked.middle }}</span><span>{{ guideTokenMasked.tail }}</span>
- </template>
- </span>
- <div class="home-guide-token-icons">
- <icon-svg :name="guideTokenVisible ? 'eye_not_displayed' : 'eye_show'" size="24px"
- class="home-guide-token-icon" @click="guideTokenVisible = !guideTokenVisible" />
- <icon-svg name="http_copy" size="14px" class="home-guide-token-icon" @click="copyText(guideToken)" />
- </div>
- </div>
- <button type="button" class="home-guide-token-btn" @click="createToken">
- <icon-svg name="gain_token" size="14px" class="home-guide-token-btn-icon" />
- <span>获取 Token</span>
- </button>
- </div>
- </div>
- <div class="home-guide-features">
- <div class="home-guide-feature">
- <icon-svg name="Mcp_general" size="38px" />
- <div>
- <div class="home-guide-feature-title">MCP 通用配置</div>
- <div class="home-guide-feature-desc">3 个 Server 共用同一套 Token</div>
- </div>
- </div>
- <div class="home-guide-feature">
- <icon-svg name="token_general" size="38px" />
- <div>
- <div class="home-guide-feature-title">一套 Token 通用</div>
- <div class="home-guide-feature-desc">MCP 客户端与 CLI 命令行均使用同一令牌</div>
- </div>
- </div>
- <div class="home-guide-feature">
- <icon-svg name="Core_scenario" size="38px" />
- <div>
- <div class="home-guide-feature-title">覆盖环境知识核心场景</div>
- <div class="home-guide-feature-desc">环境法规检索 / 标准导则查询 / 政策问答</div>
- </div>
- </div>
- </div>
- </div>
- <div class="home-guide-block home-guide-block-tools">
- <div class="home-guide-block-head">
- <div class="home-guide-block-num">2</div>
- <div class="home-guide-block-copy">
- <div class="home-guide-block-title">选择你的 AI 工具并复制配置</div>
- <div class="home-guide-block-desc">推荐 WorkBuddy 内置连接器一键接入,也支持自定义 JSON 配置</div>
- </div>
- </div>
- <div class="home-guide-access-tabs">
- <button type="button" class="home-guide-access-tab" :class="{ 'is-active': guideAccessTab === 'mcp' }"
- @click="guideAccessTab = 'mcp'">
- MCP 接入
- </button>
- <button type="button" class="home-guide-access-tab" :class="{ 'is-active': guideAccessTab === 'cli' }"
- @click="guideAccessTab = 'cli'">
- CLI 命令行接入
- </button>
- </div>
- <div class="home-guide-tool-panel">
- <template v-if="guideAccessTab === 'mcp'">
- <div class="home-guide-tool-tabs">
- <button v-for="tool in guideTools" :key="tool.key" type="button" class="home-guide-tool-tab"
- :class="{ 'is-active': guideToolTab === tool.key }" @click="guideToolTab = tool.key">
- <icon-svg v-if="tool.icon"
- :name="guideToolTab === tool.key ? 'workbuddy_icon' : 'workbuddy_icon_blue'" size="14px" />
- <span>{{ tool.label }}</span>
- </button>
- </div>
- <div v-if="guideToolTab === 'workbuddy'" class="home-guide-tool-body">
- <div class="home-guide-tool-steps">
- <div class="home-guide-tool-step">
- <div class="home-guide-tool-step-num">1</div>
- <div class="home-guide-tool-step-copy">
- <div class="home-guide-tool-step-title">自定义 MCP 配置</div>
- <div class="home-guide-tool-step-desc">
- 复制右侧 JSON → 对话框发送「这是环评云助手的 MCP 服务 JSON,帮我配置自定义的 mcp」并粘贴
- </div>
- </div>
- </div>
- <div class="home-guide-tool-step">
- <div class="home-guide-tool-step-num">2</div>
- <div class="home-guide-tool-step-copy">
- <div class="home-guide-tool-step-title">验证接入是否成功</div>
- <div class="home-guide-tool-step-desc">
- 按环境法规、标准导则、政策问答分别验证(见下方验证卡片)
- </div>
- </div>
- </div>
- <div class="home-guide-note">
- <div class="home-guide-note-head">
- <div class="home-guide-note-icon-box">
- <icon-svg name="WorkBuddy_attention" size="12px" class="home-guide-note-icon" />
- </div>
- <div class="home-guide-note-title">注意事项</div>
- </div>
- <ul class="home-guide-note-list">
- <li>优先用内置「环评云助手」连接器;仅在需要自定义时用右侧 JSON</li>
- <li>自定义接入时 type 字段为 streamableHttp(H 大写)</li>
- <li>不需要在 URL 末尾添加 /mcp 后缀</li>
- <li>将 YOUR_ACCESS_TOKEN 替换为真实 Token</li>
- <li>若工具未立即出现,完全退出并重新打开 WorkBuddy 后再验证</li>
- </ul>
- </div>
- </div>
- <div class="home-guide-code">
- <div class="home-guide-code-bar">
- <div class="home-guide-code-dots">
- <span></span>
- <span></span>
- <span></span>
- </div>
- <div class="home-guide-code-title">mcp.json</div>
- <button type="button" class="home-guide-code-copy" @click="copyGuideMcpJson">
- <icon-svg name="copy_icon_white" size="14px" class="home-guide-code-copy-icon" />
- <span>复制</span>
- </button>
- </div>
- <div class="home-guide-code-body">
- <div class="home-guide-code-lines">
- <span v-for="line in guideMcpLines" :key="line">{{ line }}</span>
- </div>
- <pre class="home-guide-code-pre"><span class="code-punct">{</span>
- <span class="code-key">"mcpServers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"hpyzs-law-keyword"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"url"</span><span class="code-punct">:</span> <span class="code-string">"https://mcp.eiacloud.com/law-keyword"</span><span class="code-punct">,</span>
- <span class="code-key">"headers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"Authorization"</span><span class="code-punct">:</span> <span class="code-string">"Bearer {{ guideAccessToken }}"</span>
- <span class="code-punct">}</span>
- <span class="code-punct">},</span>
- <span class="code-key">"hpyzs-law-semantic"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"url"</span><span class="code-punct">:</span> <span class="code-string">"https://mcp.eiacloud.com/law-semantic"</span><span class="code-punct">,</span>
- <span class="code-key">"headers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"Authorization"</span><span class="code-punct">:</span> <span class="code-string">"Bearer {{ guideAccessToken }}"</span>
- <span class="code-punct">}</span>
- <span class="code-punct">},</span>
- <span class="code-key">"hpyzs-qa"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"url"</span><span class="code-punct">:</span> <span class="code-string">"https://mcp.eiacloud.com/qa"</span><span class="code-punct">,</span>
- <span class="code-key">"headers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"Authorization"</span><span class="code-punct">:</span> <span class="code-string">"Bearer {{ guideAccessToken }}"</span>
- <span class="code-punct">}</span>
- <span class="code-punct">},</span>
- <span class="code-key">"hpyzs-emission"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"url"</span><span class="code-punct">:</span> <span class="code-string">"https://mcp.eiacloud.com/emission"</span><span class="code-punct">,</span>
- <span class="code-key">"headers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"Authorization"</span><span class="code-punct">:</span> <span class="code-string">"Bearer {{ guideAccessToken }}"</span>
- <span class="code-punct">}</span>
- <span class="code-punct">}</span>
- <span class="code-punct">}</span>
- <span class="code-punct">}</span></pre>
- </div>
- </div>
- </div>
- <div v-else-if="guideToolTab === 'doubao'" class="home-guide-tool-body home-guide-doubao-body">
- <div class="home-guide-ima-left">
- <div class="home-guide-ima-alert">
- <icon-svg name="ima_wps_warning" size="16px" class="home-guide-ima-alert-icon" />
- <div class="home-guide-ima-alert-text">
- {{ guideDoubaoContent.alert }}
- </div>
- </div>
- <div class="home-guide-ima-steps">
- <div v-for="step in guideDoubaoContent.steps" :key="step.num" class="home-guide-ima-step">
- <div class="home-guide-ima-step-num">{{ step.num }}</div>
- <div class="home-guide-ima-step-title">{{ step.title }}</div>
- </div>
- </div>
- <div class="home-guide-ima-notes">
- <div class="home-guide-ima-notes-title">注意事项</div>
- <ul class="home-guide-ima-notes-list">
- <li v-for="item in guideDoubaoContent.notes" :key="item">
- {{ item }}
- </li>
- </ul>
- </div>
- </div>
- <div class="home-guide-doubao-right">
- <img
- src="@/assets/images/doubao_img.png"
- alt="豆包自定义连接器示意"
- class="home-guide-doubao-img"
- width="608"
- height="472"
- />
- </div>
- </div>
- <div v-else-if="guideToolTab === 'qoderwork'" class="home-guide-tool-body">
- <div class="home-guide-tool-steps">
- <div class="home-guide-tool-step">
- <div class="home-guide-tool-step-num">1</div>
- <div class="home-guide-tool-step-copy">
- <div class="home-guide-tool-step-title">打开配置入口</div>
- <div class="home-guide-tool-step-desc">
- 左侧「扩展」→「连接器」→ 右上角「+ 添加」→「粘贴 JSON 配置」→ 在「通过 JSON 导入」对话框粘贴下方全量 JSON → 点击「导入」2
- </div>
- </div>
- </div>
- <div class="home-guide-tool-step">
- <div class="home-guide-tool-step-num">2</div>
- <div class="home-guide-tool-step-copy">
- <div class="home-guide-tool-step-title">粘贴 MCP 配置</div>
- <div class="home-guide-tool-step-desc">
- 将右侧「配置」中的 JSON 粘贴到客户端对应位置并保存。
- </div>
- </div>
- </div>
- <div class="home-guide-tool-step">
- <div class="home-guide-tool-step-num">3</div>
- <div class="home-guide-tool-step-copy">
- <div class="home-guide-tool-step-title">配置文件位置</div>
- <div class="home-guide-tool-step-desc">
- macOS:~/.qoderwork/mcp.json Windows:C:\Users\用户名\.qoderwork\mcp.json
- </div>
- </div>
- </div>
- <div class="home-guide-note">
- <div class="home-guide-note-head">
- <div class="home-guide-note-icon-box">
- <icon-svg name="WorkBuddy_attention" size="12px" class="home-guide-note-icon" />
- </div>
- <div class="home-guide-note-title">注意事项</div>
- </div>
- <ul class="home-guide-note-list">
- <li>type 字段为 "streamableHttp"(H 大写),与 WorkBuddy 一致</li>
- <li>不需要在 URL 末尾添加 /mcp 后缀</li>
- <li>将 YOUR_ACCESS_TOKEN 替换为页面「获取 Token」生成的真实 Token</li>
- <li>导入后可在「连接器 → 已安装」查看状态;改配置后需完全退出并重启 QoderWork</li>
- </ul>
- </div>
- </div>
- <div class="home-guide-code">
- <div class="home-guide-code-bar">
- <div class="home-guide-code-dots">
- <span></span>
- <span></span>
- <span></span>
- </div>
- <div class="home-guide-code-title">mcp.json</div>
- <button type="button" class="home-guide-code-copy" @click="copyGuideQoderworkJson">
- <icon-svg name="copy_icon_white" size="14px" class="home-guide-code-copy-icon" />
- <span>复制</span>
- </button>
- </div>
- <div class="home-guide-code-body">
- <div class="home-guide-code-lines">
- <span v-for="line in guideQoderworkLines" :key="line">{{ line }}</span>
- </div>
- <pre class="home-guide-code-pre"><span class="code-punct">{</span>
- <span class="code-key">"hpyzs-law-keyword"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"url"</span><span class="code-punct">:</span> <span class="code-string">"https://mcp.eiacloud.com/law-keyword"</span><span class="code-punct">,</span>
- <span class="code-key">"headers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"Authorization"</span><span class="code-punct">:</span> <span class="code-string">"Bearer {{ guideAccessToken }}"</span>
- <span class="code-punct">}</span>
- <span class="code-punct">},</span>
- <span class="code-key">"hpyzs-law-semantic"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"url"</span><span class="code-punct">:</span> <span class="code-string">"https://mcp.eiacloud.com/law-semantic"</span><span class="code-punct">,</span>
- <span class="code-key">"headers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"Authorization"</span><span class="code-punct">:</span> <span class="code-string">"Bearer {{ guideAccessToken }}"</span>
- <span class="code-punct">}</span>
- <span class="code-punct">},</span>
- <span class="code-key">"hpyzs-qa"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"url"</span><span class="code-punct">:</span> <span class="code-string">"https://mcp.eiacloud.com/qa"</span><span class="code-punct">,</span>
- <span class="code-key">"headers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"Authorization"</span><span class="code-punct">:</span> <span class="code-string">"Bearer {{ guideAccessToken }}"</span>
- <span class="code-punct">}</span>
- <span class="code-punct">},</span>
- <span class="code-key">"hpyzs-emission"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"url"</span><span class="code-punct">:</span> <span class="code-string">"https://mcp.eiacloud.com/emission"</span><span class="code-punct">,</span>
- <span class="code-key">"headers"</span><span class="code-punct">:</span> <span class="code-punct">{</span>
- <span class="code-key">"Authorization"</span><span class="code-punct">:</span> <span class="code-string">"Bearer {{ guideAccessToken }}"</span>
- <span class="code-punct">}</span>
- <span class="code-punct">}</span>
- <span class="code-punct">}</span></pre>
- </div>
- </div>
- </div>
- <div v-else-if="guideToolTab === 'wps'" class="home-guide-tool-body home-guide-ima-body">
- <div class="home-guide-ima-left">
- <div class="home-guide-ima-alert">
- <icon-svg name="ima_wps_warning" size="16px" class="home-guide-ima-alert-icon" />
- <div class="home-guide-ima-alert-text">
- {{ guideWpsContent.alert }}
- </div>
- </div>
- <div class="home-guide-ima-steps">
- <div v-for="step in guideWpsContent.steps" :key="step.num" class="home-guide-ima-step">
- <div class="home-guide-ima-step-num">{{ step.num }}</div>
- <div class="home-guide-ima-step-title">{{ step.title }}</div>
- </div>
- </div>
- <div class="home-guide-ima-notes">
- <div class="home-guide-ima-notes-title">注意事项</div>
- <ul class="home-guide-ima-notes-list">
- <li v-for="item in guideWpsContent.notes" :key="item">
- {{ item }}
- </li>
- </ul>
- </div>
- </div>
- <div class="home-guide-ima-right">
- <div class="home-guide-ima-panel home-guide-ima-panel--config">
- <div class="home-guide-ima-panel-title">【配置】</div>
- <div v-for="line in guideWpsContent.configLines" :key="line" class="home-guide-ima-panel-line">
- {{ line }}
- </div>
- </div>
- <div class="home-guide-ima-panel home-guide-ima-panel--verify">
- <div class="home-guide-ima-panel-title">【验证】</div>
- <div class="home-guide-ima-panel-hint">
- {{ guideWpsContent.verifyIntro }}
- </div>
- <div class="home-guide-ima-quote">{{ guideWpsContent.verifyQuote }}</div>
- <div class="home-guide-ima-panel-hint">
- {{ guideWpsContent.verifyResult }}
- </div>
- <div class="home-guide-ima-check">
- <span class="home-guide-ima-check-marks">
- <span>√</span>
- <span>√</span>
- </span>
- <span class="home-guide-ima-check-text">{{ guideWpsContent.verifyCheck }}</span>
- </div>
- </div>
- </div>
- </div>
- </template>
- <template v-else>
- <div class="home-guide-cli-body">
- <div class="home-guide-cli-head">
- <icon-svg name="systemLogoCircle" size="38px" class="home-guide-cli-logo-icon" />
- <div class="home-guide-cli-head-copy">
- <div class="home-guide-cli-name">
- <span class="home-guide-cli-pkg">hpyzs-mcp</span>
- <span class="home-guide-cli-sep">·</span>
- <span class="home-guide-cli-alias">环评云助手命令行工具</span>
- </div>
- <div class="home-guide-cli-tip">npm 全局安装 · 纯命令行执行 · 结果为原始 JSON</div>
- </div>
- </div>
- <div class="home-guide-cli-steps-title">接入步骤</div>
- <div class="home-guide-cli-steps">
- <div v-for="step in guideCliSteps" :key="step.num" class="home-guide-cli-step">
- <div class="home-guide-cli-step-num">{{ step.num }}</div>
- <div class="home-guide-cli-step-copy">
- <div class="home-guide-cli-step-title">{{ step.title }}</div>
- <div class="home-guide-cli-step-desc">{{ step.desc }}</div>
- </div>
- </div>
- </div>
- <div class="home-guide-cli-panel">
- <div class="home-guide-cli-list">
- <div v-for="command in guideCliCommands" :key="command.label" class="home-guide-cli-command">
- <div class="home-guide-cli-command-main">
- <div class="home-guide-cli-command-label">
- <span class="home-guide-cli-command-dot"></span>
- <span>{{ command.label }}</span>
- </div>
- <code class="home-guide-cli-command-text">{{ command.text }}</code>
- </div>
- <button type="button" class="home-guide-cli-command-copy" @click="copyText(command.text)">
- <icon-svg name="copy_icon_violet" size="12px" class="home-guide-cli-command-copy-icon" />
- <span>复制</span>
- </button>
- </div>
- </div>
- <div class="home-guide-cli-footer">
- <span class="home-guide-cli-footer-tip">{{ guideCliFooterTip }}</span>
- <button type="button" class="home-guide-cli-copy-all" @click="copyAllCliCommands">
- <icon-svg name="copy_icon_white" size="12px" class="home-guide-cli-copy-all-icon" />
- <span>全部复制</span>
- </button>
- </div>
- </div>
- </div>
- </template>
- </div>
- </div>
- <div class="home-guide-block home-guide-block-verify">
- <div class="home-guide-block-head">
- <div class="home-guide-block-num">3</div>
- <div class="home-guide-block-copy">
- <div class="home-guide-block-title">验证接入</div>
- <div class="home-guide-block-desc">在对话框中分别发送以下指令验证接入是否成功</div>
- </div>
- </div>
- <div class="home-guide-verify">
- <div v-for="card in guideVerifyCards" :key="card.title" class="home-guide-verify-card">
- <div class="home-guide-verify-line"></div>
- <div class="home-guide-verify-head">
- <div class="home-guide-verify-icon-box">
- <icon-svg :name="card.icon" size="16px" />
- </div>
- <div class="home-guide-verify-title">{{ card.title }}</div>
- </div>
- <div class="home-guide-verify-list">
- <div v-for="(question, questionIndex) in card.questions" :key="`${card.title}-${questionIndex}`"
- class="home-guide-verify-item">
- <span>{{ question }}</span>
- <icon-svg name="Connection_Copy" size="13px" class="home-guide-verify-copy"
- @click="copyText(question)" />
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- </div>
- </template>
- <script setup>
- import { computed, onMounted, ref } from "vue";
- import { ElMessage } from "element-plus";
- import { getMcpToken, createMcpToken } from "@/api/mcp";
- import { requireUserLogin } from "@/utils/auth";
- import globalStore from "@/store/modules/global";
- const global = globalStore();
- const guideToken = computed(() => global.mcpToken || "");
- const guideTokenVisible = ref(false);
- const guideTokenMasked = computed(() => {
- const token = guideToken.value;
- if (!token || token.length <= 15) {
- return { head: token, middle: "", tail: "" };
- }
- return {
- head: token.slice(0, 9),
- middle: "*".repeat(token.length - 15),
- tail: token.slice(-6),
- };
- });
- const applyToken = (data) => {
- // 兼容 data 为字符串,或 { token, expireTime, status, ... } 对象
- const token =
- typeof data === "string"
- ? data
- : data && typeof data === "object"
- ? data.token
- : "";
- if (token === null || token === undefined || token === "") {
- global.setMcpToken("");
- return;
- }
- global.setMcpToken(String(token));
- };
- const fetchMcpToken = async () => {
- try {
- const res = await getMcpToken();
- applyToken(res?.data);
- } catch (error) {
- console.error(error);
- }
- };
- const createToken = async () => {
- if (!requireUserLogin("请先登录", { redirect: true })) return;
- try {
- const res = await createMcpToken();
- applyToken(res?.data);
- } catch (error) {
- console.error(error);
- }
- };
- onMounted(() => {
- fetchMcpToken();
- });
- const guideAccessTab = ref("mcp");
- const guideToolTab = ref("workbuddy");
- const guideTools = [
- { key: "workbuddy", label: "WorkBuddy", icon: true },
- { key: "doubao", label: "豆包", icon: false },
- { key: "qoderwork", label: "Qoderwork", icon: false },
- ];
- const guideDoubaoContent = {
- alert: "豆包只能通过新建自定义连接器接入,不支持直接粘贴 JSON 配置。",
- steps: [
- {
- num: 1,
- title:
- "打开 豆包 → 找到「 技能·连接器·伙伴 」→ 点击「新建」→ 选择「 新建自定义连接器」 ",
- },
- {
- num: 2,
- title: "输入服务器名称、 URL 链接、自定义 Headers → 点击保存完成链接",
- },
- {
- num: 3,
- title:
- "验证是否成功——在对话中发送「用环评云助手MCP检索《大气污染物综合排放标准》中关于 VOCs 排放限值的规定」",
- },
- ],
- notes: ["自定义 Headers 内需要填写页面「获取 Token」生成的真实 Token"],
- };
- const guideWpsContent = {
- alert:
- "仅支持内置连接:WPS Comate 只能通过内置「环评云助手」连接接入,不支持粘贴 JSON 或自定义 MCP 配置。",
- steps: [
- {
- num: 1,
- title: "打开 WPS Comate → 进入「连接」→ 找到「环评云助手」→ 点击「连接」",
- },
- {
- num: 2,
- title: "按提示完成登录授权并启用连接即可使用,无需粘贴 JSON / Token",
- },
- {
- num: 3,
- title:
- "验证是否成功——在对话中发送「用环评云助手检索《大气污染物综合排放标准》中关于 VOCs 排放限值的规定」——返回的是权威法规数据,非网络搜索结果。",
- },
- ],
- notes: [
- "仅支持内置连接,无需手动粘贴 JSON 或自定义 MCP 配置",
- "首次使用需完成环评云助手账号登录授权,授权后连接长期有效",
- ],
- configLines: [
- "# 本平台仅支持内置「环评云助手」连接",
- "# 发现 → MCP → 环评云助手 → 一键连接并完成授权即可使用",
- ],
- verifyIntro: "# 在对话框中发一句:",
- verifyQuote:
- "「用环评云助手检索《大气污染物综合排放标准》中关于 VOCs 排放限值的规定」",
- verifyResult: " # → 看到法规检索工具运行成功 → 返回限值 = 接入成功",
- verifyCheck: "返回的是权威法规数据,非网络搜索",
- };
- const guideAccessToken = computed(
- () => guideToken.value || "YOUR_ACCESS_TOKEN",
- );
- const guideMcpJson = computed(() => {
- const token = guideAccessToken.value;
- return `{
- "mcpServers": {
- "hpyzs-law-keyword": {
- "url": "https://mcp.eiacloud.com/law-keyword",
- "headers": {
- "Authorization": "Bearer ${token}"
- }
- },
- "hpyzs-law-semantic": {
- "url": "https://mcp.eiacloud.com/law-semantic",
- "headers": {
- "Authorization": "Bearer ${token}"
- }
- },
- "hpyzs-qa": {
- "url": "https://mcp.eiacloud.com/qa",
- "headers": {
- "Authorization": "Bearer ${token}"
- }
- },
- "hpyzs-emission": {
- "url": "https://mcp.eiacloud.com/emission",
- "headers": {
- "Authorization": "Bearer ${token}"
- }
- }
- }
- }`;
- });
- const guideMcpLines = computed(() =>
- Array.from({ length: guideMcpJson.value.split("\n").length }, (_, i) => i + 1),
- );
- const guideQoderworkJson = computed(() => {
- const token = guideAccessToken.value;
- return `{
- "hpyzs-law-keyword": {
- "url": "https://mcp.eiacloud.com/law-keyword",
- "headers": {
- "Authorization": "Bearer ${token}"
- }
- },
- "hpyzs-law-semantic": {
- "url": "https://mcp.eiacloud.com/law-semantic",
- "headers": {
- "Authorization": "Bearer ${token}"
- }
- },
- "hpyzs-qa": {
- "url": "https://mcp.eiacloud.com/qa",
- "headers": {
- "Authorization": "Bearer ${token}"
- }
- },
- "hpyzs-emission": {
- "url": "https://mcp.eiacloud.com/emission",
- "headers": {
- "Authorization": "Bearer ${token}"
- }
- }
- }`;
- });
- const guideQoderworkLines = computed(() =>
- Array.from(
- { length: guideQoderworkJson.value.split("\n").length },
- (_, i) => i + 1,
- ),
- );
- const copyText = async (text) => {
- if (!text) {
- ElMessage.warning("暂无内容可复制");
- return;
- }
- try {
- if (navigator.clipboard?.writeText) {
- await navigator.clipboard.writeText(text);
- } else {
- const textarea = document.createElement("textarea");
- textarea.value = text;
- textarea.setAttribute("readonly", "");
- textarea.style.position = "fixed";
- textarea.style.left = "-9999px";
- document.body.appendChild(textarea);
- textarea.select();
- const ok = document.execCommand("copy");
- document.body.removeChild(textarea);
- if (!ok) throw new Error("execCommand copy failed");
- }
- ElMessage.success("复制成功");
- } catch (error) {
- console.error(error);
- ElMessage.error("复制失败");
- }
- };
- const copyGuideMcpJson = () => copyText(guideMcpJson.value);
- const copyGuideQoderworkJson = () => copyText(guideQoderworkJson.value);
- const guideCliSteps = [
- {
- num: 1,
- title: "控制台获取 Token(与 MCP 共用)",
- desc: "在第一步生成或复制 Token,CLI 与 MCP 使用同一套鉴权。",
- },
- {
- num: 2,
- title: "npm 全局安装环评云助手 CLI",
- desc: "npm install -g hpyzs-mcp",
- },
- {
- num: 3,
- title: "绑定 Token",
- desc: "右侧初始化命令已自动填入真实 Token,复制执行即可",
- },
- {
- num: 4,
- title: "命令行直接查询,返回原始 JSON",
- desc: "不经过 LLM,适合自动化流程与数据验证。",
- },
- ];
- const guideCliCommands = computed(() => {
- const token = guideAccessToken.value;
- return [
- {
- label: "安装 CLI",
- text: "npm install -g hpyzs-mcp",
- },
- {
- label: "绑定 Token",
- text: `hpyzs-mcp init --authorization "Bearer ${token}"`,
- },
- {
- label: "标准导则关键词查询",
- text: 'hpyzs-mcp law-keyword search_keyword_standard --name "地表水环境治疗标准"',
- },
- {
- label: "法规政策关键词查询",
- text: 'hpyzs-mcp law-keyword search_keyword_policy --name "噪声源分类指导目录"',
- },
- ];
- });
- const guideCliFooterTip = computed(() =>
- guideToken.value
- ? "初始化命令已自动填入真实 Token"
- : "将 YOUR_ACCESS_TOKEN 替换为页面「获取 Token」生成的真实 Token",
- );
- const copyAllCliCommands = () =>
- copyText(guideCliCommands.value.map((item) => item.text).join("\n"));
- const guideVerifyCards = [
- {
- icon: "environmental_legislation",
- title: "政策法规",
- questions: [
- "大气污染防治法第118条餐饮油烟怎么罚?",
- "环办政法函〔2017〕40号答复了什么?",
- "大气污染防治法2018修订何时施行?",
- ],
- },
- {
- icon: "Standard_guidelines",
- title: "标准导则",
- questions: [
- "GB16297表2二氧化硫二级浓度?",
- "GB16297排气筒最低高度要求?",
- "GB16297颗粒物无组织监控限值?",
- ],
- },
- {
- icon: "Policy_QA",
- title: "问答检索",
- questions: [
- "重大变动如何重新报批环评?",
- "排污许可证内容变更如何重新办理?",
- "环评批复几年不开工作废?",
- ],
- },
- ];
- </script>
- <style scoped lang="less">
- .home-section {
- width: 100%;
- }
- .home-content-stack {
- width: 100%;
- box-sizing: border-box;
- }
- .home-guide {
- box-sizing: border-box;
- width: 100%;
- padding: 60px;
- background: #FFFFFF;
- box-shadow: 0px 4px 24px 0px rgba(15, 23, 42, 0.06);
- border-radius: 8px 8px 8px 8px;
- }
- .home-guide-inner {
- width: 100%;
- display: flex;
- flex-direction: column;
- align-items: stretch;
- gap: 32px;
- }
- .home-guide-heading {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 8px;
- }
- .home-guide-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 32px;
- color: #1E293B;
- line-height: 40px;
- text-align: center;
- }
- .home-guide-subtitle {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 16px;
- color: #64748B;
- line-height: 24px;
- text-align: center;
- }
- .home-guide-timeline {
- display: flex;
- align-items: flex-start;
- justify-content: center;
- margin-top: 8px;
- }
- .home-guide-timeline-item {
- flex: 0 0 210px;
- width: 210px;
- max-width: 210px;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .home-guide-timeline-dot {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 52px;
- height: 52px;
- border-radius: 52px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 22px;
- color: #FFFFFF;
- line-height: 30px;
- text-align: center;
- }
- .home-guide-timeline-item:nth-child(1) .home-guide-timeline-dot {
- background: linear-gradient(135deg, #059669 0%, #10B981 100%);
- box-shadow: 0px 8px 24px 0px rgba(5, 150, 105, 0.3);
- }
- .home-guide-timeline-item:nth-child(3) .home-guide-timeline-dot {
- background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
- box-shadow: 0px 8px 24px 0px rgba(59, 130, 246, 0.28);
- }
- .home-guide-timeline-item:nth-child(5) .home-guide-timeline-dot {
- background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
- box-shadow: 0px 8px 24px 0px rgba(139, 92, 246, 0.28);
- }
- .home-guide-timeline-name {
- margin-top: 10px;
- width: 100%;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 20px;
- line-height: 28px;
- text-align: center;
- }
- .home-guide-timeline-item:nth-child(1) .home-guide-timeline-name {
- color: #059669;
- }
- .home-guide-timeline-item:nth-child(3) .home-guide-timeline-name {
- color: #3B82F6;
- }
- .home-guide-timeline-item:nth-child(5) .home-guide-timeline-name {
- color: #8B5CF6;
- }
- .home-guide-timeline-desc {
- margin-top: 2px;
- width: 100%;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- text-align: center;
- }
- .home-guide-timeline-line {
- flex-shrink: 0;
- width: 245px;
- height: 4px;
- margin-top: 24px;
- border-radius: 2px;
- }
- .home-guide-timeline-line-1 {
- background: linear-gradient(270deg, #059669 0%, #3B82F6 100%);
- }
- .home-guide-timeline-line-2 {
- background: linear-gradient(270deg, #3B82F6 0%, #8B5CF6 100%);
- }
- .home-guide-block {
- background: #FFFFFF;
- border-radius: 16px;
- padding: 24px;
- }
- .home-guide-block-head {
- display: flex;
- align-items: flex-start;
- gap: 12px;
- }
- .home-guide-block-num {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 24px;
- height: 24px;
- flex-shrink: 0;
- border-radius: 50%;
- background: #10B981;
- color: #FFFFFF;
- font-size: 13px;
- font-weight: 600;
- }
- .home-guide-block:nth-child(3) .home-guide-block-num {
- background: #10B981;
- }
- .home-guide-block:nth-child(4) .home-guide-block-num {
- background: #3B82F6;
- }
- .home-guide-block:nth-child(5) .home-guide-block-num {
- background: #A78BFA;
- }
- .home-guide-block-copy {
- flex: 1;
- min-width: 0;
- }
- .home-guide-block-title {
- font-size: 18px;
- font-weight: 600;
- color: #0F172A;
- line-height: 25px;
- }
- .home-guide-block-desc {
- margin-top: 4px;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- }
- .home-guide-token {
- display: flex;
- align-items: center;
- gap: 8px;
- flex-shrink: 0;
- }
- .home-guide-token-value {
- padding: 8px 12px;
- border-radius: 8px;
- background: #0F172A;
- color: #FFFFFF;
- font-size: 12px;
- }
- .home-guide-token-btn {
- padding: 8px 16px;
- border: none;
- border-radius: 8px;
- background: #1678FF;
- color: #FFFFFF;
- font-size: 13px;
- cursor: pointer;
- }
- .home-guide-block-token .home-guide-block-head {
- align-items: center;
- gap: 16px;
- }
- .home-guide-block-token .home-guide-block-num {
- width: 46px;
- height: 46px;
- background: linear-gradient(135deg, #059669 0%, #10B981 100%);
- box-shadow: 0px 8px 20px 0px rgba(5, 150, 105, 0.24);
- border-radius: 14px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 20px;
- color: #FFFFFF;
- line-height: 26px;
- text-align: center;
- }
- .home-guide-block-token .home-guide-block-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 22px;
- color: #0F172A;
- line-height: 30px;
- text-align: left;
- }
- .home-guide-block-token .home-guide-block-desc {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-block-token .home-guide-token {
- display: flex;
- align-items: center;
- gap: 16px;
- margin-left: auto;
- }
- .home-guide-token-bar {
- box-sizing: border-box;
- display: flex;
- align-items: center;
- width: 400px;
- height: 44px;
- padding: 12px 14px;
- background: #1E293B;
- border-radius: 6px;
- }
- .home-guide-token-tag {
- flex-shrink: 0;
- background: #1678FF;
- border-radius: 4px;
- padding: 3px 8px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 11px;
- color: #FFFFFF;
- line-height: 14px;
- text-align: center;
- }
- .home-guide-block-token .home-guide-token-value {
- margin-left: 8px;
- padding: 0;
- background: transparent;
- border-radius: 0;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 13px;
- color: #E5E7EB;
- line-height: 18px;
- text-align: left;
- }
- .home-guide-token-icons {
- display: flex;
- align-items: center;
- gap: 10px;
- margin-left: auto;
- }
- .home-guide-token-icon {
- width: 24px;
- height: 24px;
- color: #FFFFFF;
- }
- .home-guide-block-token .home-guide-token-btn {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- padding: 12px 14px;
- border: none;
- border-radius: 8px;
- background: linear-gradient(107deg, #3B82F6 0%, #6366F1 100%);
- box-shadow: 0px 2px 8px 0px rgba(59, 130, 246, 0.25);
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 20px;
- text-align: left;
- cursor: pointer;
- }
- .home-guide-token-btn-icon {
- width: 14px;
- height: 14px;
- }
- .home-guide-features {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 24px;
- margin-top: 16px;
- padding: 30px 24px;
- background: #F8FAFC;
- border-radius: 12px;
- border: 1px solid #E2E8F0;
- }
- .home-guide-feature {
- flex: 1;
- display: flex;
- align-items: center;
- gap: 12px;
- min-width: 0;
- :deep(.svg-icon) {
- width: 38px;
- height: 38px;
- flex-shrink: 0;
- }
- }
- .home-guide-feature-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #0F172A;
- line-height: 26px;
- text-align: left;
- white-space: nowrap;
- }
- .home-guide-feature-desc {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- text-align: left;
- white-space: nowrap;
- }
- .home-guide-access-tabs {
- display: flex;
- gap: 24px;
- margin-top: 20px;
- }
- .home-guide-access-tab {
- padding: 0;
- border: none;
- background: transparent;
- font-size: 14px;
- color: #64748B;
- cursor: pointer;
- }
- .home-guide-access-tab.is-active {
- color: #1678FF;
- font-weight: 600;
- }
- .home-guide-block-tools .home-guide-block-head {
- align-items: center;
- gap: 16px;
- }
- .home-guide-block-tools .home-guide-block-num {
- width: 46px;
- height: 46px;
- background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
- box-shadow: 0px 8px 20px 0px rgba(59, 130, 246, 0.24);
- border-radius: 14px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 20px;
- color: #FFFFFF;
- line-height: 26px;
- text-align: center;
- }
- .home-guide-block-tools .home-guide-block-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 22px;
- color: #0F172A;
- line-height: 30px;
- text-align: left;
- }
- .home-guide-block-tools .home-guide-block-desc {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-block-tools .home-guide-access-tabs {
- gap: 32px;
- margin-top: 26px;
- }
- .home-guide-block-tools .home-guide-access-tab {
- position: relative;
- padding: 0 0 13px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 18px;
- color: #0F172A;
- line-height: 25px;
- text-align: center;
- }
- .home-guide-block-tools .home-guide-access-tab.is-active {
- font-weight: 600;
- color: #1678FF;
- }
- .home-guide-block-tools .home-guide-access-tab.is-active::after {
- content: "";
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- height: 3px;
- background: #1678FF;
- }
- .home-guide-tool-panel {
- margin-top: 16px;
- padding: 20px;
- background: #F8FAFC;
- border-radius: 12px;
- border: 1px solid #E2E8F0;
- }
- .home-guide-tool-tabs {
- display: flex;
- justify-content: center;
- gap: 12px;
- }
- .home-guide-tool-tab {
- display: inline-flex;
- align-items: center;
- gap: 8px;
- margin: 0;
- padding: 10px 20px;
- border: 1px solid #E2E8F0;
- border-radius: 12px;
- background: #FFFFFF;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 14px;
- color: #475569;
- line-height: 20px;
- text-align: left;
- cursor: pointer;
- }
- .home-guide-tool-tab.is-active {
- border: none;
- background: linear-gradient(107deg, #3B82F6 0%, #6366F1 100%);
- box-shadow: 0px 4px 14px 0px rgba(59, 130, 246, 0.24);
- font-weight: 600;
- color: #FFFFFF;
- }
- .home-guide-tool-body {
- display: flex;
- gap: 20px;
- margin-top: 20px;
- align-items: stretch;
- }
- .home-guide-ima-body {
- align-items: stretch;
- }
- .home-guide-ima-left,
- .home-guide-ima-right {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- }
- .home-guide-doubao-body {
- align-items: flex-start;
- }
- .home-guide-doubao-body .home-guide-ima-left {
- flex: 1;
- min-width: 0;
- }
- .home-guide-doubao-right {
- flex: 0 0 auto;
- }
- .home-guide-doubao-img {
- display: block;
- width: 608px;
- height: 472px;
- max-width: 100%;
- object-fit: contain;
- }
- .home-guide-ima-right {
- gap: 16px;
- }
- .home-guide-ima-alert {
- display: flex;
- align-items: center;
- gap: 10px;
- padding: 12px 16px;
- background: #FFF7E6;
- border-radius: 12px;
- border: 1px solid #FFD591;
- }
- .home-guide-ima-alert-icon {
- width: 16px;
- height: 16px;
- flex-shrink: 0;
- color: #F59E0B;
- }
- .home-guide-ima-alert-text {
- flex: 1;
- min-width: 0;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 13px;
- color: #78350F;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-ima-steps {
- display: flex;
- flex-direction: column;
- gap: 18px;
- margin-top: 18px;
- }
- .home-guide-ima-step {
- display: flex;
- align-items: center;
- gap: 16px;
- }
- .home-guide-ima-step-num {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- width: 32px;
- height: 32px;
- background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
- box-shadow: 0px 4px 12px 0px rgba(59, 130, 246, 0.3);
- border-radius: 10px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 15px;
- color: #FFFFFF;
- line-height: 20px;
- text-align: center;
- }
- .home-guide-ima-step-title {
- flex: 1;
- min-width: 0;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #1F2937;
- line-height: 22px;
- text-align: left;
- }
- .home-guide-ima-notes {
- margin-top: 20px;
- }
- .home-guide-ima-notes-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 14px;
- color: #1F2937;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-ima-notes-list {
- display: flex;
- flex-direction: column;
- gap: 8px;
- margin: 8px 0 0;
- padding: 0;
- list-style: none;
- }
- .home-guide-ima-notes-list li {
- display: flex;
- align-items: flex-start;
- gap: 8px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 13px;
- color: #6B7280;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-ima-notes-list li::before {
- content: "";
- flex-shrink: 0;
- width: 6px;
- height: 6px;
- margin-top: 7px;
- background: #1678FF;
- border-radius: 6px;
- }
- .home-guide-ima-panel {
- display: flex;
- flex-direction: column;
- padding: 20px;
- background: #1E293B;
- border-radius: 12px;
- }
- .home-guide-ima-panel--config {
- gap: 10px;
- }
- .home-guide-ima-panel--verify {
- gap: 12px;
- }
- .home-guide-ima-panel-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 12px;
- color: #94A3B8;
- line-height: 16px;
- text-align: left;
- }
- .home-guide-ima-panel-line {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 13px;
- color: #E2E8F0;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-ima-panel-hint {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 13px;
- color: #94A3B8;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-ima-quote {
- width: fit-content;
- max-width: 100%;
- box-sizing: border-box;
- padding: 6px 16px;
- background: #213040;
- border-radius: 4px;
- border: 1px solid #454E5A;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 12px;
- color: #86EFAC;
- line-height: 16px;
- text-align: center;
- }
- .home-guide-ima-check {
- display: flex;
- align-items: center;
- gap: 9px;
- }
- .home-guide-ima-check-marks {
- display: inline-flex;
- align-items: center;
- gap: 9px;
- flex-shrink: 0;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 13px;
- color: #10B981;
- line-height: 20px;
- }
- .home-guide-ima-check-text {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 13px;
- color: #E2E8F0;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-cli-body {
- display: grid;
- grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
- grid-template-areas:
- "head ."
- "title panel"
- "steps panel";
- column-gap: 20px;
- row-gap: 20px;
- }
- .home-guide-cli-head {
- grid-area: head;
- display: flex;
- align-items: center;
- gap: 14px;
- }
- .home-guide-cli-logo-icon {
- width: 38px;
- height: 38px;
- flex-shrink: 0;
- }
- .home-guide-cli-head-copy {
- min-width: 0;
- }
- .home-guide-cli-name {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- }
- .home-guide-cli-pkg {
- font-family: Menlo, Menlo;
- font-weight: 700;
- font-size: 14px;
- color: #0F172A;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-cli-sep {
- margin: 0 8px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- }
- .home-guide-cli-alias {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-cli-tip {
- margin-top: 2px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 12px;
- color: #94A3B8;
- line-height: 16px;
- text-align: left;
- }
- .home-guide-cli-steps-title {
- grid-area: title;
- margin: 0;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 16px;
- color: #0F172A;
- line-height: 24px;
- text-align: left;
- }
- .home-guide-cli-steps {
- grid-area: steps;
- min-width: 0;
- }
- .home-guide-cli-panel {
- grid-area: panel;
- align-self: stretch;
- min-width: 0;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- border-radius: 12px;
- background: #1E293B;
- }
- .home-guide-cli-step {
- display: flex;
- align-items: flex-start;
- gap: 12px;
- padding: 20px 0;
- border-bottom: 1px solid #E2E8F0;
- }
- .home-guide-cli-step:first-child {
- padding-top: 0;
- }
- .home-guide-cli-step:last-child {
- border-bottom: none;
- padding-bottom: 0;
- }
- .home-guide-cli-step-num {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- width: 32px;
- height: 32px;
- background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
- box-shadow: 0px 4px 12px 0px rgba(139, 92, 246, 0.3);
- border-radius: 10px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 15px;
- color: #FFFFFF;
- line-height: 20px;
- text-align: center;
- }
- .home-guide-cli-step-copy {
- min-width: 0;
- }
- .home-guide-cli-step-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 16px;
- color: #0F172A;
- line-height: 24px;
- text-align: left;
- }
- .home-guide-cli-step-desc {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-cli-list {
- display: flex;
- flex-direction: column;
- gap: 10px;
- padding: 14px 16px;
- background: #1E293B;
- }
- .home-guide-cli-command {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 12px;
- padding: 12px;
- background: #0F172A;
- border-radius: 10px;
- }
- .home-guide-cli-command-main {
- min-width: 0;
- flex: 1;
- }
- .home-guide-cli-command-label {
- display: flex;
- align-items: center;
- gap: 6px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 11px;
- color: #94A3B8;
- line-height: 16px;
- text-align: left;
- white-space: nowrap;
- }
- .home-guide-cli-command-dot {
- width: 6px;
- height: 6px;
- flex-shrink: 0;
- background: #A78BFA;
- border-radius: 6px;
- }
- .home-guide-cli-command-text {
- display: block;
- margin-top: 6px;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-family: Consolas, Monaco, monospace;
- font-size: 13px;
- color: #7DD3FC;
- line-height: 18px;
- }
- .home-guide-cli-command-copy {
- display: inline-flex;
- align-items: center;
- gap: 4px;
- margin: 0;
- padding: 4px 8px;
- border: none;
- border-radius: 6px;
- background: rgba(139, 92, 246, 0.2);
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 11px;
- color: #A78BFA;
- line-height: 14px;
- text-align: left;
- cursor: pointer;
- white-space: nowrap;
- }
- .home-guide-cli-command-copy-icon {
- width: 12px;
- height: 12px;
- }
- .home-guide-cli-footer {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 12px;
- margin-top: auto;
- padding: 18px 16px;
- background: #0F172A;
- border: 0 solid #334155;
- }
- .home-guide-cli-footer-tip {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 12px;
- color: #94A3B8;
- line-height: 16px;
- text-align: left;
- }
- .home-guide-cli-copy-all {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- margin: 0;
- padding: 6px 12px;
- border: none;
- border-radius: 8px;
- background: #1678FF;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 12px;
- color: #FFFFFF;
- line-height: 16px;
- text-align: left;
- cursor: pointer;
- }
- .home-guide-cli-copy-all-icon {
- width: 12px;
- height: 12px;
- }
- .home-guide-tool-steps,
- .home-guide-code {
- flex: 1;
- min-width: 0;
- }
- .home-guide-tool-steps {
- display: flex;
- flex-direction: column;
- }
- .home-guide-tool-step+.home-guide-tool-step {
- margin-top: 18px;
- }
- .home-guide-tool-step {
- display: flex;
- align-items: flex-start;
- gap: 16px;
- }
- .home-guide-tool-step-num {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- width: 32px;
- height: 32px;
- background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
- box-shadow: 0px 4px 12px 0px rgba(59, 130, 246, 0.3);
- border-radius: 10px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 15px;
- color: #FFFFFF;
- line-height: 20px;
- text-align: center;
- }
- .home-guide-tool-step-copy {
- flex: 1;
- min-width: 0;
- }
- .home-guide-tool-step-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 16px;
- color: #0F172A;
- line-height: 24px;
- text-align: left;
- }
- .home-guide-tool-step-desc {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-note {
- margin-top: 20px;
- padding: 16px;
- background: linear-gradient(107deg, #FFFBEB 0%, #FEF3C7 100%);
- border-radius: 12px;
- border: 1px solid #FDE68A;
- }
- .home-guide-note-head {
- display: flex;
- align-items: center;
- gap: 8px;
- }
- .home-guide-note-icon-box {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- padding: 6px;
- background: #F59E0B;
- border-radius: 6px;
- }
- .home-guide-note-icon {
- width: 12px;
- height: 12px;
- color: #FFFFFF;
- }
- .home-guide-note-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 15px;
- color: #92400E;
- line-height: 22px;
- text-align: left;
- }
- .home-guide-note-list {
- margin: 10px 0 0;
- padding-left: 18px;
- list-style: disc;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 13px;
- color: #78350F;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-note-list li {
- margin-bottom: 10px;
- }
- .home-guide-note-list li:last-child {
- margin-bottom: 0;
- }
- .home-guide-note-list li::marker {
- color: #D97706;
- }
- .home-guide-code {
- position: relative;
- overflow: hidden;
- border-radius: 12px;
- background: #1E293B;
- box-shadow: 0px 8px 24px 0px rgba(15, 23, 42, 0.18);
- /* 高度由左侧步骤区撑开,代码内容不撑高整块区域 */
- }
- .home-guide-code-bar {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- z-index: 1;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 12px 14px;
- border-bottom: 1px solid rgba(148, 163, 184, 0.16);
- background: #1E293B;
- }
- .home-guide-code-dots {
- display: flex;
- align-items: center;
- gap: 6px;
- width: 72px;
- }
- .home-guide-code-dots span {
- width: 10px;
- height: 10px;
- border-radius: 50%;
- }
- .home-guide-code-dots span:nth-child(1) {
- background: #FF5F57;
- }
- .home-guide-code-dots span:nth-child(2) {
- background: #FEBC2E;
- }
- .home-guide-code-dots span:nth-child(3) {
- background: #28C840;
- }
- .home-guide-code-title {
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 13px;
- color: #94A3B8;
- line-height: 18px;
- }
- .home-guide-code-copy {
- display: inline-flex;
- align-items: center;
- gap: 4px;
- margin: 0;
- padding: 6px 10px;
- border: none;
- border-radius: 6px;
- background: #1678FF;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 12px;
- color: #FFFFFF;
- line-height: 16px;
- cursor: pointer;
- }
- .home-guide-code-copy-icon {
- width: 14px;
- height: 14px;
- }
- .home-guide-code-body {
- position: absolute;
- top: 49px;
- right: 0;
- bottom: 0;
- left: 0;
- display: flex;
- gap: 14px;
- padding: 14px 16px 18px;
- overflow: auto;
- }
- .home-guide-code-lines {
- display: flex;
- flex-direction: column;
- flex-shrink: 0;
- font-family: Consolas, Monaco, monospace;
- font-size: 13px;
- color: #64748B;
- line-height: 22px;
- text-align: right;
- user-select: none;
- }
- .home-guide-code-pre {
- margin: 0;
- flex: 1;
- min-width: 0;
- font-family: Consolas, Monaco, monospace;
- font-size: 13px;
- line-height: 22px;
- white-space: pre;
- color: #E2E8F0;
- }
- .home-guide-code-pre .code-key {
- color: #7DD3FC;
- }
- .home-guide-code-pre .code-string {
- color: #86EFAC;
- }
- .home-guide-code-pre .code-punct {
- color: #CBD5E1;
- }
- .home-guide-block-verify .home-guide-block-head {
- align-items: center;
- gap: 12px;
- }
- .home-guide-block-verify .home-guide-block-num {
- width: 46px;
- height: 46px;
- background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
- box-shadow: 0px 8px 20px 0px rgba(139, 92, 246, 0.24);
- border-radius: 14px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 20px;
- color: #FFFFFF;
- line-height: 26px;
- text-align: center;
- }
- .home-guide-block-verify .home-guide-block-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 20px;
- color: #0F172A;
- line-height: 28px;
- text-align: left;
- }
- .home-guide-block-verify .home-guide-block-desc {
- margin-top: 2px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #64748B;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-verify {
- display: flex;
- gap: 16px;
- margin-top: 16px;
- }
- .home-guide-verify-card {
- flex: 1;
- min-width: 0;
- padding: 20px;
- background: #F8FAFC;
- border-radius: 12px;
- border: 1px solid #E2E8F0;
- }
- .home-guide-verify-line {
- height: 4px;
- border-radius: 0;
- }
- .home-guide-verify-card:nth-child(1) .home-guide-verify-line {
- background: linear-gradient(270deg, #059669 0%, #10B981 100%);
- }
- .home-guide-verify-card:nth-child(2) .home-guide-verify-line {
- background: linear-gradient(270deg, #3B82F6 0%, #60A5FA 100%);
- }
- .home-guide-verify-card:nth-child(3) .home-guide-verify-line {
- background: linear-gradient(270deg, #8B5CF6 0%, #A78BFA 100%);
- }
- .home-guide-verify-head {
- display: flex;
- align-items: center;
- gap: 10px;
- margin-top: 10px;
- }
- .home-guide-verify-icon-box {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- padding: 10px;
- border-radius: 10px;
- }
- .home-guide-verify-card:nth-child(1) .home-guide-verify-icon-box {
- background: #ECFDF5;
- }
- .home-guide-verify-card:nth-child(2) .home-guide-verify-icon-box {
- background: #DBEAFE;
- }
- .home-guide-verify-card:nth-child(3) .home-guide-verify-icon-box {
- background: #F3E8FF;
- }
- .home-guide-verify-title {
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 16px;
- color: #0F172A;
- line-height: 24px;
- text-align: left;
- }
- .home-guide-verify-list {
- display: flex;
- flex-direction: column;
- gap: 10px;
- margin-top: 10px;
- }
- .home-guide-verify-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 8px;
- padding: 12px 10px;
- background: #FFFFFF;
- border-radius: 10px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 13px;
- color: #334155;
- line-height: 20px;
- text-align: left;
- }
- .home-guide-verify-item span {
- flex: 1;
- min-width: 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .home-guide-verify-copy {
- flex-shrink: 0;
- color: #94A3B8;
- cursor: pointer;
- }
- </style>
|