mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-09-16 18:27:13 +00:00
feat: 迁移 geekai-plus v4.3.1 到开源版
- 同步 Plus v4.3.1 功能源并移除商业 License 闭环 - 更新开源镜像命名、Docker 部署版本和 geekai 数据库配置 - 补充前端 ESLint 检查配置并修复存量解析与模板问题 - 保留 JWT、管理员权限、API Key 和 OAuth 等正常鉴权机制
This commit is contained in:
+18
-17
@@ -102,21 +102,22 @@ type SystemConfig struct {
|
||||
|
||||
// 配置键名常量
|
||||
const (
|
||||
ConfigKeySystem = "system" // 系统配置
|
||||
ConfigKeyNotice = "notice" // 公告配置
|
||||
ConfigKeyAgreement = "agreement" // 用户协议配置
|
||||
ConfigKeyPrivacy = "privacy" // 隐私政策配置
|
||||
ConfigKeyMarkMap = "mark_map" // 水印配置
|
||||
ConfigKeyCaptcha = "captcha" // 验证码配置
|
||||
ConfigKeyWxLogin = "wx_login" // 微信扫码登录配置
|
||||
ConfigKeyWxGzh = "wx_gzh" // 微信公众号配置
|
||||
ConfigKeySms = "sms" // 短信配置
|
||||
ConfigKeySmtp = "smtp" // SMTP 配置
|
||||
ConfigKeyOss = "oss" // OSS 配置
|
||||
ConfigKeyPayment = "payment" // 支付配置
|
||||
ConfigKeyModeration = "moderation" // 文本审查配置
|
||||
ConfigKeyAI3D = "ai3d" // AI3D 配置
|
||||
ConfigKeyJimeng = "jimeng" // 即梦AI配置
|
||||
ConfigKeyVideo = "video" // 视频生成配置
|
||||
ConfigKeyPPT = "ppt" // PPT 生成配置
|
||||
ConfigKeySystem = "system" // 系统配置
|
||||
ConfigKeyNotice = "notice" // 公告配置
|
||||
ConfigKeyAgreement = "agreement" // 用户协议配置
|
||||
ConfigKeyPrivacy = "privacy" // 隐私政策配置
|
||||
ConfigKeyMarkMap = "mark_map" // 水印配置
|
||||
ConfigKeyCaptcha = "captcha" // 验证码配置
|
||||
ConfigKeyWxLogin = "wx_login" // 微信扫码登录配置
|
||||
ConfigKeyWxGzh = "wx_gzh" // 微信公众号配置
|
||||
ConfigKeyWxGzhMenu = "wx_gzh_menu" // 微信公众号自定义菜单草稿
|
||||
ConfigKeySms = "sms" // 短信配置
|
||||
ConfigKeySmtp = "smtp" // SMTP 配置
|
||||
ConfigKeyOss = "oss" // OSS 配置
|
||||
ConfigKeyPayment = "payment" // 支付配置
|
||||
ConfigKeyModeration = "moderation" // 文本审查配置
|
||||
ConfigKeyAI3D = "ai3d" // AI3D 配置
|
||||
ConfigKeyJimeng = "jimeng" // 即梦AI配置
|
||||
ConfigKeyVideo = "video" // 视频生成配置
|
||||
ConfigKeyPPT = "ppt" // PPT 生成配置
|
||||
)
|
||||
|
||||
@@ -40,3 +40,19 @@ type WxGzhConfig struct {
|
||||
EncodingAESKey string `json:"encoding_aes_key"`
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
// WxGzhMenuConfig 公众号自定义菜单草稿(与微信公众平台 menu/create 的 button 结构一致)
|
||||
type WxGzhMenuConfig struct {
|
||||
Button []WxGzhMenuButton `json:"button"`
|
||||
}
|
||||
|
||||
// WxGzhMenuButton 单条菜单;含子菜单时仅填 Name 与 SubButton,不填 Type
|
||||
type WxGzhMenuButton struct {
|
||||
Type string `json:"type,omitempty"` // view | click 等
|
||||
Name string `json:"name"`
|
||||
Key string `json:"key,omitempty"` // click
|
||||
URL string `json:"url,omitempty"` // view
|
||||
AppID string `json:"appid,omitempty"` // miniprogram
|
||||
PagePath string `json:"pagepath,omitempty"` // miniprogram
|
||||
SubButton []WxGzhMenuButton `json:"sub_button,omitempty"` // 子菜单
|
||||
}
|
||||
|
||||
@@ -42,8 +42,9 @@ type JimengTaskRequest struct {
|
||||
Action string `json:"action"` // 请求Action
|
||||
Power int `json:"power"` // 消耗算力
|
||||
// 公共参数
|
||||
Prompt string `json:"prompt,omitempty"`
|
||||
ImageUrls []string `json:"image_urls,omitempty"`
|
||||
Prompt string `json:"prompt,omitempty"`
|
||||
ImageUrls []string `json:"image_urls,omitempty"`
|
||||
Content []JMContentItem `json:"content,omitempty"` // Seedance 官方多模态输入,优先级高于兼容字段
|
||||
|
||||
// 图片生成参数
|
||||
Size string `json:"size,omitempty"`
|
||||
@@ -52,10 +53,14 @@ type JimengTaskRequest struct {
|
||||
ForceSingle bool `json:"force_single,omitempty"`
|
||||
|
||||
// 视频生成参数
|
||||
Duration int `json:"duration,omitempty"` // 视频时长,单位:秒
|
||||
TemplateId string `json:"template_id,omitempty"` // 运镜模板ID
|
||||
AspectRatio string `json:"aspect_ratio,omitempty"`
|
||||
CameraStrength string `json:"camera_strength,omitempty"` // 运镜强度
|
||||
Duration int `json:"duration,omitempty"` // 视频时长,单位:秒
|
||||
TemplateId string `json:"template_id,omitempty"` // 运镜模板ID
|
||||
AspectRatio string `json:"aspect_ratio,omitempty"` // 视频比例
|
||||
Resolution string `json:"resolution,omitempty"` // 视频分辨率
|
||||
CameraStrength string `json:"camera_strength,omitempty"` // 运镜强度
|
||||
GenerateAudio *bool `json:"generate_audio,omitempty"` // Seedance 是否生成音频
|
||||
ReturnLastFrame bool `json:"return_last_frame,omitempty"`
|
||||
Watermark *bool `json:"watermark,omitempty"`
|
||||
|
||||
// 数字人视频生成参数
|
||||
AudioURL string `json:"audio_url,omitempty"` // 音频URL
|
||||
@@ -64,3 +69,18 @@ type JimengTaskRequest struct {
|
||||
// 视频动作迁移参数
|
||||
VideoURL string `json:"video_url,omitempty"` // 动作视频URL
|
||||
}
|
||||
|
||||
// JMAssetRef 多模态素材引用。
|
||||
type JMAssetRef struct {
|
||||
URL string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
// JMContentItem Seedance content[] 子项。
|
||||
type JMContentItem struct {
|
||||
Type string `json:"type"` // text/image_url/video_url/audio_url
|
||||
Text string `json:"text,omitempty"`
|
||||
ImageURL *JMAssetRef `json:"image_url,omitempty"`
|
||||
VideoURL *JMAssetRef `json:"video_url,omitempty"`
|
||||
AudioURL *JMAssetRef `json:"audio_url,omitempty"`
|
||||
Role string `json:"role,omitempty"` // first_frame/last_frame/reference_image/reference_video/reference_audio
|
||||
}
|
||||
|
||||
@@ -27,9 +27,11 @@ var PayChannel = map[string]string{
|
||||
"alipay": "支付宝商号",
|
||||
"wxpay": "微信商号",
|
||||
"epay": "易支付",
|
||||
"stripe": "Stripe 商号",
|
||||
}
|
||||
|
||||
var PayWays = map[string]string{
|
||||
"alipay": "支付宝",
|
||||
"wxpay": "微信支付",
|
||||
"stripe": "Stripe",
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ type PaymentConfig struct {
|
||||
Alipay AlipayConfig `json:"alipay,omitempty"` // 支付宝支付渠道配置
|
||||
Epay EpayConfig `json:"epay,omitempty"` // 易支付配置
|
||||
WxPay WxPayConfig `json:"wxpay,omitempty"` // 微信支付渠道配置
|
||||
Stripe StripeConfig `json:"stripe,omitempty"` // Stripe 支付配置
|
||||
}
|
||||
|
||||
// AlipayConfig 支付宝支付配置
|
||||
@@ -58,3 +59,19 @@ func (c *EpayConfig) Equal(other *EpayConfig) bool {
|
||||
c.ApiURL == other.ApiURL &&
|
||||
c.Domain == other.Domain
|
||||
}
|
||||
|
||||
// StripeConfig Stripe 支付配置
|
||||
type StripeConfig struct {
|
||||
Enabled bool `json:"enabled,omitempty"` // 是否启用该支付通道
|
||||
SecretKey string `json:"secret_key,omitempty"` // Stripe Secret Key
|
||||
WebhookKey string `json:"webhook_key,omitempty"` // Stripe Webhook Signing Secret
|
||||
Domain string `json:"domain,omitempty"` // 支付回跳域名
|
||||
Currency string `json:"currency,omitempty"` // 货币代码
|
||||
}
|
||||
|
||||
func (c *StripeConfig) Equal(other *StripeConfig) bool {
|
||||
return c.SecretKey == other.SecretKey &&
|
||||
c.WebhookKey == other.WebhookKey &&
|
||||
c.Domain == other.Domain &&
|
||||
c.Currency == other.Currency
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user