更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

-14
View File
@@ -2,11 +2,6 @@ package models
import "time"
// PlatformAgentApi 智能体API管理表: yz_platform_agent_api
// 按上游接口存储调用地址、请求协议、密钥列表、模型列表
// Provider 为用户自由填写的上游名称,不做枚举约束
// Protocol 显式指定请求协议,决定拼哪个端点路径与用哪种鉴权头
// ApiKeys 存 JSON 数组,支持同一上游下挂多个账号的密钥,每条可带备注
type PlatformAgentApi struct {
ID uint64 `orm:"column(id);pk;auto" json:"id"`
Provider string `orm:"column(provider);size(100)" json:"provider"`
@@ -30,8 +25,6 @@ func (m *PlatformAgentApi) TableName() string {
return "yz_platform_agent_api"
}
// EffectiveURL 返回实际生效的接口地址
// 勾选了自定义地址时用 CustomURL,否则用 BaseURL
func (m *PlatformAgentApi) EffectiveURL() string {
if m.UseCustomURL == 1 && m.CustomURL != "" {
return m.CustomURL
@@ -39,22 +32,15 @@ func (m *PlatformAgentApi) EffectiveURL() string {
return m.BaseURL
}
// AgentApiKey 单条密钥:密钥本身 + 可选备注(如账号名 mimo198)
type AgentApiKey struct {
Key string `json:"key"`
Remark string `json:"remark"`
}
// 请求协议枚举,与前端 constants.js 的 PROTOCOLS 保持一致
const (
// AgentProtocolChatCompletions OpenAI Chat Completions API,端点 {base}/chat/completions
AgentProtocolChatCompletions = "chat_completions"
// AgentProtocolResponses OpenAI Responses API,端点 {base}/responses
AgentProtocolResponses = "responses"
// AgentProtocolAnthropic Anthropic Messages API,端点 {base}/messages
AgentProtocolAnthropic = "anthropic"
// AgentProtocolGemini Google Gemini generateContent,端点 {base}/models/{model}:generateContent
AgentProtocolGemini = "gemini"
// AgentProtocolCustom 自定义:直接把填写的地址当完整端点请求,不追加任何路径
AgentProtocolCustom = "custom"
)