refactor: authType固定COOKIE/X-API-Key/自定义三种

This commit is contained in:
mediabot-pt
2026-07-06 01:32:37 +08:00
parent 6ce987b2f5
commit c042410c7b

View File

@@ -63,13 +63,15 @@
<div style="margin-bottom:12px;padding:10px 12px;border:1px solid #e6a23c;border-radius:4px;background:#fdf6ec">
<div style="font-weight:500;margin-bottom:6px;font-size:13px">认证方式</div>
<div style="display:flex;gap:8px;flex-wrap:wrap;align-items:center">
<el-select v-model="authType" size="small" @change="syncAuth" style="width:100px">
<el-select v-model="authType" size="small" @change="syncAuth" style="width:110px">
<el-option label="无" value="NONE"/>
<el-option label="Cookie" value="COOKIE"/>
<el-option label="Header" value="HEADER"/>
<el-option label="X-API-Key" value="API_KEY"/>
<el-option label="自定义" value="HEADER"/>
</el-select>
<el-input v-if="authType==='HEADER'" v-model="authValue" size="small" placeholder="如 Authorization: Bearer {token}" @input="syncAuth" style="flex:1;max-width:350px"/>
<span v-if="authType==='COOKIE'" style="color:#909399;font-size:12px">mediabot 管理 cookie</span>
<el-input v-if="authType==='API_KEY'" v-model="authValue" size="small" placeholder="API Key值或占位符" @input="syncAuth" style="flex:1;max-width:250px"/>
<el-input v-if="authType==='HEADER'" v-model="authValue" size="small" placeholder="完整header,如 Authorization: Bearer {token}" @input="syncAuth" style="flex:1;max-width:380px"/>
<span v-if="authType==='COOKIE'" style="color:#909399;font-size:12px">mediabo 管理 cookie 生命周期</span>
</div>
</div>