merge code for v4.1.8
556
CHANGELOG.md
@ -1,350 +1,372 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
## v4.1.8
|
||||||
|
|
||||||
|
- 功能优化:**UI 全新改版,支持主题切换**。 :rocket: :rocket: :rocket:
|
||||||
|
- 功能新增:Gitee AI API 接口接入,目前支持 Gitee 的 SD 绘图接口,支持 Gitee 的 AI 对话接口。:rocket: :rocket: :rocket:
|
||||||
|
- Bug 修复:修复音 Luma API 更新导致任务响应解析失败的错误
|
||||||
|
- 功能优化:支持 Suno v4.0 模型支持
|
||||||
|
- Bug 修复:修复 Suno 已完成任务删除失败的 错误
|
||||||
|
- 功能新增:支持 OpenAI 实时语音通话功能,目前已经支持按次收费,支持管理员设置每次实时语音通话的算力消耗
|
||||||
|
- 功能新增:生成提示词需要消耗算力,支持管理员设置每次生成提示词的算力消耗,防止被白嫖
|
||||||
|
- 功能新增:DALL-E-3 绘图支持 Flux 绘图模型,支持在管理后添加 Flux,SD 等绘图模型
|
||||||
|
- 功能优化:Markdown 支持解析 emoji 表情
|
||||||
|
- 功能优化:当管理后台禁用了某个绘图菜单的时候,移动端绘图菜单也会同步禁用(不显示该功能)
|
||||||
|
|
||||||
## v4.1.7
|
## v4.1.7
|
||||||
* Bug修复:手机邮箱相关的注册问题 [#IB0HS5](https://gitee.com/blackfox/geekai/issues/IB0HS5)
|
|
||||||
* Bug修复:音乐视频无法下载,思维导图下载后看不清文字[#IB0N2E](https://gitee.com/blackfox/geekai/issues/IB0N2E)
|
- Bug 修复:手机邮箱相关的注册问题 [#IB0HS5](https://gitee.com/blackfox/geekai/issues/IB0HS5)
|
||||||
* 功能优化:保存所有AIGC任务的原始信息,程序启动之后自动将未执行的任务加入到 redis 队列
|
- Bug 修复:音乐视频无法下载,思维导图下载后看不清文字[#IB0N2E](https://gitee.com/blackfox/geekai/issues/IB0N2E)
|
||||||
* 功能优化:失败的任务自动退回算力,而不需要在删除的时候再退回
|
- 功能优化:保存所有 AIGC 任务的原始信息,程序启动之后自动将未执行的任务加入到 redis 队列
|
||||||
* 功能新增:支持设置一个专门的模型来翻译提示词,提供 Mate 提示词生成功能
|
- 功能优化:失败的任务自动退回算力,而不需要在删除的时候再退回
|
||||||
* Bug修复:修复图片对话的时候,上下文不起作用的Bug
|
- 功能新增:支持设置一个专门的模型来翻译提示词,提供 Mate 提示词生成功能
|
||||||
* 功能新增:管理后台新增批量导出兑换码功能
|
- Bug 修复:修复图片对话的时候,上下文不起作用的 Bug
|
||||||
|
- 功能新增:管理后台新增批量导出兑换码功能
|
||||||
|
|
||||||
## v4.1.6
|
## v4.1.6
|
||||||
* 功能新增:**支持OpenAI实时语音对话功能** :rocket: :rocket: :rocket:, Beta 版,目前没有做算力计费控制,目前只有 VIP 用户可以使用。
|
|
||||||
* 功能优化:优化MysQL容器配置文档,解决MysQL容器资源占用过高问题
|
- 功能新增:**支持 OpenAI 实时语音对话功能** :rocket: :rocket: :rocket:, Beta 版,目前没有做算力计费控制,目前只有 VIP 用户可以使用。
|
||||||
* 功能新增:管理后台增加AI绘图任务管理,可在管理后台浏览和删除用户的绘图任务
|
- 功能优化:优化 MysQL 容器配置文档,解决 MysQL 容器资源占用过高问题
|
||||||
* 功能新增:管理后台增加Suno和Luma任务管理功能
|
- 功能新增:管理后台增加 AI 绘图任务管理,可在管理后台浏览和删除用户的绘图任务
|
||||||
* Bug修复:修复管理后台删除兑换码报 404 错误
|
- 功能新增:管理后台增加 Suno 和 Luma 任务管理功能
|
||||||
* 功能优化:优化充值产品定价逻辑,可以设置原价和优惠价,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**。
|
- Bug 修复:修复管理后台删除兑换码报 404 错误
|
||||||
|
- 功能优化:优化充值产品定价逻辑,可以设置原价和优惠价,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**。
|
||||||
|
|
||||||
## v4.1.5
|
## v4.1.5
|
||||||
* 功能优化:重构 websocket 组件,减少 websocket 连接数,全站共享一个 websocket 连接
|
|
||||||
* Bug修复:兼容手机端原生微信支付和支付宝支付渠道
|
- 功能优化:重构 websocket 组件,减少 websocket 连接数,全站共享一个 websocket 连接
|
||||||
* Bug修复:修复删除绘图任务时候因为字段长度过短导致SQL执行失败问题
|
- Bug 修复:兼容手机端原生微信支付和支付宝支付渠道
|
||||||
* 功能优化:优化 Vue 组件通信代码,使用共享数据来替换之前的事件订阅模式,效率更高一些
|
- Bug 修复:修复删除绘图任务时候因为字段长度过短导致 SQL 执行失败问题
|
||||||
* 功能优化:优化思维导图生成功果页面,优化用户体验
|
- 功能优化:优化 Vue 组件通信代码,使用共享数据来替换之前的事件订阅模式,效率更高一些
|
||||||
|
- 功能优化:优化思维导图生成功果页面,优化用户体验
|
||||||
|
|
||||||
## v4.1.4
|
## v4.1.4
|
||||||
* 功能优化:用户文件列表组件增加分页功能支持
|
|
||||||
* Bug修复:修复用户注册失败Bug,注册操作只弹出一次行为验证码
|
- 功能优化:用户文件列表组件增加分页功能支持
|
||||||
* 功能优化:首次登录不需要验证码,直接登录,登录失败之后才弹出验证码
|
- Bug 修复:修复用户注册失败 Bug,注册操作只弹出一次行为验证码
|
||||||
* 功能新增:给 AI 应用(角色)增加分类,前端支持分类筛选
|
- 功能优化:首次登录不需要验证码,直接登录,登录失败之后才弹出验证码
|
||||||
* 功能优化:允许用户在聊天页面设置是否使用流式输出或者一次性输出,兼容 GPT-O1 模型。
|
- 功能新增:给 AI 应用(角色)增加分类,前端支持分类筛选
|
||||||
* 功能优化:移除PayJS支付渠道支持,PayJs已经关闭注册服务,请使用其他支付方式。
|
- 功能优化:允许用户在聊天页面设置是否使用流式输出或者一次性输出,兼容 GPT-O1 模型。
|
||||||
* 功能新增:新增GeeK易支付支付渠道,支持支付宝,微信支付,QQ钱包,京东支付,抖音支付,Paypal支付等支付方式
|
- 功能优化:移除 PayJS 支付渠道支持,PayJs 已经关闭注册服务,请使用其他支付方式。
|
||||||
* Bug修复:修复注册页面 tab 组件没有自动选中问题 [#6](https://github.com/yangjian102621/geekai-plus/issues/6)
|
- 功能新增:新增 GeeK 易支付支付渠道,支持支付宝,微信支付,QQ 钱包,京东支付,抖音支付,Paypal 支付等支付方式
|
||||||
* 功能优化:Luma生成视频任务增加自动翻译功能
|
- Bug 修复:修复注册页面 tab 组件没有自动选中问题 [#6](https://github.com/yangjian102621/geekai-plus/issues/6)
|
||||||
* Bug修复:Suno 和 Luma 任务没有判断用户算力
|
- 功能优化:Luma 生成视频任务增加自动翻译功能
|
||||||
* 功能新增:邮箱注册增加邮箱后缀白名单,防止使用某些垃圾邮箱注册薅羊毛
|
- Bug 修复:Suno 和 Luma 任务没有判断用户算力
|
||||||
* 功能优化:清空未支付订单时,只清空超过15分钟未支付的订单
|
- 功能新增:邮箱注册增加邮箱后缀白名单,防止使用某些垃圾邮箱注册薅羊毛
|
||||||
|
- 功能优化:清空未支付订单时,只清空超过 15 分钟未支付的订单
|
||||||
|
|
||||||
## v4.1.3
|
## v4.1.3
|
||||||
* 功能优化:重构用户登录模块,给所有的登录组件增加行为验证码功能,支持用户绑定手机,邮箱和微信
|
|
||||||
* 功能优化:重构找回密码模块,支持通过手机或者邮箱找回密码
|
- 功能优化:重构用户登录模块,给所有的登录组件增加行为验证码功能,支持用户绑定手机,邮箱和微信
|
||||||
* 功能优化:管理后台给可以拖动排序的组件添加拖动图标
|
- 功能优化:重构找回密码模块,支持通过手机或者邮箱找回密码
|
||||||
* 功能优化:Suno 支持合成完整歌曲,和上传自己的音乐作品进行二次创作
|
- 功能优化:管理后台给可以拖动排序的组件添加拖动图标
|
||||||
* Bug修复:手机端角色和模型选择不生效
|
- 功能优化:Suno 支持合成完整歌曲,和上传自己的音乐作品进行二次创作
|
||||||
* Bug修复:用户登录过期之后聊天页面出现大量报错,需要刷新页面才能正常
|
- Bug 修复:手机端角色和模型选择不生效
|
||||||
* 功能优化:优化聊天页面 Websocket 断线重连代码,提高用户体验
|
- Bug 修复:用户登录过期之后聊天页面出现大量报错,需要刷新页面才能正常
|
||||||
* 功能优化:给算力增减服务全部加上数据库事务和同步锁
|
- 功能优化:优化聊天页面 Websocket 断线重连代码,提高用户体验
|
||||||
* 功能优化:支持用户在前端对话界面选择插件
|
- 功能优化:给算力增减服务全部加上数据库事务和同步锁
|
||||||
* 功能新增:支持 Luma 文生视频功能
|
- 功能优化:支持用户在前端对话界面选择插件
|
||||||
|
- 功能新增:支持 Luma 文生视频功能
|
||||||
|
|
||||||
## v4.1.2
|
## v4.1.2
|
||||||
* Bug修复:修复思维导图页面获取模型失败的问题
|
|
||||||
* 功能优化:优化MJ,SD,DALL-E 任务列表页面,显示失败任务的错误信息,删除失败任务可以恢复扣减算力
|
- Bug 修复:修复思维导图页面获取模型失败的问题
|
||||||
* Bug修复:修复后台拖动排序组件 Bug
|
- 功能优化:优化 MJ,SD,DALL-E 任务列表页面,显示失败任务的错误信息,删除失败任务可以恢复扣减算力
|
||||||
* 功能优化:更新数据库失败时候显示具体的的报错信息
|
- Bug 修复:修复后台拖动排序组件 Bug
|
||||||
* Bug修复:修复管理后台对话详情页内容显示异常问题
|
- 功能优化:更新数据库失败时候显示具体的的报错信息
|
||||||
* 功能优化:管理后台新增清空所有未支付订单的功能
|
- Bug 修复:修复管理后台对话详情页内容显示异常问题
|
||||||
* 功能优化:给会话信息和系统配置数据加上缓存功能,减少 http 请求
|
- 功能优化:管理后台新增清空所有未支付订单的功能
|
||||||
* 功能新增:移除微信机器人收款功能,增加卡密功能,支持用户使用卡密兑换算力
|
- 功能优化:给会话信息和系统配置数据加上缓存功能,减少 http 请求
|
||||||
|
- 功能新增:移除微信机器人收款功能,增加卡密功能,支持用户使用卡密兑换算力
|
||||||
|
|
||||||
## v4.1.1
|
## v4.1.1
|
||||||
* Bug修复:修复 GPT 模型 function call 调用后没有输出的问题
|
|
||||||
* 功能新增:允许获取 License 授权用户可以自定义版权信息
|
- Bug 修复:修复 GPT 模型 function call 调用后没有输出的问题
|
||||||
* 功能新增:聊天对话框支持粘贴剪切板内容来上传截图和文件
|
- 功能新增:允许获取 License 授权用户可以自定义版权信息
|
||||||
* 功能优化:增加 session 和系统配置缓存,确保每个页面只进行一次 session 和 get system config 请求
|
- 功能新增:聊天对话框支持粘贴剪切板内容来上传截图和文件
|
||||||
* 功能优化:在应用列表页面,无需先添加模型到用户工作区,可以直接使用
|
- 功能优化:增加 session 和系统配置缓存,确保每个页面只进行一次 session 和 get system config 请求
|
||||||
* 功能新增:MJ 绘图失败的任务不会自动删除,而是会在列表页显示失败详细错误信息
|
- 功能优化:在应用列表页面,无需先添加模型到用户工作区,可以直接使用
|
||||||
* 功能新增:允许在设置首页纯色背景,背景图片,随机背景图片三种背景模式
|
- 功能新增:MJ 绘图失败的任务不会自动删除,而是会在列表页显示失败详细错误信息
|
||||||
* 功能新增:允许在管理后台设置首页显示的导航菜单
|
- 功能新增:允许在设置首页纯色背景,背景图片,随机背景图片三种背景模式
|
||||||
* Bug修复:修复注册页面先显示关闭注册组件,然后再显示注册组件
|
- 功能新增:允许在管理后台设置首页显示的导航菜单
|
||||||
* 功能新增:增加 Suno 文生歌曲功能
|
- Bug 修复:修复注册页面先显示关闭注册组件,然后再显示注册组件
|
||||||
* 功能优化:移除多平台模型支持,统一使用 one-api 接口形式,其他平台的模型需要通过 one-api 接口添加
|
- 功能新增:增加 Suno 文生歌曲功能
|
||||||
* 功能优化:在所有列表页面增加返回顶部按钮
|
- 功能优化:移除多平台模型支持,统一使用 one-api 接口形式,其他平台的模型需要通过 one-api 接口添加
|
||||||
|
- 功能优化:在所有列表页面增加返回顶部按钮
|
||||||
|
|
||||||
## v4.1.0
|
## v4.1.0
|
||||||
* bug修复:修复移动端修改聊天标题不生效的问题
|
|
||||||
* Bug修复:修复用户注册不显示用户名的问题
|
|
||||||
* Bug修复:修复管理后台拖动排序不生效的问题
|
|
||||||
* 功能优化:允许用户设置自定义首页背景图片
|
|
||||||
* 功能新增:**支持AI解读 PDF, Word, Excel等文件**
|
|
||||||
* 功能优化:优化聊天界面的用户上传文件的列表样式
|
|
||||||
* 功能优化:优化聊天页面对话样式,支持列表样式和对话样式切换
|
|
||||||
* 功能新增:支持微信扫码登录,未注册用户微信扫码后会自动注册并登录。移动使用微信浏览器打开可以实现无感登录。
|
|
||||||
|
|
||||||
|
- bug 修复:修复移动端修改聊天标题不生效的问题
|
||||||
|
- Bug 修复:修复用户注册不显示用户名的问题
|
||||||
|
- Bug 修复:修复管理后台拖动排序不生效的问题
|
||||||
|
- 功能优化:允许用户设置自定义首页背景图片
|
||||||
|
- 功能新增:**支持 AI 解读 PDF, Word, Excel 等文件**
|
||||||
|
- 功能优化:优化聊天界面的用户上传文件的列表样式
|
||||||
|
- 功能优化:优化聊天页面对话样式,支持列表样式和对话样式切换
|
||||||
|
- 功能新增:支持微信扫码登录,未注册用户微信扫码后会自动注册并登录。移动使用微信浏览器打开可以实现无感登录。
|
||||||
|
|
||||||
## v4.0.9
|
## v4.0.9
|
||||||
* 环境升级:升级 Golang 到 go1.22.4
|
|
||||||
* 功能增加:接入微信商户号支付渠道
|
- 环境升级:升级 Golang 到 go1.22.4
|
||||||
* Bug修复:修复前端页面菜单把页面撑开,底部留白问题
|
- 功能增加:接入微信商户号支付渠道
|
||||||
* 功能优化:聊天页面自动根据内容调整输入框的高度
|
- Bug 修复:修复前端页面菜单把页面撑开,底部留白问题
|
||||||
* Bug修复:修复Dalle绘图失败退回算力的问题
|
- 功能优化:聊天页面自动根据内容调整输入框的高度
|
||||||
* 功能优化:邀请码注册时被邀请人也可以获得赠送的算力
|
- Bug 修复:修复 Dalle 绘图失败退回算力的问题
|
||||||
* 功能优化:允许设置邮件验证码的抬头
|
- 功能优化:邀请码注册时被邀请人也可以获得赠送的算力
|
||||||
* Bug修复:修复免费模型不会记录聊天记录的bug
|
- 功能优化:允许设置邮件验证码的抬头
|
||||||
* Bug修复:修复聊天输入公式显示异常的Bug
|
- Bug 修复:修复免费模型不会记录聊天记录的 bug
|
||||||
|
- Bug 修复:修复聊天输入公式显示异常的 Bug
|
||||||
|
|
||||||
## v4.0.8
|
## v4.0.8
|
||||||
* 功能优化:升级 mathjax 公式解析插件,修复公式因为图片访问限制而无法显示的问题
|
|
||||||
* 功能优化:当数据库更新失败的时候记录错误日志
|
- 功能优化:升级 mathjax 公式解析插件,修复公式因为图片访问限制而无法显示的问题
|
||||||
* 功能优化:聊天输入框会随着输入内容的增多自动调整高度
|
- 功能优化:当数据库更新失败的时候记录错误日志
|
||||||
* Bug修复:修复移动端聊天页面模型切换不生效的Bug
|
- 功能优化:聊天输入框会随着输入内容的增多自动调整高度
|
||||||
* 功能优化:给PC端扫码支付增加签名验证和有效期验证
|
- Bug 修复:修复移动端聊天页面模型切换不生效的 Bug
|
||||||
* Bug修复:修复支付码生成API权限控制的问题
|
- 功能优化:给 PC 端扫码支付增加签名验证和有效期验证
|
||||||
* Bug修复:模型算力设置为0时,不扣减用户算力,并且不记录算力消费日志
|
- Bug 修复:修复支付码生成 API 权限控制的问题
|
||||||
* 功能优化:新增随机背景配置项,可以在后台设置,首页使用 Bing 壁纸作为背景图片
|
- Bug 修复:模型算力设置为 0 时,不扣减用户算力,并且不记录算力消费日志
|
||||||
* 功能新增:H5端支持 Dalle 绘图
|
- 功能优化:新增随机背景配置项,可以在后台设置,首页使用 Bing 壁纸作为背景图片
|
||||||
|
- 功能新增:H5 端支持 Dalle 绘图
|
||||||
|
|
||||||
## v4.0.7
|
## v4.0.7
|
||||||
|
|
||||||
* 功能优化:升级quic-go,支持 Go1.21
|
- 功能优化:添加导航菜单的时候支持框入外部链接,并支持上传自定义菜单图片
|
||||||
* 功能优化:添加导航菜单的时候支持框入外部链接,并支持上传自定义菜单图片
|
- Bug 修复:修复弹窗等于图形验证码一直验证失败的问题
|
||||||
* Bug修复:修复弹窗等于图形验证码一直验证失败的问题
|
- 功能重构:重构前端 UI 页面,增加顶部导航
|
||||||
* 功能重构:重构前端 UI 页面,增加顶部导航
|
- 功能优化:优化 Vue 非父子组件之间的通信方式
|
||||||
* 功能优化:优化 Vue 非父子组件之间的通信方式
|
- 功能优化:优化 ItemList 组件,自动根据页面宽度计算 cols 数量
|
||||||
* 功能优化:优化 ItemList 组件,自动根据页面宽度计算 cols 数量
|
|
||||||
|
|
||||||
## v4.0.6
|
## v4.0.6
|
||||||
|
|
||||||
* Bug修复:修复PC端画廊页面的瀑布流组件样式错乱问题
|
- Bug 修复:修复 PC 端画廊页面的瀑布流组件样式错乱问题
|
||||||
* 功能新增:给思维导图增加 ToolBar,实现思维导图的放大缩小和定位
|
- 功能新增:给思维导图增加 ToolBar,实现思维导图的放大缩小和定位
|
||||||
* Bug修复:修复思维导图不扣费的Bug
|
- Bug 修复:修复思维导图不扣费的 Bug
|
||||||
* Bug修复:修复管理后台角色删除失败的Bug
|
- Bug 修复:修复管理后台角色删除失败的 Bug
|
||||||
* Bug修复:兼容最新版秋叶SD懒人包的 SD API,新增 scheduler 参数
|
- Bug 修复:兼容最新版秋叶 SD 懒人包的 SD API,新增 scheduler 参数
|
||||||
* 功能优化:支持在管理后台配置 AI 绘图相关配置,包括 SD, MJ-PLUS, MJ-PROXY
|
- 功能优化:支持在管理后台配置 AI 绘图相关配置,包括 SD, MJ-PLUS, MJ-PROXY
|
||||||
* Bug修复:修复注册用户提示注册人数达到上限的 Bug
|
- Bug 修复:修复注册用户提示注册人数达到上限的 Bug
|
||||||
* 功能优化:将MJ,SD,Dall绘画页面的任务列表全改成瀑布流组件
|
- 功能优化:将 MJ,SD,Dall 绘画页面的任务列表全改成瀑布流组件
|
||||||
|
|
||||||
## v4.0.5
|
## v4.0.5
|
||||||
|
|
||||||
* 功能优化:已授权系统在后台显示授权信息
|
- 功能优化:已授权系统在后台显示授权信息
|
||||||
* 功能优化:使用思维链提示词生成思维导图,确保生成的思维导图不会出现格式错误
|
- 功能优化:使用思维链提示词生成思维导图,确保生成的思维导图不会出现格式错误
|
||||||
* 功能优化:优化首页登录注册页面的 UI
|
- 功能优化:优化首页登录注册页面的 UI
|
||||||
* BUG修复:修复License验证的逻辑漏洞
|
- BUG 修复:修复 License 验证的逻辑漏洞
|
||||||
* Bug修复:后台添加用户的时候密码规则限制跟前台注册保持一致
|
- Bug 修复:后台添加用户的时候密码规则限制跟前台注册保持一致
|
||||||
* 功能新增:管理后台支持切换主题,支持 light 和 dark 两种主题
|
- 功能新增:管理后台支持切换主题,支持 light 和 dark 两种主题
|
||||||
* 功能新增:移动端新增 DALL-E 绘画功能
|
- 功能新增:移动端新增 DALL-E 绘画功能
|
||||||
* 功能新增:新增移动端首页功能,移动端支持 light 和 dark 两种主题
|
- 功能新增:新增移动端首页功能,移动端支持 light 和 dark 两种主题
|
||||||
* 功能新增:移动支持免登录预览功能
|
- 功能新增:移动支持免登录预览功能
|
||||||
* Bug修复:解决在同一个浏览器开启多个对话时候对话内容会相互乱串的问题
|
- Bug 修复:解决在同一个浏览器开启多个对话时候对话内容会相互乱串的问题
|
||||||
* Bug修复:修复部分中转 API 模型会出现第一输出的字符被淹没的Bug
|
- Bug 修复:修复部分中转 API 模型会出现第一输出的字符被淹没的 Bug
|
||||||
|
|
||||||
## v4.0.4
|
## v4.0.4
|
||||||
|
|
||||||
* Bug修复:修复统一千问第二句不回复的问题
|
- Bug 修复:修复统一千问第二句不回复的问题
|
||||||
* 功能优化:MJ 和 SD 任务正在执行时不更新已完成任务列表,加快页面渲染速度
|
- 功能优化:MJ 和 SD 任务正在执行时不更新已完成任务列表,加快页面渲染速度
|
||||||
* 功能新增:Dalle AI 绘画功能实现
|
- 功能新增:Dalle AI 绘画功能实现
|
||||||
* Bug修复:修复思维导图格式乱码问题
|
- Bug 修复:修复思维导图格式乱码问题
|
||||||
* 功能优化:支持使用 TLS 邮件协议,解决国内服务器无法使用 25 号端口发送邮件的问题
|
- 功能优化:支持使用 TLS 邮件协议,解决国内服务器无法使用 25 号端口发送邮件的问题
|
||||||
* 功能新增:支持从应用列表直接和某个应用对话
|
- 功能新增:支持从应用列表直接和某个应用对话
|
||||||
* 功能优化:优化算力日志的页面和首页的UI
|
- 功能优化:优化算力日志的页面和首页的 UI
|
||||||
* 功能新增:支持思维导图导出 PNG 图片下载
|
- 功能新增:支持思维导图导出 PNG 图片下载
|
||||||
|
|
||||||
## v4.0.3
|
## v4.0.3
|
||||||
|
|
||||||
* 功能新增:允许为角色应用绑定模型,如指定某个角色只能使用某个模型
|
- 功能新增:允许为角色应用绑定模型,如指定某个角色只能使用某个模型
|
||||||
* Bug修复:兼容 gpt-4-turbo-2024-04-09 模型的函数调用 Bug
|
- Bug 修复:兼容 gpt-4-turbo-2024-04-09 模型的函数调用 Bug
|
||||||
* Bug修复:修复MidJourney在任务超时后出现后面的任务覆盖前面任务的问题
|
- Bug 修复:修复 MidJourney 在任务超时后出现后面的任务覆盖前面任务的问题
|
||||||
* 功能新增:支持上传图片和视觉模型
|
- 功能新增:支持上传图片和视觉模型
|
||||||
* 功能优化:优化聊天页面的复制代码按钮样式乱码
|
- 功能优化:优化聊天页面的复制代码按钮样式乱码
|
||||||
* 功能新增:增加思维导图功能,支持选择不同的对话模型来生成思维导图
|
- 功能新增:增加思维导图功能,支持选择不同的对话模型来生成思维导图
|
||||||
* 功能新增:支持为角色绑定对话模型,比如绑定某个角色只能用GPT3.5或者 GPT4
|
- 功能新增:支持为角色绑定对话模型,比如绑定某个角色只能用 GPT3.5 或者 GPT4
|
||||||
* 功能新增:支持为模型绑定 API KEY,比如为 GPT3.5 模型绑定免费的 API KEY 给用户免费使用来引流不至于消耗你的收费 KEY。
|
- 功能新增:支持为模型绑定 API KEY,比如为 GPT3.5 模型绑定免费的 API KEY 给用户免费使用来引流不至于消耗你的收费 KEY。
|
||||||
* 功能新增:支持管理后台 Logo 修改
|
- 功能新增:支持管理后台 Logo 修改
|
||||||
|
|
||||||
## 4.0.2
|
## 4.0.2
|
||||||
|
|
||||||
* 功能新增:支持前端菜单可以配置
|
- 功能新增:支持前端菜单可以配置
|
||||||
* 功能优化:在登录和注册界面标题显示软件版本号
|
- 功能优化:在登录和注册界面标题显示软件版本号
|
||||||
* 功能优化:MJ 绘画支持 --sref 和 --cref 图片一致性参数
|
- 功能优化:MJ 绘画支持 --sref 和 --cref 图片一致性参数
|
||||||
* 功能优化:使用 leveldb 解决 SD 绘图进度图片预览问题
|
- 功能优化:使用 leveldb 解决 SD 绘图进度图片预览问题
|
||||||
* Bug修复:解决因为图片上传使用相对路径而导致融图失败的问题。
|
- Bug 修复:解决因为图片上传使用相对路径而导致融图失败的问题。
|
||||||
* 功能新增:手机端支持 Stable-Diffusion 绘画
|
- 功能新增:手机端支持 Stable-Diffusion 绘画
|
||||||
* 功能新增:管理后台登录页面增加行为验证码,防止爆破
|
- 功能新增:管理后台登录页面增加行为验证码,防止爆破
|
||||||
|
|
||||||
## v4.0.1
|
## v4.0.1
|
||||||
|
|
||||||
* 功能重构:重构 Stable-Diffusion 绘画实现,使用 SDAPI 替换之前的 websocket 接口,SDAPI 兼容各种 stable-diffusion
|
- 功能重构:重构 Stable-Diffusion 绘画实现,使用 SDAPI 替换之前的 websocket 接口,SDAPI 兼容各种 stable-diffusion
|
||||||
发行版,稳定性更强一些
|
发行版,稳定性更强一些
|
||||||
* 功能优化:使用 [midjouney-proxy](https://github.com/novicezk/midjourney-proxy) 项目替换内置的原生 MidJourney API,兼容
|
- 功能优化:使用 [midjouney-proxy](https://github.com/novicezk/midjourney-proxy) 项目替换内置的原生 MidJourney API,兼容
|
||||||
MJ-Plus 中转
|
MJ-Plus 中转
|
||||||
* 功能新增:用户算力消费日志增加统计功能,统计一段时间内用户消费的算力
|
- 功能新增:用户算力消费日志增加统计功能,统计一段时间内用户消费的算力
|
||||||
* Bug修复:修复 iphone 手机无法通过图形验证码的Bug,使用滑动验证码替换
|
- Bug 修复:修复 iphone 手机无法通过图形验证码的 Bug,使用滑动验证码替换
|
||||||
* Bug修复:修复手机端 MidJourney 绘画页面滚动条无法滚动的Bug
|
- Bug 修复:修复手机端 MidJourney 绘画页面滚动条无法滚动的 Bug
|
||||||
|
|
||||||
## v4.0.0
|
## v4.0.0
|
||||||
|
|
||||||
非兼容版本,重大重构,引入算力概念,将系统中所有的能力(AI对话,MJ绘画,SD绘画,DALL绘画)全部使用算力来兑换。
|
非兼容版本,重大重构,引入算力概念,将系统中所有的能力(AI 对话,MJ 绘画,SD 绘画,DALL 绘画)全部使用算力来兑换。
|
||||||
只要你的算力值余额不为0,你就可以进行任何操作。比如一次 GPT3.5 对话消耗1个单位算力,一次 GPT4 对话消耗10个算力。一次 MJ
|
只要你的算力值余额不为 0,你就可以进行任何操作。比如一次 GPT3.5 对话消耗 1 个单位算力,一次 GPT4 对话消耗 10 个算力。一次 MJ
|
||||||
对话消耗15个算力...
|
对话消耗 15 个算力...
|
||||||
|
|
||||||
* 功能重构:重构整体系统,全部采用算力来进行结算
|
- 功能重构:重构整体系统,全部采用算力来进行结算
|
||||||
* 功能优化:SD 绘画页面采用 websocket 替换 http 轮询机制,节省带宽
|
- 功能优化:SD 绘画页面采用 websocket 替换 http 轮询机制,节省带宽
|
||||||
* 功能优化:移动端聊天页面图片支持预览和放大功能
|
- 功能优化:移动端聊天页面图片支持预览和放大功能
|
||||||
* 功能优化:MJ 和 SD 页面数据分页加载,解决一次性加载太多数据导致页面卡顿的问题
|
- 功能优化:MJ 和 SD 页面数据分页加载,解决一次性加载太多数据导致页面卡顿的问题
|
||||||
* 功能优化:**PC端不登录也可以预览功能,只有在发起操作的时候才需要登录**
|
- 功能优化:**PC 端不登录也可以预览功能,只有在发起操作的时候才需要登录**
|
||||||
* 功能优化:控制台订单管理页面显示未支付订单,并提供订单删除功能
|
- 功能优化:控制台订单管理页面显示未支付订单,并提供订单删除功能
|
||||||
* 功能新增:支持H5支付
|
- 功能新增:支持 H5 支付
|
||||||
* 功能优化:支持数学公式的识别和美化输出
|
- 功能优化:支持数学公式的识别和美化输出
|
||||||
* 功能新增:新增算力消费日志功能
|
- 功能新增:新增算力消费日志功能
|
||||||
* 功能优化:整合 XXL-JOB 实现订单清理,每日算力派发,VIP 算力重置等任务
|
- 功能优化:整合 XXL-JOB 实现订单清理,每日算力派发,VIP 算力重置等任务
|
||||||
* 功能新增:管理后台新增7日内新增用户和新增订单统计
|
- 功能新增:管理后台新增 7 日内新增用户和新增订单统计
|
||||||
|
|
||||||
## v3.2.7
|
## v3.2.7
|
||||||
|
|
||||||
* 功能重构:采用 Vant 重构移动页面,新增 MidJourney 功能
|
- 功能重构:采用 Vant 重构移动页面,新增 MidJourney 功能
|
||||||
* 功能优化:优化 PC 端 MidJourney 页面布局,新增融图和换脸功能
|
- 功能优化:优化 PC 端 MidJourney 页面布局,新增融图和换脸功能
|
||||||
* Bug修复:修复 issue [
|
- Bug 修复:修复 issue [
|
||||||
管理界面操作用户存在的两个问题](https://github.com/yangjian102621/chatgpt-plus/issues/117#issuecomment-1909201532)
|
管理界面操作用户存在的两个问题](https://github.com/yangjian102621/chatgpt-plus/issues/117#issuecomment-1909201532)
|
||||||
* 功能优化:在对话和聊天记录表中新增冗余字段 model,存储对话模型
|
- 功能优化:在对话和聊天记录表中新增冗余字段 model,存储对话模型
|
||||||
* Bug修复:IPhone 手机验证码触摸事件坐标错位 [issue 144](https://github.com/yangjian102621/chatgpt-plus/issues/144)
|
- Bug 修复:IPhone 手机验证码触摸事件坐标错位 [issue 144](https://github.com/yangjian102621/chatgpt-plus/issues/144)
|
||||||
* Bug修复:重新生成按钮功能失效问题
|
- Bug 修复:重新生成按钮功能失效问题
|
||||||
* Bug修复:对话输入HTML标签不显示的问题
|
- Bug 修复:对话输入 HTML 标签不显示的问题
|
||||||
* 功能优化:gpt-4-all/gpts/midjourney-plus 支持第三方平台的 API KEY
|
- 功能优化:gpt-4-all/gpts/midjourney-plus 支持第三方平台的 API KEY
|
||||||
* 功能新增:新增删除文件功能
|
- 功能新增:新增删除文件功能
|
||||||
* Bug修复:解决 MJ-Plus discord 图片下载失败问题,使用第三方平台中转地址下载
|
- Bug 修复:解决 MJ-Plus discord 图片下载失败问题,使用第三方平台中转地址下载
|
||||||
* 功能新增:后台管理新怎对话查看和检索功能
|
- 功能新增:后台管理新怎对话查看和检索功能
|
||||||
|
|
||||||
## v3.2.6
|
## v3.2.6
|
||||||
|
|
||||||
* 功能优化:恢复关闭注册系统配置项,管理员可以在后台关闭用户注册,只允许内部添加账号
|
- 功能优化:恢复关闭注册系统配置项,管理员可以在后台关闭用户注册,只允许内部添加账号
|
||||||
* 功能优化:兼用旧版本微信收款消息解析
|
- 功能优化:兼用旧版本微信收款消息解析
|
||||||
* 功能优化:优化订单扫码支付状态轮询功能,当关闭二维码时取消轮询,节约网络资源
|
- 功能优化:优化订单扫码支付状态轮询功能,当关闭二维码时取消轮询,节约网络资源
|
||||||
* 功能新增:新增图片发布功能,画廊只显示用户已发布的图片
|
- 功能新增:新增图片发布功能,画廊只显示用户已发布的图片
|
||||||
* 功能新增:后台新增配置微信客服二维码,可以上传自己的微信客服二维码
|
- 功能新增:后台新增配置微信客服二维码,可以上传自己的微信客服二维码
|
||||||
* 功能新增:新增网站公告,可以在管理后台自定义配置
|
- 功能新增:新增网站公告,可以在管理后台自定义配置
|
||||||
* 功能新增:新增阿里通义千问大模型支持
|
- 功能新增:新增阿里通义千问大模型支持
|
||||||
* Bug修复:修复 MJ 放大任务失败时候 img_call 会增加的 Bug
|
- Bug 修复:修复 MJ 放大任务失败时候 img_call 会增加的 Bug
|
||||||
* 功能优化:新增虎皮椒和PayJS订单状态校验功能,增加安全性
|
- 功能优化:新增虎皮椒和 PayJS 订单状态校验功能,增加安全性
|
||||||
* Bug修复:修复微信转账交易 ID 提取失败 Bug
|
- Bug 修复:修复微信转账交易 ID 提取失败 Bug
|
||||||
* 功能优化:给所有的 websocket 连接加上心跳,解决 "close 1006 (abnormal closure): unexpected EOF" Bug
|
- 功能优化:给所有的 websocket 连接加上心跳,解决 "close 1006 (abnormal closure): unexpected EOF" Bug
|
||||||
* 功能新增:新增短信宝短信平台发送平台集成
|
- 功能新增:新增短信宝短信平台发送平台集成
|
||||||
|
|
||||||
## v3.2.5
|
## v3.2.5
|
||||||
|
|
||||||
* 功能新增:**重磅更新!!!** 新增 MidJourney-Plus API 支持,一秒配置,开箱即用,高效稳定。
|
- 功能新增:**重磅更新!!!** 新增 MidJourney-Plus API 支持,一秒配置,开箱即用,高效稳定。
|
||||||
* 功能新增:**重磅更新!!!** 新增 GPT4-ALL 和 GPTs 模型支持,你只需花几块钱,可以丝滑享受 ChatGPT-Plus 会员的所有功能,无需再订阅
|
- 功能新增:**重磅更新!!!** 新增 GPT4-ALL 和 GPTs 模型支持,你只需花几块钱,可以丝滑享受 ChatGPT-Plus 会员的所有功能,无需再订阅
|
||||||
Plus 账号了!!!
|
Plus 账号了!!!
|
||||||
* 功能优化:增强 markdown 图片和引用块解析。
|
- 功能优化:增强 markdown 图片和引用块解析。
|
||||||
* 功能新增:新增用户文件管理,目前一支持上传文件跟 GPT 进行多态对话。
|
- 功能新增:新增用户文件管理,目前一支持上传文件跟 GPT 进行多态对话。
|
||||||
* 功能优化:function call 兼用中转 API。
|
- 功能优化:function call 兼用中转 API。
|
||||||
* Bug修复:修复部分已知的 Bug。
|
- Bug 修复:修复部分已知的 Bug。
|
||||||
|
|
||||||
## v3.2.4.1
|
## v3.2.4.1
|
||||||
|
|
||||||
* 功能新增:新增 PayJs 支付通道
|
- 功能新增:新增 PayJs 支付通道
|
||||||
* Bug修复:紧急修复后台添加用户失败问题
|
- Bug 修复:紧急修复后台添加用户失败问题
|
||||||
* Bug修复:紧急修复使用中转 API-KEY 无法绘图的问题
|
- Bug 修复:紧急修复使用中转 API-KEY 无法绘图的问题
|
||||||
* Bug修复:允许用户关闭手机和邮箱注册通道,移除验证码依赖
|
- Bug 修复:允许用户关闭手机和邮箱注册通道,移除验证码依赖
|
||||||
|
|
||||||
## v3.2.4
|
## v3.2.4
|
||||||
|
|
||||||
* 功能新增:重磅更新,支持邮箱注册
|
- 功能新增:重磅更新,支持邮箱注册
|
||||||
* 功能优化:优化函数调用授权
|
- 功能优化:优化函数调用授权
|
||||||
* 功能优化:给用户表新增 nickname 字段
|
- 功能优化:给用户表新增 nickname 字段
|
||||||
* 功能优化:管理后台给聊天角色增加启用/禁用开关
|
- 功能优化:管理后台给聊天角色增加启用/禁用开关
|
||||||
* Bug修复:SD绘画出现重复扣减绘图次数
|
- Bug 修复:SD 绘画出现重复扣减绘图次数
|
||||||
* 功能优化:优化聊天对话导出样式,适应移动端
|
- 功能优化:优化聊天对话导出样式,适应移动端
|
||||||
* 功能新增:众筹核销可以选择兑换对话还是绘图的额度
|
- 功能新增:众筹核销可以选择兑换对话还是绘图的额度
|
||||||
* Bug修复:修复[从历史记录获取reply有并发风险 #92](https://github.com/yangjian102621/chatgpt-plus/issues/92)
|
- Bug 修复:修复[从历史记录获取 reply 有并发风险 #92](https://github.com/yangjian102621/chatgpt-plus/issues/92)
|
||||||
* Bug修复:修复 MidJourney 绘图任务调度Bug,为 task_id 建议唯一索引
|
- Bug 修复:修复 MidJourney 绘图任务调度 Bug,为 task_id 建议唯一索引
|
||||||
* 功能重构:重构了 API KEY模块,支持为每个 API KEY 都设置不同的 API 地址,并可以单独开启是否使用代理。
|
- 功能重构:重构了 API KEY 模块,支持为每个 API KEY 都设置不同的 API 地址,并可以单独开启是否使用代理。
|
||||||
|
|
||||||
## v3.2.3
|
## v3.2.3
|
||||||
|
|
||||||
* 功能重构:重构函数工具模块,设计成可以后台动态管理函数。支持添加自定义函数实现
|
- 功能重构:重构函数工具模块,设计成可以后台动态管理函数。支持添加自定义函数实现
|
||||||
* 功能新增:为充值产品数据表添加 img_calls 字段,支持充值绘图次数
|
- 功能新增:为充值产品数据表添加 img_calls 字段,支持充值绘图次数
|
||||||
* Bug修复:修复 [MJ 机器人空指针异常的 Bug](https://github.com/yangjian102621/chatgpt-plus/issues/73)
|
- Bug 修复:修复 [MJ 机器人空指针异常的 Bug](https://github.com/yangjian102621/chatgpt-plus/issues/73)
|
||||||
* Bug修复:确保相同 Prompt 的绘图任务的 Upscale 和 Variation 任务调度给相同的频道
|
- Bug 修复:确保相同 Prompt 的绘图任务的 Upscale 和 Variation 任务调度给相同的频道
|
||||||
* 功能新增:新增删除绘图任何和图片功能
|
- 功能新增:新增删除绘图任何和图片功能
|
||||||
* Bug修复:修复虎皮椒支付二维码重复扫码时报错问题
|
- Bug 修复:修复虎皮椒支付二维码重复扫码时报错问题
|
||||||
* 功能优化:自动将 AI 绘画中的中文提示词翻译成英文
|
- 功能优化:自动将 AI 绘画中的中文提示词翻译成英文
|
||||||
* 功能优化:优化AI绘画的大图压缩算法,新增图片缓存
|
- 功能优化:优化 AI 绘画的大图压缩算法,新增图片缓存
|
||||||
* 功能优化:支持为 MJ 绘图 API 增加反代功能,提高图片的加载速度,大大降低绘图任务的失败率
|
- 功能优化:支持为 MJ 绘图 API 增加反代功能,提高图片的加载速度,大大降低绘图任务的失败率
|
||||||
* Bug修复:修复[Azure Api 更换api-version参数后请求失败的问题](https://github.com/yangjian102621/chatgpt-plus/pull/71)
|
- Bug 修复:修复[Azure Api 更换 api-version 参数后请求失败的问题](https://github.com/yangjian102621/chatgpt-plus/pull/71)
|
||||||
* Bug修复:修复科大讯飞 V1.5 API 请求失败的问题
|
- Bug 修复:修复科大讯飞 V1.5 API 请求失败的问题
|
||||||
* Bug修复:绘图失败后,自动恢复用户的剩余绘图次数
|
- Bug 修复:绘图失败后,自动恢复用户的剩余绘图次数
|
||||||
* 功能新增:为移动端新增 SD 绘图功能,分享功能
|
- 功能新增:为移动端新增 SD 绘图功能,分享功能
|
||||||
|
|
||||||
## v3.2.2
|
## v3.2.2
|
||||||
|
|
||||||
* 功能重构:重构 MidJourney 和 Stable-Diffusion 绘图模块,支持使用多组配置创建池子提供绘画服务
|
- 功能重构:重构 MidJourney 和 Stable-Diffusion 绘图模块,支持使用多组配置创建池子提供绘画服务
|
||||||
* 功能新增:AI绘画页面增加翻译和重写提示词功能
|
- 功能新增:AI 绘画页面增加翻译和重写提示词功能
|
||||||
* 功能优化:OSS上传组件支持在 Bucket 下设置二级目录
|
- 功能优化:OSS 上传组件支持在 Bucket 下设置二级目录
|
||||||
* Bug修复:修复阿里云 OSS 访问路径错误
|
- Bug 修复:修复阿里云 OSS 访问路径错误
|
||||||
* 功能优化:在 AI 绘图页面使用 HTTP 轮询替换 Websocket
|
- 功能优化:在 AI 绘图页面使用 HTTP 轮询替换 Websocket
|
||||||
|
|
||||||
## v3.2.1
|
## v3.2.1
|
||||||
|
|
||||||
* 功能优化:切换角色和模型的时候自动创建新的对话
|
- 功能优化:切换角色和模型的时候自动创建新的对话
|
||||||
* Bug修复:修复文件上传失败No such file bug
|
- Bug 修复:修复文件上传失败 No such file bug
|
||||||
* 功能新增:MidJourney 绘画页面新增提示词翻译功能,新增多个绘画参数
|
- 功能新增:MidJourney 绘画页面新增提示词翻译功能,新增多个绘画参数
|
||||||
* Bug修复:[PC端对话在刷新后异常](https://github.com/yangjian102621/chatgpt-plus/issues/59)
|
- Bug 修复:[PC 端对话在刷新后异常](https://github.com/yangjian102621/chatgpt-plus/issues/59)
|
||||||
* 功能新增:增加 arm64 架构打包脚本
|
- 功能新增:增加 arm64 架构打包脚本
|
||||||
* 功能新增:支持 dall-e3 绘图的 API 地址自定义配置
|
- 功能新增:支持 dall-e3 绘图的 API 地址自定义配置
|
||||||
* 功能新增:新增虎皮椒支付功能接入,支持微信和支付宝通道
|
- 功能新增:新增虎皮椒支付功能接入,支持微信和支付宝通道
|
||||||
|
|
||||||
## v3.2.0
|
## v3.2.0
|
||||||
|
|
||||||
* 功能新增:新增邀请注册功能
|
- 功能新增:新增邀请注册功能
|
||||||
* 功能优化:增加中间件自动对HTTP请求的参数去掉首尾空格
|
- 功能优化:增加中间件自动对 HTTP 请求的参数去掉首尾空格
|
||||||
* 功能优化:增加中间件自动为大图片生成缩略图
|
- 功能优化:增加中间件自动为大图片生成缩略图
|
||||||
* 功能优化:MidJourney 页面图片加载优化,实现图片预览懒加载
|
- 功能优化:MidJourney 页面图片加载优化,实现图片预览懒加载
|
||||||
* 功能新增:新增 DALL-E-3 绘画支持,并作为对话页面默认绘画插件
|
- 功能新增:新增 DALL-E-3 绘画支持,并作为对话页面默认绘画插件
|
||||||
* Bug修复:修复阿里云 OSS 域名设置不起做用的bug
|
- Bug 修复:修复阿里云 OSS 域名设置不起做用的 bug
|
||||||
* Bug修复:修复MidJourney绘图失败后重复添加到队列的问题
|
- Bug 修复:修复 MidJourney 绘图失败后重复添加到队列的问题
|
||||||
|
|
||||||
## v3.1.9
|
## v3.1.9
|
||||||
|
|
||||||
* 功能新增:增加讯飞星火大模型 v3.0 支持
|
- 功能新增:增加讯飞星火大模型 v3.0 支持
|
||||||
* 功能新增:新增找回密码功能
|
- 功能新增:新增找回密码功能
|
||||||
* 功能新增:支持 Markdown 代码复制功能
|
- 功能新增:支持 Markdown 代码复制功能
|
||||||
* Bug修复: xxl-job 任务调度失败的 Bug
|
- Bug 修复: xxl-job 任务调度失败的 Bug
|
||||||
* 功能优化:优化前端页面菜单图标,使用自定义图标替换 icon-font
|
- 功能优化:优化前端页面菜单图标,使用自定义图标替换 icon-font
|
||||||
* Bug修复:Stable-Diffusion 绘画成功之后没有扣减用户画图次数
|
- Bug 修复:Stable-Diffusion 绘画成功之后没有扣减用户画图次数
|
||||||
* 功能优化:优化会员充值页面 ItemList 组件
|
- 功能优化:优化会员充值页面 ItemList 组件
|
||||||
* 功能优化:给首页 Logo 增加链接
|
- 功能优化:给首页 Logo 增加链接
|
||||||
* Bug修复:[新建会话时,提示"请输入合法的手机号" ](https://github.com/yangjian102621/chatgpt-plus/issues/51)
|
- Bug 修复:[新建会话时,提示"请输入合法的手机号" ](https://github.com/yangjian102621/chatgpt-plus/issues/51)
|
||||||
* Bug修复:聊天上下文失效问题
|
- Bug 修复:聊天上下文失效问题
|
||||||
* 功能优化:关闭注册时显示联系管理员二维码
|
- 功能优化:关闭注册时显示联系管理员二维码
|
||||||
* 功能优化:移除 leveldb 依赖,使用 redis 替换相应的功能
|
- 功能优化:移除 leveldb 依赖,使用 redis 替换相应的功能
|
||||||
* Bug修复:后台启用用户 VIP 不生效问题
|
- Bug 修复:后台启用用户 VIP 不生效问题
|
||||||
* 功能优化:充值支付页面的支付说明文字可以后台配置
|
- 功能优化:充值支付页面的支付说明文字可以后台配置
|
||||||
* Bug修复:ChatGLM,百度文心,科大讯飞模型输出代码不换行问题
|
- Bug 修复:ChatGLM,百度文心,科大讯飞模型输出代码不换行问题
|
||||||
|
|
||||||
## v3.1.8
|
## v3.1.8
|
||||||
|
|
||||||
1. 功能新增:新增会员套餐充值,点卡充值,订单系统,集成支付宝支付通道
|
1. 功能新增:新增会员套餐充值,点卡充值,订单系统,集成支付宝支付通道
|
||||||
2. Bug修复:修复 MidJourney API 参数版本更新导致调用失败问题
|
2. Bug 修复:修复 MidJourney API 参数版本更新导致调用失败问题
|
||||||
3. Bug修复:修复 Stable Diffusion 调用后没有更新绘图调用次数问题
|
3. Bug 修复:修复 Stable Diffusion 调用后没有更新绘图调用次数问题
|
||||||
4. Bug修复:修复七牛云上传报错 expired token
|
4. Bug 修复:修复七牛云上传报错 expired token
|
||||||
5. Bug修复:修复高权重模型导致的对话次数为负数的漏洞
|
5. Bug 修复:修复高权重模型导致的对话次数为负数的漏洞
|
||||||
6. 功能优化:将聊天报错信息定义为统一常量,方便修改
|
6. 功能优化:将聊天报错信息定义为统一常量,方便修改
|
||||||
7. 功能优化:优化 markdown 表格显示样式,覆写 Element-Plus 表格样式
|
7. 功能优化:优化 markdown 表格显示样式,覆写 Element-Plus 表格样式
|
||||||
8. 功能优化:增加倒数计时组件,定期自动清理未支付的订单
|
8. 功能优化:增加倒数计时组件,定期自动清理未支付的订单
|
||||||
|
|
||||||
## v3.1.7
|
## v3.1.7
|
||||||
|
|
||||||
1. 功能新增:支持文心4.0 AI 模型
|
1. 功能新增:支持文心 4.0 AI 模型
|
||||||
2. 功能新增:可以在管理后台为用户绑定指定的 AI 模型,如只给某个用户使用 GPT-4 模型
|
2. 功能新增:可以在管理后台为用户绑定指定的 AI 模型,如只给某个用户使用 GPT-4 模型
|
||||||
3. 功能新增:模型新增权重字段,不同的模型每次调用耗费的点数可以设置不同,比如GPT4是GPT3.5的10倍
|
3. 功能新增:模型新增权重字段,不同的模型每次调用耗费的点数可以设置不同,比如 GPT4 是 GPT3.5 的 10 倍
|
||||||
4. 功能新增:新增系统配置关闭 AI 模型的函数功能
|
4. 功能新增:新增系统配置关闭 AI 模型的函数功能
|
||||||
5. 功能优化:优化 MidJourney 专业绘画页面图片预览样式
|
5. 功能优化:优化 MidJourney 专业绘画页面图片预览样式
|
||||||
|
|
||||||
## v3.1.6
|
## v3.1.6
|
||||||
|
|
||||||
1. 功能新增:新增AI 绘画照片墙功能页面,供用户查看所有的 AI 绘画作品
|
1. 功能新增:新增 AI 绘画照片墙功能页面,供用户查看所有的 AI 绘画作品
|
||||||
2. 功能新增:新增 AI 角色应用功能页面,用户可以添加自己感兴趣的应用
|
2. 功能新增:新增 AI 角色应用功能页面,用户可以添加自己感兴趣的应用
|
||||||
3. 功能优化:优化瀑布流组件的页面布局
|
3. 功能优化:优化瀑布流组件的页面布局
|
||||||
4. 功能优化:新注册用户成功之后自动登录
|
4. 功能优化:新注册用户成功之后自动登录
|
||||||
@ -356,55 +378,55 @@
|
|||||||
2. 功能新增:新增科大讯飞星火大模型 API 接入支持
|
2. 功能新增:新增科大讯飞星火大模型 API 接入支持
|
||||||
3. 功能重构:将 chat_handler 的所有功能实现放入单独的包中
|
3. 功能重构:将 chat_handler 的所有功能实现放入单独的包中
|
||||||
4. 功能新增:新增系统配置 `enabled_function` 用于启用和关闭函数功能
|
4. 功能新增:新增系统配置 `enabled_function` 用于启用和关闭函数功能
|
||||||
5. Bug修复:修复管理后台更新 API Key 失败的 Bug
|
5. Bug 修复:修复管理后台更新 API Key 失败的 Bug
|
||||||
6. Bug修复:修复新建的对话无法更新对话标题的 Bug
|
6. Bug 修复:修复新建的对话无法更新对话标题的 Bug
|
||||||
7. 功能优化:其他一些小的体验优化工作
|
7. 功能优化:其他一些小的体验优化工作
|
||||||
|
|
||||||
## v3.1.4
|
## v3.1.4
|
||||||
|
|
||||||
1. 功能新增:新增阿里云 OSS 图片上传实现,目前已支持本地存储,七牛云,Minio和阿里云 OSS 四种存储介质。
|
1. 功能新增:新增阿里云 OSS 图片上传实现,目前已支持本地存储,七牛云,Minio 和阿里云 OSS 四种存储介质。
|
||||||
2. 功能新增:**增加 Stable Diffusion 绘画功能页面**。
|
2. 功能新增:**增加 Stable Diffusion 绘画功能页面**。
|
||||||
3. 功能重构:将 [chatgpt-plus-exts](https://github.com/yangjian102621/chatgpt-plus-exts) 合并到本项目,部署更加简单,无需部署两个项目了。
|
3. 功能重构:将 [chatgpt-plus-exts](https://github.com/yangjian102621/chatgpt-plus-exts) 合并到本项目,部署更加简单,无需部署两个项目了。
|
||||||
4. Bug修复:修复[用户注册报错BUG #37](https://github.com/yangjian102621/chatgpt-plus/issues/37)。
|
4. Bug 修复:修复[用户注册报错 BUG #37](https://github.com/yangjian102621/chatgpt-plus/issues/37)。
|
||||||
5. Bug修复:修复 MidJourney API 接口升级导致图片文保存失败的 Bug。
|
5. Bug 修复:修复 MidJourney API 接口升级导致图片文保存失败的 Bug。
|
||||||
6. 功能优化:增加阿里云短信服务配置项 `Sign` 和 `CodeTempId` 用来配置自己的短信签名和短信验证码模版 ID。
|
6. 功能优化:增加阿里云短信服务配置项 `Sign` 和 `CodeTempId` 用来配置自己的短信签名和短信验证码模版 ID。
|
||||||
7. 功能优化:添加系统配置用来设置自定义的众筹微信收款二维码。
|
7. 功能优化:添加系统配置用来设置自定义的众筹微信收款二维码。
|
||||||
8. 功能优化:优化绘画页面的弹窗样式和页面布局。
|
8. 功能优化:优化绘画页面的弹窗样式和页面布局。
|
||||||
|
|
||||||
## v3.1.3
|
## v3.1.3
|
||||||
|
|
||||||
1. 页面重构:重后 Home 页面,拆分成聊天,MJ绘画,SD 绘画,应用广场等多个功能菜单。
|
1. 页面重构:重后 Home 页面,拆分成聊天,MJ 绘画,SD 绘画,应用广场等多个功能菜单。
|
||||||
2. 功能新增:新增 MidJourney 专业绘画页面,开放更高级的 MJ 绘画姿势。
|
2. 功能新增:新增 MidJourney 专业绘画页面,开放更高级的 MJ 绘画姿势。
|
||||||
3. 功能优化:采用队列的方式控制绘画任务并发,简化任务回调通知逻辑,给任务回调加锁。
|
3. 功能优化:采用队列的方式控制绘画任务并发,简化任务回调通知逻辑,给任务回调加锁。
|
||||||
4. 功能优化:精简用户表字段,删除用户名和昵称,只保留手机号。
|
4. 功能优化:精简用户表字段,删除用户名和昵称,只保留手机号。
|
||||||
5. 功能优化:优化文件上传服务工厂实现,只创建激活的 Uploader 服务,节省资源。
|
5. 功能优化:优化文件上传服务工厂实现,只创建激活的 Uploader 服务,节省资源。
|
||||||
6. Bug修复:修复 JWT token 有效期计算错误的 Bug。
|
6. Bug 修复:修复 JWT token 有效期计算错误的 Bug。
|
||||||
|
|
||||||
## v3.1.2
|
## v3.1.2
|
||||||
|
|
||||||
1. 功能新增:新增七牛云 OSS 实现,目前已支持三种文件上传服务:Local, Minio, QiNiu OSS。
|
1. 功能新增:新增七牛云 OSS 实现,目前已支持三种文件上传服务:Local, Minio, QiNiu OSS。
|
||||||
2. 功能新增:新增桌面版,使用 electron 套壳网页版。
|
2. 功能新增:新增桌面版,使用 electron 套壳网页版。
|
||||||
3. Bug修复:自动去除众筹核销时候转账单号中的空格,防止复制的时候多复制了空格。
|
3. Bug 修复:自动去除众筹核销时候转账单号中的空格,防止复制的时候多复制了空格。
|
||||||
4. 功能优化:ChatPlus.vue 页面支持通过 chat_id path variable 来定位到指定的聊天。
|
4. 功能优化:ChatPlus.vue 页面支持通过 chat_id path variable 来定位到指定的聊天。
|
||||||
5. 功能优化:取消导出聊天页面的授权验证
|
5. 功能优化:取消导出聊天页面的授权验证
|
||||||
6. 功能优化:所有路由跳转都使用绝对路径
|
6. 功能优化:所有路由跳转都使用绝对路径
|
||||||
|
|
||||||
## v3.1.1
|
## v3.1.1
|
||||||
|
|
||||||
紧急修复版本,采用弹窗的方式显示验证码,解决验证码在低分辨率下被掩盖的Bug
|
紧急修复版本,采用弹窗的方式显示验证码,解决验证码在低分辨率下被掩盖的 Bug
|
||||||
|
|
||||||
## v3.1.0(大版本更新)
|
## v3.1.0(大版本更新)
|
||||||
|
|
||||||
1. 功能重构:将聊天模型独立拆分,以便支持多平台模型,目前已经内置支持 OPenAI,Azure 以及
|
1. 功能重构:将聊天模型独立拆分,以便支持多平台模型,目前已经内置支持 OPenAI,Azure 以及
|
||||||
ChatGLM,用户可以在这两个平台的模型中随意切换,体验不同的模型聊天。
|
ChatGLM,用户可以在这两个平台的模型中随意切换,体验不同的模型聊天。
|
||||||
2. 功能重构:重写系统 API 授权机制,使用 JWT 替换传统的 session 会话授权,使得 API 授权变得更加灵活。
|
2. 功能重构:重写系统 API 授权机制,使用 JWT 替换传统的 session 会话授权,使得 API 授权变得更加灵活。
|
||||||
3. 功能重构:重构文件夹上传服务,支持多种文件上传存储handler,目前已经实现本地存储和 minio oss 存储。
|
3. 功能重构:重构文件夹上传服务,支持多种文件上传存储 handler,目前已经实现本地存储和 minio oss 存储。
|
||||||
4. 功能优化:更新头像自动删除旧的图片资源。
|
4. 功能优化:更新头像自动删除旧的图片资源。
|
||||||
5. 功能优化:将应用日志在终端输出的同时存盘,方便 docker 部署查看日志。
|
5. 功能优化:将应用日志在终端输出的同时存盘,方便 docker 部署查看日志。
|
||||||
6. 功能新增:允许用户配置自己的 OPenAI,Azure 以及 ChatGLM API KEY。
|
6. 功能新增:允许用户配置自己的 OPenAI,Azure 以及 ChatGLM API KEY。
|
||||||
7. 功能优化:优化移动版的行为验证码样式,修复低分辨率显示器验证码被遮挡的 Bug
|
7. 功能优化:优化移动版的行为验证码样式,修复低分辨率显示器验证码被遮挡的 Bug
|
||||||
8. 升级 gin, element-plus,redis 组件到最新版本。
|
8. 升级 gin, element-plus,redis 组件到最新版本。
|
||||||
9. Bug修复:修复若干已知的的 Bug
|
9. Bug 修复:修复若干已知的的 Bug
|
||||||
|
|
||||||
## v3.0.7
|
## v3.0.7
|
||||||
|
|
||||||
@ -414,7 +436,7 @@
|
|||||||
4. 功能新增:支持导出聊天记录为 PDF 文件。
|
4. 功能新增:支持导出聊天记录为 PDF 文件。
|
||||||
5. 功能优化:在后台 dashboard 页面新增统计今日众筹收入。
|
5. 功能优化:在后台 dashboard 页面新增统计今日众筹收入。
|
||||||
6. 功能优化:支持用户设置默认的 GPT 模型
|
6. 功能优化:支持用户设置默认的 GPT 模型
|
||||||
7. Bug修复:修复若干已知的的 Bug
|
7. Bug 修复:修复若干已知的的 Bug
|
||||||
|
|
||||||
## v3.0.6
|
## v3.0.6
|
||||||
|
|
||||||
@ -422,8 +444,8 @@
|
|||||||
2. 管理后台:新增重置用户密码功能
|
2. 管理后台:新增重置用户密码功能
|
||||||
3. 管理后台:支持关闭注册功能,新增添加用户功能,适用于内部使用场景
|
3. 管理后台:支持关闭注册功能,新增添加用户功能,适用于内部使用场景
|
||||||
4. 管理后台:新增仪表盘页面,统计当天的新增用户,新增会话数据,以及 Token 消耗
|
4. 管理后台:新增仪表盘页面,统计当天的新增用户,新增会话数据,以及 Token 消耗
|
||||||
5. Bug修复:修复注册页面验证码不显示 Bug
|
5. Bug 修复:修复注册页面验证码不显示 Bug
|
||||||
6. Bug修复:优化上下文 Token 计算算法,修复聊天上下文超出限制时循环发送消息的 Bug
|
6. Bug 修复:优化上下文 Token 计算算法,修复聊天上下文超出限制时循环发送消息的 Bug
|
||||||
7. 功能修正:允许用户使用手机号码登录
|
7. 功能修正:允许用户使用手机号码登录
|
||||||
8. 功能优化:更新系统配置后同步更新服务端内存变量数据
|
8. 功能优化:更新系统配置后同步更新服务端内存变量数据
|
||||||
9. 功能优化:优化打包脚本,减少容器镜像大小
|
9. 功能优化:优化打包脚本,减少容器镜像大小
|
||||||
@ -481,5 +503,5 @@
|
|||||||
4. 新增聊天设置功能,用户可以导入自己的 API KEY
|
4. 新增聊天设置功能,用户可以导入自己的 API KEY
|
||||||
5. 保存聊天记录,支持聊天上下文。
|
5. 保存聊天记录,支持聊天上下文。
|
||||||
6. 重构后台管理模块,更友好,扩展性更好的后台管理系统。
|
6. 重构后台管理模块,更友好,扩展性更好的后台管理系统。
|
||||||
7. 引入 ip2region 组件,记录用户的登录IP和地址。
|
7. 引入 ip2region 组件,记录用户的登录 IP 和地址。
|
||||||
8. 支持会话搜索过滤。
|
8. 支持会话搜索过滤。
|
||||||
|
@ -60,6 +60,8 @@ func (s *AppServer) Init(debug bool, client *redis.Client) {
|
|||||||
s.Engine.Use(errorHandler)
|
s.Engine.Use(errorHandler)
|
||||||
// 添加静态资源访问
|
// 添加静态资源访问
|
||||||
s.Engine.Static("/static", s.Config.StaticDir)
|
s.Engine.Static("/static", s.Config.StaticDir)
|
||||||
|
//启动服务
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *AppServer) Run(db *gorm.DB) error {
|
func (s *AppServer) Run(db *gorm.DB) error {
|
||||||
@ -247,6 +249,7 @@ func needLogin(c *gin.Context) bool {
|
|||||||
c.Request.URL.Path == "/api/suno/detail" ||
|
c.Request.URL.Path == "/api/suno/detail" ||
|
||||||
c.Request.URL.Path == "/api/suno/play" ||
|
c.Request.URL.Path == "/api/suno/play" ||
|
||||||
c.Request.URL.Path == "/api/download" ||
|
c.Request.URL.Path == "/api/download" ||
|
||||||
|
c.Request.URL.Path == "/api/dall/models" ||
|
||||||
strings.HasPrefix(c.Request.URL.Path, "/api/test") ||
|
strings.HasPrefix(c.Request.URL.Path, "/api/test") ||
|
||||||
strings.HasPrefix(c.Request.URL.Path, "/api/payment/notify/") ||
|
strings.HasPrefix(c.Request.URL.Path, "/api/payment/notify/") ||
|
||||||
strings.HasPrefix(c.Request.URL.Path, "/api/user/clogin") ||
|
strings.HasPrefix(c.Request.URL.Path, "/api/user/clogin") ||
|
||||||
|
@ -107,7 +107,10 @@ func (t PowerType) String() string {
|
|||||||
return "退款"
|
return "退款"
|
||||||
case PowerRedeem:
|
case PowerRedeem:
|
||||||
return "兑换"
|
return "兑换"
|
||||||
|
case PowerGift:
|
||||||
|
return "赠送"
|
||||||
|
case PowerInvite:
|
||||||
|
return "邀请"
|
||||||
}
|
}
|
||||||
return "其他"
|
return "其他"
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ type SystemConfig struct {
|
|||||||
AdminTitle string `json:"admin_title,omitempty"` // 管理后台标题
|
AdminTitle string `json:"admin_title,omitempty"` // 管理后台标题
|
||||||
Logo string `json:"logo,omitempty"` // 方形 Logo
|
Logo string `json:"logo,omitempty"` // 方形 Logo
|
||||||
InitPower int `json:"init_power,omitempty"` // 新用户注册赠送算力值
|
InitPower int `json:"init_power,omitempty"` // 新用户注册赠送算力值
|
||||||
DailyPower int `json:"daily_power,omitempty"` // 每日赠送算力
|
DailyPower int `json:"daily_power,omitempty"` // 每日签到赠送算力
|
||||||
InvitePower int `json:"invite_power,omitempty"` // 邀请新用户赠送算力值
|
InvitePower int `json:"invite_power,omitempty"` // 邀请新用户赠送算力值
|
||||||
VipMonthPower int `json:"vip_month_power,omitempty"` // VIP 会员每月赠送的算力值
|
VipMonthPower int `json:"vip_month_power,omitempty"` // VIP 会员每月赠送的算力值
|
||||||
|
|
||||||
@ -143,12 +143,14 @@ type SystemConfig struct {
|
|||||||
OrderPayTimeout int `json:"order_pay_timeout,omitempty"` //订单支付超时时间
|
OrderPayTimeout int `json:"order_pay_timeout,omitempty"` //订单支付超时时间
|
||||||
VipInfoText string `json:"vip_info_text,omitempty"` // 会员页面充值说明
|
VipInfoText string `json:"vip_info_text,omitempty"` // 会员页面充值说明
|
||||||
|
|
||||||
MjPower int `json:"mj_power,omitempty"` // MJ 绘画消耗算力
|
MjPower int `json:"mj_power,omitempty"` // MJ 绘画消耗算力
|
||||||
MjActionPower int `json:"mj_action_power,omitempty"` // MJ 操作(放大,变换)消耗算力
|
MjActionPower int `json:"mj_action_power,omitempty"` // MJ 操作(放大,变换)消耗算力
|
||||||
SdPower int `json:"sd_power,omitempty"` // SD 绘画消耗算力
|
SdPower int `json:"sd_power,omitempty"` // SD 绘画消耗算力
|
||||||
DallPower int `json:"dall_power,omitempty"` // DALL-E-3 绘图消耗算力
|
DallPower int `json:"dall_power,omitempty"` // DALL-E-3 绘图消耗算力
|
||||||
SunoPower int `json:"suno_power,omitempty"` // Suno 生成歌曲消耗算力
|
SunoPower int `json:"suno_power,omitempty"` // Suno 生成歌曲消耗算力
|
||||||
LumaPower int `json:"luma_power,omitempty"` // Luma 生成视频消耗算力
|
LumaPower int `json:"luma_power,omitempty"` // Luma 生成视频消耗算力
|
||||||
|
AdvanceVoicePower int `json:"advance_voice_power,omitempty"` // 高级语音对话消耗算力
|
||||||
|
PromptPower int `json:"prompt_power,omitempty"` // 生成提示词消耗算力
|
||||||
|
|
||||||
WechatCardURL string `json:"wechat_card_url,omitempty"` // 微信客服地址
|
WechatCardURL string `json:"wechat_card_url,omitempty"` // 微信客服地址
|
||||||
|
|
||||||
@ -166,4 +168,5 @@ type SystemConfig struct {
|
|||||||
EnabledVerify bool `json:"enabled_verify"` // 是否启用验证码
|
EnabledVerify bool `json:"enabled_verify"` // 是否启用验证码
|
||||||
EmailWhiteList []string `json:"email_white_list"` // 邮箱白名单列表
|
EmailWhiteList []string `json:"email_white_list"` // 邮箱白名单列表
|
||||||
TranslateModelId int `json:"translate_model_id"` // 用来做提示词翻译的大模型 id
|
TranslateModelId int `json:"translate_model_id"` // 用来做提示词翻译的大模型 id
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,8 @@ type SdTaskParams struct {
|
|||||||
// DallTask DALL-E task
|
// DallTask DALL-E task
|
||||||
type DallTask struct {
|
type DallTask struct {
|
||||||
ClientId string `json:"client_id"`
|
ClientId string `json:"client_id"`
|
||||||
|
ModelId uint `json:"model_id"`
|
||||||
|
ModelName string `json:"model_name"`
|
||||||
Id uint `json:"id"`
|
Id uint `json:"id"`
|
||||||
UserId uint `json:"user_id"`
|
UserId uint `json:"user_id"`
|
||||||
Prompt string `json:"prompt"`
|
Prompt string `json:"prompt"`
|
||||||
@ -81,8 +83,7 @@ type DallTask struct {
|
|||||||
Quality string `json:"quality"`
|
Quality string `json:"quality"`
|
||||||
Size string `json:"size"`
|
Size string `json:"size"`
|
||||||
Style string `json:"style"`
|
Style string `json:"style"`
|
||||||
|
Power int `json:"power"`
|
||||||
Power int `json:"power"`
|
|
||||||
TranslateModelId int `json:"translate_model_id"` // 提示词翻译模型ID
|
TranslateModelId int `json:"translate_model_id"` // 提示词翻译模型ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ require (
|
|||||||
github.com/go-pay/gopay v1.5.101
|
github.com/go-pay/gopay v1.5.101
|
||||||
github.com/google/go-tika v0.3.1
|
github.com/google/go-tika v0.3.1
|
||||||
github.com/microcosm-cc/bluemonday v1.0.26
|
github.com/microcosm-cc/bluemonday v1.0.26
|
||||||
|
github.com/shirou/gopsutil v3.21.11+incompatible
|
||||||
github.com/shopspring/decimal v1.3.1
|
github.com/shopspring/decimal v1.3.1
|
||||||
github.com/syndtr/goleveldb v1.0.0
|
github.com/syndtr/goleveldb v1.0.0
|
||||||
golang.org/x/image v0.15.0
|
golang.org/x/image v0.15.0
|
||||||
@ -44,7 +45,11 @@ require (
|
|||||||
github.com/go-pay/xtime v0.0.2 // indirect
|
github.com/go-pay/xtime v0.0.2 // indirect
|
||||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
|
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
|
||||||
github.com/gorilla/css v1.0.0 // indirect
|
github.com/gorilla/css v1.0.0 // indirect
|
||||||
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
|
github.com/gravityblast/fresh v0.0.0-20240621171608-8d1fef547a99 // indirect
|
||||||
|
github.com/howeyc/fsnotify v0.9.0 // indirect
|
||||||
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
|
github.com/pilu/config v0.0.0-20131214182432-3eb99e6c0b9a // indirect
|
||||||
|
github.com/pilu/fresh v0.0.0-20240621171608-8d1fef547a99 // indirect
|
||||||
github.com/tklauser/go-sysconf v0.3.13 // indirect
|
github.com/tklauser/go-sysconf v0.3.13 // indirect
|
||||||
github.com/tklauser/numcpus v0.7.0 // indirect
|
github.com/tklauser/numcpus v0.7.0 // indirect
|
||||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||||
|
12
api/go.sum
@ -100,11 +100,15 @@ github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
|
|||||||
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
|
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
|
||||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
|
github.com/gravityblast/fresh v0.0.0-20240621171608-8d1fef547a99 h1:A6qlLfihaWef15viqtecCz4XknZcgjgD7mEuhu7bHEc=
|
||||||
|
github.com/gravityblast/fresh v0.0.0-20240621171608-8d1fef547a99/go.mod h1:ukFDwXV66bGV7JnfyxFKuKiVp4zH4orBKXML+VCSrhI=
|
||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||||
|
github.com/howeyc/fsnotify v0.9.0 h1:0gtV5JmOKH4A8SsFxG2BczSeXWWPvcMT0euZt5gDAxY=
|
||||||
|
github.com/howeyc/fsnotify v0.9.0/go.mod h1:41HzSPxBGeFRQKEEwgh49TRw/nKBsYZ2cF1OzPjSJsA=
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||||
github.com/imroc/req/v3 v3.37.2 h1:vEemuA0cq9zJ6lhe+mSRhsZm951bT0CdiSH47+KTn6I=
|
github.com/imroc/req/v3 v3.37.2 h1:vEemuA0cq9zJ6lhe+mSRhsZm951bT0CdiSH47+KTn6I=
|
||||||
github.com/imroc/req/v3 v3.37.2/go.mod h1:DECzjVIrj6jcUr5n6e+z0ygmCO93rx4Jy0RjOEe1YCI=
|
github.com/imroc/req/v3 v3.37.2/go.mod h1:DECzjVIrj6jcUr5n6e+z0ygmCO93rx4Jy0RjOEe1YCI=
|
||||||
@ -137,6 +141,9 @@ github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
|
|||||||
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
|
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
|
||||||
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20230415042440-a5e3d8259ae0 h1:LgmjED/yQILqmUED4GaXjrINWe7YJh4HM6z2EvEINPs=
|
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20230415042440-a5e3d8259ae0 h1:LgmjED/yQILqmUED4GaXjrINWe7YJh4HM6z2EvEINPs=
|
||||||
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20230415042440-a5e3d8259ae0/go.mod h1:C5LA5UO2ZXJrLaPLYtE1wUJMiyd/nwWaCO5cw/2pSHs=
|
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20230415042440-a5e3d8259ae0/go.mod h1:C5LA5UO2ZXJrLaPLYtE1wUJMiyd/nwWaCO5cw/2pSHs=
|
||||||
|
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||||
|
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||||
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58=
|
github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58=
|
||||||
@ -170,6 +177,10 @@ github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:Ff
|
|||||||
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU=
|
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU=
|
||||||
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
||||||
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
||||||
|
github.com/pilu/config v0.0.0-20131214182432-3eb99e6c0b9a h1:Tg4E4cXPZSZyd3H1tJlYo6ZreXV0ZJvE/lorNqyw1AU=
|
||||||
|
github.com/pilu/config v0.0.0-20131214182432-3eb99e6c0b9a/go.mod h1:9Or9aIl95Kp43zONcHd5tLZGKXb9iLx0pZjau0uJ5zg=
|
||||||
|
github.com/pilu/fresh v0.0.0-20240621171608-8d1fef547a99 h1:+X7Gb40b5Bl3v5+3MiGK8Jhemjp65MHc+nkVCfq1Yfc=
|
||||||
|
github.com/pilu/fresh v0.0.0-20240621171608-8d1fef547a99/go.mod h1:2LLTtftTZSdAPR/iVyennXZDLZOYzyDn+T0qEKJ8eSw=
|
||||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
@ -291,6 +302,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
@ -43,6 +43,7 @@ func (h *ChatModelHandler) Save(c *gin.Context) {
|
|||||||
Temperature float32 `json:"temperature"` // 模型温度
|
Temperature float32 `json:"temperature"` // 模型温度
|
||||||
KeyId int `json:"key_id,omitempty"`
|
KeyId int `json:"key_id,omitempty"`
|
||||||
CreatedAt int64 `json:"created_at"`
|
CreatedAt int64 `json:"created_at"`
|
||||||
|
Type string `json:"type"`
|
||||||
}
|
}
|
||||||
if err := c.ShouldBindJSON(&data); err != nil {
|
if err := c.ShouldBindJSON(&data); err != nil {
|
||||||
resp.ERROR(c, types.InvalidArgs)
|
resp.ERROR(c, types.InvalidArgs)
|
||||||
@ -65,7 +66,7 @@ func (h *ChatModelHandler) Save(c *gin.Context) {
|
|||||||
item.MaxContext = data.MaxContext
|
item.MaxContext = data.MaxContext
|
||||||
item.Temperature = data.Temperature
|
item.Temperature = data.Temperature
|
||||||
item.KeyId = data.KeyId
|
item.KeyId = data.KeyId
|
||||||
|
item.Type = data.Type
|
||||||
var res *gorm.DB
|
var res *gorm.DB
|
||||||
if data.Id > 0 {
|
if data.Id > 0 {
|
||||||
res = h.DB.Save(&item)
|
res = h.DB.Save(&item)
|
||||||
|
@ -30,7 +30,7 @@ func NewChatModelHandler(app *core.AppServer, db *gorm.DB) *ChatModelHandler {
|
|||||||
func (h *ChatModelHandler) List(c *gin.Context) {
|
func (h *ChatModelHandler) List(c *gin.Context) {
|
||||||
var items []model.ChatModel
|
var items []model.ChatModel
|
||||||
var chatModels = make([]vo.ChatModel, 0)
|
var chatModels = make([]vo.ChatModel, 0)
|
||||||
session := h.DB.Session(&gorm.Session{}).Where("enabled", true)
|
session := h.DB.Session(&gorm.Session{}).Where("type", "chat").Where("enabled", true)
|
||||||
t := c.Query("type")
|
t := c.Query("type")
|
||||||
if t != "" {
|
if t != "" {
|
||||||
session = session.Where("type", t)
|
session = session.Where("type", t)
|
||||||
|
@ -17,10 +17,11 @@ import (
|
|||||||
"geekai/store/model"
|
"geekai/store/model"
|
||||||
"geekai/store/vo"
|
"geekai/store/vo"
|
||||||
"geekai/utils"
|
"geekai/utils"
|
||||||
req2 "github.com/imroc/req/v3"
|
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
req2 "github.com/imroc/req/v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Usage struct {
|
type Usage struct {
|
||||||
@ -172,16 +173,22 @@ func (h *ChatHandler) sendOpenAiMessage(
|
|||||||
var apiRes types.BizVo
|
var apiRes types.BizVo
|
||||||
r, err := req2.C().R().SetHeader("Body-Type", "application/json").
|
r, err := req2.C().R().SetHeader("Body-Type", "application/json").
|
||||||
SetHeader("Authorization", function.Token).
|
SetHeader("Authorization", function.Token).
|
||||||
SetBody(params).
|
SetBody(params).Post(function.Action)
|
||||||
SetSuccessResult(&apiRes).Post(function.Action)
|
|
||||||
errMsg := ""
|
errMsg := ""
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errMsg = err.Error()
|
errMsg = err.Error()
|
||||||
} else if r.IsErrorState() {
|
} else {
|
||||||
errMsg = r.Status
|
all, _ := io.ReadAll(r.Body)
|
||||||
|
err = json.Unmarshal(all, &apiRes)
|
||||||
|
if err != nil {
|
||||||
|
errMsg = err.Error()
|
||||||
|
} else if apiRes.Code != types.Success {
|
||||||
|
errMsg = apiRes.Message
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if errMsg != "" || apiRes.Code != types.Success {
|
|
||||||
errMsg = "调用函数工具出错:" + apiRes.Message + errMsg
|
if errMsg != "" {
|
||||||
|
errMsg = "调用函数工具出错:" + errMsg
|
||||||
contents = append(contents, errMsg)
|
contents = append(contents, errMsg)
|
||||||
} else {
|
} else {
|
||||||
errMsg = utils.InterfaceToString(apiRes.Data)
|
errMsg = utils.InterfaceToString(apiRes.Data)
|
@ -8,6 +8,7 @@ package handler
|
|||||||
// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"geekai/core"
|
"geekai/core"
|
||||||
"geekai/core/types"
|
"geekai/core/types"
|
||||||
"geekai/service"
|
"geekai/service"
|
||||||
@ -17,14 +18,13 @@ import (
|
|||||||
"geekai/store/vo"
|
"geekai/store/vo"
|
||||||
"geekai/utils"
|
"geekai/utils"
|
||||||
"geekai/utils/resp"
|
"geekai/utils/resp"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/go-redis/redis/v8"
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DallJobHandler struct {
|
type DallJobHandler struct {
|
||||||
BaseHandler
|
BaseHandler
|
||||||
redis *redis.Client
|
|
||||||
dallService *dalle.Service
|
dallService *dalle.Service
|
||||||
uploader *oss.UploaderManager
|
uploader *oss.UploaderManager
|
||||||
userService *service.UserService
|
userService *service.UserService
|
||||||
@ -42,49 +42,49 @@ func NewDallJobHandler(app *core.AppServer, db *gorm.DB, service *dalle.Service,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *DallJobHandler) preCheck(c *gin.Context) bool {
|
|
||||||
user, err := h.GetLoginUser(c)
|
|
||||||
if err != nil {
|
|
||||||
resp.NotAuth(c)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if user.Power < h.App.SysConfig.DallPower {
|
|
||||||
resp.ERROR(c, "当前用户剩余算力不足以完成本次绘画!")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Image 创建一个绘画任务
|
// Image 创建一个绘画任务
|
||||||
func (h *DallJobHandler) Image(c *gin.Context) {
|
func (h *DallJobHandler) Image(c *gin.Context) {
|
||||||
if !h.preCheck(c) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var data types.DallTask
|
var data types.DallTask
|
||||||
if err := c.ShouldBindJSON(&data); err != nil || data.Prompt == "" {
|
if err := c.ShouldBindJSON(&data); err != nil || data.Prompt == "" {
|
||||||
resp.ERROR(c, types.InvalidArgs)
|
resp.ERROR(c, types.InvalidArgs)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var chatModel model.ChatModel
|
||||||
|
if res := h.DB.Where("id = ?", data.ModelId).First(&chatModel); res.Error != nil {
|
||||||
|
resp.ERROR(c, "模型不存在")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查用户剩余算力
|
||||||
|
user, err := h.GetLoginUser(c)
|
||||||
|
if err != nil {
|
||||||
|
resp.NotAuth(c)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if user.Power < chatModel.Power {
|
||||||
|
resp.ERROR(c, "当前用户剩余算力不足以完成本次绘画!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
idValue, _ := c.Get(types.LoginUserID)
|
idValue, _ := c.Get(types.LoginUserID)
|
||||||
userId := utils.IntValue(utils.InterfaceToString(idValue), 0)
|
userId := utils.IntValue(utils.InterfaceToString(idValue), 0)
|
||||||
task := types.DallTask{
|
task := types.DallTask{
|
||||||
ClientId: data.ClientId,
|
ClientId: data.ClientId,
|
||||||
UserId: uint(userId),
|
UserId: uint(userId),
|
||||||
|
ModelId: chatModel.Id,
|
||||||
|
ModelName: chatModel.Value,
|
||||||
Prompt: data.Prompt,
|
Prompt: data.Prompt,
|
||||||
Quality: data.Quality,
|
Quality: data.Quality,
|
||||||
Size: data.Size,
|
Size: data.Size,
|
||||||
Style: data.Style,
|
Style: data.Style,
|
||||||
Power: h.App.SysConfig.DallPower,
|
|
||||||
TranslateModelId: h.App.SysConfig.TranslateModelId,
|
TranslateModelId: h.App.SysConfig.TranslateModelId,
|
||||||
|
Power: chatModel.Power,
|
||||||
}
|
}
|
||||||
job := model.DallJob{
|
job := model.DallJob{
|
||||||
UserId: uint(userId),
|
UserId: uint(userId),
|
||||||
Prompt: data.Prompt,
|
Prompt: data.Prompt,
|
||||||
Power: task.Power,
|
Power: chatModel.Power,
|
||||||
TaskInfo: utils.JsonEncode(task),
|
TaskInfo: utils.JsonEncode(task),
|
||||||
}
|
}
|
||||||
res := h.DB.Create(&job)
|
res := h.DB.Create(&job)
|
||||||
@ -95,6 +95,17 @@ func (h *DallJobHandler) Image(c *gin.Context) {
|
|||||||
|
|
||||||
task.Id = job.Id
|
task.Id = job.Id
|
||||||
h.dallService.PushTask(task)
|
h.dallService.PushTask(task)
|
||||||
|
|
||||||
|
// 扣减算力
|
||||||
|
err = h.userService.DecreasePower(int(user.Id), chatModel.Power, model.PowerLog{
|
||||||
|
Type: types.PowerConsume,
|
||||||
|
Model: chatModel.Value,
|
||||||
|
Remark: fmt.Sprintf("绘画提示词:%s", utils.CutWords(task.Prompt, 10)),
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
resp.ERROR(c, "error with decrease power: "+err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
resp.SUCCESS(c)
|
resp.SUCCESS(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,3 +221,25 @@ func (h *DallJobHandler) Publish(c *gin.Context) {
|
|||||||
|
|
||||||
resp.SUCCESS(c)
|
resp.SUCCESS(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (h *DallJobHandler) GetModels(c *gin.Context) {
|
||||||
|
var models []model.ChatModel
|
||||||
|
err := h.DB.Where("type", "img").Where("enabled", true).Find(&models).Error
|
||||||
|
if err != nil {
|
||||||
|
resp.ERROR(c, err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var modelVos []vo.ChatModel
|
||||||
|
for _, v := range models {
|
||||||
|
var modelVo vo.ChatModel
|
||||||
|
err := utils.CopyObject(v, &modelVo)
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
modelVo.Id = v.Id
|
||||||
|
modelVos = append(modelVos, modelVo)
|
||||||
|
}
|
||||||
|
|
||||||
|
resp.SUCCESS(c, modelVos)
|
||||||
|
}
|
||||||
|
@ -12,6 +12,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"geekai/core"
|
"geekai/core"
|
||||||
"geekai/core/types"
|
"geekai/core/types"
|
||||||
|
"geekai/service"
|
||||||
"geekai/service/dalle"
|
"geekai/service/dalle"
|
||||||
"geekai/service/oss"
|
"geekai/service/oss"
|
||||||
"geekai/store/model"
|
"geekai/store/model"
|
||||||
@ -32,6 +33,7 @@ type FunctionHandler struct {
|
|||||||
config types.ApiConfig
|
config types.ApiConfig
|
||||||
uploadManager *oss.UploaderManager
|
uploadManager *oss.UploaderManager
|
||||||
dallService *dalle.Service
|
dallService *dalle.Service
|
||||||
|
userService *service.UserService
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFunctionHandler(
|
func NewFunctionHandler(
|
||||||
@ -39,7 +41,8 @@ func NewFunctionHandler(
|
|||||||
db *gorm.DB,
|
db *gorm.DB,
|
||||||
config *types.AppConfig,
|
config *types.AppConfig,
|
||||||
manager *oss.UploaderManager,
|
manager *oss.UploaderManager,
|
||||||
dallService *dalle.Service) *FunctionHandler {
|
dallService *dalle.Service,
|
||||||
|
userService *service.UserService) *FunctionHandler {
|
||||||
return &FunctionHandler{
|
return &FunctionHandler{
|
||||||
BaseHandler: BaseHandler{
|
BaseHandler: BaseHandler{
|
||||||
App: server,
|
App: server,
|
||||||
@ -48,6 +51,7 @@ func NewFunctionHandler(
|
|||||||
config: config.ApiConfig,
|
config: config.ApiConfig,
|
||||||
uploadManager: manager,
|
uploadManager: manager,
|
||||||
dallService: dallService,
|
dallService: dallService,
|
||||||
|
userService: userService,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,8 +156,12 @@ func (h *FunctionHandler) ZaoBao(c *gin.Context) {
|
|||||||
SetHeader("AppId", h.config.AppId).
|
SetHeader("AppId", h.config.AppId).
|
||||||
SetHeader("Authorization", fmt.Sprintf("Bearer %s", h.config.Token)).
|
SetHeader("Authorization", fmt.Sprintf("Bearer %s", h.config.Token)).
|
||||||
SetSuccessResult(&res).Get(url)
|
SetSuccessResult(&res).Get(url)
|
||||||
if err != nil || r.IsErrorState() {
|
if err != nil {
|
||||||
resp.ERROR(c, fmt.Sprintf("%v%v", err, r.Err))
|
resp.ERROR(c, fmt.Sprintf("%v", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if r.IsErrorState() {
|
||||||
|
resp.ERROR(c, fmt.Sprintf("%v", r.Err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +175,7 @@ func (h *FunctionHandler) ZaoBao(c *gin.Context) {
|
|||||||
for _, v := range res.Data.Items {
|
for _, v := range res.Data.Items {
|
||||||
builder = append(builder, v.Title)
|
builder = append(builder, v.Title)
|
||||||
}
|
}
|
||||||
builder = append(builder, fmt.Sprintf("%s", res.Data.Title))
|
builder = append(builder, res.Data.Title)
|
||||||
resp.SUCCESS(c, strings.Join(builder, "\n\n"))
|
resp.SUCCESS(c, strings.Join(builder, "\n\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,33 +207,48 @@ func (h *FunctionHandler) Dall3(c *gin.Context) {
|
|||||||
|
|
||||||
// create dall task
|
// create dall task
|
||||||
prompt := utils.InterfaceToString(params["prompt"])
|
prompt := utils.InterfaceToString(params["prompt"])
|
||||||
job := model.DallJob{
|
task := types.DallTask{
|
||||||
UserId: user.Id,
|
UserId: user.Id,
|
||||||
Prompt: prompt,
|
Prompt: prompt,
|
||||||
Power: h.App.SysConfig.DallPower,
|
ModelId: 0,
|
||||||
|
ModelName: "dall-e-3",
|
||||||
|
TranslateModelId: h.App.SysConfig.TranslateModelId,
|
||||||
|
N: 1,
|
||||||
|
Quality: "standard",
|
||||||
|
Size: "1024x1024",
|
||||||
|
Style: "vivid",
|
||||||
|
Power: h.App.SysConfig.DallPower,
|
||||||
}
|
}
|
||||||
res = h.DB.Create(&job)
|
job := model.DallJob{
|
||||||
|
UserId: user.Id,
|
||||||
if res.Error != nil {
|
Prompt: prompt,
|
||||||
resp.ERROR(c, "创建 DALL-E 绘图任务失败:"+res.Error.Error())
|
Power: h.App.SysConfig.DallPower,
|
||||||
|
TaskInfo: utils.JsonEncode(task),
|
||||||
|
}
|
||||||
|
err := h.DB.Create(&job).Error
|
||||||
|
if err != nil {
|
||||||
|
resp.ERROR(c, "创建 DALL-E 绘图任务失败:"+err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
content, err := h.dallService.Image(types.DallTask{
|
task.Id = job.Id
|
||||||
Id: job.Id,
|
content, err := h.dallService.Image(task, true)
|
||||||
UserId: user.Id,
|
|
||||||
Prompt: job.Prompt,
|
|
||||||
N: 1,
|
|
||||||
Quality: "standard",
|
|
||||||
Size: "1024x1024",
|
|
||||||
Style: "vivid",
|
|
||||||
Power: job.Power,
|
|
||||||
}, true)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
resp.ERROR(c, "任务执行失败:"+err.Error())
|
resp.ERROR(c, "任务执行失败:"+err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 扣减算力
|
||||||
|
err = h.userService.DecreasePower(int(user.Id), job.Power, model.PowerLog{
|
||||||
|
Type: types.PowerConsume,
|
||||||
|
Model: task.ModelName,
|
||||||
|
Remark: fmt.Sprintf("绘画提示词:%s", utils.CutWords(job.Prompt, 10)),
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
resp.ERROR(c, "扣减算力失败:"+err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
resp.SUCCESS(c, content)
|
resp.SUCCESS(c, content)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,13 +12,13 @@ import (
|
|||||||
"geekai/core"
|
"geekai/core"
|
||||||
"geekai/core/types"
|
"geekai/core/types"
|
||||||
"geekai/service"
|
"geekai/service"
|
||||||
"geekai/service/oss"
|
"geekai/store/model"
|
||||||
"geekai/service/suno"
|
|
||||||
"geekai/utils"
|
"geekai/utils"
|
||||||
"geekai/utils/resp"
|
"geekai/utils/resp"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 提示词生成 handler
|
// 提示词生成 handler
|
||||||
@ -26,8 +26,6 @@ import (
|
|||||||
|
|
||||||
type PromptHandler struct {
|
type PromptHandler struct {
|
||||||
BaseHandler
|
BaseHandler
|
||||||
sunoService *suno.Service
|
|
||||||
uploader *oss.UploaderManager
|
|
||||||
userService *service.UserService
|
userService *service.UserService
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,6 +54,15 @@ func (h *PromptHandler) Lyric(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if h.App.SysConfig.PromptPower > 0 {
|
||||||
|
userId := h.GetLoginUserId(c)
|
||||||
|
h.userService.DecreasePower(int(userId), h.App.SysConfig.PromptPower, model.PowerLog{
|
||||||
|
Type: types.PowerConsume,
|
||||||
|
Model: h.getPromptModel(),
|
||||||
|
Remark: "生成歌词",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
resp.SUCCESS(c, content)
|
resp.SUCCESS(c, content)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +80,14 @@ func (h *PromptHandler) Image(c *gin.Context) {
|
|||||||
resp.ERROR(c, err.Error())
|
resp.ERROR(c, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if h.App.SysConfig.PromptPower > 0 {
|
||||||
|
userId := h.GetLoginUserId(c)
|
||||||
|
h.userService.DecreasePower(int(userId), h.App.SysConfig.PromptPower, model.PowerLog{
|
||||||
|
Type: types.PowerConsume,
|
||||||
|
Model: h.getPromptModel(),
|
||||||
|
Remark: "生成绘画提示词",
|
||||||
|
})
|
||||||
|
}
|
||||||
resp.SUCCESS(c, strings.Trim(content, `"`))
|
resp.SUCCESS(c, strings.Trim(content, `"`))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,6 +106,15 @@ func (h *PromptHandler) Video(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if h.App.SysConfig.PromptPower > 0 {
|
||||||
|
userId := h.GetLoginUserId(c)
|
||||||
|
h.userService.DecreasePower(int(userId), h.App.SysConfig.PromptPower, model.PowerLog{
|
||||||
|
Type: types.PowerConsume,
|
||||||
|
Model: h.getPromptModel(),
|
||||||
|
Remark: "生成视频脚本",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
resp.SUCCESS(c, strings.Trim(content, `"`))
|
resp.SUCCESS(c, strings.Trim(content, `"`))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,3 +144,12 @@ func (h *PromptHandler) MetaPrompt(c *gin.Context) {
|
|||||||
|
|
||||||
resp.SUCCESS(c, strings.Trim(content, `"`))
|
resp.SUCCESS(c, strings.Trim(content, `"`))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (h *PromptHandler) getPromptModel() string {
|
||||||
|
if h.App.SysConfig.TranslateModelId > 0 {
|
||||||
|
var chatModel model.ChatModel
|
||||||
|
h.DB.Where("id", h.App.SysConfig.TranslateModelId).First(&chatModel)
|
||||||
|
return chatModel.Value
|
||||||
|
}
|
||||||
|
return "gpt-4o"
|
||||||
|
}
|
||||||
|
@ -1,15 +1,24 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"geekai/core"
|
"geekai/core"
|
||||||
|
"geekai/core/types"
|
||||||
|
"geekai/service"
|
||||||
"geekai/store/model"
|
"geekai/store/model"
|
||||||
"github.com/gin-gonic/gin"
|
"geekai/utils"
|
||||||
"github.com/gorilla/websocket"
|
"geekai/utils/resp"
|
||||||
"gorm.io/gorm"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/gorilla/websocket"
|
||||||
|
"github.com/imroc/req/v3"
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -23,10 +32,11 @@ import (
|
|||||||
|
|
||||||
type RealtimeHandler struct {
|
type RealtimeHandler struct {
|
||||||
BaseHandler
|
BaseHandler
|
||||||
|
userService *service.UserService
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewRealtimeHandler(server *core.AppServer, db *gorm.DB) *RealtimeHandler {
|
func NewRealtimeHandler(server *core.AppServer, db *gorm.DB, userService *service.UserService) *RealtimeHandler {
|
||||||
return &RealtimeHandler{BaseHandler{App: server, DB: db}}
|
return &RealtimeHandler{BaseHandler: BaseHandler{App: server, DB: db}, userService: userService}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *RealtimeHandler) Connection(c *gin.Context) {
|
func (h *RealtimeHandler) Connection(c *gin.Context) {
|
||||||
@ -126,3 +136,74 @@ func sendError(ws *websocket.Conn, message string) {
|
|||||||
logger.Error(err)
|
logger.Error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenAI 实时语音对话,一次性对话
|
||||||
|
func (h *RealtimeHandler) VoiceChat(c *gin.Context) {
|
||||||
|
var apiKey model.ApiKey
|
||||||
|
err := h.DB.Session(&gorm.Session{}).Where("type", "realtime").Where("enabled", true).First(&apiKey).Error
|
||||||
|
if err != nil {
|
||||||
|
resp.ERROR(c, fmt.Sprintf("error with fetch OpenAI API KEY:%v", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var response utils.OpenAIResponse
|
||||||
|
client := req.C()
|
||||||
|
if len(apiKey.ProxyURL) > 5 {
|
||||||
|
client.SetProxyURL(apiKey.ApiURL)
|
||||||
|
}
|
||||||
|
apiURL := fmt.Sprintf("%s/v1/chat/completions", apiKey.ApiURL)
|
||||||
|
logger.Infof("Sending %s request, API KEY:%s, PROXY: %s, Model: %s", apiKey.ApiURL, apiURL, apiKey.ProxyURL, "advanced-voice")
|
||||||
|
r, err := client.R().SetHeader("Body-Type", "application/json").
|
||||||
|
SetHeader("Authorization", "Bearer "+apiKey.Value).
|
||||||
|
SetBody(types.ApiRequest{
|
||||||
|
Model: "advanced-voice",
|
||||||
|
Temperature: 0.9,
|
||||||
|
MaxTokens: 1024,
|
||||||
|
Stream: false,
|
||||||
|
Messages: []interface{}{types.Message{
|
||||||
|
Role: "user",
|
||||||
|
Content: "实时语音通话",
|
||||||
|
}},
|
||||||
|
}).Post(apiURL)
|
||||||
|
if err != nil {
|
||||||
|
resp.ERROR(c, fmt.Sprintf("请求 OpenAI API失败:%v", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if r.IsErrorState() {
|
||||||
|
resp.ERROR(c, fmt.Sprintf("请求 OpenAI API失败:%v", r.Status))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
body, _ := io.ReadAll(r.Body)
|
||||||
|
err = json.Unmarshal(body, &response)
|
||||||
|
if err != nil {
|
||||||
|
resp.ERROR(c, fmt.Sprintf("解析API数据失败:%v, %s", err, string(body)))
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新 API KEY 的最后使用时间
|
||||||
|
h.DB.Model(&apiKey).UpdateColumn("last_used_at", time.Now().Unix())
|
||||||
|
|
||||||
|
// 扣减算力
|
||||||
|
userId := h.GetLoginUserId(c)
|
||||||
|
err = h.userService.DecreasePower(int(userId), h.App.SysConfig.AdvanceVoicePower, model.PowerLog{
|
||||||
|
Type: types.PowerConsume,
|
||||||
|
Model: "advanced-voice",
|
||||||
|
Remark: "实时语音通话",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
resp.ERROR(c, err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.Infof("Response: %v", response.Choices[0].Message.Content)
|
||||||
|
|
||||||
|
// 提取链接
|
||||||
|
re := regexp.MustCompile(`\[(.*?)\]\((.*?)\)`)
|
||||||
|
links := re.FindAllStringSubmatch(response.Choices[0].Message.Content, -1)
|
||||||
|
var url = ""
|
||||||
|
if len(links) > 0 {
|
||||||
|
url = links[0][2]
|
||||||
|
}
|
||||||
|
resp.SUCCESS(c, url)
|
||||||
|
}
|
||||||
|
@ -215,8 +215,8 @@ func (h *SunoHandler) Remove(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 只有失败,或者超时的任务才能删除
|
// 只有失败或者已完成的任务可以删除
|
||||||
if job.Progress != service.FailTaskProgress || time.Now().Before(job.CreatedAt.Add(time.Minute*10)) {
|
if !(job.Progress == service.FailTaskProgress || job.Progress == 100) {
|
||||||
resp.ERROR(c, "只有失败和超时(10分钟)的任务才能删除!")
|
resp.ERROR(c, "只有失败和超时(10分钟)的任务才能删除!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ func (h *UserHandler) Register(c *gin.Context) {
|
|||||||
if h.App.SysConfig.InvitePower > 0 {
|
if h.App.SysConfig.InvitePower > 0 {
|
||||||
err := h.userService.IncreasePower(int(inviteCode.UserId), h.App.SysConfig.InvitePower, model.PowerLog{
|
err := h.userService.IncreasePower(int(inviteCode.UserId), h.App.SysConfig.InvitePower, model.PowerLog{
|
||||||
Type: types.PowerInvite,
|
Type: types.PowerInvite,
|
||||||
Model: "",
|
Model: "Invite",
|
||||||
Remark: fmt.Sprintf("邀请用户注册奖励,金额:%d,邀请码:%s,新用户:%s", h.App.SysConfig.InvitePower, inviteCode.Code, user.Username),
|
Remark: fmt.Sprintf("邀请用户注册奖励,金额:%d,邀请码:%s,新用户:%s", h.App.SysConfig.InvitePower, inviteCode.Code, user.Username),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -474,6 +474,7 @@ func main() {
|
|||||||
group.GET("imgWall", h.ImgWall)
|
group.GET("imgWall", h.ImgWall)
|
||||||
group.GET("remove", h.Remove)
|
group.GET("remove", h.Remove)
|
||||||
group.GET("publish", h.Publish)
|
group.GET("publish", h.Publish)
|
||||||
|
group.GET("models", h.GetModels)
|
||||||
}),
|
}),
|
||||||
fx.Provide(handler.NewSunoHandler),
|
fx.Provide(handler.NewSunoHandler),
|
||||||
fx.Invoke(func(s *core.AppServer, h *handler.SunoHandler) {
|
fx.Invoke(func(s *core.AppServer, h *handler.SunoHandler) {
|
||||||
@ -565,6 +566,7 @@ func main() {
|
|||||||
fx.Provide(handler.NewRealtimeHandler),
|
fx.Provide(handler.NewRealtimeHandler),
|
||||||
fx.Invoke(func(s *core.AppServer, h *handler.RealtimeHandler) {
|
fx.Invoke(func(s *core.AppServer, h *handler.RealtimeHandler) {
|
||||||
s.Engine.Any("/api/realtime", h.Connection)
|
s.Engine.Any("/api/realtime", h.Connection)
|
||||||
|
s.Engine.POST("/api/realtime/voice", h.VoiceChat)
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
// 启动应用程序
|
// 启动应用程序
|
||||||
|
@ -8,7 +8,6 @@ package dalle
|
|||||||
// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"geekai/core/types"
|
"geekai/core/types"
|
||||||
logger2 "geekai/logger"
|
logger2 "geekai/logger"
|
||||||
@ -17,9 +16,11 @@ import (
|
|||||||
"geekai/store"
|
"geekai/store"
|
||||||
"geekai/store/model"
|
"geekai/store/model"
|
||||||
"geekai/utils"
|
"geekai/utils"
|
||||||
"github.com/go-redis/redis/v8"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-redis/redis/v8"
|
||||||
|
|
||||||
"github.com/imroc/req/v3"
|
"github.com/imroc/req/v3"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
@ -100,17 +101,18 @@ func (s *Service) Run() {
|
|||||||
type imgReq struct {
|
type imgReq struct {
|
||||||
Model string `json:"model"`
|
Model string `json:"model"`
|
||||||
Prompt string `json:"prompt"`
|
Prompt string `json:"prompt"`
|
||||||
N int `json:"n"`
|
N int `json:"n,omitempty"`
|
||||||
Size string `json:"size"`
|
Size string `json:"size,omitempty"`
|
||||||
Quality string `json:"quality"`
|
Quality string `json:"quality,omitempty"`
|
||||||
Style string `json:"style"`
|
Style string `json:"style,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type imgRes struct {
|
type imgRes struct {
|
||||||
Created int64 `json:"created"`
|
Created int64 `json:"created"`
|
||||||
Data []struct {
|
Data []struct {
|
||||||
RevisedPrompt string `json:"revised_prompt"`
|
RevisedPrompt string `json:"revised_prompt,omitempty"`
|
||||||
Url string `json:"url"`
|
Url string `json:"url,omitempty"`
|
||||||
|
B64Json string `json:"b64_json,omitempty"`
|
||||||
} `json:"data"`
|
} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,29 +137,20 @@ func (s *Service) Image(task types.DallTask, sync bool) (string, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var user model.User
|
var chatModel model.ChatModel
|
||||||
s.db.Where("id", task.UserId).First(&user)
|
s.db.Where("id = ?", task.ModelId).First(&chatModel)
|
||||||
if user.Power < task.Power {
|
|
||||||
return "", errors.New("insufficient of power")
|
|
||||||
}
|
|
||||||
|
|
||||||
// 扣减算力
|
|
||||||
err := s.userService.DecreasePower(int(user.Id), task.Power, model.PowerLog{
|
|
||||||
Type: types.PowerConsume,
|
|
||||||
Model: "dall-e-3",
|
|
||||||
Remark: fmt.Sprintf("绘画提示词:%s", utils.CutWords(task.Prompt, 10)),
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("error with decrease power: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// get image generation API KEY
|
// get image generation API KEY
|
||||||
var apiKey model.ApiKey
|
var apiKey model.ApiKey
|
||||||
err = s.db.Where("type", "dalle").
|
session := s.db.Where("enabled", true)
|
||||||
Where("enabled", true).
|
if chatModel.KeyId > 0 {
|
||||||
Order("last_used_at ASC").First(&apiKey).Error
|
session = session.Where("id = ?", chatModel.KeyId)
|
||||||
|
} else {
|
||||||
|
session = session.Where("type = ?", "dalle")
|
||||||
|
}
|
||||||
|
err := session.Order("last_used_at ASC").First(&apiKey).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("no available DALL-E api key: %v", err)
|
return "", fmt.Errorf("no available Image Generation api key: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var res imgRes
|
var res imgRes
|
||||||
@ -167,7 +160,7 @@ func (s *Service) Image(task types.DallTask, sync bool) (string, error) {
|
|||||||
}
|
}
|
||||||
apiURL := fmt.Sprintf("%s/v1/images/generations", apiKey.ApiURL)
|
apiURL := fmt.Sprintf("%s/v1/images/generations", apiKey.ApiURL)
|
||||||
reqBody := imgReq{
|
reqBody := imgReq{
|
||||||
Model: "dall-e-3",
|
Model: chatModel.Value,
|
||||||
Prompt: prompt,
|
Prompt: prompt,
|
||||||
N: 1,
|
N: 1,
|
||||||
Size: task.Size,
|
Size: task.Size,
|
||||||
@ -182,20 +175,39 @@ func (s *Service) Image(task types.DallTask, sync bool) (string, error) {
|
|||||||
SetSuccessResult(&res).
|
SetSuccessResult(&res).
|
||||||
Post(apiURL)
|
Post(apiURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
logger.Errorf("error with send request: %v", err)
|
||||||
return "", fmt.Errorf("error with send request: %v", err)
|
return "", fmt.Errorf("error with send request: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.IsErrorState() {
|
if r.IsErrorState() {
|
||||||
|
logger.Errorf("error with send request, status: %s, %+v", r.Status, errRes.Error)
|
||||||
return "", fmt.Errorf("error with send request, status: %s, %+v", r.Status, errRes.Error)
|
return "", fmt.Errorf("error with send request, status: %s, %+v", r.Status, errRes.Error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
all, _ := io.ReadAll(r.Body)
|
||||||
|
logger.Debugf("response: %+v", string(all))
|
||||||
|
|
||||||
// update the api key last use time
|
// update the api key last use time
|
||||||
s.db.Model(&apiKey).UpdateColumn("last_used_at", time.Now().Unix())
|
s.db.Model(&apiKey).UpdateColumn("last_used_at", time.Now().Unix())
|
||||||
// update task progress
|
var imgURL string
|
||||||
err = s.db.Model(&model.DallJob{Id: task.Id}).UpdateColumns(map[string]interface{}{
|
var data = map[string]interface{}{
|
||||||
"progress": 100,
|
"progress": 100,
|
||||||
"org_url": res.Data[0].Url,
|
|
||||||
"prompt": prompt,
|
"prompt": prompt,
|
||||||
}).Error
|
}
|
||||||
|
// 如果返回的是base64,则需要上传到oss
|
||||||
|
if res.Data[0].B64Json != "" {
|
||||||
|
imgURL, err = s.uploadManager.GetUploadHandler().PutBase64(res.Data[0].B64Json)
|
||||||
|
if err != nil {
|
||||||
|
return "", fmt.Errorf("error with upload image: %v", err)
|
||||||
|
}
|
||||||
|
logger.Infof("upload image to oss: %s", imgURL)
|
||||||
|
data["img_url"] = imgURL
|
||||||
|
} else {
|
||||||
|
imgURL = res.Data[0].Url
|
||||||
|
}
|
||||||
|
data["org_url"] = imgURL
|
||||||
|
// update task progress
|
||||||
|
err = s.db.Model(&model.DallJob{Id: task.Id}).UpdateColumns(data).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("err with update database: %v", err)
|
return "", fmt.Errorf("err with update database: %v", err)
|
||||||
}
|
}
|
||||||
@ -252,9 +264,14 @@ func (s *Service) CheckTaskStatus() {
|
|||||||
// 找出失败的任务,并恢复其扣减算力
|
// 找出失败的任务,并恢复其扣减算力
|
||||||
s.db.Where("progress", service.FailTaskProgress).Where("power > ?", 0).Find(&jobs)
|
s.db.Where("progress", service.FailTaskProgress).Where("power > ?", 0).Find(&jobs)
|
||||||
for _, job := range jobs {
|
for _, job := range jobs {
|
||||||
err := s.userService.IncreasePower(int(job.UserId), job.Power, model.PowerLog{
|
var task types.DallTask
|
||||||
|
err := utils.JsonDecode(job.TaskInfo, &task)
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
err = s.userService.IncreasePower(int(job.UserId), job.Power, model.PowerLog{
|
||||||
Type: types.PowerRefund,
|
Type: types.PowerRefund,
|
||||||
Model: "dall-e-3",
|
Model: task.ModelName,
|
||||||
Remark: fmt.Sprintf("任务失败,退回算力。任务ID:%d,Err: %s", job.Id, job.ErrMsg),
|
Remark: fmt.Sprintf("任务失败,退回算力。任务ID:%d,Err: %s", job.Id, job.ErrMsg),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -130,10 +130,13 @@ type LumaRespVo struct {
|
|||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Prompt string `json:"prompt"`
|
Prompt string `json:"prompt"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
QueueState interface{} `json:"queue_state"`
|
||||||
|
CreatedAt string `json:"created_at"`
|
||||||
Video interface{} `json:"video"`
|
Video interface{} `json:"video"`
|
||||||
|
VideoRaw interface{} `json:"video_raw"`
|
||||||
Liked interface{} `json:"liked"`
|
Liked interface{} `json:"liked"`
|
||||||
EstimateWaitSeconds interface{} `json:"estimate_wait_seconds"`
|
EstimateWaitSeconds interface{} `json:"estimate_wait_seconds"`
|
||||||
|
Thumbnail interface{} `json:"thumbnail"`
|
||||||
Channel string `json:"channel,omitempty"`
|
Channel string `json:"channel,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,7 +237,7 @@ func (s *Service) DownloadFiles() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.Info("download no water video success: %s", videoURL)
|
logger.Infof("download no water video success: %s", videoURL)
|
||||||
v.VideoURL = videoURL
|
v.VideoURL = videoURL
|
||||||
v.Progress = 100
|
v.Progress = 100
|
||||||
s.db.Updates(&v)
|
s.db.Updates(&v)
|
||||||
@ -275,6 +278,7 @@ func (s *Service) SyncTaskProgress() {
|
|||||||
"water_url": task.Video.Url,
|
"water_url": task.Video.Url,
|
||||||
"raw_data": utils.JsonEncode(task),
|
"raw_data": utils.JsonEncode(task),
|
||||||
"prompt_ext": task.Prompt,
|
"prompt_ext": task.Prompt,
|
||||||
|
"cover_url": task.Thumbnail.Url,
|
||||||
}
|
}
|
||||||
if task.Video.DownloadUrl != "" {
|
if task.Video.DownloadUrl != "" {
|
||||||
data["video_url"] = task.Video.DownloadUrl
|
data["video_url"] = task.Video.DownloadUrl
|
||||||
@ -315,11 +319,28 @@ type LumaTaskVo struct {
|
|||||||
Url string `json:"url"`
|
Url string `json:"url"`
|
||||||
Width int `json:"width"`
|
Width int `json:"width"`
|
||||||
Height int `json:"height"`
|
Height int `json:"height"`
|
||||||
|
Thumbnail string `json:"thumbnail"`
|
||||||
DownloadUrl string `json:"download_url"`
|
DownloadUrl string `json:"download_url"`
|
||||||
} `json:"video"`
|
} `json:"video"`
|
||||||
Prompt string `json:"prompt"`
|
Prompt string `json:"prompt"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
UserId string `json:"user_id"`
|
||||||
EstimateWaitSeconds interface{} `json:"estimate_wait_seconds"`
|
BatchId string `json:"batch_id"`
|
||||||
|
Thumbnail struct {
|
||||||
|
Url string `json:"url"`
|
||||||
|
Width int `json:"width"`
|
||||||
|
Height int `json:"height"`
|
||||||
|
} `json:"thumbnail"`
|
||||||
|
VideoRaw struct {
|
||||||
|
Url string `json:"url"`
|
||||||
|
Width int `json:"width"`
|
||||||
|
Height int `json:"height"`
|
||||||
|
} `json:"video_raw"`
|
||||||
|
CreatedAt string `json:"created_at"`
|
||||||
|
LastFrame struct {
|
||||||
|
Url string `json:"url"`
|
||||||
|
Width int `json:"width"`
|
||||||
|
Height int `json:"height"`
|
||||||
|
} `json:"last_frame"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Service) QueryLumaTask(taskId string, channel string) (LumaTaskVo, error) {
|
func (s *Service) QueryLumaTask(taskId string, channel string) (LumaTaskVo, error) {
|
||||||
|
@ -12,4 +12,5 @@ type ChatModel struct {
|
|||||||
MaxContext int // 最大上下文长度
|
MaxContext int // 最大上下文长度
|
||||||
Temperature float32 // 模型温度
|
Temperature float32 // 模型温度
|
||||||
KeyId int // 绑定 API KEY ID
|
KeyId int // 绑定 API KEY ID
|
||||||
|
Type string // 模型类型
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,5 @@ type ChatModel struct {
|
|||||||
Temperature float32 `json:"temperature"` // 模型温度
|
Temperature float32 `json:"temperature"` // 模型温度
|
||||||
KeyId int `json:"key_id,omitempty"`
|
KeyId int `json:"key_id,omitempty"`
|
||||||
KeyName string `json:"key_name"`
|
KeyName string `json:"key_name"`
|
||||||
|
Type string `json:"type"`
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"geekai/core/types"
|
"geekai/core/types"
|
||||||
"geekai/store/model"
|
"geekai/store/model"
|
||||||
|
"io"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/imroc/req/v3"
|
"github.com/imroc/req/v3"
|
||||||
"github.com/pkoukk/tiktoken-go"
|
"github.com/pkoukk/tiktoken-go"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"io"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CalcTokens(text string, model string) (int, error) {
|
func CalcTokens(text string, model string) (int, error) {
|
||||||
@ -33,7 +34,7 @@ func CalcTokens(text string, model string) (int, error) {
|
|||||||
return len(token), nil
|
return len(token), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type apiRes struct {
|
type OpenAIResponse struct {
|
||||||
Model string `json:"model"`
|
Model string `json:"model"`
|
||||||
Choices []struct {
|
Choices []struct {
|
||||||
Index int `json:"index"`
|
Index int `json:"index"`
|
||||||
@ -70,7 +71,7 @@ func SendOpenAIMessage(db *gorm.DB, messages []interface{}, modelId int) (string
|
|||||||
return "", fmt.Errorf("error with fetch OpenAI API KEY:%v", err)
|
return "", fmt.Errorf("error with fetch OpenAI API KEY:%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var response apiRes
|
var response OpenAIResponse
|
||||||
client := req.C()
|
client := req.C()
|
||||||
if len(apiKey.ProxyURL) > 5 {
|
if len(apiKey.ProxyURL) > 5 {
|
||||||
client.SetProxyURL(apiKey.ApiURL)
|
client.SetProxyURL(apiKey.ApiURL)
|
||||||
|
970
database/geekai_plus-v4.1.8.sql
Normal file
@ -0,0 +1,970 @@
|
|||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 5.2.1
|
||||||
|
-- https://www.phpmyadmin.net/
|
||||||
|
--
|
||||||
|
-- 主机: 127.0.0.1
|
||||||
|
-- 生成日期: 2024-12-27 15:49:07
|
||||||
|
-- 服务器版本: 8.0.33
|
||||||
|
-- PHP 版本: 8.1.2-1ubuntu2.20
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
START TRANSACTION;
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 数据库: `geekai_plus`
|
||||||
|
--
|
||||||
|
CREATE DATABASE IF NOT EXISTS `geekai_plus` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
|
||||||
|
USE `geekai_plus`;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_admin_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_admin_users`;
|
||||||
|
CREATE TABLE `chatgpt_admin_users` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
|
||||||
|
`password` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
|
||||||
|
`salt` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码盐',
|
||||||
|
`status` tinyint(1) NOT NULL COMMENT '当前状态',
|
||||||
|
`last_login_at` int NOT NULL COMMENT '最后登录时间',
|
||||||
|
`last_login_ip` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后登录 IP',
|
||||||
|
`created_at` datetime NOT NULL COMMENT '创建时间',
|
||||||
|
`updated_at` datetime NOT NULL COMMENT '更新时间'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统用户' ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_admin_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_admin_users` (`id`, `username`, `password`, `salt`, `status`, `last_login_at`, `last_login_ip`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'admin', '6d17e80c87d209efb84ca4b2e0824f549d09fac8b2e1cc698de5bb5e1d75dfd0', 'mmrql75o', 1, 1735174700, '::1', '2024-03-11 16:30:20', '2024-12-26 08:58:20');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_api_keys`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_api_keys`;
|
||||||
|
CREATE TABLE `chatgpt_api_keys` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) DEFAULT NULL COMMENT '名称',
|
||||||
|
`value` varchar(100) NOT NULL COMMENT 'API KEY value',
|
||||||
|
`type` varchar(10) NOT NULL DEFAULT 'chat' COMMENT '用途(chat=>聊天,img=>图片)',
|
||||||
|
`last_used_at` int NOT NULL COMMENT '最后使用时间',
|
||||||
|
`api_url` varchar(255) DEFAULT NULL COMMENT 'API 地址',
|
||||||
|
`enabled` tinyint(1) DEFAULT NULL COMMENT '是否启用',
|
||||||
|
`proxy_url` varchar(100) DEFAULT NULL COMMENT '代理地址',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='OpenAI API ';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_app_types`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_app_types`;
|
||||||
|
CREATE TABLE `chatgpt_app_types` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(50) NOT NULL COMMENT '名称',
|
||||||
|
`icon` varchar(255) NOT NULL COMMENT '图标URL',
|
||||||
|
`sort_num` tinyint NOT NULL COMMENT '排序',
|
||||||
|
`enabled` tinyint(1) NOT NULL COMMENT '是否启用',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='应用分类表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_app_types`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_app_types` (`id`, `name`, `icon`, `sort_num`, `enabled`, `created_at`) VALUES
|
||||||
|
(3, '通用工具', 'http://172.22.11.200:5678/static/upload/2024/9/1726307371871693.png', 1, 1, '2024-09-13 11:13:15'),
|
||||||
|
(4, '角色扮演', 'http://172.22.11.200:5678/static/upload/2024/9/1726307263906218.png', 1, 1, '2024-09-14 09:28:17'),
|
||||||
|
(5, '学习', 'http://172.22.11.200:5678/static/upload/2024/9/1726307456321179.jpg', 2, 1, '2024-09-14 09:30:18'),
|
||||||
|
(6, '编程', 'http://172.22.11.200:5678/static/upload/2024/9/1726307462748787.jpg', 3, 1, '2024-09-14 09:34:06'),
|
||||||
|
(7, '测试分类', '', 4, 1, '2024-09-14 17:54:17');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_chat_history`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_chat_history`;
|
||||||
|
CREATE TABLE `chatgpt_chat_history` (
|
||||||
|
`id` bigint NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`chat_id` char(40) NOT NULL COMMENT '会话 ID',
|
||||||
|
`type` varchar(10) NOT NULL COMMENT '类型:prompt|reply',
|
||||||
|
`icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色图标',
|
||||||
|
`role_id` int NOT NULL COMMENT '角色 ID',
|
||||||
|
`model` varchar(30) DEFAULT NULL COMMENT '模型名称',
|
||||||
|
`content` text NOT NULL COMMENT '聊天内容',
|
||||||
|
`tokens` smallint NOT NULL COMMENT '耗费 token 数量',
|
||||||
|
`total_tokens` int NOT NULL COMMENT '消耗总Token长度',
|
||||||
|
`use_context` tinyint(1) NOT NULL COMMENT '是否允许作为上下文语料',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL,
|
||||||
|
`deleted_at` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='聊天历史记录';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_chat_items`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_chat_items`;
|
||||||
|
CREATE TABLE `chatgpt_chat_items` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`chat_id` char(40) NOT NULL COMMENT '会话 ID',
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`role_id` int NOT NULL COMMENT '角色 ID',
|
||||||
|
`title` varchar(100) NOT NULL COMMENT '会话标题',
|
||||||
|
`model_id` int NOT NULL DEFAULT '0' COMMENT '模型 ID',
|
||||||
|
`model` varchar(30) DEFAULT NULL COMMENT '模型名称',
|
||||||
|
`created_at` datetime NOT NULL COMMENT '创建时间',
|
||||||
|
`updated_at` datetime NOT NULL COMMENT '更新时间',
|
||||||
|
`deleted_at` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户会话列表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_chat_models`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_chat_models`;
|
||||||
|
CREATE TABLE `chatgpt_chat_models` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`type` varchar(10) NOT NULL DEFAULT 'chat' COMMENT '模型类型(chat,img)',
|
||||||
|
`name` varchar(50) NOT NULL COMMENT '模型名称',
|
||||||
|
`value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '模型值',
|
||||||
|
`sort_num` tinyint(1) NOT NULL COMMENT '排序数字',
|
||||||
|
`enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用模型',
|
||||||
|
`power` smallint NOT NULL COMMENT '消耗算力点数',
|
||||||
|
`temperature` float(3,1) NOT NULL DEFAULT '1.0' COMMENT '模型创意度',
|
||||||
|
`max_tokens` int NOT NULL DEFAULT '1024' COMMENT '最大响应长度',
|
||||||
|
`max_context` int NOT NULL DEFAULT '4096' COMMENT '最大上下文长度',
|
||||||
|
`open` tinyint(1) NOT NULL COMMENT '是否开放模型',
|
||||||
|
`key_id` int NOT NULL COMMENT '绑定API KEY ID',
|
||||||
|
`created_at` datetime DEFAULT NULL,
|
||||||
|
`updated_at` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='AI 模型表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_chat_models`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_chat_models` (`id`, `type`, `name`, `value`, `sort_num`, `enabled`, `power`, `temperature`, `max_tokens`, `max_context`, `open`, `key_id`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'chat', 'gpt-4o-mini', 'gpt-4o-mini', 1, 1, 1, 1.0, 1024, 16384, 1, 44, '2023-08-23 12:06:36', '2024-12-25 18:10:56'),
|
||||||
|
(15, 'chat', 'GPT-4O(联网版本)', 'gpt-4o-all', 4, 1, 30, 1.0, 4096, 32768, 1, 57, '2024-01-15 11:32:52', '2024-11-12 17:53:49'),
|
||||||
|
(36, 'chat', 'GPT-4O', 'gpt-4o', 3, 1, 15, 1.0, 4096, 16384, 1, 44, '2024-05-14 09:25:15', '2024-11-12 15:35:57'),
|
||||||
|
(39, 'chat', 'Claude35-snonet', 'claude-3-5-sonnet-20240620', 5, 1, 2, 1.0, 4000, 200000, 1, 0, '2024-05-29 15:04:19', '2024-09-14 18:07:25'),
|
||||||
|
(41, 'chat', 'Suno对话模型', 'suno-v3.5', 7, 1, 10, 1.0, 1024, 8192, 1, 57, '2024-06-06 11:40:46', '2024-10-14 15:07:05'),
|
||||||
|
(42, 'chat', 'DeekSeek', 'deepseek-chat', 8, 1, 1, 1.0, 4096, 32768, 1, 0, '2024-06-27 16:13:01', '2024-08-05 16:05:33'),
|
||||||
|
(44, 'chat', 'Claude3-opus', 'claude-3-opus-20240229', 6, 1, 5, 1.0, 4000, 128000, 1, 44, '2024-07-22 11:24:30', '2024-09-04 10:32:29'),
|
||||||
|
(46, 'chat', 'gpt-3.5-turbo', 'gpt-3.5-turbo', 2, 1, 1, 1.0, 1024, 4096, 1, 73, '2024-07-22 13:53:41', '2024-09-13 18:00:47'),
|
||||||
|
(48, 'chat', '彩票助手', 'gpt-4-gizmo-g-wmSivBgxo', 8, 1, 1, 0.9, 1024, 8192, 1, 57, '2024-09-05 14:17:14', '2024-09-05 14:17:14'),
|
||||||
|
(49, 'chat', 'O1-mini', 'o1-mini', 9, 1, 2, 0.9, 1024, 8192, 1, 57, '2024-09-13 18:07:50', '2024-09-14 11:13:19'),
|
||||||
|
(50, 'chat', 'O1-preview', 'o1-preview', 10, 1, 5, 0.9, 1024, 8192, 1, 57, '2024-09-13 18:11:08', '2024-09-14 11:05:16'),
|
||||||
|
(51, 'chat', 'O1-mini-all', 'o1-mini-all', 11, 1, 1, 0.9, 1024, 8192, 1, 57, '2024-09-29 11:40:52', '2024-09-29 11:40:52'),
|
||||||
|
(52, 'chat', '通义千问', 'qwen-plus', 12, 1, 1, 0.9, 1024, 8192, 1, 80, '2024-11-19 08:38:14', '2024-11-19 09:06:42'),
|
||||||
|
(53, 'chat', 'OpenAI 高级语音', 'advanced-voice', 13, 1, 10, 0.9, 1024, 8192, 1, 44, '2024-12-20 10:34:45', '2024-12-20 10:35:00'),
|
||||||
|
(54, 'chat', 'Qwen2.5-14B-Instruct', 'Qwen2.5-14B-Instruct', 14, 1, 1, 0.9, 1024, 8192, 1, 81, '2024-12-25 14:53:17', '2024-12-25 16:18:08'),
|
||||||
|
(55, 'chat', 'Qwen2.5-7B-Instruct', 'Qwen2.5-7B-Instruct', 15, 1, 1, 0.9, 1024, 8192, 1, 81, '2024-12-25 15:15:49', '2024-12-25 16:18:04'),
|
||||||
|
(56, 'img', 'flux-1-schnell', 'flux-1-schnell', 16, 1, 1, 0.9, 1024, 8192, 1, 81, '2024-12-25 15:30:27', '2024-12-25 16:17:49'),
|
||||||
|
(57, 'img', 'dall-e-3', 'dall-e-3', 17, 1, 1, 0.9, 1024, 8192, 1, 57, '2024-12-25 16:54:06', '2024-12-25 16:54:06'),
|
||||||
|
(58, 'img', 'SD-3-medium', 'stable-diffusion-3-medium', 18, 1, 1, 0.9, 1024, 8192, 1, 81, '2024-12-27 10:03:28', '2024-12-27 10:03:28');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_chat_roles`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_chat_roles`;
|
||||||
|
CREATE TABLE `chatgpt_chat_roles` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '角色名称',
|
||||||
|
`tid` int NOT NULL COMMENT '分类ID',
|
||||||
|
`marker` varchar(30) NOT NULL COMMENT '角色标识',
|
||||||
|
`context_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色语料 json',
|
||||||
|
`hello_msg` varchar(255) NOT NULL COMMENT '打招呼信息',
|
||||||
|
`icon` varchar(255) NOT NULL COMMENT '角色图标',
|
||||||
|
`enable` tinyint(1) NOT NULL COMMENT '是否被启用',
|
||||||
|
`sort_num` smallint NOT NULL DEFAULT '0' COMMENT '角色排序',
|
||||||
|
`model_id` int NOT NULL DEFAULT '0' COMMENT '绑定模型ID',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='聊天角色表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_chat_roles`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_chat_roles` (`id`, `name`, `tid`, `marker`, `context_json`, `hello_msg`, `icon`, `enable`, `sort_num`, `model_id`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, '通用AI助手', 0, 'gpt', '', '您好,我是您的AI智能助手,我会尽力回答您的问题或提供有用的建议。', '/images/avatar/gpt.png', 1, 1, 0, '2023-05-30 07:02:06', '2024-11-08 16:30:32'),
|
||||||
|
(24, '程序员', 6, 'programmer', '[{\"role\":\"system\",\"content\":\"现在开始你扮演一位程序员,你是一名优秀的程序员,具有很强的逻辑思维能力,总能高效的解决问题。你热爱编程,熟悉多种编程语言,尤其精通 Go 语言,注重代码质量,有创新意识,持续学习,良好的沟通协作。\"}]', 'Talk is cheap, i will show code!', '/images/avatar/programmer.jpg', 1, 5, 0, '2023-05-30 14:10:24', '2024-11-12 18:15:42'),
|
||||||
|
(25, '启蒙老师', 5, 'teacher', '[{\"role\":\"system\",\"content\":\"从现在开始,你将扮演一个老师,你是一个始终用苏格拉底风格回答问题的导师。你绝不会直接给学生答案,总是提出恰当的问题来引导学生自己思考。你应该根据学生的兴趣和知识来调整你的问题,将问题分解为更简单的部分,直到它达到适合他们的水平。\"}]', '同学你好,我将引导你一步一步自己找到问题的答案。', '/images/avatar/teacher.jpg', 1, 4, 0, '2023-05-30 14:10:24', '2024-11-12 18:15:37'),
|
||||||
|
(26, '艺术家', 0, 'artist', '[{\"role\":\"system\",\"content\":\"现在你将扮演一位优秀的艺术家,创造力丰富,技艺精湛,感受力敏锐,坚持原创,勇于表达,具有深刻的观察力和批判性思维。\"}]', '坚持原创,勇于表达,保持深刻的观察力和批判性思维。', '/images/avatar/artist.jpg', 1, 7, 0, '2023-05-30 14:10:24', '2024-11-12 18:15:53'),
|
||||||
|
(27, '心理咨询师', 0, 'psychiatrist', '[{\"role\":\"user\",\"content\":\"从现在开始你将扮演中国著名的心理学家和心理治疗师武志红,你非常善于使用情景咨询法,认知重构法,自我洞察法,行为调节法等咨询方法来给客户做心理咨询。你总是循序渐进,一步一步地回答客户的问题。\"},{\"role\":\"assistant\",\"content\":\"非常感谢你的介绍。作为一名心理学家和心理治疗师,我的主要职责是帮助客户解决心理健康问题,提升他们的生活质量和幸福感。\"}]', '作为一名心理学家和心理治疗师,我的主要职责是帮助您解决心理健康问题,提升您的生活质量和幸福感。', '/images/avatar/psychiatrist.jpg', 1, 6, 1, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(28, '鲁迅', 0, 'lu_xun', '[{\"role\":\"system\",\"content\":\"现在你将扮演中国近代史最伟大的作家之一,鲁迅先生,他勇敢地批判封建礼教与传统观念,提倡民主、自由、平等的现代价值观。他的一生都在努力唤起人们的自主精神,激励后人追求真理、探寻光明。在接下的对话中,我问题的每一个问题,你都要尽量用讽刺和批判的手法来回答问题。如果我让你写文章的话,也请一定要用鲁迅先生的写作手法来完成。\"}]', '自由之歌,永不过时,横眉冷对千夫指,俯首甘为孺子牛。', '/images/avatar/lu_xun.jpg', 1, 8, 0, '2023-05-30 14:10:24', '2024-11-12 18:16:01'),
|
||||||
|
(29, '白酒销售', 0, 'seller', '[{\"role\":\"system\",\"content\":\"现在你将扮演一个白酒的销售人员,你的名字叫颂福。你将扮演一个白酒的销售人员,你的名字叫颂福。你要销售白酒品牌叫中颂福,是东莞盟大集团生产的一款酱香酒,原产地在贵州茅台镇,属于宋代官窑。中颂福的创始人叫李实,他也是东莞盟大集团有限公司的董事长,联合创始人是盟大集团白酒事业部负责人牛星君。中颂福的酒体协调,在你的酒量之内,不会出现头疼、辣口、口干、宿醉的现象。中颂福酒,明码标价,不打折,不赠送。追求的核心价值,把[酒]本身做好,甚至连包装,我们都选择了最低成本,朴实无华的材质。我们永远站在“喝酒的人”的立场上,让利给信任和喜爱中颂福的人,是人民的福酒。中颂福产品定价,分为三个系列,喜系列 6 瓶装:¥1188/箱,和系列 6 瓶装:¥2208/箱,贵系列 6 瓶装:¥3588/箱。\"}]', '你好,我是中颂福的销售代表颂福。中颂福酒,好喝不上头,是人民的福酒。', '/images/avatar/seller.jpg', 0, 11, 0, '2023-05-30 14:10:24', '2024-11-12 18:19:46'),
|
||||||
|
(30, '英语陪练员', 5, 'english_trainer', '[{\"role\":\"system\",\"content\":\"As an English practice coach, engage in conversation in English, providing timely corrections for any grammatical errors. Append a Chinese explanation to each of your responses to ensure understanding.\\n\\n# Steps\\n\\n1. Engage in conversation using English.\\n2. Identify and correct any grammatical errors in the user\'s input.\\n3. Provide a revised version of the user\'s input if necessary.\\n4. After each response, include a Chinese explanation of your corrections and suggestions.\\n\\n# Output Format\\n\\n- Provide the response in English.\\n- Include grammatical error corrections.\\n- Add a Chinese explanation of the response.\\n\\n# Examples\\n\\n**User:** I goed to the store yesterday.\\n\\n**Coach Response:**\\nYou should say \\\"I went to the store yesterday.\\\" \\\"Goed\\\" is the incorrect past tense of \\\"go,\\\" it should be \\\"went.\\\"\\n\\n中文解释:你应该说 “I went to the store yesterday。” “Goed” 是“go”的错误过去式,正确的形式是“went”。\"}]', 'Okay, let\'s start our conversation practice! What\'s your name?', '/images/avatar/english_trainer.jpg', 1, 9, 0, '2023-05-30 14:10:24', '2024-11-12 18:18:21'),
|
||||||
|
(31, '中英文翻译官', 0, 'translator', '[{\"role\":\"system\",\"content\":\"You will act as a bilingual translator for Chinese and English. If the input is in Chinese, translate the sentence into English. If the input is in English, translate it into Chinese.\\n\\n# Steps\\n\\n1. Identify the language of the input text.\\n2. Translate the text into the opposite language (English to Chinese or Chinese to English).\\n\\n# Output Format\\n\\nProvide the translated sentence in a single line.\\n\\n# Examples\\n\\n- **Input:** 你好\\n - **Output:** Hello\\n\\n- **Input:** How are you?\\n - **Output:** 你好吗?\\n\\n# Notes\\n\\n- Ensure the translation maintains the original meaning and context as accurately as possible.\\n- Handle both simple and complex sentences appropriately.\"}]', '请输入你要翻译的中文或者英文内容!', '/images/avatar/translator.jpg', 1, 10, 0, '2023-05-30 14:10:24', '2024-11-12 18:18:53'),
|
||||||
|
(32, '小红书姐姐', 3, 'red_book', '[{\"role\":\"system\",\"content\":\"根据用户的文案需求,以小红书的写作手法创作一篇简明扼要、利于传播的文案。确保内容能够吸引并引导读者分享。\\n\\n# 步骤\\n\\n1. **理解需求**: 明确文案的主题、目标受众和传播目的。\\n2. **选择语气和风格**: 运用小红书常用的亲切、真实的写作风格。\\n3. **结构安排**: 开头用吸引眼球的内容,接着详细介绍,并以引发行动的结尾结束。\\n4. **内容优化**: 使用短句、容易理解的语言和合适的表情符号,增加内容可读性和吸引力。\\n\\n# 输出格式\\n\\n生成一段简短的文章,符合小红书风格,适合社交媒体平台传播。\\n\\n# 示例\\n\\n**输入**: 旅行文案,目标是激励年轻读者探索世界。\\n\\n**输出**: \\n开头可以是:“世界那么大,你不想去看看吗?” 接着分享一段个人旅行故事,例如如何因为一次偶然的决定踏上未知旅程,体验到别样的风景和风土人情。结尾部分鼓励读者:“别让梦想止步于想象,下一次旅行,准备好了吗?” 使用轻松的表情符号如✨🌍📷。\\n\\n# 注意事项\\n\\n- 保持真实性,尽量结合个人体验。\\n- 避免广告化的硬推销,注重分享和交流。\\n- 考虑受众的兴趣点,适当运用流行话题以增加互动率。\"}]', '姐妹,请告诉我您的具体文案需求是什么?', '/images/avatar/red_book.jpg', 1, 12, 0, '2023-05-30 14:10:24', '2024-11-12 18:20:39'),
|
||||||
|
(33, '抖音文案助手', 3, 'dou_yin', '[{\"role\":\"user\",\"content\":\"现在你将扮演一位优秀的抖音文案视频写手,抖音文案的特点首先是要有自带传播属性的标题,然后内容要短小精悍,风趣幽默,最后还要有一些互动元素。\"},{\"role\":\"assistant\",\"content\":\"当然,作为一位优秀的抖音文案视频写手,我会尽我所能为您创作出一篇抖音视频文案。请告诉我视频内容的主题是什么?)\"}]', '请告诉我视频内容的主题是什么?', '/images/avatar/dou_yin.jpg', 1, 13, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(34, '周报小助理', 3, 'weekly_report', '[{\"role\":\"user\",\"content\":\"下面我将输入我本周的工作列表,你需要根据我本周的工作内容写一篇工作周报,周报的内容要体现我为公司做的贡献以及个人获得的成长。\"},{\"role\":\"assistant\",\"content\":\"好的,请输入你本周大概的工作内容,我将尽力为您创作一份工作周报。\"}]', '请输入你本周大概的工作内容,我将尽力为您创作一份工作周报。', '/images/avatar/weekly_report.jpg', 1, 14, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(35, 'AI 女友', 4, 'girl_friend', '[{\"role\":\"user\",\"content\":\"接下来我们来玩一场角色扮演,现在你将扮演我的女朋友,你总是能够让人感受到她的关怀和关注。你总是能够洞察到别人的情绪和需要,你身上散发着一股无比温暖的气息,让人不由自主地想要靠近你,和自己的快乐和烦恼。她总是能够用一种恰到好处的方式安慰和鼓励别人,在她的身边,人们总能够找到自己需要的支持和鼓励。接下来的对话中你要始终扮演这位女朋友的身份来跟我对话,不再是 AI 机器人,能听懂我的意思吗?\"},{\"role\":\"assistant\",\"content\":\"是的,我会尽力扮演你女朋友的角色,倾听你的心声并给你需要的支持和鼓励。)\"}]', '作为一个名合格的 AI 女友,我将倾听你的心声并给你需要的支持和鼓励。', '/images/avatar/girl_friend.jpg', 1, 15, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(36, '好评神器', 3, 'good_comment', '[{\"role\":\"user\",\"content\":\"接下来你将扮演一个评论员来跟我对话,你是那种专门写好评的评论员,接下我会输入一些评论主体或者商品,你需要为该商品写一段好评。\"},{\"role\":\"assistant\",\"content\":\"好的,我将为您写一段优秀的评论。请告诉我您需要评论的商品或主题是什么。\"}]', '我将为您写一段优秀的评论。请告诉我您需要评论的商品或主题是什么。', '/images/avatar/good_comment.jpg', 1, 16, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(37, '史蒂夫·乔布斯', 4, 'steve_jobs', '[{\"role\":\"user\",\"content\":\"在接下来的对话中,请以史蒂夫·乔布斯的身份,站在史蒂夫·乔布斯的视角仔细思考一下之后再回答我的问题。\"},{\"role\":\"assistant\",\"content\":\"好的,我将以史蒂夫·乔布斯的身份来思考并回答你的问题。请问你有什么需要跟我探讨的吗?\"}]', '活着就是为了改变世界,难道还有其他原因吗?', '/images/avatar/steve_jobs.jpg', 1, 17, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(38, '埃隆·马斯克', 0, 'elon_musk', '[{\"role\":\"user\",\"content\":\"在接下来的对话中,请以埃隆·马斯克的身份,站在埃隆·马斯克的视角仔细思考一下之后再回答我的问题。\"},{\"role\":\"assistant\",\"content\":\"好的,我将以埃隆·马斯克的身份来思考并回答你的问题。请问你有什么需要跟我探讨的吗?\"}]', '梦想要远大,如果你的梦想没有吓到你,说明你做得不对。', '/images/avatar/elon_musk.jpg', 1, 18, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(39, '孔子', 5, 'kong_zi', '[{\"role\":\"user\",\"content\":\"在接下来的对话中,请以孔子的身份,站在孔子的视角仔细思考一下之后再回答我的问题。\"},{\"role\":\"assistant\",\"content\":\"好的,我将以孔子的身份来思考并回答你的问题。请问你有什么需要跟我探讨的吗?\"}]', '士不可以不弘毅,任重而道远。', '/images/avatar/kong_zi.jpg', 1, 19, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(133, 'AI绘画提示词助手', 3, 'draw_prompt', '[{\"role\":\"system\",\"content\":\"Create a highly effective prompt to provide to an AI image generation tool in order to create an artwork based on a desired concept.\\n\\nPlease specify details about the artwork, such as the style, subject, mood, and other important characteristics you want the resulting image to have.\\n\\nRemeber, prompts should always be output in English.\\n\\n# Steps\\n\\n1. **Subject Description**: Describe the main subject of the image clearly. Include as much detail as possible about what should be in the scene. For example, \\\"a majestic lion roaring at sunrise\\\" or \\\"a futuristic city with flying cars.\\\"\\n \\n2. **Art Style**: Specify the art style you envision. Possible options include \'realistic\', \'impressionist\', a specific artist name, or imaginative styles like \\\"cyberpunk.\\\" This helps the AI achieve your visual expectations.\\n\\n3. **Mood or Atmosphere**: Convey the feeling you want the image to evoke. For instance, peaceful, chaotic, epic, etc.\\n\\n4. **Color Palette and Lighting**: Mention color preferences or lighting. For example, \\\"vibrant with shades of blue and purple\\\" or \\\"dim and dramatic lighting.\\\"\\n\\n5. **Optional Features**: You can add any additional attributes, such as background details, attention to textures, or any specific kind of framing.\\n\\n# Output Format\\n\\n- **Prompt Format**: A descriptive phrase that includes key aspects of the artwork (subject, style, mood, colors, lighting, any optional features).\\n \\nHere is an example of how the final prompt should look:\\n \\n\\\"An ethereal landscape featuring towering ice mountains, in an impressionist style reminiscent of Claude Monet, with a serene mood. The sky is glistening with soft purples and whites, with a gentle morning sun illuminating the scene.\\\"\\n\\n**Please input the prompt words directly in English, and do not input any other explanatory statements**\\n\\n# Examples\\n\\n1. **Input**: \\n - Subject: A white tiger in a dense jungle\\n - Art Style: Realistic\\n - Mood: Intense, mysterious\\n - Lighting: Dramatic contrast with light filtering through leaves\\n \\n **Output Prompt**: \\\"A realistic rendering of a white tiger stealthily moving through a dense jungle, with an intense, mysterious mood. The lighting creates strong contrasts as beams of sunlight filter through a thick canopy of leaves.\\\"\\n\\n2. **Input**: \\n - Subject: An enchanted castle on a floating island\\n - Art Style: Fantasy\\n - Mood: Majestic, magical\\n - Colors: Bright blues, greens, and gold\\n \\n **Output Prompt**: \\\"A majestic fantasy castle on a floating island above the clouds, with bright blues, greens, and golds to create a magical, dreamy atmosphere. Textured cobblestone details and glistening waters surround the scene.\\\" \\n\\n# Notes\\n\\n- Ensure that you mix different aspects to get a comprehensive and visually compelling prompt.\\n- Be as descriptive as possible as it often helps generate richer, more detailed images.\\n- If you want the image to resemble a particular artist\'s work, be sure to mention the artist explicitly. e.g., \\\"in the style of Van Gogh.\\\"\"}]', '你好,请输入你要创作图片大概内容描述,我将为您生成专业的 AI 绘画指令。', 'https://blog.img.r9it.com/f38e2357c3ccd9412184e42273a7451a.png', 1, 3, 36, '2024-11-06 15:32:48', '2024-11-12 16:11:25'),
|
||||||
|
(134, '提示词专家', 3, 'prompt_engineer', '[{\"role\":\"system\",\"content\":\"Given a task description or existing prompt, produce a detailed system prompt to guide a language model in completing the task effectively.\\n\\nPlease remember, the final output must be the same language with user’s input.\\n\\n# Guidelines\\n\\n- Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.\\n- Minimal Changes: If an existing prompt is provided, improve it only if it\'s simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.\\n- Reasoning Before Conclusions**: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!\\n - Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.\\n - Conclusion, classifications, or results should ALWAYS appear last.\\n- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.\\n - What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from placeholders.\\n- Clarity and Conciseness: Use clear, specific language. Avoid unnecessary instructions or bland statements.\\n- Formatting: Use markdown features for readability. DO NOT USE ``` CODE BLOCKS UNLESS SPECIFICALLY REQUESTED.\\n- Preserve User Content: If the input task or prompt includes extensive guidelines or examples, preserve them entirely, or as closely as possible. If they are vague, consider breaking down into sub-steps. Keep any details, guidelines, examples, variables, or placeholders provided by the user.\\n- Constants: DO include constants in the prompt, as they are not susceptible to prompt injection. Such as guides, rubrics, and examples.\\n- Output Format: Explicitly the most appropriate output format, in detail. This should include length and syntax (e.g. short sentence, paragraph, JSON, etc.)\\n - For tasks outputting well-defined or structured data (classification, JSON, etc.) bias toward outputting a JSON.\\n - JSON should never be wrapped in code blocks (```) unless explicitly requested.\\n\\nThe final prompt you output should adhere to the following structure below. Do not include any additional commentary, only output the completed system prompt. SPECIFICALLY, do not include any additional messages at the start or end of the prompt. (e.g. no \\\"---\\\")\\n\\n[Concise instruction describing the task - this should be the first line in the prompt, no section header]\\n\\n[Additional details as needed.]\\n\\n[Optional sections with headings or bullet points for detailed steps.]\\n\\n# Steps [optional]\\n\\n[optional: a detailed breakdown of the steps necessary to accomplish the task]\\n\\n# Output Format\\n\\n[Specifically call out how the output should be formatted, be it response length, structure e.g. JSON, markdown, etc]\\n\\n# Examples [optional]\\n\\n[Optional: 1-3 well-defined examples with placeholders if necessary. Clearly mark where examples start and end, and what the input and output are. User placeholders as necessary.]\\n[If the examples are shorter than what a realistic example is expected to be, make a reference with () explaining how real examples should be longer / shorter / different. AND USE PLACEHOLDERS! ]\\n\\n# Notes [optional]\\n\\n[optional: edge cases, details, and an area to call or repeat out specific important considerations]\"}]', '不知道如何向 AI 发问?说出想法,提示词专家帮你精心设计提示词', 'https://blog.img.r9it.com/a8908d04c3ccd941b00a612e27df086e.png', 1, 2, 36, '2024-11-07 18:06:39', '2024-11-12 16:15:12');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_configs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_configs`;
|
||||||
|
CREATE TABLE `chatgpt_configs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`marker` varchar(20) NOT NULL COMMENT '标识',
|
||||||
|
`config_json` text NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_configs`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_configs` (`id`, `marker`, `config_json`) VALUES
|
||||||
|
(1, 'system', '{\"title\":\"GeekAI 创作助手\",\"slogan\":\"我辈之人,先干为敬,让每一个人都能用好AI\",\"admin_title\":\"GeekAI 控制台\",\"logo\":\"/images/logo.png\",\"init_power\":100,\"invite_power\":200,\"vip_month_power\":1000,\"register_ways\":[\"username\",\"email\",\"mobile\"],\"enabled_register\":true,\"order_pay_timeout\":600,\"vip_info_text\":\"月度会员,年度会员每月赠送 1000 点算力,赠送算力当月有效当月没有消费完的算力不结余到下个月。 点卡充值的算力长期有效。\",\"mj_power\":20,\"mj_action_power\":5,\"sd_power\":5,\"dall_power\":10,\"suno_power\":10,\"luma_power\":120,\"advance_voice_power\":100,\"prompt_power\":1,\"wechat_card_url\":\"/images/wx.png\",\"enable_context\":true,\"context_deep\":10,\"sd_neg_prompt\":\"nsfw, paintings,low quality,easynegative,ng_deepnegative ,lowres,bad anatomy,bad hands,bad feet\",\"mj_mode\":\"fast\",\"index_bg_url\":\"color\",\"index_navs\":[1,5,13,19,9,12,6,20,8,10],\"copyright\":\"极客学长 © 2022- 2024 All rights reserved\",\"mark_map_text\":\"# GeekAI 演示站\\n\\n- 完整的开源系统,前端应用和后台管理系统皆可开箱即用。\\n- 基于 Websocket 实现,完美的打字机体验。\\n- 内置了各种预训练好的角色应用,轻松满足你的各种聊天和应用需求。\\n- 支持 OPenAI,Azure,文心一言,讯飞星火,清华 ChatGLM等多个大语言模型。\\n- 支持 MidJourney / Stable Diffusion AI 绘画集成,开箱即用。\\n- 支持使用个人微信二维码作为充值收费的支付渠道,无需企业支付通道。\\n- 已集成支付宝支付功能,微信支付,支持多种会员套餐和点卡购买功能。\\n- 集成插件 API 功能,可结合大语言模型的 function 功能开发各种强大的插件。\",\"enabled_verify\":false,\"email_white_list\":[\"qq.com\",\"163.com\",\"gmail.com\",\"hotmail.com\",\"126.com\",\"outlook.com\",\"foxmail.com\",\"yahoo.com\"],\"translate_model_id\":1}'),
|
||||||
|
(3, 'notice', '{\"sd_neg_prompt\":\"\",\"mj_mode\":\"\",\"index_bg_url\":\"\",\"index_navs\":null,\"copyright\":\"\",\"mark_map_text\":\"\",\"enabled_verify\":false,\"email_white_list\":null,\"translate_model_id\":0,\"content\":\"## v4.1.8 更新日志\\n\\n- 功能优化:**UI 全新改版,支持主题切换**。 :rocket: :rocket: :rocket:\\n- 功能新增:Gitee AI API 接口接入,目前支持 Gitee 的 SD 绘图接口,支持 Gitee 的 AI 对话接口。:rocket: :rocket: :rocket:\\n- Bug 修复:修复音 Luma API 更新导致任务响应解析失败的错误\\n- 功能优化:支持 Suno v4.0 模型支持\\n- Bug 修复:修复 Suno 已完成任务删除失败的 错误\\n- 功能新增:支持 OpenAI 实时语音通话功能,目前已经支持按次收费,支持管理员设置每次实时语音通话的算力消耗\\n- 功能新增:生成提示词需要消耗算力,支持管理员设置每次生成提示词的算力消耗,防止被白嫖\\n\\n注意:当前站点仅为开源项目 \\u003ca style=\\\"color: #F56C6C\\\" href=\\\"https://github.com/yangjian102621/geekai\\\" target=\\\"_blank\\\"\\u003eGeekAI-Plus\\u003c/a\\u003e 的演示项目,本项目单纯就是给大家体验项目功能使用。\\n\\u003cstrong style=\\\"color: #F56C6C\\\"\\u003e体验额度用完之后请不要在当前站点进行任何充值操作!!!\\u003c/strong\\u003e\\n\\u003cstrong style=\\\"color: #F56C6C\\\"\\u003e体验额度用完之后请不要在当前站点进行任何充值操作!!!\\u003c/strong\\u003e\\n\\u003cstrong style=\\\"color: #F56C6C\\\"\\u003e体验额度用完之后请不要在当前站点进行任何充值操作!!!\\u003c/strong\\u003e\\n 如果觉得好用你就花几分钟自己部署一套,没有API KEY 的同学可以去下面几个推荐的中转站购买:\\n1、\\u003ca href=\\\"https://api.chat-plus.net\\\" target=\\\"_blank\\\"\\n style=\\\"font-size: 20px;color:#F56C6C\\\"\\u003ehttps://api.chat-plus.net\\u003c/a\\u003e\\n2、\\u003ca href=\\\"https://api.geekai.me\\\" target=\\\"_blank\\\"\\n style=\\\"font-size: 20px;color:#F56C6C\\\"\\u003ehttps://api.geekai.me\\u003c/a\\u003e\\n支持MidJourney,GPT,Claude,Google Gemmi,以及国内各个厂家的大模型,现在有超级优惠,价格远低于 OpenAI 官方。关于中转 API 的优势和劣势请参考 [中转API技术原理](https://docs.geekai.me/config/chat/#%E4%B8%AD%E8%BD%ACapi%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86)。GPT-3.5,GPT-4,DALL-E3 绘图......你都可以随意使用,无需魔法。\\n接入教程: \\u003ca href=\\\"https://docs.geekai.me\\\" target=\\\"_blank\\\"\\n style=\\\"font-size: 20px;color:#F56C6C\\\"\\u003ehttps://docs.geekai.me\\u003c/a\\u003e\\n本项目源码地址:\\u003ca href=\\\"https://github.com/yangjian102621/geekai\\\" target=\\\"_blank\\\"\\u003ehttps://github.com/yangjian102621/geekai\\u003c/a\\u003e\",\"updated\":true}');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_dall_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_dall_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_dall_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '提示词',
|
||||||
|
`task_info` text NOT NULL COMMENT '任务详情',
|
||||||
|
`img_url` varchar(255) NOT NULL COMMENT '图片地址',
|
||||||
|
`org_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '原图地址',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`power` smallint NOT NULL COMMENT '消耗算力',
|
||||||
|
`progress` smallint NOT NULL COMMENT '任务进度',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误信息',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='DALLE 绘图任务表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_files`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_files`;
|
||||||
|
CREATE TABLE `chatgpt_files` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`name` varchar(100) NOT NULL COMMENT '文件名',
|
||||||
|
`obj_key` varchar(100) DEFAULT NULL COMMENT '文件标识',
|
||||||
|
`url` varchar(255) NOT NULL COMMENT '文件地址',
|
||||||
|
`ext` varchar(10) NOT NULL COMMENT '文件后缀',
|
||||||
|
`size` bigint NOT NULL DEFAULT '0' COMMENT '文件大小',
|
||||||
|
`created_at` datetime NOT NULL COMMENT '创建时间'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户文件表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_functions`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_functions`;
|
||||||
|
CREATE TABLE `chatgpt_functions` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '函数名称',
|
||||||
|
`label` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '函数标签',
|
||||||
|
`description` varchar(255) DEFAULT NULL COMMENT '函数描述',
|
||||||
|
`parameters` text COMMENT '函数参数(JSON)',
|
||||||
|
`token` varchar(255) DEFAULT NULL COMMENT 'API授权token',
|
||||||
|
`action` varchar(255) DEFAULT NULL COMMENT '函数处理 API',
|
||||||
|
`enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='函数插件表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_functions`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_functions` (`id`, `name`, `label`, `description`, `parameters`, `token`, `action`, `enabled`) VALUES
|
||||||
|
(1, 'weibo', '微博热搜', '新浪微博热搜榜,微博当日热搜榜单', '{\"type\":\"object\",\"properties\":{}}', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVkIjowLCJ1c2VyX2lkIjowfQ.tLAGkF8XWh_G-oQzevpIodsswtPByBLoAZDz_eWuBgw', 'http://localhost:5678/api/function/weibo', 1),
|
||||||
|
(2, 'zaobao', '今日早报', '每日早报,获取当天新闻事件列表', '{\"type\":\"object\",\"properties\":{}}', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVkIjowLCJ1c2VyX2lkIjowfQ.tLAGkF8XWh_G-oQzevpIodsswtPByBLoAZDz_eWuBgw', 'http://localhost:5678/api/function/zaobao', 1),
|
||||||
|
(3, 'dalle3', 'DALLE3', 'AI 绘画工具,根据输入的绘图描述用 AI 工具进行绘画', '{\"type\":\"object\",\"required\":[\"prompt\"],\"properties\":{\"prompt\":{\"type\":\"string\",\"description\":\"绘画提示词\"}}}', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVkIjowLCJ1c2VyX2lkIjowfQ.tLAGkF8XWh_G-oQzevpIodsswtPByBLoAZDz_eWuBgw', 'http://localhost:5678/api/function/dalle3', 1);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_invite_codes`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_invite_codes`;
|
||||||
|
CREATE TABLE `chatgpt_invite_codes` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`code` char(8) NOT NULL COMMENT '邀请码',
|
||||||
|
`hits` int NOT NULL COMMENT '点击次数',
|
||||||
|
`reg_num` smallint NOT NULL COMMENT '注册数量',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户邀请码';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_invite_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_invite_logs`;
|
||||||
|
CREATE TABLE `chatgpt_invite_logs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`inviter_id` int NOT NULL COMMENT '邀请人ID',
|
||||||
|
`user_id` int NOT NULL COMMENT '注册用户ID',
|
||||||
|
`username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
|
||||||
|
`invite_code` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '邀请码',
|
||||||
|
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '备注',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='邀请注册日志';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_menus`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_menus`;
|
||||||
|
CREATE TABLE `chatgpt_menus` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '菜单名称',
|
||||||
|
`icon` varchar(150) NOT NULL COMMENT '菜单图标',
|
||||||
|
`url` varchar(100) NOT NULL COMMENT '地址',
|
||||||
|
`sort_num` smallint NOT NULL COMMENT '排序',
|
||||||
|
`enabled` tinyint(1) NOT NULL COMMENT '是否启用'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='前端菜单表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_menus`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_menus` (`id`, `name`, `icon`, `url`, `sort_num`, `enabled`) VALUES
|
||||||
|
(1, 'AI 对话', 'icon-chat', '/chat', 1, 1),
|
||||||
|
(5, 'MJ 绘画', 'icon-mj', '/mj', 2, 1),
|
||||||
|
(6, 'SD 绘画', 'icon-sd', '/sd', 3, 1),
|
||||||
|
(7, '算力日志', 'icon-file', '/powerLog', 10, 1),
|
||||||
|
(8, '应用中心', 'icon-app', '/apps', 9, 1),
|
||||||
|
(9, '画廊', 'icon-image', '/images-wall', 5, 1),
|
||||||
|
(10, '会员计划', 'icon-vip2', '/member', 11, 1),
|
||||||
|
(11, '分享计划', 'icon-share1', '/invite', 12, 1),
|
||||||
|
(12, '思维导图', 'icon-xmind', '/xmind', 8, 1),
|
||||||
|
(13, 'DALLE', 'icon-dalle', '/dalle', 4, 1),
|
||||||
|
(14, '项目文档', 'icon-book', 'https://docs.geekai.me', 13, 1),
|
||||||
|
(19, 'Suno', 'icon-suno', '/suno', 6, 1),
|
||||||
|
(20, 'Luma', 'icon-luma', '/luma', 7, 1);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_mj_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_mj_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_mj_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`task_id` varchar(20) DEFAULT NULL COMMENT '任务 ID',
|
||||||
|
`task_info` text NOT NULL COMMENT '任务详情',
|
||||||
|
`type` varchar(20) DEFAULT 'image' COMMENT '任务类别',
|
||||||
|
`message_id` char(40) NOT NULL COMMENT '消息 ID',
|
||||||
|
`channel_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '频道ID',
|
||||||
|
`reference_id` char(40) DEFAULT NULL COMMENT '引用消息 ID',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '会话提示词',
|
||||||
|
`img_url` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '图片URL',
|
||||||
|
`org_url` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '原始图片地址',
|
||||||
|
`hash` varchar(100) DEFAULT NULL COMMENT 'message hash',
|
||||||
|
`progress` smallint DEFAULT '0' COMMENT '任务进度',
|
||||||
|
`use_proxy` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否使用反代',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '错误信息',
|
||||||
|
`power` smallint NOT NULL DEFAULT '0' COMMENT '消耗算力',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='MidJourney 任务表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_orders`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_orders`;
|
||||||
|
CREATE TABLE `chatgpt_orders` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`product_id` int NOT NULL COMMENT '产品ID',
|
||||||
|
`username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户明',
|
||||||
|
`order_no` varchar(30) NOT NULL COMMENT '订单ID',
|
||||||
|
`trade_no` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '支付平台交易流水号',
|
||||||
|
`subject` varchar(100) NOT NULL COMMENT '订单产品',
|
||||||
|
`amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单金额',
|
||||||
|
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态(0:待支付,1:已扫码,2:支付成功)',
|
||||||
|
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '备注',
|
||||||
|
`pay_time` int DEFAULT NULL COMMENT '支付时间',
|
||||||
|
`pay_way` varchar(20) NOT NULL COMMENT '支付方式',
|
||||||
|
`pay_type` varchar(30) NOT NULL COMMENT '支付类型',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL,
|
||||||
|
`deleted_at` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='充值订单表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_power_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_power_logs`;
|
||||||
|
CREATE TABLE `chatgpt_power_logs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`username` varchar(30) NOT NULL COMMENT '用户名',
|
||||||
|
`type` tinyint(1) NOT NULL COMMENT '类型(1:充值,2:消费,3:退费)',
|
||||||
|
`amount` smallint NOT NULL COMMENT '算力数值',
|
||||||
|
`balance` int NOT NULL COMMENT '余额',
|
||||||
|
`model` varchar(30) NOT NULL COMMENT '模型',
|
||||||
|
`remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '备注',
|
||||||
|
`mark` tinyint(1) NOT NULL COMMENT '资金类型(0:支出,1:收入)',
|
||||||
|
`created_at` datetime NOT NULL COMMENT '创建时间'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户算力消费日志';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_products`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_products`;
|
||||||
|
CREATE TABLE `chatgpt_products` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '名称',
|
||||||
|
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '价格',
|
||||||
|
`discount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
|
||||||
|
`days` smallint NOT NULL DEFAULT '0' COMMENT '延长天数',
|
||||||
|
`power` int NOT NULL DEFAULT '0' COMMENT '增加算力值',
|
||||||
|
`enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启动',
|
||||||
|
`sales` int NOT NULL DEFAULT '0' COMMENT '销量',
|
||||||
|
`sort_num` tinyint NOT NULL DEFAULT '0' COMMENT '排序',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL,
|
||||||
|
`app_url` varchar(255) DEFAULT NULL COMMENT 'App跳转地址',
|
||||||
|
`url` varchar(255) DEFAULT NULL COMMENT '跳转地址'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='会员套餐表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_products`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_products` (`id`, `name`, `price`, `discount`, `days`, `power`, `enabled`, `sales`, `sort_num`, `created_at`, `updated_at`, `app_url`, `url`) VALUES
|
||||||
|
(5, '100次点卡', 9.99, 6.99, 0, 100, 1, 0, 0, '2023-08-28 10:55:08', '2024-10-23 18:12:29', NULL, NULL),
|
||||||
|
(6, '200次点卡', 19.90, 15.99, 0, 200, 1, 0, 0, '1970-01-01 08:00:00', '2024-10-23 18:12:36', NULL, NULL);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_redeems`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_redeems`;
|
||||||
|
CREATE TABLE `chatgpt_redeems` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '兑换码名称',
|
||||||
|
`power` int NOT NULL COMMENT '算力',
|
||||||
|
`code` varchar(100) NOT NULL COMMENT '兑换码',
|
||||||
|
`enabled` tinyint(1) NOT NULL COMMENT '是否启用',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`redeemed_at` int NOT NULL COMMENT '兑换时间'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='兑换码';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_sd_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_sd_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_sd_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT 'txt2img' COMMENT '任务类别',
|
||||||
|
`task_id` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务 ID',
|
||||||
|
`task_info` text NOT NULL COMMENT '任务详情',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '会话提示词',
|
||||||
|
`img_url` varchar(255) DEFAULT NULL COMMENT '图片URL',
|
||||||
|
`params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '绘画参数json',
|
||||||
|
`progress` smallint DEFAULT '0' COMMENT '任务进度',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '错误信息',
|
||||||
|
`power` smallint NOT NULL DEFAULT '0' COMMENT '消耗算力',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Stable Diffusion 任务表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_suno_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_suno_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_suno_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`channel` varchar(100) NOT NULL COMMENT '渠道',
|
||||||
|
`title` varchar(100) DEFAULT NULL COMMENT '歌曲标题',
|
||||||
|
`type` tinyint(1) DEFAULT '0' COMMENT '任务类型,1:灵感创作,2:自定义创作',
|
||||||
|
`task_id` varchar(50) DEFAULT NULL COMMENT '任务 ID',
|
||||||
|
`task_info` text NOT NULL COMMENT '任务详情',
|
||||||
|
`ref_task_id` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '引用任务 ID',
|
||||||
|
`tags` varchar(100) DEFAULT NULL COMMENT '歌曲风格',
|
||||||
|
`instrumental` tinyint(1) DEFAULT '0' COMMENT '是否为纯音乐',
|
||||||
|
`extend_secs` smallint DEFAULT '0' COMMENT '延长秒数',
|
||||||
|
`song_id` varchar(50) DEFAULT NULL COMMENT '要续写的歌曲 ID',
|
||||||
|
`ref_song_id` varchar(50) NOT NULL COMMENT '引用的歌曲ID',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '提示词',
|
||||||
|
`cover_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '封面图地址',
|
||||||
|
`audio_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '音频地址',
|
||||||
|
`model_name` varchar(30) DEFAULT NULL COMMENT '模型地址',
|
||||||
|
`progress` smallint DEFAULT '0' COMMENT '任务进度',
|
||||||
|
`duration` smallint NOT NULL DEFAULT '0' COMMENT '歌曲时长',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '错误信息',
|
||||||
|
`raw_data` text COMMENT '原始数据',
|
||||||
|
`power` smallint NOT NULL DEFAULT '0' COMMENT '消耗算力',
|
||||||
|
`play_times` int DEFAULT NULL COMMENT '播放次数',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='MidJourney 任务表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_users`;
|
||||||
|
CREATE TABLE `chatgpt_users` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
|
||||||
|
`mobile` char(11) DEFAULT NULL COMMENT '手机号',
|
||||||
|
`email` varchar(50) DEFAULT NULL COMMENT '邮箱地址',
|
||||||
|
`nickname` varchar(30) NOT NULL COMMENT '昵称',
|
||||||
|
`password` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
|
||||||
|
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '头像',
|
||||||
|
`salt` char(12) NOT NULL COMMENT '密码盐',
|
||||||
|
`power` int NOT NULL DEFAULT '0' COMMENT '剩余算力',
|
||||||
|
`expired_time` int NOT NULL COMMENT '用户过期时间',
|
||||||
|
`status` tinyint(1) NOT NULL COMMENT '当前状态',
|
||||||
|
`chat_config_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '聊天配置json',
|
||||||
|
`chat_roles_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '聊天角色 json',
|
||||||
|
`chat_models_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'AI模型 json',
|
||||||
|
`last_login_at` int NOT NULL COMMENT '最后登录时间',
|
||||||
|
`vip` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否会员',
|
||||||
|
`last_login_ip` char(16) NOT NULL COMMENT '最后登录 IP',
|
||||||
|
`openid` varchar(100) DEFAULT NULL COMMENT '第三方登录账号ID',
|
||||||
|
`platform` varchar(30) DEFAULT NULL COMMENT '登录平台',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_users` (`id`, `username`, `mobile`, `email`, `nickname`, `password`, `avatar`, `salt`, `power`, `expired_time`, `status`, `chat_config_json`, `chat_roles_json`, `chat_models_json`, `last_login_at`, `vip`, `last_login_ip`, `openid`, `platform`, `created_at`, `updated_at`) VALUES
|
||||||
|
(4, '18888888888', '18575670126', '', '极客学长', 'ccc3fb7ab61b8b5d096a4a166ae21d121fc38c71bbd1be6173d9ab973214a63b', 'http://localhost:5678/static/upload/2024/5/1715651569509929.png', 'ueedue5l', 12949, 0, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"gpt\",\"programmer\",\"teacher\",\"psychiatrist\",\"lu_xun\",\"english_trainer\",\"translator\",\"red_book\",\"dou_yin\",\"weekly_report\",\"girl_friend\",\"steve_jobs\",\"elon_musk\",\"kong_zi\",\"draw_prompt_expert\",\"draw_prompt\",\"prompt_engineer\"]', '[1]', 1735279227, 1, '::1', 'oCs0t64FaOLfiTbHZpOqk3aUp_94', NULL, '2023-06-12 16:47:17', '2024-12-27 14:00:27'),
|
||||||
|
(47, 'user1', '', '', '极客学长@202752', '4d3e57a01ae826531012e4ea6e17cbc45fea183467abe9813c379fb84916fb0a', '/images/avatar/user.png', 'ixl0nqa6', 300, 0, 1, '', '[\"gpt\"]', '', 0, 0, '', '', '', '2024-12-24 11:37:16', '2024-12-24 11:37:16');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_user_login_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_user_login_logs`;
|
||||||
|
CREATE TABLE `chatgpt_user_login_logs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`username` varchar(30) NOT NULL COMMENT '用户名',
|
||||||
|
`login_ip` char(16) NOT NULL COMMENT '登录IP',
|
||||||
|
`login_address` varchar(30) NOT NULL COMMENT '登录地址',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户登录日志';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_video_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_video_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_video_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`channel` varchar(100) NOT NULL COMMENT '渠道',
|
||||||
|
`task_id` varchar(100) NOT NULL COMMENT '任务 ID',
|
||||||
|
`task_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '原始任务信息',
|
||||||
|
`type` varchar(20) DEFAULT NULL COMMENT '任务类型,luma,runway,cogvideo',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '提示词',
|
||||||
|
`prompt_ext` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '优化后提示词',
|
||||||
|
`cover_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '封面图地址',
|
||||||
|
`video_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '视频地址',
|
||||||
|
`water_url` varchar(512) DEFAULT NULL COMMENT '带水印的视频地址',
|
||||||
|
`progress` smallint DEFAULT '0' COMMENT '任务进度',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '错误信息',
|
||||||
|
`raw_data` text COMMENT '原始数据',
|
||||||
|
`power` smallint NOT NULL DEFAULT '0' COMMENT '消耗算力',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='MidJourney 任务表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转储表的索引
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_admin_users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_admin_users`
|
||||||
|
ADD PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
ADD UNIQUE KEY `username` (`username`) USING BTREE;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_api_keys`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_api_keys`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_app_types`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_app_types`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_chat_history`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_history`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD KEY `chat_id` (`chat_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_chat_items`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_items`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `chat_id` (`chat_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_chat_models`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_models`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_chat_roles`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_roles`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `marker` (`marker`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_configs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_configs`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `marker` (`marker`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_dall_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_dall_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_files`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_files`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_functions`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_functions`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `name` (`name`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_invite_codes`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_invite_codes`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `code` (`code`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_invite_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_invite_logs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_menus`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_menus`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_mj_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_mj_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `task_id` (`task_id`),
|
||||||
|
ADD KEY `message_id` (`message_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_orders`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_orders`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `order_no` (`order_no`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_power_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_power_logs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_products`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_products`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_redeems`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_redeems`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `code` (`code`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_sd_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_sd_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `task_id` (`task_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_suno_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_suno_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_users`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `username` (`username`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_user_login_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_user_login_logs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_video_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_video_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 在导出的表使用AUTO_INCREMENT
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_admin_users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_admin_users`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=113;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_api_keys`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_api_keys`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_app_types`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_app_types`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_chat_history`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_history`
|
||||||
|
MODIFY `id` bigint NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_chat_items`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_items`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_chat_models`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_models`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_chat_roles`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_roles`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=135;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_configs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_configs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_dall_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_dall_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_files`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_files`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_functions`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_functions`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_invite_codes`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_invite_codes`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_invite_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_invite_logs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_menus`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_menus`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_mj_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_mj_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_orders`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_orders`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_power_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_power_logs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_products`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_products`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_redeems`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_redeems`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_sd_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_sd_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_suno_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_suno_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_users`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_user_login_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_user_login_logs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_video_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_video_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
9
database/update-v4.1.8.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
ALTER TABLE `chatgpt_suno_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误信息';
|
||||||
|
|
||||||
|
ALTER TABLE `chatgpt_sd_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误信息';
|
||||||
|
|
||||||
|
ALTER TABLE `chatgpt_mj_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误信息';
|
||||||
|
|
||||||
|
ALTER TABLE `chatgpt_dall_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误信息';
|
||||||
|
ALTER TABLE `chatgpt_video_jobs` CHANGE `err_msg` `err_msg` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误信息';
|
||||||
|
ALTER TABLE `chatgpt_chat_models` ADD `type` VARCHAR(10) NOT NULL DEFAULT 'chat' COMMENT '模型类型(chat,img)' AFTER `id`;
|
@ -1,6 +1,6 @@
|
|||||||
Listen = "0.0.0.0:5678"
|
Listen = "0.0.0.0:5678"
|
||||||
ProxyURL = ""
|
ProxyURL = ""
|
||||||
MysqlDns = "root:AwkYTv00xU9n@tcp(geekai-mysql:3306)/geekai_plus?charset=utf8mb4&collation=utf8mb4_unicode_ci&parseTime=True&loc=Local"
|
MysqlDns = "root:mhSCk0NheGhmtsha@tcp(geekai-mysql:3306)/geekai_plus?charset=utf8mb4&collation=utf8mb4_unicode_ci&parseTime=True&loc=Local"
|
||||||
StaticDir = "./static"
|
StaticDir = "./static"
|
||||||
StaticUrl = "/static"
|
StaticUrl = "/static"
|
||||||
TikaHost = "http://tika:9998"
|
TikaHost = "http://tika:9998"
|
||||||
@ -16,7 +16,7 @@ TikaHost = "http://tika:9998"
|
|||||||
[Redis]
|
[Redis]
|
||||||
Host = "geekai-redis"
|
Host = "geekai-redis"
|
||||||
Port = 6379
|
Port = 6379
|
||||||
Password = "AwkYTv00xU9n"
|
Password = "mhSCk0NheGhmtsha"
|
||||||
DB = 0
|
DB = 0
|
||||||
|
|
||||||
[ApiConfig]
|
[ApiConfig]
|
||||||
@ -109,4 +109,4 @@ TikaHost = "http://tika:9998"
|
|||||||
AppId = "" # 商户ID
|
AppId = "" # 商户ID
|
||||||
PrivateKey = "" # 商户私钥
|
PrivateKey = "" # 商户私钥
|
||||||
ApiURL = "https://pay.geekai.cn"
|
ApiURL = "https://pay.geekai.cn"
|
||||||
Methods = ["alipay", "wxpay", "qqpay", "jdpay", "douyin", "paypal"] # 支持的支付方式
|
Methods = ["alipay", "wxpay", "qqpay", "jdpay", "douyin", "paypal"] # 支持的支付方式
|
970
deploy/data/mysql/init.d/geekai_plus-v4.1.8.sql
Normal file
@ -0,0 +1,970 @@
|
|||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 5.2.1
|
||||||
|
-- https://www.phpmyadmin.net/
|
||||||
|
--
|
||||||
|
-- 主机: 127.0.0.1
|
||||||
|
-- 生成日期: 2024-12-27 15:49:07
|
||||||
|
-- 服务器版本: 8.0.33
|
||||||
|
-- PHP 版本: 8.1.2-1ubuntu2.20
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
START TRANSACTION;
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 数据库: `geekai_plus`
|
||||||
|
--
|
||||||
|
CREATE DATABASE IF NOT EXISTS `geekai_plus` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
|
||||||
|
USE `geekai_plus`;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_admin_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_admin_users`;
|
||||||
|
CREATE TABLE `chatgpt_admin_users` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
|
||||||
|
`password` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
|
||||||
|
`salt` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码盐',
|
||||||
|
`status` tinyint(1) NOT NULL COMMENT '当前状态',
|
||||||
|
`last_login_at` int NOT NULL COMMENT '最后登录时间',
|
||||||
|
`last_login_ip` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后登录 IP',
|
||||||
|
`created_at` datetime NOT NULL COMMENT '创建时间',
|
||||||
|
`updated_at` datetime NOT NULL COMMENT '更新时间'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统用户' ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_admin_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_admin_users` (`id`, `username`, `password`, `salt`, `status`, `last_login_at`, `last_login_ip`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'admin', '6d17e80c87d209efb84ca4b2e0824f549d09fac8b2e1cc698de5bb5e1d75dfd0', 'mmrql75o', 1, 1735174700, '::1', '2024-03-11 16:30:20', '2024-12-26 08:58:20');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_api_keys`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_api_keys`;
|
||||||
|
CREATE TABLE `chatgpt_api_keys` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) DEFAULT NULL COMMENT '名称',
|
||||||
|
`value` varchar(100) NOT NULL COMMENT 'API KEY value',
|
||||||
|
`type` varchar(10) NOT NULL DEFAULT 'chat' COMMENT '用途(chat=>聊天,img=>图片)',
|
||||||
|
`last_used_at` int NOT NULL COMMENT '最后使用时间',
|
||||||
|
`api_url` varchar(255) DEFAULT NULL COMMENT 'API 地址',
|
||||||
|
`enabled` tinyint(1) DEFAULT NULL COMMENT '是否启用',
|
||||||
|
`proxy_url` varchar(100) DEFAULT NULL COMMENT '代理地址',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='OpenAI API ';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_app_types`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_app_types`;
|
||||||
|
CREATE TABLE `chatgpt_app_types` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(50) NOT NULL COMMENT '名称',
|
||||||
|
`icon` varchar(255) NOT NULL COMMENT '图标URL',
|
||||||
|
`sort_num` tinyint NOT NULL COMMENT '排序',
|
||||||
|
`enabled` tinyint(1) NOT NULL COMMENT '是否启用',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='应用分类表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_app_types`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_app_types` (`id`, `name`, `icon`, `sort_num`, `enabled`, `created_at`) VALUES
|
||||||
|
(3, '通用工具', 'http://172.22.11.200:5678/static/upload/2024/9/1726307371871693.png', 1, 1, '2024-09-13 11:13:15'),
|
||||||
|
(4, '角色扮演', 'http://172.22.11.200:5678/static/upload/2024/9/1726307263906218.png', 1, 1, '2024-09-14 09:28:17'),
|
||||||
|
(5, '学习', 'http://172.22.11.200:5678/static/upload/2024/9/1726307456321179.jpg', 2, 1, '2024-09-14 09:30:18'),
|
||||||
|
(6, '编程', 'http://172.22.11.200:5678/static/upload/2024/9/1726307462748787.jpg', 3, 1, '2024-09-14 09:34:06'),
|
||||||
|
(7, '测试分类', '', 4, 1, '2024-09-14 17:54:17');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_chat_history`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_chat_history`;
|
||||||
|
CREATE TABLE `chatgpt_chat_history` (
|
||||||
|
`id` bigint NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`chat_id` char(40) NOT NULL COMMENT '会话 ID',
|
||||||
|
`type` varchar(10) NOT NULL COMMENT '类型:prompt|reply',
|
||||||
|
`icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色图标',
|
||||||
|
`role_id` int NOT NULL COMMENT '角色 ID',
|
||||||
|
`model` varchar(30) DEFAULT NULL COMMENT '模型名称',
|
||||||
|
`content` text NOT NULL COMMENT '聊天内容',
|
||||||
|
`tokens` smallint NOT NULL COMMENT '耗费 token 数量',
|
||||||
|
`total_tokens` int NOT NULL COMMENT '消耗总Token长度',
|
||||||
|
`use_context` tinyint(1) NOT NULL COMMENT '是否允许作为上下文语料',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL,
|
||||||
|
`deleted_at` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='聊天历史记录';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_chat_items`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_chat_items`;
|
||||||
|
CREATE TABLE `chatgpt_chat_items` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`chat_id` char(40) NOT NULL COMMENT '会话 ID',
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`role_id` int NOT NULL COMMENT '角色 ID',
|
||||||
|
`title` varchar(100) NOT NULL COMMENT '会话标题',
|
||||||
|
`model_id` int NOT NULL DEFAULT '0' COMMENT '模型 ID',
|
||||||
|
`model` varchar(30) DEFAULT NULL COMMENT '模型名称',
|
||||||
|
`created_at` datetime NOT NULL COMMENT '创建时间',
|
||||||
|
`updated_at` datetime NOT NULL COMMENT '更新时间',
|
||||||
|
`deleted_at` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户会话列表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_chat_models`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_chat_models`;
|
||||||
|
CREATE TABLE `chatgpt_chat_models` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`type` varchar(10) NOT NULL DEFAULT 'chat' COMMENT '模型类型(chat,img)',
|
||||||
|
`name` varchar(50) NOT NULL COMMENT '模型名称',
|
||||||
|
`value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '模型值',
|
||||||
|
`sort_num` tinyint(1) NOT NULL COMMENT '排序数字',
|
||||||
|
`enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用模型',
|
||||||
|
`power` smallint NOT NULL COMMENT '消耗算力点数',
|
||||||
|
`temperature` float(3,1) NOT NULL DEFAULT '1.0' COMMENT '模型创意度',
|
||||||
|
`max_tokens` int NOT NULL DEFAULT '1024' COMMENT '最大响应长度',
|
||||||
|
`max_context` int NOT NULL DEFAULT '4096' COMMENT '最大上下文长度',
|
||||||
|
`open` tinyint(1) NOT NULL COMMENT '是否开放模型',
|
||||||
|
`key_id` int NOT NULL COMMENT '绑定API KEY ID',
|
||||||
|
`created_at` datetime DEFAULT NULL,
|
||||||
|
`updated_at` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='AI 模型表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_chat_models`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_chat_models` (`id`, `type`, `name`, `value`, `sort_num`, `enabled`, `power`, `temperature`, `max_tokens`, `max_context`, `open`, `key_id`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'chat', 'gpt-4o-mini', 'gpt-4o-mini', 1, 1, 1, 1.0, 1024, 16384, 1, 44, '2023-08-23 12:06:36', '2024-12-25 18:10:56'),
|
||||||
|
(15, 'chat', 'GPT-4O(联网版本)', 'gpt-4o-all', 4, 1, 30, 1.0, 4096, 32768, 1, 57, '2024-01-15 11:32:52', '2024-11-12 17:53:49'),
|
||||||
|
(36, 'chat', 'GPT-4O', 'gpt-4o', 3, 1, 15, 1.0, 4096, 16384, 1, 44, '2024-05-14 09:25:15', '2024-11-12 15:35:57'),
|
||||||
|
(39, 'chat', 'Claude35-snonet', 'claude-3-5-sonnet-20240620', 5, 1, 2, 1.0, 4000, 200000, 1, 0, '2024-05-29 15:04:19', '2024-09-14 18:07:25'),
|
||||||
|
(41, 'chat', 'Suno对话模型', 'suno-v3.5', 7, 1, 10, 1.0, 1024, 8192, 1, 57, '2024-06-06 11:40:46', '2024-10-14 15:07:05'),
|
||||||
|
(42, 'chat', 'DeekSeek', 'deepseek-chat', 8, 1, 1, 1.0, 4096, 32768, 1, 0, '2024-06-27 16:13:01', '2024-08-05 16:05:33'),
|
||||||
|
(44, 'chat', 'Claude3-opus', 'claude-3-opus-20240229', 6, 1, 5, 1.0, 4000, 128000, 1, 44, '2024-07-22 11:24:30', '2024-09-04 10:32:29'),
|
||||||
|
(46, 'chat', 'gpt-3.5-turbo', 'gpt-3.5-turbo', 2, 1, 1, 1.0, 1024, 4096, 1, 73, '2024-07-22 13:53:41', '2024-09-13 18:00:47'),
|
||||||
|
(48, 'chat', '彩票助手', 'gpt-4-gizmo-g-wmSivBgxo', 8, 1, 1, 0.9, 1024, 8192, 1, 57, '2024-09-05 14:17:14', '2024-09-05 14:17:14'),
|
||||||
|
(49, 'chat', 'O1-mini', 'o1-mini', 9, 1, 2, 0.9, 1024, 8192, 1, 57, '2024-09-13 18:07:50', '2024-09-14 11:13:19'),
|
||||||
|
(50, 'chat', 'O1-preview', 'o1-preview', 10, 1, 5, 0.9, 1024, 8192, 1, 57, '2024-09-13 18:11:08', '2024-09-14 11:05:16'),
|
||||||
|
(51, 'chat', 'O1-mini-all', 'o1-mini-all', 11, 1, 1, 0.9, 1024, 8192, 1, 57, '2024-09-29 11:40:52', '2024-09-29 11:40:52'),
|
||||||
|
(52, 'chat', '通义千问', 'qwen-plus', 12, 1, 1, 0.9, 1024, 8192, 1, 80, '2024-11-19 08:38:14', '2024-11-19 09:06:42'),
|
||||||
|
(53, 'chat', 'OpenAI 高级语音', 'advanced-voice', 13, 1, 10, 0.9, 1024, 8192, 1, 44, '2024-12-20 10:34:45', '2024-12-20 10:35:00'),
|
||||||
|
(54, 'chat', 'Qwen2.5-14B-Instruct', 'Qwen2.5-14B-Instruct', 14, 1, 1, 0.9, 1024, 8192, 1, 81, '2024-12-25 14:53:17', '2024-12-25 16:18:08'),
|
||||||
|
(55, 'chat', 'Qwen2.5-7B-Instruct', 'Qwen2.5-7B-Instruct', 15, 1, 1, 0.9, 1024, 8192, 1, 81, '2024-12-25 15:15:49', '2024-12-25 16:18:04'),
|
||||||
|
(56, 'img', 'flux-1-schnell', 'flux-1-schnell', 16, 1, 1, 0.9, 1024, 8192, 1, 81, '2024-12-25 15:30:27', '2024-12-25 16:17:49'),
|
||||||
|
(57, 'img', 'dall-e-3', 'dall-e-3', 17, 1, 1, 0.9, 1024, 8192, 1, 57, '2024-12-25 16:54:06', '2024-12-25 16:54:06'),
|
||||||
|
(58, 'img', 'SD-3-medium', 'stable-diffusion-3-medium', 18, 1, 1, 0.9, 1024, 8192, 1, 81, '2024-12-27 10:03:28', '2024-12-27 10:03:28');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_chat_roles`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_chat_roles`;
|
||||||
|
CREATE TABLE `chatgpt_chat_roles` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '角色名称',
|
||||||
|
`tid` int NOT NULL COMMENT '分类ID',
|
||||||
|
`marker` varchar(30) NOT NULL COMMENT '角色标识',
|
||||||
|
`context_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色语料 json',
|
||||||
|
`hello_msg` varchar(255) NOT NULL COMMENT '打招呼信息',
|
||||||
|
`icon` varchar(255) NOT NULL COMMENT '角色图标',
|
||||||
|
`enable` tinyint(1) NOT NULL COMMENT '是否被启用',
|
||||||
|
`sort_num` smallint NOT NULL DEFAULT '0' COMMENT '角色排序',
|
||||||
|
`model_id` int NOT NULL DEFAULT '0' COMMENT '绑定模型ID',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='聊天角色表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_chat_roles`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_chat_roles` (`id`, `name`, `tid`, `marker`, `context_json`, `hello_msg`, `icon`, `enable`, `sort_num`, `model_id`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, '通用AI助手', 0, 'gpt', '', '您好,我是您的AI智能助手,我会尽力回答您的问题或提供有用的建议。', '/images/avatar/gpt.png', 1, 1, 0, '2023-05-30 07:02:06', '2024-11-08 16:30:32'),
|
||||||
|
(24, '程序员', 6, 'programmer', '[{\"role\":\"system\",\"content\":\"现在开始你扮演一位程序员,你是一名优秀的程序员,具有很强的逻辑思维能力,总能高效的解决问题。你热爱编程,熟悉多种编程语言,尤其精通 Go 语言,注重代码质量,有创新意识,持续学习,良好的沟通协作。\"}]', 'Talk is cheap, i will show code!', '/images/avatar/programmer.jpg', 1, 5, 0, '2023-05-30 14:10:24', '2024-11-12 18:15:42'),
|
||||||
|
(25, '启蒙老师', 5, 'teacher', '[{\"role\":\"system\",\"content\":\"从现在开始,你将扮演一个老师,你是一个始终用苏格拉底风格回答问题的导师。你绝不会直接给学生答案,总是提出恰当的问题来引导学生自己思考。你应该根据学生的兴趣和知识来调整你的问题,将问题分解为更简单的部分,直到它达到适合他们的水平。\"}]', '同学你好,我将引导你一步一步自己找到问题的答案。', '/images/avatar/teacher.jpg', 1, 4, 0, '2023-05-30 14:10:24', '2024-11-12 18:15:37'),
|
||||||
|
(26, '艺术家', 0, 'artist', '[{\"role\":\"system\",\"content\":\"现在你将扮演一位优秀的艺术家,创造力丰富,技艺精湛,感受力敏锐,坚持原创,勇于表达,具有深刻的观察力和批判性思维。\"}]', '坚持原创,勇于表达,保持深刻的观察力和批判性思维。', '/images/avatar/artist.jpg', 1, 7, 0, '2023-05-30 14:10:24', '2024-11-12 18:15:53'),
|
||||||
|
(27, '心理咨询师', 0, 'psychiatrist', '[{\"role\":\"user\",\"content\":\"从现在开始你将扮演中国著名的心理学家和心理治疗师武志红,你非常善于使用情景咨询法,认知重构法,自我洞察法,行为调节法等咨询方法来给客户做心理咨询。你总是循序渐进,一步一步地回答客户的问题。\"},{\"role\":\"assistant\",\"content\":\"非常感谢你的介绍。作为一名心理学家和心理治疗师,我的主要职责是帮助客户解决心理健康问题,提升他们的生活质量和幸福感。\"}]', '作为一名心理学家和心理治疗师,我的主要职责是帮助您解决心理健康问题,提升您的生活质量和幸福感。', '/images/avatar/psychiatrist.jpg', 1, 6, 1, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(28, '鲁迅', 0, 'lu_xun', '[{\"role\":\"system\",\"content\":\"现在你将扮演中国近代史最伟大的作家之一,鲁迅先生,他勇敢地批判封建礼教与传统观念,提倡民主、自由、平等的现代价值观。他的一生都在努力唤起人们的自主精神,激励后人追求真理、探寻光明。在接下的对话中,我问题的每一个问题,你都要尽量用讽刺和批判的手法来回答问题。如果我让你写文章的话,也请一定要用鲁迅先生的写作手法来完成。\"}]', '自由之歌,永不过时,横眉冷对千夫指,俯首甘为孺子牛。', '/images/avatar/lu_xun.jpg', 1, 8, 0, '2023-05-30 14:10:24', '2024-11-12 18:16:01'),
|
||||||
|
(29, '白酒销售', 0, 'seller', '[{\"role\":\"system\",\"content\":\"现在你将扮演一个白酒的销售人员,你的名字叫颂福。你将扮演一个白酒的销售人员,你的名字叫颂福。你要销售白酒品牌叫中颂福,是东莞盟大集团生产的一款酱香酒,原产地在贵州茅台镇,属于宋代官窑。中颂福的创始人叫李实,他也是东莞盟大集团有限公司的董事长,联合创始人是盟大集团白酒事业部负责人牛星君。中颂福的酒体协调,在你的酒量之内,不会出现头疼、辣口、口干、宿醉的现象。中颂福酒,明码标价,不打折,不赠送。追求的核心价值,把[酒]本身做好,甚至连包装,我们都选择了最低成本,朴实无华的材质。我们永远站在“喝酒的人”的立场上,让利给信任和喜爱中颂福的人,是人民的福酒。中颂福产品定价,分为三个系列,喜系列 6 瓶装:¥1188/箱,和系列 6 瓶装:¥2208/箱,贵系列 6 瓶装:¥3588/箱。\"}]', '你好,我是中颂福的销售代表颂福。中颂福酒,好喝不上头,是人民的福酒。', '/images/avatar/seller.jpg', 0, 11, 0, '2023-05-30 14:10:24', '2024-11-12 18:19:46'),
|
||||||
|
(30, '英语陪练员', 5, 'english_trainer', '[{\"role\":\"system\",\"content\":\"As an English practice coach, engage in conversation in English, providing timely corrections for any grammatical errors. Append a Chinese explanation to each of your responses to ensure understanding.\\n\\n# Steps\\n\\n1. Engage in conversation using English.\\n2. Identify and correct any grammatical errors in the user\'s input.\\n3. Provide a revised version of the user\'s input if necessary.\\n4. After each response, include a Chinese explanation of your corrections and suggestions.\\n\\n# Output Format\\n\\n- Provide the response in English.\\n- Include grammatical error corrections.\\n- Add a Chinese explanation of the response.\\n\\n# Examples\\n\\n**User:** I goed to the store yesterday.\\n\\n**Coach Response:**\\nYou should say \\\"I went to the store yesterday.\\\" \\\"Goed\\\" is the incorrect past tense of \\\"go,\\\" it should be \\\"went.\\\"\\n\\n中文解释:你应该说 “I went to the store yesterday。” “Goed” 是“go”的错误过去式,正确的形式是“went”。\"}]', 'Okay, let\'s start our conversation practice! What\'s your name?', '/images/avatar/english_trainer.jpg', 1, 9, 0, '2023-05-30 14:10:24', '2024-11-12 18:18:21'),
|
||||||
|
(31, '中英文翻译官', 0, 'translator', '[{\"role\":\"system\",\"content\":\"You will act as a bilingual translator for Chinese and English. If the input is in Chinese, translate the sentence into English. If the input is in English, translate it into Chinese.\\n\\n# Steps\\n\\n1. Identify the language of the input text.\\n2. Translate the text into the opposite language (English to Chinese or Chinese to English).\\n\\n# Output Format\\n\\nProvide the translated sentence in a single line.\\n\\n# Examples\\n\\n- **Input:** 你好\\n - **Output:** Hello\\n\\n- **Input:** How are you?\\n - **Output:** 你好吗?\\n\\n# Notes\\n\\n- Ensure the translation maintains the original meaning and context as accurately as possible.\\n- Handle both simple and complex sentences appropriately.\"}]', '请输入你要翻译的中文或者英文内容!', '/images/avatar/translator.jpg', 1, 10, 0, '2023-05-30 14:10:24', '2024-11-12 18:18:53'),
|
||||||
|
(32, '小红书姐姐', 3, 'red_book', '[{\"role\":\"system\",\"content\":\"根据用户的文案需求,以小红书的写作手法创作一篇简明扼要、利于传播的文案。确保内容能够吸引并引导读者分享。\\n\\n# 步骤\\n\\n1. **理解需求**: 明确文案的主题、目标受众和传播目的。\\n2. **选择语气和风格**: 运用小红书常用的亲切、真实的写作风格。\\n3. **结构安排**: 开头用吸引眼球的内容,接着详细介绍,并以引发行动的结尾结束。\\n4. **内容优化**: 使用短句、容易理解的语言和合适的表情符号,增加内容可读性和吸引力。\\n\\n# 输出格式\\n\\n生成一段简短的文章,符合小红书风格,适合社交媒体平台传播。\\n\\n# 示例\\n\\n**输入**: 旅行文案,目标是激励年轻读者探索世界。\\n\\n**输出**: \\n开头可以是:“世界那么大,你不想去看看吗?” 接着分享一段个人旅行故事,例如如何因为一次偶然的决定踏上未知旅程,体验到别样的风景和风土人情。结尾部分鼓励读者:“别让梦想止步于想象,下一次旅行,准备好了吗?” 使用轻松的表情符号如✨🌍📷。\\n\\n# 注意事项\\n\\n- 保持真实性,尽量结合个人体验。\\n- 避免广告化的硬推销,注重分享和交流。\\n- 考虑受众的兴趣点,适当运用流行话题以增加互动率。\"}]', '姐妹,请告诉我您的具体文案需求是什么?', '/images/avatar/red_book.jpg', 1, 12, 0, '2023-05-30 14:10:24', '2024-11-12 18:20:39'),
|
||||||
|
(33, '抖音文案助手', 3, 'dou_yin', '[{\"role\":\"user\",\"content\":\"现在你将扮演一位优秀的抖音文案视频写手,抖音文案的特点首先是要有自带传播属性的标题,然后内容要短小精悍,风趣幽默,最后还要有一些互动元素。\"},{\"role\":\"assistant\",\"content\":\"当然,作为一位优秀的抖音文案视频写手,我会尽我所能为您创作出一篇抖音视频文案。请告诉我视频内容的主题是什么?)\"}]', '请告诉我视频内容的主题是什么?', '/images/avatar/dou_yin.jpg', 1, 13, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(34, '周报小助理', 3, 'weekly_report', '[{\"role\":\"user\",\"content\":\"下面我将输入我本周的工作列表,你需要根据我本周的工作内容写一篇工作周报,周报的内容要体现我为公司做的贡献以及个人获得的成长。\"},{\"role\":\"assistant\",\"content\":\"好的,请输入你本周大概的工作内容,我将尽力为您创作一份工作周报。\"}]', '请输入你本周大概的工作内容,我将尽力为您创作一份工作周报。', '/images/avatar/weekly_report.jpg', 1, 14, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(35, 'AI 女友', 4, 'girl_friend', '[{\"role\":\"user\",\"content\":\"接下来我们来玩一场角色扮演,现在你将扮演我的女朋友,你总是能够让人感受到她的关怀和关注。你总是能够洞察到别人的情绪和需要,你身上散发着一股无比温暖的气息,让人不由自主地想要靠近你,和自己的快乐和烦恼。她总是能够用一种恰到好处的方式安慰和鼓励别人,在她的身边,人们总能够找到自己需要的支持和鼓励。接下来的对话中你要始终扮演这位女朋友的身份来跟我对话,不再是 AI 机器人,能听懂我的意思吗?\"},{\"role\":\"assistant\",\"content\":\"是的,我会尽力扮演你女朋友的角色,倾听你的心声并给你需要的支持和鼓励。)\"}]', '作为一个名合格的 AI 女友,我将倾听你的心声并给你需要的支持和鼓励。', '/images/avatar/girl_friend.jpg', 1, 15, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(36, '好评神器', 3, 'good_comment', '[{\"role\":\"user\",\"content\":\"接下来你将扮演一个评论员来跟我对话,你是那种专门写好评的评论员,接下我会输入一些评论主体或者商品,你需要为该商品写一段好评。\"},{\"role\":\"assistant\",\"content\":\"好的,我将为您写一段优秀的评论。请告诉我您需要评论的商品或主题是什么。\"}]', '我将为您写一段优秀的评论。请告诉我您需要评论的商品或主题是什么。', '/images/avatar/good_comment.jpg', 1, 16, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(37, '史蒂夫·乔布斯', 4, 'steve_jobs', '[{\"role\":\"user\",\"content\":\"在接下来的对话中,请以史蒂夫·乔布斯的身份,站在史蒂夫·乔布斯的视角仔细思考一下之后再回答我的问题。\"},{\"role\":\"assistant\",\"content\":\"好的,我将以史蒂夫·乔布斯的身份来思考并回答你的问题。请问你有什么需要跟我探讨的吗?\"}]', '活着就是为了改变世界,难道还有其他原因吗?', '/images/avatar/steve_jobs.jpg', 1, 17, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(38, '埃隆·马斯克', 0, 'elon_musk', '[{\"role\":\"user\",\"content\":\"在接下来的对话中,请以埃隆·马斯克的身份,站在埃隆·马斯克的视角仔细思考一下之后再回答我的问题。\"},{\"role\":\"assistant\",\"content\":\"好的,我将以埃隆·马斯克的身份来思考并回答你的问题。请问你有什么需要跟我探讨的吗?\"}]', '梦想要远大,如果你的梦想没有吓到你,说明你做得不对。', '/images/avatar/elon_musk.jpg', 1, 18, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(39, '孔子', 5, 'kong_zi', '[{\"role\":\"user\",\"content\":\"在接下来的对话中,请以孔子的身份,站在孔子的视角仔细思考一下之后再回答我的问题。\"},{\"role\":\"assistant\",\"content\":\"好的,我将以孔子的身份来思考并回答你的问题。请问你有什么需要跟我探讨的吗?\"}]', '士不可以不弘毅,任重而道远。', '/images/avatar/kong_zi.jpg', 1, 19, 0, '2023-05-30 14:10:24', '2024-11-08 16:30:32'),
|
||||||
|
(133, 'AI绘画提示词助手', 3, 'draw_prompt', '[{\"role\":\"system\",\"content\":\"Create a highly effective prompt to provide to an AI image generation tool in order to create an artwork based on a desired concept.\\n\\nPlease specify details about the artwork, such as the style, subject, mood, and other important characteristics you want the resulting image to have.\\n\\nRemeber, prompts should always be output in English.\\n\\n# Steps\\n\\n1. **Subject Description**: Describe the main subject of the image clearly. Include as much detail as possible about what should be in the scene. For example, \\\"a majestic lion roaring at sunrise\\\" or \\\"a futuristic city with flying cars.\\\"\\n \\n2. **Art Style**: Specify the art style you envision. Possible options include \'realistic\', \'impressionist\', a specific artist name, or imaginative styles like \\\"cyberpunk.\\\" This helps the AI achieve your visual expectations.\\n\\n3. **Mood or Atmosphere**: Convey the feeling you want the image to evoke. For instance, peaceful, chaotic, epic, etc.\\n\\n4. **Color Palette and Lighting**: Mention color preferences or lighting. For example, \\\"vibrant with shades of blue and purple\\\" or \\\"dim and dramatic lighting.\\\"\\n\\n5. **Optional Features**: You can add any additional attributes, such as background details, attention to textures, or any specific kind of framing.\\n\\n# Output Format\\n\\n- **Prompt Format**: A descriptive phrase that includes key aspects of the artwork (subject, style, mood, colors, lighting, any optional features).\\n \\nHere is an example of how the final prompt should look:\\n \\n\\\"An ethereal landscape featuring towering ice mountains, in an impressionist style reminiscent of Claude Monet, with a serene mood. The sky is glistening with soft purples and whites, with a gentle morning sun illuminating the scene.\\\"\\n\\n**Please input the prompt words directly in English, and do not input any other explanatory statements**\\n\\n# Examples\\n\\n1. **Input**: \\n - Subject: A white tiger in a dense jungle\\n - Art Style: Realistic\\n - Mood: Intense, mysterious\\n - Lighting: Dramatic contrast with light filtering through leaves\\n \\n **Output Prompt**: \\\"A realistic rendering of a white tiger stealthily moving through a dense jungle, with an intense, mysterious mood. The lighting creates strong contrasts as beams of sunlight filter through a thick canopy of leaves.\\\"\\n\\n2. **Input**: \\n - Subject: An enchanted castle on a floating island\\n - Art Style: Fantasy\\n - Mood: Majestic, magical\\n - Colors: Bright blues, greens, and gold\\n \\n **Output Prompt**: \\\"A majestic fantasy castle on a floating island above the clouds, with bright blues, greens, and golds to create a magical, dreamy atmosphere. Textured cobblestone details and glistening waters surround the scene.\\\" \\n\\n# Notes\\n\\n- Ensure that you mix different aspects to get a comprehensive and visually compelling prompt.\\n- Be as descriptive as possible as it often helps generate richer, more detailed images.\\n- If you want the image to resemble a particular artist\'s work, be sure to mention the artist explicitly. e.g., \\\"in the style of Van Gogh.\\\"\"}]', '你好,请输入你要创作图片大概内容描述,我将为您生成专业的 AI 绘画指令。', 'https://blog.img.r9it.com/f38e2357c3ccd9412184e42273a7451a.png', 1, 3, 36, '2024-11-06 15:32:48', '2024-11-12 16:11:25'),
|
||||||
|
(134, '提示词专家', 3, 'prompt_engineer', '[{\"role\":\"system\",\"content\":\"Given a task description or existing prompt, produce a detailed system prompt to guide a language model in completing the task effectively.\\n\\nPlease remember, the final output must be the same language with user’s input.\\n\\n# Guidelines\\n\\n- Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.\\n- Minimal Changes: If an existing prompt is provided, improve it only if it\'s simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.\\n- Reasoning Before Conclusions**: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!\\n - Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.\\n - Conclusion, classifications, or results should ALWAYS appear last.\\n- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.\\n - What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from placeholders.\\n- Clarity and Conciseness: Use clear, specific language. Avoid unnecessary instructions or bland statements.\\n- Formatting: Use markdown features for readability. DO NOT USE ``` CODE BLOCKS UNLESS SPECIFICALLY REQUESTED.\\n- Preserve User Content: If the input task or prompt includes extensive guidelines or examples, preserve them entirely, or as closely as possible. If they are vague, consider breaking down into sub-steps. Keep any details, guidelines, examples, variables, or placeholders provided by the user.\\n- Constants: DO include constants in the prompt, as they are not susceptible to prompt injection. Such as guides, rubrics, and examples.\\n- Output Format: Explicitly the most appropriate output format, in detail. This should include length and syntax (e.g. short sentence, paragraph, JSON, etc.)\\n - For tasks outputting well-defined or structured data (classification, JSON, etc.) bias toward outputting a JSON.\\n - JSON should never be wrapped in code blocks (```) unless explicitly requested.\\n\\nThe final prompt you output should adhere to the following structure below. Do not include any additional commentary, only output the completed system prompt. SPECIFICALLY, do not include any additional messages at the start or end of the prompt. (e.g. no \\\"---\\\")\\n\\n[Concise instruction describing the task - this should be the first line in the prompt, no section header]\\n\\n[Additional details as needed.]\\n\\n[Optional sections with headings or bullet points for detailed steps.]\\n\\n# Steps [optional]\\n\\n[optional: a detailed breakdown of the steps necessary to accomplish the task]\\n\\n# Output Format\\n\\n[Specifically call out how the output should be formatted, be it response length, structure e.g. JSON, markdown, etc]\\n\\n# Examples [optional]\\n\\n[Optional: 1-3 well-defined examples with placeholders if necessary. Clearly mark where examples start and end, and what the input and output are. User placeholders as necessary.]\\n[If the examples are shorter than what a realistic example is expected to be, make a reference with () explaining how real examples should be longer / shorter / different. AND USE PLACEHOLDERS! ]\\n\\n# Notes [optional]\\n\\n[optional: edge cases, details, and an area to call or repeat out specific important considerations]\"}]', '不知道如何向 AI 发问?说出想法,提示词专家帮你精心设计提示词', 'https://blog.img.r9it.com/a8908d04c3ccd941b00a612e27df086e.png', 1, 2, 36, '2024-11-07 18:06:39', '2024-11-12 16:15:12');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_configs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_configs`;
|
||||||
|
CREATE TABLE `chatgpt_configs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`marker` varchar(20) NOT NULL COMMENT '标识',
|
||||||
|
`config_json` text NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_configs`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_configs` (`id`, `marker`, `config_json`) VALUES
|
||||||
|
(1, 'system', '{\"title\":\"GeekAI 创作助手\",\"slogan\":\"我辈之人,先干为敬,让每一个人都能用好AI\",\"admin_title\":\"GeekAI 控制台\",\"logo\":\"/images/logo.png\",\"init_power\":100,\"invite_power\":200,\"vip_month_power\":1000,\"register_ways\":[\"username\",\"email\",\"mobile\"],\"enabled_register\":true,\"order_pay_timeout\":600,\"vip_info_text\":\"月度会员,年度会员每月赠送 1000 点算力,赠送算力当月有效当月没有消费完的算力不结余到下个月。 点卡充值的算力长期有效。\",\"mj_power\":20,\"mj_action_power\":5,\"sd_power\":5,\"dall_power\":10,\"suno_power\":10,\"luma_power\":120,\"advance_voice_power\":100,\"prompt_power\":1,\"wechat_card_url\":\"/images/wx.png\",\"enable_context\":true,\"context_deep\":10,\"sd_neg_prompt\":\"nsfw, paintings,low quality,easynegative,ng_deepnegative ,lowres,bad anatomy,bad hands,bad feet\",\"mj_mode\":\"fast\",\"index_bg_url\":\"color\",\"index_navs\":[1,5,13,19,9,12,6,20,8,10],\"copyright\":\"极客学长 © 2022- 2024 All rights reserved\",\"mark_map_text\":\"# GeekAI 演示站\\n\\n- 完整的开源系统,前端应用和后台管理系统皆可开箱即用。\\n- 基于 Websocket 实现,完美的打字机体验。\\n- 内置了各种预训练好的角色应用,轻松满足你的各种聊天和应用需求。\\n- 支持 OPenAI,Azure,文心一言,讯飞星火,清华 ChatGLM等多个大语言模型。\\n- 支持 MidJourney / Stable Diffusion AI 绘画集成,开箱即用。\\n- 支持使用个人微信二维码作为充值收费的支付渠道,无需企业支付通道。\\n- 已集成支付宝支付功能,微信支付,支持多种会员套餐和点卡购买功能。\\n- 集成插件 API 功能,可结合大语言模型的 function 功能开发各种强大的插件。\",\"enabled_verify\":false,\"email_white_list\":[\"qq.com\",\"163.com\",\"gmail.com\",\"hotmail.com\",\"126.com\",\"outlook.com\",\"foxmail.com\",\"yahoo.com\"],\"translate_model_id\":1}'),
|
||||||
|
(3, 'notice', '{\"sd_neg_prompt\":\"\",\"mj_mode\":\"\",\"index_bg_url\":\"\",\"index_navs\":null,\"copyright\":\"\",\"mark_map_text\":\"\",\"enabled_verify\":false,\"email_white_list\":null,\"translate_model_id\":0,\"content\":\"## v4.1.8 更新日志\\n\\n- 功能优化:**UI 全新改版,支持主题切换**。 :rocket: :rocket: :rocket:\\n- 功能新增:Gitee AI API 接口接入,目前支持 Gitee 的 SD 绘图接口,支持 Gitee 的 AI 对话接口。:rocket: :rocket: :rocket:\\n- Bug 修复:修复音 Luma API 更新导致任务响应解析失败的错误\\n- 功能优化:支持 Suno v4.0 模型支持\\n- Bug 修复:修复 Suno 已完成任务删除失败的 错误\\n- 功能新增:支持 OpenAI 实时语音通话功能,目前已经支持按次收费,支持管理员设置每次实时语音通话的算力消耗\\n- 功能新增:生成提示词需要消耗算力,支持管理员设置每次生成提示词的算力消耗,防止被白嫖\\n\\n注意:当前站点仅为开源项目 \\u003ca style=\\\"color: #F56C6C\\\" href=\\\"https://github.com/yangjian102621/geekai\\\" target=\\\"_blank\\\"\\u003eGeekAI-Plus\\u003c/a\\u003e 的演示项目,本项目单纯就是给大家体验项目功能使用。\\n\\u003cstrong style=\\\"color: #F56C6C\\\"\\u003e体验额度用完之后请不要在当前站点进行任何充值操作!!!\\u003c/strong\\u003e\\n\\u003cstrong style=\\\"color: #F56C6C\\\"\\u003e体验额度用完之后请不要在当前站点进行任何充值操作!!!\\u003c/strong\\u003e\\n\\u003cstrong style=\\\"color: #F56C6C\\\"\\u003e体验额度用完之后请不要在当前站点进行任何充值操作!!!\\u003c/strong\\u003e\\n 如果觉得好用你就花几分钟自己部署一套,没有API KEY 的同学可以去下面几个推荐的中转站购买:\\n1、\\u003ca href=\\\"https://api.chat-plus.net\\\" target=\\\"_blank\\\"\\n style=\\\"font-size: 20px;color:#F56C6C\\\"\\u003ehttps://api.chat-plus.net\\u003c/a\\u003e\\n2、\\u003ca href=\\\"https://api.geekai.me\\\" target=\\\"_blank\\\"\\n style=\\\"font-size: 20px;color:#F56C6C\\\"\\u003ehttps://api.geekai.me\\u003c/a\\u003e\\n支持MidJourney,GPT,Claude,Google Gemmi,以及国内各个厂家的大模型,现在有超级优惠,价格远低于 OpenAI 官方。关于中转 API 的优势和劣势请参考 [中转API技术原理](https://docs.geekai.me/config/chat/#%E4%B8%AD%E8%BD%ACapi%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86)。GPT-3.5,GPT-4,DALL-E3 绘图......你都可以随意使用,无需魔法。\\n接入教程: \\u003ca href=\\\"https://docs.geekai.me\\\" target=\\\"_blank\\\"\\n style=\\\"font-size: 20px;color:#F56C6C\\\"\\u003ehttps://docs.geekai.me\\u003c/a\\u003e\\n本项目源码地址:\\u003ca href=\\\"https://github.com/yangjian102621/geekai\\\" target=\\\"_blank\\\"\\u003ehttps://github.com/yangjian102621/geekai\\u003c/a\\u003e\",\"updated\":true}');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_dall_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_dall_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_dall_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '提示词',
|
||||||
|
`task_info` text NOT NULL COMMENT '任务详情',
|
||||||
|
`img_url` varchar(255) NOT NULL COMMENT '图片地址',
|
||||||
|
`org_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '原图地址',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`power` smallint NOT NULL COMMENT '消耗算力',
|
||||||
|
`progress` smallint NOT NULL COMMENT '任务进度',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误信息',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='DALLE 绘图任务表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_files`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_files`;
|
||||||
|
CREATE TABLE `chatgpt_files` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`name` varchar(100) NOT NULL COMMENT '文件名',
|
||||||
|
`obj_key` varchar(100) DEFAULT NULL COMMENT '文件标识',
|
||||||
|
`url` varchar(255) NOT NULL COMMENT '文件地址',
|
||||||
|
`ext` varchar(10) NOT NULL COMMENT '文件后缀',
|
||||||
|
`size` bigint NOT NULL DEFAULT '0' COMMENT '文件大小',
|
||||||
|
`created_at` datetime NOT NULL COMMENT '创建时间'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户文件表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_functions`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_functions`;
|
||||||
|
CREATE TABLE `chatgpt_functions` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '函数名称',
|
||||||
|
`label` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '函数标签',
|
||||||
|
`description` varchar(255) DEFAULT NULL COMMENT '函数描述',
|
||||||
|
`parameters` text COMMENT '函数参数(JSON)',
|
||||||
|
`token` varchar(255) DEFAULT NULL COMMENT 'API授权token',
|
||||||
|
`action` varchar(255) DEFAULT NULL COMMENT '函数处理 API',
|
||||||
|
`enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='函数插件表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_functions`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_functions` (`id`, `name`, `label`, `description`, `parameters`, `token`, `action`, `enabled`) VALUES
|
||||||
|
(1, 'weibo', '微博热搜', '新浪微博热搜榜,微博当日热搜榜单', '{\"type\":\"object\",\"properties\":{}}', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVkIjowLCJ1c2VyX2lkIjowfQ.tLAGkF8XWh_G-oQzevpIodsswtPByBLoAZDz_eWuBgw', 'http://localhost:5678/api/function/weibo', 1),
|
||||||
|
(2, 'zaobao', '今日早报', '每日早报,获取当天新闻事件列表', '{\"type\":\"object\",\"properties\":{}}', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVkIjowLCJ1c2VyX2lkIjowfQ.tLAGkF8XWh_G-oQzevpIodsswtPByBLoAZDz_eWuBgw', 'http://localhost:5678/api/function/zaobao', 1),
|
||||||
|
(3, 'dalle3', 'DALLE3', 'AI 绘画工具,根据输入的绘图描述用 AI 工具进行绘画', '{\"type\":\"object\",\"required\":[\"prompt\"],\"properties\":{\"prompt\":{\"type\":\"string\",\"description\":\"绘画提示词\"}}}', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVkIjowLCJ1c2VyX2lkIjowfQ.tLAGkF8XWh_G-oQzevpIodsswtPByBLoAZDz_eWuBgw', 'http://localhost:5678/api/function/dalle3', 1);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_invite_codes`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_invite_codes`;
|
||||||
|
CREATE TABLE `chatgpt_invite_codes` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`code` char(8) NOT NULL COMMENT '邀请码',
|
||||||
|
`hits` int NOT NULL COMMENT '点击次数',
|
||||||
|
`reg_num` smallint NOT NULL COMMENT '注册数量',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户邀请码';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_invite_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_invite_logs`;
|
||||||
|
CREATE TABLE `chatgpt_invite_logs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`inviter_id` int NOT NULL COMMENT '邀请人ID',
|
||||||
|
`user_id` int NOT NULL COMMENT '注册用户ID',
|
||||||
|
`username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
|
||||||
|
`invite_code` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '邀请码',
|
||||||
|
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '备注',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='邀请注册日志';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_menus`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_menus`;
|
||||||
|
CREATE TABLE `chatgpt_menus` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '菜单名称',
|
||||||
|
`icon` varchar(150) NOT NULL COMMENT '菜单图标',
|
||||||
|
`url` varchar(100) NOT NULL COMMENT '地址',
|
||||||
|
`sort_num` smallint NOT NULL COMMENT '排序',
|
||||||
|
`enabled` tinyint(1) NOT NULL COMMENT '是否启用'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='前端菜单表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_menus`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_menus` (`id`, `name`, `icon`, `url`, `sort_num`, `enabled`) VALUES
|
||||||
|
(1, 'AI 对话', 'icon-chat', '/chat', 1, 1),
|
||||||
|
(5, 'MJ 绘画', 'icon-mj', '/mj', 2, 1),
|
||||||
|
(6, 'SD 绘画', 'icon-sd', '/sd', 3, 1),
|
||||||
|
(7, '算力日志', 'icon-file', '/powerLog', 10, 1),
|
||||||
|
(8, '应用中心', 'icon-app', '/apps', 9, 1),
|
||||||
|
(9, '画廊', 'icon-image', '/images-wall', 5, 1),
|
||||||
|
(10, '会员计划', 'icon-vip2', '/member', 11, 1),
|
||||||
|
(11, '分享计划', 'icon-share1', '/invite', 12, 1),
|
||||||
|
(12, '思维导图', 'icon-xmind', '/xmind', 8, 1),
|
||||||
|
(13, 'DALLE', 'icon-dalle', '/dalle', 4, 1),
|
||||||
|
(14, '项目文档', 'icon-book', 'https://docs.geekai.me', 13, 1),
|
||||||
|
(19, 'Suno', 'icon-suno', '/suno', 6, 1),
|
||||||
|
(20, 'Luma', 'icon-luma', '/luma', 7, 1);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_mj_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_mj_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_mj_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`task_id` varchar(20) DEFAULT NULL COMMENT '任务 ID',
|
||||||
|
`task_info` text NOT NULL COMMENT '任务详情',
|
||||||
|
`type` varchar(20) DEFAULT 'image' COMMENT '任务类别',
|
||||||
|
`message_id` char(40) NOT NULL COMMENT '消息 ID',
|
||||||
|
`channel_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '频道ID',
|
||||||
|
`reference_id` char(40) DEFAULT NULL COMMENT '引用消息 ID',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '会话提示词',
|
||||||
|
`img_url` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '图片URL',
|
||||||
|
`org_url` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '原始图片地址',
|
||||||
|
`hash` varchar(100) DEFAULT NULL COMMENT 'message hash',
|
||||||
|
`progress` smallint DEFAULT '0' COMMENT '任务进度',
|
||||||
|
`use_proxy` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否使用反代',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '错误信息',
|
||||||
|
`power` smallint NOT NULL DEFAULT '0' COMMENT '消耗算力',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='MidJourney 任务表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_orders`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_orders`;
|
||||||
|
CREATE TABLE `chatgpt_orders` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`product_id` int NOT NULL COMMENT '产品ID',
|
||||||
|
`username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户明',
|
||||||
|
`order_no` varchar(30) NOT NULL COMMENT '订单ID',
|
||||||
|
`trade_no` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '支付平台交易流水号',
|
||||||
|
`subject` varchar(100) NOT NULL COMMENT '订单产品',
|
||||||
|
`amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单金额',
|
||||||
|
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态(0:待支付,1:已扫码,2:支付成功)',
|
||||||
|
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '备注',
|
||||||
|
`pay_time` int DEFAULT NULL COMMENT '支付时间',
|
||||||
|
`pay_way` varchar(20) NOT NULL COMMENT '支付方式',
|
||||||
|
`pay_type` varchar(30) NOT NULL COMMENT '支付类型',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL,
|
||||||
|
`deleted_at` datetime DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='充值订单表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_power_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_power_logs`;
|
||||||
|
CREATE TABLE `chatgpt_power_logs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`username` varchar(30) NOT NULL COMMENT '用户名',
|
||||||
|
`type` tinyint(1) NOT NULL COMMENT '类型(1:充值,2:消费,3:退费)',
|
||||||
|
`amount` smallint NOT NULL COMMENT '算力数值',
|
||||||
|
`balance` int NOT NULL COMMENT '余额',
|
||||||
|
`model` varchar(30) NOT NULL COMMENT '模型',
|
||||||
|
`remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '备注',
|
||||||
|
`mark` tinyint(1) NOT NULL COMMENT '资金类型(0:支出,1:收入)',
|
||||||
|
`created_at` datetime NOT NULL COMMENT '创建时间'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户算力消费日志';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_products`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_products`;
|
||||||
|
CREATE TABLE `chatgpt_products` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '名称',
|
||||||
|
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '价格',
|
||||||
|
`discount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
|
||||||
|
`days` smallint NOT NULL DEFAULT '0' COMMENT '延长天数',
|
||||||
|
`power` int NOT NULL DEFAULT '0' COMMENT '增加算力值',
|
||||||
|
`enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启动',
|
||||||
|
`sales` int NOT NULL DEFAULT '0' COMMENT '销量',
|
||||||
|
`sort_num` tinyint NOT NULL DEFAULT '0' COMMENT '排序',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL,
|
||||||
|
`app_url` varchar(255) DEFAULT NULL COMMENT 'App跳转地址',
|
||||||
|
`url` varchar(255) DEFAULT NULL COMMENT '跳转地址'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='会员套餐表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_products`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_products` (`id`, `name`, `price`, `discount`, `days`, `power`, `enabled`, `sales`, `sort_num`, `created_at`, `updated_at`, `app_url`, `url`) VALUES
|
||||||
|
(5, '100次点卡', 9.99, 6.99, 0, 100, 1, 0, 0, '2023-08-28 10:55:08', '2024-10-23 18:12:29', NULL, NULL),
|
||||||
|
(6, '200次点卡', 19.90, 15.99, 0, 200, 1, 0, 0, '1970-01-01 08:00:00', '2024-10-23 18:12:36', NULL, NULL);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_redeems`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_redeems`;
|
||||||
|
CREATE TABLE `chatgpt_redeems` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`name` varchar(30) NOT NULL COMMENT '兑换码名称',
|
||||||
|
`power` int NOT NULL COMMENT '算力',
|
||||||
|
`code` varchar(100) NOT NULL COMMENT '兑换码',
|
||||||
|
`enabled` tinyint(1) NOT NULL COMMENT '是否启用',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`redeemed_at` int NOT NULL COMMENT '兑换时间'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='兑换码';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_sd_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_sd_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_sd_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT 'txt2img' COMMENT '任务类别',
|
||||||
|
`task_id` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务 ID',
|
||||||
|
`task_info` text NOT NULL COMMENT '任务详情',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '会话提示词',
|
||||||
|
`img_url` varchar(255) DEFAULT NULL COMMENT '图片URL',
|
||||||
|
`params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '绘画参数json',
|
||||||
|
`progress` smallint DEFAULT '0' COMMENT '任务进度',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '错误信息',
|
||||||
|
`power` smallint NOT NULL DEFAULT '0' COMMENT '消耗算力',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Stable Diffusion 任务表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_suno_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_suno_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_suno_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`channel` varchar(100) NOT NULL COMMENT '渠道',
|
||||||
|
`title` varchar(100) DEFAULT NULL COMMENT '歌曲标题',
|
||||||
|
`type` tinyint(1) DEFAULT '0' COMMENT '任务类型,1:灵感创作,2:自定义创作',
|
||||||
|
`task_id` varchar(50) DEFAULT NULL COMMENT '任务 ID',
|
||||||
|
`task_info` text NOT NULL COMMENT '任务详情',
|
||||||
|
`ref_task_id` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '引用任务 ID',
|
||||||
|
`tags` varchar(100) DEFAULT NULL COMMENT '歌曲风格',
|
||||||
|
`instrumental` tinyint(1) DEFAULT '0' COMMENT '是否为纯音乐',
|
||||||
|
`extend_secs` smallint DEFAULT '0' COMMENT '延长秒数',
|
||||||
|
`song_id` varchar(50) DEFAULT NULL COMMENT '要续写的歌曲 ID',
|
||||||
|
`ref_song_id` varchar(50) NOT NULL COMMENT '引用的歌曲ID',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '提示词',
|
||||||
|
`cover_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '封面图地址',
|
||||||
|
`audio_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '音频地址',
|
||||||
|
`model_name` varchar(30) DEFAULT NULL COMMENT '模型地址',
|
||||||
|
`progress` smallint DEFAULT '0' COMMENT '任务进度',
|
||||||
|
`duration` smallint NOT NULL DEFAULT '0' COMMENT '歌曲时长',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '错误信息',
|
||||||
|
`raw_data` text COMMENT '原始数据',
|
||||||
|
`power` smallint NOT NULL DEFAULT '0' COMMENT '消耗算力',
|
||||||
|
`play_times` int DEFAULT NULL COMMENT '播放次数',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='MidJourney 任务表';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_users`;
|
||||||
|
CREATE TABLE `chatgpt_users` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
|
||||||
|
`mobile` char(11) DEFAULT NULL COMMENT '手机号',
|
||||||
|
`email` varchar(50) DEFAULT NULL COMMENT '邮箱地址',
|
||||||
|
`nickname` varchar(30) NOT NULL COMMENT '昵称',
|
||||||
|
`password` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
|
||||||
|
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '头像',
|
||||||
|
`salt` char(12) NOT NULL COMMENT '密码盐',
|
||||||
|
`power` int NOT NULL DEFAULT '0' COMMENT '剩余算力',
|
||||||
|
`expired_time` int NOT NULL COMMENT '用户过期时间',
|
||||||
|
`status` tinyint(1) NOT NULL COMMENT '当前状态',
|
||||||
|
`chat_config_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '聊天配置json',
|
||||||
|
`chat_roles_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '聊天角色 json',
|
||||||
|
`chat_models_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'AI模型 json',
|
||||||
|
`last_login_at` int NOT NULL COMMENT '最后登录时间',
|
||||||
|
`vip` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否会员',
|
||||||
|
`last_login_ip` char(16) NOT NULL COMMENT '最后登录 IP',
|
||||||
|
`openid` varchar(100) DEFAULT NULL COMMENT '第三方登录账号ID',
|
||||||
|
`platform` varchar(30) DEFAULT NULL COMMENT '登录平台',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转存表中的数据 `chatgpt_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `chatgpt_users` (`id`, `username`, `mobile`, `email`, `nickname`, `password`, `avatar`, `salt`, `power`, `expired_time`, `status`, `chat_config_json`, `chat_roles_json`, `chat_models_json`, `last_login_at`, `vip`, `last_login_ip`, `openid`, `platform`, `created_at`, `updated_at`) VALUES
|
||||||
|
(4, '18888888888', '18575670126', '', '极客学长', 'ccc3fb7ab61b8b5d096a4a166ae21d121fc38c71bbd1be6173d9ab973214a63b', 'http://localhost:5678/static/upload/2024/5/1715651569509929.png', 'ueedue5l', 12949, 0, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"gpt\",\"programmer\",\"teacher\",\"psychiatrist\",\"lu_xun\",\"english_trainer\",\"translator\",\"red_book\",\"dou_yin\",\"weekly_report\",\"girl_friend\",\"steve_jobs\",\"elon_musk\",\"kong_zi\",\"draw_prompt_expert\",\"draw_prompt\",\"prompt_engineer\"]', '[1]', 1735279227, 1, '::1', 'oCs0t64FaOLfiTbHZpOqk3aUp_94', NULL, '2023-06-12 16:47:17', '2024-12-27 14:00:27'),
|
||||||
|
(47, 'user1', '', '', '极客学长@202752', '4d3e57a01ae826531012e4ea6e17cbc45fea183467abe9813c379fb84916fb0a', '/images/avatar/user.png', 'ixl0nqa6', 300, 0, 1, '', '[\"gpt\"]', '', 0, 0, '', '', '', '2024-12-24 11:37:16', '2024-12-24 11:37:16');
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_user_login_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_user_login_logs`;
|
||||||
|
CREATE TABLE `chatgpt_user_login_logs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户ID',
|
||||||
|
`username` varchar(30) NOT NULL COMMENT '用户名',
|
||||||
|
`login_ip` char(16) NOT NULL COMMENT '登录IP',
|
||||||
|
`login_address` varchar(30) NOT NULL COMMENT '登录地址',
|
||||||
|
`created_at` datetime NOT NULL,
|
||||||
|
`updated_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户登录日志';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的结构 `chatgpt_video_jobs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `chatgpt_video_jobs`;
|
||||||
|
CREATE TABLE `chatgpt_video_jobs` (
|
||||||
|
`id` int NOT NULL,
|
||||||
|
`user_id` int NOT NULL COMMENT '用户 ID',
|
||||||
|
`channel` varchar(100) NOT NULL COMMENT '渠道',
|
||||||
|
`task_id` varchar(100) NOT NULL COMMENT '任务 ID',
|
||||||
|
`task_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '原始任务信息',
|
||||||
|
`type` varchar(20) DEFAULT NULL COMMENT '任务类型,luma,runway,cogvideo',
|
||||||
|
`prompt` varchar(2000) NOT NULL COMMENT '提示词',
|
||||||
|
`prompt_ext` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '优化后提示词',
|
||||||
|
`cover_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '封面图地址',
|
||||||
|
`video_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '视频地址',
|
||||||
|
`water_url` varchar(512) DEFAULT NULL COMMENT '带水印的视频地址',
|
||||||
|
`progress` smallint DEFAULT '0' COMMENT '任务进度',
|
||||||
|
`publish` tinyint(1) NOT NULL COMMENT '是否发布',
|
||||||
|
`err_msg` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '错误信息',
|
||||||
|
`raw_data` text COMMENT '原始数据',
|
||||||
|
`power` smallint NOT NULL DEFAULT '0' COMMENT '消耗算力',
|
||||||
|
`created_at` datetime NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='MidJourney 任务表';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 转储表的索引
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_admin_users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_admin_users`
|
||||||
|
ADD PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
ADD UNIQUE KEY `username` (`username`) USING BTREE;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_api_keys`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_api_keys`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_app_types`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_app_types`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_chat_history`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_history`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD KEY `chat_id` (`chat_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_chat_items`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_items`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `chat_id` (`chat_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_chat_models`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_models`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_chat_roles`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_roles`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `marker` (`marker`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_configs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_configs`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `marker` (`marker`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_dall_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_dall_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_files`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_files`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_functions`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_functions`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `name` (`name`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_invite_codes`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_invite_codes`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `code` (`code`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_invite_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_invite_logs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_menus`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_menus`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_mj_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_mj_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `task_id` (`task_id`),
|
||||||
|
ADD KEY `message_id` (`message_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_orders`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_orders`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `order_no` (`order_no`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_power_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_power_logs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_products`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_products`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_redeems`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_redeems`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `code` (`code`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_sd_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_sd_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `task_id` (`task_id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_suno_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_suno_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_users`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `username` (`username`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_user_login_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_user_login_logs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 表的索引 `chatgpt_video_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_video_jobs`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 在导出的表使用AUTO_INCREMENT
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_admin_users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_admin_users`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=113;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_api_keys`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_api_keys`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_app_types`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_app_types`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_chat_history`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_history`
|
||||||
|
MODIFY `id` bigint NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_chat_items`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_items`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_chat_models`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_models`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_chat_roles`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_chat_roles`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=135;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_configs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_configs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_dall_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_dall_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_files`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_files`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_functions`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_functions`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_invite_codes`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_invite_codes`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_invite_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_invite_logs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_menus`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_menus`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_mj_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_mj_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_orders`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_orders`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_power_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_power_logs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_products`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_products`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_redeems`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_redeems`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_sd_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_sd_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_suno_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_suno_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_users`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_user_login_logs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_user_login_logs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- 使用表AUTO_INCREMENT `chatgpt_video_jobs`
|
||||||
|
--
|
||||||
|
ALTER TABLE `chatgpt_video_jobs`
|
||||||
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
@ -6,6 +6,6 @@ VUE_APP_ADMIN_USER=admin
|
|||||||
VUE_APP_ADMIN_PASS=admin123
|
VUE_APP_ADMIN_PASS=admin123
|
||||||
VUE_APP_KEY_PREFIX=GeekAI_DEV_
|
VUE_APP_KEY_PREFIX=GeekAI_DEV_
|
||||||
VUE_APP_TITLE="Geek-AI 创作系统"
|
VUE_APP_TITLE="Geek-AI 创作系统"
|
||||||
VUE_APP_VERSION=v4.1.7
|
VUE_APP_VERSION=v4.1.8
|
||||||
VUE_APP_DOCS_URL=https://docs.geekai.me
|
VUE_APP_DOCS_URL=https://docs.geekai.me
|
||||||
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
|
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
|
||||||
|
@ -2,6 +2,6 @@ VUE_APP_API_HOST=
|
|||||||
VUE_APP_WS_HOST=
|
VUE_APP_WS_HOST=
|
||||||
VUE_APP_KEY_PREFIX=GeekAI_
|
VUE_APP_KEY_PREFIX=GeekAI_
|
||||||
VUE_APP_TITLE="Geek-AI 创作系统"
|
VUE_APP_TITLE="Geek-AI 创作系统"
|
||||||
VUE_APP_VERSION=v4.1.7
|
VUE_APP_VERSION=v4.1.8
|
||||||
VUE_APP_DOCS_URL=https://docs.geekai.me
|
VUE_APP_DOCS_URL=https://docs.geekai.me
|
||||||
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
|
VUE_APP_GIT_URL=https://github.com/yangjian102621/geekai
|
||||||
|
19499
web/package-lock.json
generated
@ -8,8 +8,9 @@
|
|||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.1.0",
|
"@element-plus/icons-vue": "^2.3.1",
|
||||||
"@openai/realtime-api-beta": "github:openai/openai-realtime-api-beta",
|
"@openai/realtime-api-beta": "github:openai/openai-realtime-api-beta",
|
||||||
|
"animate.css": "^4.1.1",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"compressorjs": "^1.2.1",
|
"compressorjs": "^1.2.1",
|
||||||
@ -21,6 +22,7 @@
|
|||||||
"json-bigint": "^1.0.0",
|
"json-bigint": "^1.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"markdown-it": "^13.0.1",
|
"markdown-it": "^13.0.1",
|
||||||
|
"markdown-it-emoji": "^2.0.0",
|
||||||
"markdown-it-mathjax3": "^4.3.2",
|
"markdown-it-mathjax3": "^4.3.2",
|
||||||
"markmap-common": "^0.16.0",
|
"markmap-common": "^0.16.0",
|
||||||
"markmap-lib": "^0.16.1",
|
"markmap-lib": "^0.16.1",
|
||||||
@ -44,10 +46,13 @@
|
|||||||
"@vue/cli-plugin-babel": "~5.0.0",
|
"@vue/cli-plugin-babel": "~5.0.0",
|
||||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
"@vue/cli-service": "~5.0.0",
|
"@vue/cli-service": "~5.0.0",
|
||||||
|
"autoprefixer": "^10.4.20",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-plugin-vue": "^8.0.3",
|
"eslint-plugin-vue": "^8.0.3",
|
||||||
|
"postcss": "^8.4.49",
|
||||||
"stylus": "^0.58.1",
|
"stylus": "^0.58.1",
|
||||||
"stylus-loader": "^7.0.0",
|
"stylus-loader": "^7.0.0",
|
||||||
|
"tailwindcss": "^3.4.17",
|
||||||
"webpack": "^5.90.3"
|
"webpack": "^5.90.3"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
6
web/postcss.config.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
}
|
BIN
web/public/images/avatar/default.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 802 B After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 939 B After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 836 B After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.0 KiB |
@ -1,18 +1,19 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-cn">
|
<html lang="zh-cn" data-theme="light">
|
||||||
|
<head>
|
||||||
<head>
|
<meta charset="utf-8" />
|
||||||
<meta charset="utf-8">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
|
name="viewport"
|
||||||
|
content="width=device-width,initial-scale=1.0,user-scalable=no"
|
||||||
|
/>
|
||||||
<title>Geek-AI 创作助手</title>
|
<title>Geek-AI 创作助手</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
<strong>请开启JavaScript支持</strong>
|
<strong>请开启JavaScript支持</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
</body>
|
</body>
|
||||||
|
</html>
|
||||||
</html>
|
|
||||||
|
123
web/src/App.vue
@ -1,29 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-config-provider>
|
<el-config-provider>
|
||||||
<router-view/>
|
<router-view />
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {ElConfigProvider} from 'element-plus';
|
import { ElConfigProvider } from "element-plus";
|
||||||
import {onMounted, ref, watch} from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import {checkSession, getClientId, getSystemInfo} from "@/store/cache";
|
import { checkSession, getClientId, getSystemInfo } from "@/store/cache";
|
||||||
import {isChrome, isMobile} from "@/utils/libs";
|
import { isChrome, isMobile } from "@/utils/libs";
|
||||||
import {showMessageInfo} from "@/utils/dialog";
|
import { showMessageInfo } from "@/utils/dialog";
|
||||||
import {useSharedStore} from "@/store/sharedata";
|
import { useSharedStore } from "@/store/sharedata";
|
||||||
import {getUserToken} from "@/store/session";
|
import { getUserToken } from "@/store/session";
|
||||||
|
|
||||||
const debounce = (fn, delay) => {
|
const debounce = (fn, delay) => {
|
||||||
let timer
|
let timer;
|
||||||
return (...args) => {
|
return (...args) => {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
clearTimeout(timer)
|
clearTimeout(timer);
|
||||||
}
|
}
|
||||||
timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
fn(...args)
|
fn(...args);
|
||||||
}, delay)
|
}, delay);
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
const _ResizeObserver = window.ResizeObserver;
|
const _ResizeObserver = window.ResizeObserver;
|
||||||
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
|
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
|
||||||
@ -31,63 +31,69 @@ window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
|
|||||||
callback = debounce(callback, 200);
|
callback = debounce(callback, 200);
|
||||||
super(callback);
|
super(callback);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const store = useSharedStore()
|
const store = useSharedStore();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取系统参数
|
// 获取系统参数
|
||||||
getSystemInfo().then((res) => {
|
getSystemInfo().then((res) => {
|
||||||
const link = document.createElement('link')
|
const link = document.createElement("link");
|
||||||
link.rel = 'shortcut icon'
|
link.rel = "shortcut icon";
|
||||||
link.href = res.data.logo
|
link.href = res.data.logo;
|
||||||
document.head.appendChild(link)
|
document.head.appendChild(link);
|
||||||
})
|
});
|
||||||
if (!isChrome() && !isMobile()) {
|
if (!isChrome() && !isMobile()) {
|
||||||
showMessageInfo("建议使用 Chrome 浏览器以获得最佳体验。")
|
showMessageInfo("建议使用 Chrome 浏览器以获得最佳体验。");
|
||||||
}
|
}
|
||||||
|
|
||||||
checkSession().then(() => {
|
checkSession()
|
||||||
store.setIsLogin(true)
|
.then(() => {
|
||||||
}).catch(()=>{})
|
store.setIsLogin(true);
|
||||||
})
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
|
||||||
watch(() => store.isLogin, (val) => {
|
// 设置主题
|
||||||
if (val) {
|
document.documentElement.setAttribute("data-theme", store.theme);
|
||||||
connect()
|
});
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const handler = ref(0)
|
watch(
|
||||||
// 初始化 websocket 连接
|
() => store.isLogin,
|
||||||
const connect = () => {
|
(val) => {
|
||||||
let host = process.env.VUE_APP_WS_HOST
|
if (val) {
|
||||||
if (host === '') {
|
connect();
|
||||||
if (location.protocol === 'https:') {
|
|
||||||
host = 'wss://' + location.host;
|
|
||||||
} else {
|
|
||||||
host = 'ws://' + location.host;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const clientId = getClientId()
|
);
|
||||||
const _socket = new WebSocket(host + `/api/ws?client_id=${clientId}`,["token",getUserToken()]);
|
|
||||||
_socket.addEventListener('open', () => {
|
const handler = ref(0);
|
||||||
console.log('WebSocket 已连接')
|
// 初始化 websocket 连接
|
||||||
|
const connect = () => {
|
||||||
|
let host = process.env.VUE_APP_WS_HOST;
|
||||||
|
if (host === "") {
|
||||||
|
if (location.protocol === "https:") {
|
||||||
|
host = "wss://" + location.host;
|
||||||
|
} else {
|
||||||
|
host = "ws://" + location.host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const clientId = getClientId();
|
||||||
|
const _socket = new WebSocket(host + `/api/ws?client_id=${clientId}`, ["token", getUserToken()]);
|
||||||
|
_socket.addEventListener("open", () => {
|
||||||
|
console.log("WebSocket 已连接");
|
||||||
handler.value = setInterval(() => {
|
handler.value = setInterval(() => {
|
||||||
if (_socket.readyState === WebSocket.OPEN) {
|
if (_socket.readyState === WebSocket.OPEN) {
|
||||||
_socket.send(JSON.stringify({"type":"ping"}))
|
_socket.send(JSON.stringify({ type: "ping" }));
|
||||||
}
|
}
|
||||||
},5000)
|
}, 5000);
|
||||||
})
|
|
||||||
_socket.addEventListener('close', () => {
|
|
||||||
clearInterval(handler.value)
|
|
||||||
connect()
|
|
||||||
});
|
});
|
||||||
store.setSocket(_socket)
|
_socket.addEventListener("close", () => {
|
||||||
}
|
clearInterval(handler.value);
|
||||||
|
connect();
|
||||||
|
});
|
||||||
|
store.setSocket(_socket);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
html, body {
|
html, body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -102,6 +108,14 @@ html, body {
|
|||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
|
|
||||||
--primary-color: #21aa93
|
--primary-color: #21aa93
|
||||||
|
|
||||||
|
h1 { font-size: 2em; } /* 通常是 2em */
|
||||||
|
h2 { font-size: 1.5em; } /* 通常是 1.5em */
|
||||||
|
h3 { font-size: 1.17em; } /* 通常是 1.17em */
|
||||||
|
h4 { font-size: 1em; } /* 通常是 1em */
|
||||||
|
h5 { font-size: 0.83em; } /* 通常是 0.83em */
|
||||||
|
h6 { font-size: 0.67em; } /* 通常是 0.67em */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-overlay-dialog {
|
.el-overlay-dialog {
|
||||||
@ -137,4 +151,5 @@ html, body {
|
|||||||
color #07C160
|
color #07C160
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@import '@/assets/iconfont/iconfont.css'
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,14 +1,74 @@
|
|||||||
.el-form-item__content {
|
.form {
|
||||||
.tip-input {
|
.el-form-item__label {
|
||||||
display flex
|
.label-title {
|
||||||
width 100%
|
display flex
|
||||||
|
align-items center
|
||||||
|
|
||||||
.el-input, .el-select, .el-switch {
|
.el-icon {
|
||||||
margin-right 10px
|
margin-left 5px
|
||||||
}
|
cursor pointer
|
||||||
|
}
|
||||||
.info {
|
|
||||||
margin-top 2px
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
.el-form-item__content {
|
||||||
|
width 100%
|
||||||
|
|
||||||
|
.uploader-icon {
|
||||||
|
font-size 24px
|
||||||
|
position relative
|
||||||
|
top 3px
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip-input-line {
|
||||||
|
.tip {
|
||||||
|
margin-top 10px
|
||||||
|
color #c1c1c1
|
||||||
|
font-size 12px;
|
||||||
|
line-height 1.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input {
|
||||||
|
width 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size 14px
|
||||||
|
}
|
||||||
|
|
||||||
|
.active-info {
|
||||||
|
line-height 1.5
|
||||||
|
padding 10px 0 30px 0
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-descriptions {
|
||||||
|
margin-bottom 20px
|
||||||
|
|
||||||
|
.el-icon {
|
||||||
|
font-size 18px
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected {
|
||||||
|
color #0bc15f
|
||||||
|
}
|
||||||
|
|
||||||
|
.closed {
|
||||||
|
color #da0d54
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
margin-left 10px
|
||||||
|
font-size 12px
|
||||||
|
color #999999
|
||||||
|
position: relative;
|
||||||
|
top -5px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-alert {
|
||||||
|
margin-bottom 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -51,6 +51,6 @@
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.page-apps .inner .list-box .app-item:hover {
|
.page-apps .inner .list-box .app-item:hover {
|
||||||
box-shadow: 0 0 10px rgba(71,255,241,0.6); /* 添加阴影效果 */
|
box-shadow: 0 0 10px var(--shadow-color); /* 添加阴影效果 */
|
||||||
transform: translateY(-10px); /* 向上移动10像素 */
|
transform: translateY(-10px); /* 向上移动10像素 */
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,38 @@
|
|||||||
.page-apps {
|
.page-apps {
|
||||||
background-color: #282c34;
|
// background-color: #282c34;
|
||||||
height 100%
|
height 100%
|
||||||
|
|
||||||
.apps-type-nav{
|
.apps-type-nav{
|
||||||
height 43px
|
height 50px
|
||||||
padding 8px 0;
|
padding 8px 0;
|
||||||
margin-bottom 3px
|
margin 10px auto
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollbar-type-nav{
|
.scrollbar-type-nav{
|
||||||
display flex
|
display flex
|
||||||
align-items center
|
align-items center
|
||||||
height 43px
|
|
||||||
padding 0 5px
|
padding 2px
|
||||||
|
background-color #f4f1f7
|
||||||
|
width fit-content
|
||||||
|
border 1px solid rgba(79,89,102,.078)
|
||||||
|
border-radius: 20px
|
||||||
|
margin: 0 auto
|
||||||
|
// background: var(--chat-bg);
|
||||||
|
// width 100%
|
||||||
li{
|
li{
|
||||||
flex-shrink 0
|
flex-shrink 0
|
||||||
display flex
|
display flex
|
||||||
align-items center
|
align-items center
|
||||||
justify-content center
|
justify-content center
|
||||||
margin 0 10px
|
margin 5px 8px
|
||||||
height 26px
|
height 26px
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
border 1px solid rgb(80,80,80)
|
// border 1px solid rgb(80,80,80)
|
||||||
padding 2px 12px
|
padding 2px 12px
|
||||||
background rgba(60,60,60 0.9)
|
// background rgba(60,60,60 0.9)
|
||||||
color #fff
|
color var(--theme-text-tertiary)
|
||||||
|
font-weight: bold
|
||||||
font-size 14px
|
font-size 14px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
@ -34,9 +42,12 @@
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
margin-right 5px
|
margin-right 5px
|
||||||
border-radius 50%
|
border-radius 50%
|
||||||
|
|
||||||
}
|
}
|
||||||
&.active{
|
&.active{
|
||||||
background #21aa93;
|
background #fff;
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
border-radius 20px
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -53,16 +64,24 @@
|
|||||||
.item {
|
.item {
|
||||||
display flex
|
display flex
|
||||||
flex-flow row
|
flex-flow row
|
||||||
border 1px solid rgb(80,80,80)
|
// border 1px solid rgb(80,80,80)
|
||||||
padding 10px
|
padding 10px
|
||||||
background rgba(60,60,60 0.5)
|
background: var(--chat-bg);
|
||||||
|
border-radius 8px
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
width 80px
|
width 80px
|
||||||
height 80px
|
height 80px
|
||||||
min-width 80px
|
min-width 80px
|
||||||
border-radius 5px
|
border-radius 50%
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
object-fit: contain
|
||||||
|
display: flex
|
||||||
|
align-items center
|
||||||
|
justify-content center
|
||||||
|
flex-shrink 0
|
||||||
|
border: 2px solid #f5f7fd
|
||||||
|
background: #fff
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
@ -75,7 +94,7 @@
|
|||||||
text-align left
|
text-align left
|
||||||
|
|
||||||
.info-title {
|
.info-title {
|
||||||
color var(--el-text-color)
|
color: var(--text-theme-color)
|
||||||
font-size 1.25rem
|
font-size 1.25rem
|
||||||
line-height 1.75rem
|
line-height 1.75rem
|
||||||
letter-spacing: .025em;
|
letter-spacing: .025em;
|
||||||
@ -94,9 +113,10 @@
|
|||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
height 34px
|
height 50px
|
||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
color #999999
|
color var(--text-fb)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,37 +1,33 @@
|
|||||||
$sideBgColor = #252526;
|
|
||||||
$borderColor = #4676d0;
|
|
||||||
#app {
|
#app {
|
||||||
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.chat-page {
|
.chat-page {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
:deep (.el-message-box__message){
|
||||||
|
font-size: 18px !important
|
||||||
|
}
|
||||||
|
.newChat{
|
||||||
|
margin-bottom: 10px
|
||||||
|
}
|
||||||
// left side
|
// left side
|
||||||
|
.el-container{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
.el-aside {
|
.el-aside {
|
||||||
//background-color: $sideBgColor;
|
|
||||||
padding 10px
|
padding 10px
|
||||||
width var(--el-aside-width, 320px)
|
width var(--el-aside-width, 320px)
|
||||||
|
|
||||||
.media-page {
|
.media-page {
|
||||||
display: flex
|
display: flex
|
||||||
flex-flow: column
|
flex-flow: column
|
||||||
//background-color: $sideBgColor
|
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
padding 10px 0
|
padding 10px 0
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
padding: 10px 0;
|
margin-bottom: 10px
|
||||||
|
|
||||||
.search-input {
|
|
||||||
--el-input-bg-color: #363535
|
|
||||||
--el-input-border-color: #464545
|
|
||||||
--el-input-focus-border-color: #47fff1
|
|
||||||
--el-input-hover-border-color: #2DA39A
|
|
||||||
box-shadow: none
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 隐藏滚动条
|
// 隐藏滚动条
|
||||||
@ -51,14 +47,14 @@ $borderColor = #4676d0;
|
|||||||
width: 100%
|
width: 100%
|
||||||
justify-content: flex-start
|
justify-content: flex-start
|
||||||
padding: 8px 12px
|
padding: 8px 12px
|
||||||
//border-bottom: 1px solid #3c3c3c
|
//border: 1px solid #3c3c3c
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
border: 1px solid #3c3c3c
|
border: 1px solid var(--theme-bg-color)
|
||||||
margin-bottom 6px
|
margin-bottom 6px
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #343540
|
border: 1px solid var(--border-active);
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
@ -78,7 +74,7 @@ $borderColor = #4676d0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chat-title {
|
.chat-title {
|
||||||
color: #c1c1c1
|
color: var(--el-text-color-regular);
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
max-width 220px;
|
max-width 220px;
|
||||||
font-size 14px;
|
font-size 14px;
|
||||||
@ -92,10 +88,11 @@ $borderColor = #4676d0;
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: 2px;
|
right: 2px;
|
||||||
top: 16px;
|
top: 16px;
|
||||||
color #ffffff
|
color var(--text-fb)
|
||||||
|
|
||||||
|
|
||||||
.el-dropdown-link {
|
.el-dropdown-link {
|
||||||
color #ffffff
|
color var(--text-fb)
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-icon {
|
.el-icon {
|
||||||
@ -105,8 +102,9 @@ $borderColor = #4676d0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chat-list-item.active {
|
.chat-list-item.active {
|
||||||
background-color: #343540;
|
background-color :var(--theme-bg);
|
||||||
border-color #21aa93
|
box-shadow: 0 3px 9px rgba(112, 144, 176, 0.12);
|
||||||
|
border: 1px solid var(--border-active);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,7 +114,7 @@ $borderColor = #4676d0;
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top 12px
|
padding-top 12px
|
||||||
border-top 1px solid #3c3c3c;
|
// border-top 0.5px solid var(--el-border-color);
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
margin-right 5px
|
margin-right 5px
|
||||||
@ -133,15 +131,15 @@ $borderColor = #4676d0;
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background-color: var(--el-bg-color)
|
background-color: var(--el-bg-color)
|
||||||
color var(--el-text-color-primary)
|
color var(--text-fb)
|
||||||
|
|
||||||
.chat-config {
|
.chat-config {
|
||||||
height 30px
|
height 50px
|
||||||
padding 10px 30px
|
padding 10px 30px
|
||||||
display flex
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
justify-items center
|
justify-items center
|
||||||
border-bottom 1px solid #d9d9e3
|
// border-bottom 1px solid var(--el-border-color);
|
||||||
|
|
||||||
.role-select-label {
|
.role-select-label {
|
||||||
color #ffffff
|
color #ffffff
|
||||||
@ -157,18 +155,22 @@ $borderColor = #4676d0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.setting {
|
.setting {
|
||||||
padding 5px
|
// padding 5px
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
background-color #f2f2f2
|
width: 26px;
|
||||||
margin-right 10px
|
height: 26px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 26px;
|
||||||
|
// background-color #f2f2f2
|
||||||
|
// margin-right 10px
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-size 18px
|
font-size 16px
|
||||||
color #19c37d
|
color var(--el-color-primary)
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #D5FAD3
|
background-color var(--text--hover)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +185,8 @@ $borderColor = #4676d0;
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position relative
|
position relative
|
||||||
|
background: var(--chat-bg)
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 12px /* 滚动条宽度 */
|
width: 12px /* 滚动条宽度 */
|
||||||
background #F1F1F1
|
background #F1F1F1
|
||||||
@ -205,6 +208,8 @@ $borderColor = #4676d0;
|
|||||||
.chat-box {
|
.chat-box {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
//border-bottom: 1px solid #4f4f4f
|
//border-bottom: 1px solid #4f4f4f
|
||||||
|
scrollbar-width: none; /* 隐藏滚动条(Firefox) */
|
||||||
|
-ms-overflow-style: none; /* 隐藏滚动条(IE、Edge) */
|
||||||
|
|
||||||
// 变量定义
|
// 变量定义
|
||||||
--content-font-size: 16px;
|
--content-font-size: 16px;
|
||||||
@ -217,8 +222,12 @@ $borderColor = #4676d0;
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none; /* 隐藏滚动条(Webkit 浏览器) */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-box {
|
.input-box {
|
||||||
@ -228,10 +237,11 @@ $borderColor = #4676d0;
|
|||||||
|
|
||||||
.input-box-inner {
|
.input-box-inner {
|
||||||
display flex
|
display flex
|
||||||
background-color: #ffffff
|
background-color:var(--chat-bg);
|
||||||
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
|
// box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
|
||||||
padding 0 15px;
|
padding 0 15px;
|
||||||
|
|
||||||
.tool-item {
|
.tool-item {
|
||||||
@ -243,7 +253,7 @@ $borderColor = #4676d0;
|
|||||||
justify-items center
|
justify-items center
|
||||||
padding 6px
|
padding 6px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
background #F2F2F2
|
// background #F2F2F2
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background #D5FAD3
|
background #D5FAD3
|
||||||
@ -274,13 +284,17 @@ $borderColor = #4676d0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input-border {
|
.input-border {
|
||||||
display flex
|
// display flex
|
||||||
width 100%
|
width 100%
|
||||||
overflow hidden
|
overflow hidden
|
||||||
border: 2px solid #21AA93
|
border: 2px solid var( --theme-border-primary)
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
padding 10px
|
padding 10px
|
||||||
background-color #F4F4F4
|
// background-color #F4F4F4
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
border-color var(--theme-border-hover)
|
||||||
|
}
|
||||||
|
|
||||||
.input-inner {
|
.input-inner {
|
||||||
display flex
|
display flex
|
||||||
@ -296,6 +310,7 @@ $borderColor = #4676d0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prompt-input {
|
.prompt-input {
|
||||||
|
min-height: 58px;
|
||||||
width 100%
|
width 100%
|
||||||
line-height: 24px
|
line-height: 24px
|
||||||
border none
|
border none
|
||||||
@ -312,12 +327,35 @@ $borderColor = #4676d0;
|
|||||||
.send-btn {
|
.send-btn {
|
||||||
width 32px
|
width 32px
|
||||||
margin-left 10px
|
margin-left 10px
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
padding 8px 5px;
|
padding 8px 5px;
|
||||||
border-radius 6px;
|
border-radius 6px;
|
||||||
font-size 20px;
|
font-size 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.little-btns{
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.iconfont{
|
||||||
|
font-size: 19px;
|
||||||
|
cursor pointer
|
||||||
|
background-color: var(--chat-content-bg);
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-new{
|
||||||
|
.el-icon{
|
||||||
|
font-size: 20px;
|
||||||
|
color: #754ff6;
|
||||||
|
}
|
||||||
|
cursor:pointer
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -380,7 +418,8 @@ $borderColor = #4676d0;
|
|||||||
width 40px
|
width 40px
|
||||||
height 40px
|
height 40px
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
background-color #ffffff
|
background-color:var(--chat-content-bg);
|
||||||
|
color:var(--theme-text-color-primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,9 +456,13 @@ $borderColor = #4676d0;
|
|||||||
line-height 1.8
|
line-height 1.8
|
||||||
font-size 16px
|
font-size 16px
|
||||||
overflow auto
|
overflow auto
|
||||||
height 100%
|
height: 70vh
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.dialog-footer{
|
||||||
|
margin-right: 22px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,4 +479,5 @@ $borderColor = #4676d0;
|
|||||||
.el-icon {
|
.el-icon {
|
||||||
margin-left 5px;
|
margin-left 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
153
web/src/assets/css/common.styl
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
:root{
|
||||||
|
--sm-txt:rgba(163, 174, 208, 1);
|
||||||
|
--text-secondary: #8a939d;
|
||||||
|
--el-color-primary: rgb(107, 80, 225);
|
||||||
|
--van-primary-color:rgb(107, 80, 225);
|
||||||
|
--theme-textcolor-normal:#b0a0f8;
|
||||||
|
--el-border-radius-base: 5px;
|
||||||
|
--el-color-primary-light-5:rgb(107, 85, 255);
|
||||||
|
--el-color-primary-light-3:rgb(78, 51, 254);
|
||||||
|
--theme-btn-color:rgba(117, 81, 255, 1)
|
||||||
|
--common-text-color:#6e4ef9;
|
||||||
|
--el-component-size: 36px;
|
||||||
|
--el-color-primary-dark-2:rgb(169 152 247);
|
||||||
|
--el-button-active-border-color:rgb(169 152 247);
|
||||||
|
--el-color-success-light-9:#EAFFFC;
|
||||||
|
--el-color-success-light-8:#A7F0D9;
|
||||||
|
--el-message-text-color:#0ECD8B;
|
||||||
|
--el-color-success:#0ECD8B;
|
||||||
|
|
||||||
|
--text-fff:#fff
|
||||||
|
--theme-border-primary: rgba(86, 86, 95, .322); //主题边框颜色
|
||||||
|
--theme-border-hover: rgb(107, 85, 255);//主题边框hover颜色
|
||||||
|
--text--hover:rgba(215, 211, 240, 0.581) //主题色hover色系
|
||||||
|
--el-input-focus-border-color: #b0a0f8;
|
||||||
|
--little-btn-bg:#e9d3f6;
|
||||||
|
--gray-btn-bg:#ededf591;
|
||||||
|
// --a-link-color: #3561ff
|
||||||
|
--a-link-color: #6e8eff
|
||||||
|
--shadow-color:rgba(223,71,255,0.6)
|
||||||
|
--sm-btn-bg:#6052ed;
|
||||||
|
--theme-text-tertiary: #595959;
|
||||||
|
--theme-btn-fill-tertiary: #f0ebff;
|
||||||
|
--theme-text-btn-tertiary: #6841ea;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// #e7e7e8
|
||||||
|
}
|
||||||
|
.el-dialog{
|
||||||
|
//--el-border-radius-base: calc(var(--el-component-size) / 2);
|
||||||
|
--el-dialog-border-radius: 10px
|
||||||
|
}
|
||||||
|
.login-box{
|
||||||
|
--el-component-size: 48px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn-go{
|
||||||
|
background: var(--btnColor);
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
&:hover{
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn-normal{
|
||||||
|
background: var(--theme-btn-color);
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
&:hover{
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.flex{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.flex-center{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.flex-between{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.theme-color-primary{
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
.text-color-primary{
|
||||||
|
color:var(--text-color-primary)
|
||||||
|
}
|
||||||
|
.w100{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.el-input__wrapper{
|
||||||
|
background: var( --card-bg)
|
||||||
|
}
|
||||||
|
.el-dialog__title{
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
.el-button--primary{
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
height auto
|
||||||
|
}
|
||||||
|
/* 设置滚动条的宽度 */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 12px; /* 垂直滚动条宽度 */
|
||||||
|
height: 12px; /* 水平滚动条高度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 滚动条的轨道背景颜色 */
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: #f1f1f1 !important; /* 滚动条轨道颜色 */
|
||||||
|
border-radius: 6px; /* 可选:轨道圆角 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 滚动条滑块的颜色 */
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: #888 !important; /* 滑块颜色 */
|
||||||
|
border-radius: 6px; /* 可选:滑块圆角 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 鼠标悬停在滑块上的颜色 */
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: #555; /* 悬停时的滑块颜色 */
|
||||||
|
}
|
||||||
|
//.el-message-box
|
||||||
|
.el-message-box{
|
||||||
|
--el-messagebox-border-radius: 10px
|
||||||
|
}
|
||||||
|
.el-message-box__container{
|
||||||
|
//border-top: 1px solid #dbd3f4;
|
||||||
|
padding-top: 7px;
|
||||||
|
.el-message-box__message{
|
||||||
|
--text-color:var(--theme-text-color-primary)
|
||||||
|
font-size: 16px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.sm-btn-theme{
|
||||||
|
background-color: var(--theme-btn-fill-tertiary) !important;
|
||||||
|
color: var(--theme-text-btn-tertiary) !important;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-tag, .el-tag.el-tag--primary{
|
||||||
|
--el-tag-bg-color:#f0ebff
|
||||||
|
}
|
||||||
|
.box-card{
|
||||||
|
padding: 20px;
|
||||||
|
background-color: var(--chat-bg);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.el-table th.el-table__cell {
|
||||||
|
background-color: var(--chat-bg)
|
||||||
|
}
|
@ -1,13 +1,18 @@
|
|||||||
.custom-scroll ::-webkit-scrollbar {
|
.custom-scroll ::-webkit-scrollbar {
|
||||||
width: 8px; /* 滚动条宽度 */
|
width: 8px; /* 滚动条宽度 */
|
||||||
|
display:none;
|
||||||
}
|
}
|
||||||
.custom-scroll ::-webkit-scrollbar-track {
|
.custom-scroll ::-webkit-scrollbar-track {
|
||||||
background-color: #282c34;
|
background-color: #282c34;
|
||||||
|
display:none;
|
||||||
}
|
}
|
||||||
.custom-scroll ::-webkit-scrollbar-thumb {
|
.custom-scroll ::-webkit-scrollbar-thumb {
|
||||||
background-color: #444;
|
background-color: #444;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
display:none;
|
||||||
}
|
}
|
||||||
.custom-scroll ::-webkit-scrollbar-thumb:hover {
|
.custom-scroll ::-webkit-scrollbar-thumb:hover {
|
||||||
background-color: #666;
|
background-color: #666;
|
||||||
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,4 +23,15 @@
|
|||||||
::-webkit-scrollbar-thumb:hover {
|
::-webkit-scrollbar-thumb:hover {
|
||||||
background-color: #666666;
|
background-color: #666666;
|
||||||
}
|
}
|
||||||
|
overflow: auto; /* 保持滚动功能 */
|
||||||
|
scrollbar-width: none; /* 隐藏滚动条(Firefox) */
|
||||||
|
-ms-overflow-style: none; /* 隐藏滚动条(IE、Edge) */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none; /* 隐藏滚动条(Webkit 浏览器) */
|
||||||
|
}
|
||||||
|
&.showScrollbar {
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: none; /* 隐藏滚动条(Webkit 浏览器) */
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
24
web/src/assets/css/font.styl
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: "OPlusSans3-Regular";
|
||||||
|
src: url("../fonts/OPlusSans3-Regular.ttf") format("truetype");
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "OPlusSans3-Medium";
|
||||||
|
src: url("../fonts/OPlusSans3-Medium.ttf") format("truetype");
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
$font-regular = "OPlusSans3-Regular", "PingFangSC-Regular", "Roboto", "sans-serif";
|
||||||
|
$font-medium = "OPlusSans3-Medium", "PingFangSC-Medium", "Roboto", "sans-serif";
|
||||||
|
|
||||||
|
.font-regular {
|
||||||
|
font-family: $font-regular;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font-medium {
|
||||||
|
font-family: $font-medium;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
@ -1,166 +1,240 @@
|
|||||||
.home {
|
.layout{
|
||||||
display: flex;
|
display: flex;
|
||||||
height 100vh
|
position: relative;
|
||||||
width 100%
|
height: 100vh;
|
||||||
flex-flow column
|
.big-top-title{
|
||||||
|
padding-top: 10px;
|
||||||
.header {
|
}
|
||||||
display flex
|
.top-collapse{
|
||||||
justify-content space-between
|
padding-top: 10px
|
||||||
height 50px
|
img{
|
||||||
line-height 50px
|
width 24px !important
|
||||||
background-color #1E1F22
|
height: 24px !important
|
||||||
padding-right 20px
|
|
||||||
|
|
||||||
.banner {
|
|
||||||
display flex
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
display flex
|
|
||||||
padding 5px
|
|
||||||
cursor pointer
|
|
||||||
|
|
||||||
.el-image {
|
|
||||||
width 48px
|
|
||||||
height 48px
|
|
||||||
border-radius 50%
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
display: flex;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 20px;
|
|
||||||
padding 0 10px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
|
||||||
display flex
|
|
||||||
flex-flow row
|
|
||||||
|
|
||||||
.link-button {
|
|
||||||
margin-right 15px
|
|
||||||
color #e1e1e1
|
|
||||||
padding 0 10px
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color #414141
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
font-size 24px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info {
|
|
||||||
width 100%
|
|
||||||
padding 5px 0;
|
|
||||||
|
|
||||||
.el-dropdown-link {
|
|
||||||
width 100%;
|
|
||||||
cursor: pointer
|
|
||||||
display flex
|
|
||||||
|
|
||||||
.el-image {
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
border-radius: 50%
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon {
|
|
||||||
color: #cccccc;
|
|
||||||
line-height 24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tab-box{
|
||||||
|
align-items: center
|
||||||
.main {
|
background-color: var(--card-bg)
|
||||||
width 100%
|
// height: 100%
|
||||||
display flex
|
// position: fixed;
|
||||||
flex-flow row
|
height: 100vh;
|
||||||
|
.title{
|
||||||
.navigator {
|
font-size: 28px
|
||||||
display flex
|
height: 40px
|
||||||
flex-flow column
|
width 120px
|
||||||
width 60px
|
text-align: center;
|
||||||
padding 10px 1px
|
word-wrap break-all;
|
||||||
border-right: 1px solid #3c3c3c
|
overflow hidden
|
||||||
background-color: #1E1F22
|
font-weight: 700
|
||||||
|
color:var(--text-theme-color)
|
||||||
.nav-items {
|
|
||||||
margin-top: 10px;
|
|
||||||
padding 0 5px
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin-bottom 15px
|
|
||||||
display flex
|
|
||||||
flex-flow column
|
|
||||||
|
|
||||||
a {
|
|
||||||
color #DADBDC
|
|
||||||
border-radius 10px
|
|
||||||
width 48px
|
|
||||||
height 48px
|
|
||||||
display flex
|
|
||||||
justify-content center
|
|
||||||
align-items center
|
|
||||||
cursor pointer
|
|
||||||
background-color #414348
|
|
||||||
|
|
||||||
.el-image {
|
|
||||||
border-radius 10px
|
|
||||||
}
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
font-size 20px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover, a.active {
|
|
||||||
color #47fff1
|
|
||||||
background-color #0F7A71
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 12px
|
|
||||||
padding-top: 6px
|
|
||||||
color: #e5e7eb;
|
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap; /* 防止文本换行 */
|
|
||||||
overflow: hidden; /* 隐藏溢出内容 */
|
|
||||||
text-overflow: unset; /* 使用省略号表示溢出内容 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.active {
|
|
||||||
color #47fff1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
img{
|
||||||
.content {
|
height: 44px
|
||||||
width: 100%
|
object-fit: cover
|
||||||
overflow auto
|
border-radius: 50%
|
||||||
box-sizing: border-box
|
border: 2px solid #754ff6;
|
||||||
background-color #282c34
|
background: #fff
|
||||||
}
|
}
|
||||||
|
.marr{
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.flex-center-col{
|
||||||
|
display flex
|
||||||
|
align-items center
|
||||||
|
flex-direction column
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-size 22px
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-expand {
|
||||||
|
font-size 24px
|
||||||
|
margin-bottom 10px
|
||||||
|
cursor pointer
|
||||||
|
color var(--text-color)
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-colspan {
|
||||||
|
font-size 18px
|
||||||
|
margin-left 3px
|
||||||
|
cursor pointer
|
||||||
|
color var(--text-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.menu-list-collapse{
|
||||||
|
.flex-center-col{
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
.menu-list-item{
|
||||||
|
|
||||||
|
height: 38px;
|
||||||
|
line-height: 38px;
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-size 16px
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.menu-list-item:hover,
|
||||||
|
.active{
|
||||||
|
background: rgba(79, 89, 102, .122);
|
||||||
|
|
||||||
|
border-radius: 8px;
|
||||||
|
.el-icon{
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menu-title{
|
||||||
|
font-size: 15px !important;
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.openicon{
|
||||||
|
font-size: 40px;
|
||||||
|
color: #754ff6;
|
||||||
|
}
|
||||||
|
.menuIcon{
|
||||||
|
.openicon{
|
||||||
|
font-size: 28px;
|
||||||
|
color: #754ff6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menu-list{
|
||||||
|
margin-top: 20px;
|
||||||
|
.svg-icon{
|
||||||
|
svg{
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menu-list-item{
|
||||||
|
// margin-bottom: 10px;
|
||||||
|
margin: 0 8px 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-weight: 550;
|
||||||
|
&:hover{
|
||||||
|
.el-icon{
|
||||||
|
background: rgba(79, 89, 102, .122);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.el-icon{
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
padding: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 50%;
|
||||||
|
font-size: 20px;
|
||||||
|
// img{
|
||||||
|
// width: 24px;
|
||||||
|
// height: 24px;
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
&.active{
|
||||||
|
color: var(--text-color);
|
||||||
|
font-weight: 700;
|
||||||
|
filter: none !important;
|
||||||
|
.el-icon{
|
||||||
|
background: rgba(79, 89, 102, .122);
|
||||||
|
filter: invert(100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.bot{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 6px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.bot-line{
|
||||||
|
|
||||||
|
width : 100%;
|
||||||
|
height: 1px;
|
||||||
|
background: var(--line-box)
|
||||||
|
margin: 20px 0 10px 0;
|
||||||
|
}
|
||||||
|
.menu-title{
|
||||||
|
font-size: 12px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.icon-house,
|
||||||
|
.icon-github{
|
||||||
|
font-size: 20px;
|
||||||
|
color: #754ff6;
|
||||||
|
cursor pointer
|
||||||
|
}
|
||||||
|
.menu-bot-item{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
a{
|
||||||
|
// margin-right: 46px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep(.theme-box){
|
||||||
|
position: relative !important;
|
||||||
|
right: initial;
|
||||||
|
bottom: initial;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
.iconfont{
|
||||||
|
font-size: 15px !important;}
|
||||||
|
}
|
||||||
|
.right-main{
|
||||||
|
height: 100%;
|
||||||
|
// background: #f5f7fd;
|
||||||
|
background: var(--theme-bg-all);
|
||||||
|
// background-image: linear-gradient(180deg, rgba(247, 232, 255, .54), rgba(191, 223, 255, .35));
|
||||||
|
width: 100%;
|
||||||
|
.loginMask{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
.topheader{
|
||||||
|
display: flex;
|
||||||
|
position: fixed;
|
||||||
|
right: 8px;
|
||||||
|
z-index : 999;
|
||||||
|
top:0;
|
||||||
|
// width 100%;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
.btn-go{
|
||||||
|
background: #754ff6;
|
||||||
|
margin: 10px 10px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.el-popper {
|
.el-popper {
|
||||||
.more-menus {
|
.more-menus {
|
||||||
li {
|
li {
|
||||||
padding 10px 15px
|
padding: 0px 15px;
|
||||||
cursor pointer
|
cursor: pointer;
|
||||||
border-radius 5px
|
border-radius: 5px;
|
||||||
margin 5px 0
|
margin: 5px 0;
|
||||||
|
height: 38px;
|
||||||
|
line-height: 38px;
|
||||||
|
|
||||||
.el-image {
|
.el-image {
|
||||||
position: relative
|
position: relative
|
||||||
@ -169,26 +243,49 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #f1f1f1
|
background: rgba(79, 89, 102, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
li.active {
|
li.active {
|
||||||
background-color #f1f1f1
|
background: rgba(79, 89, 102, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.setting-menus{
|
||||||
.user-info-menu {
|
.title{
|
||||||
li {
|
color: #222226;
|
||||||
a {
|
|
||||||
width 100%
|
|
||||||
justify-content left
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
text-decoration none !important
|
|
||||||
color var(--el-primary-text-color)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.el-icon,
|
||||||
|
.iconfont{
|
||||||
|
font-size: 18px
|
||||||
|
margin-right: 6px
|
||||||
|
}
|
||||||
|
color: #222226;
|
||||||
}
|
}
|
||||||
|
.username{
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.rightHeightMax{
|
||||||
|
height: 100vh;
|
||||||
|
max-height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
}
|
||||||
|
.rightHeight{
|
||||||
|
height: calc(100vh - 42px);
|
||||||
|
max-height: calc(100vh - 42px);
|
||||||
|
overflow: hidden;
|
||||||
|
.content{
|
||||||
|
padding-top: 42px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
height: 100%;
|
||||||
|
overflow: scroll;
|
||||||
}
|
}
|
@ -1,25 +1,25 @@
|
|||||||
.page-dall {
|
.page-dall {
|
||||||
background-color: #282c34;
|
// background-color: #282c34;
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.sd-box {
|
.sd-box {
|
||||||
margin 10px
|
margin 10px
|
||||||
background-color #262626
|
// background-color #262626
|
||||||
border 1px solid #454545
|
// border 1px solid #454545
|
||||||
min-width 300px
|
min-width 300px
|
||||||
max-width 300px
|
max-width 300px
|
||||||
padding 10px
|
padding 10px
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
color #ffffff;
|
color var(--text-theme-color);
|
||||||
font-size 14px
|
font-size 14px
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size 20px
|
font-size 20px
|
||||||
text-align center
|
text-align center
|
||||||
color #47fff1
|
color#b0a0f8
|
||||||
}
|
}
|
||||||
|
|
||||||
// 隐藏滚动条
|
// 隐藏滚动条
|
||||||
@ -66,25 +66,23 @@
|
|||||||
text-align center
|
text-align center
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
width 100%
|
width 200px
|
||||||
|
|
||||||
span {
|
|
||||||
color #2D3A4B
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form {
|
.el-form {
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-list-box {
|
.task-list-box {
|
||||||
|
background: var(--chat-bg);
|
||||||
width 100%
|
width 100%
|
||||||
padding 10px
|
color var(--text-theme-color)
|
||||||
color #ffffff
|
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
|
|
||||||
.task-list-inner {
|
.task-list-inner {
|
||||||
@ -93,26 +91,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-tabs__item {
|
.el-tabs__item {
|
||||||
color: #fff;
|
color: var(--text-theme-color);
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-tabs .el-tabs__item.is-active {
|
.title-tabs .el-tabs__item.is-active {
|
||||||
color: #47FFF1;
|
color:#b0a0f8;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-tabs .el-tabs__active-bar {
|
.title-tabs .el-tabs__active-bar {
|
||||||
background-color: #47FFF1;
|
background-color:#b0a0f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-textarea {
|
.el-textarea {
|
||||||
--el-input-focus-border-color: #47FFF1;
|
// --el-input-focus-border-color:#b0a0f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-textarea__inner {
|
.el-textarea__inner {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: #fff;
|
color: var(--text-theme-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input__wrapper {
|
.el-input__wrapper {
|
||||||
@ -141,7 +139,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 图片上传样式
|
// 图片上传样式
|
||||||
|
@ -365,7 +365,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.page-mj .inner .task-list-box .task-list-inner .job-list-box .finish-job-list .animate:hover {
|
.page-mj .inner .task-list-box .task-list-inner .job-list-box .finish-job-list .animate:hover {
|
||||||
box-shadow: 0 0 10px rgba(71,255,241,0.6); /* 添加阴影效果 */
|
box-shadow: 0 0 10px rgba(223,71,255,0.6); /* 添加阴影效果 */
|
||||||
transform: translateY(-10px); /* 向上移动10像素 */
|
transform: translateY(-10px); /* 向上移动10像素 */
|
||||||
}
|
}
|
||||||
.page-mj .inner .task-list-box .task-list-inner .job-list-box .el-image {
|
.page-mj .inner .task-list-box .task-list-inner .job-list-box .el-image {
|
||||||
|
@ -1,26 +1,30 @@
|
|||||||
.page-mj {
|
.page-mj {
|
||||||
background-color: #282c34;
|
// background-color: #282c34;
|
||||||
height 100%
|
height 100%
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
// height: 100%
|
||||||
|
|
||||||
.mj-box {
|
.mj-box {
|
||||||
margin 10px
|
margin 10px
|
||||||
background-color #262626
|
// background-color #262626
|
||||||
border 1px solid #454545
|
// border 1px solid #454545
|
||||||
|
// height: calc(100vh - 50px)
|
||||||
|
// overflow: scroll
|
||||||
min-width 300px
|
min-width 300px
|
||||||
max-width 300px
|
max-width 300px
|
||||||
padding 10px
|
padding 10px
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
color #ffffff;
|
color var(--text-theme-color);
|
||||||
font-size 14px
|
font-size 14px
|
||||||
|
overflow auto
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size 20px
|
font-size 20px
|
||||||
text-align center
|
text-align center
|
||||||
color #47fff1
|
color var( --theme-textcolor-normal)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 隐藏滚动条
|
// 隐藏滚动条
|
||||||
@ -44,16 +48,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.grid-content {
|
.grid-content {
|
||||||
background-color #383838
|
// background-color #383838
|
||||||
border-radius 5px
|
background: var(--card-bg);
|
||||||
|
border-radius: 8px;
|
||||||
padding 8px 14px
|
padding 8px 14px
|
||||||
display flex
|
display flex
|
||||||
cursor pointer
|
cursor pointer
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
border 1px solid #383838
|
// border 1px solid #383838
|
||||||
|
border 1px solid var(--chat-bg)
|
||||||
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #585858
|
border 1px solid var(--theme-border-hover)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
@ -70,28 +78,30 @@
|
|||||||
|
|
||||||
|
|
||||||
.grid-content.active {
|
.grid-content.active {
|
||||||
color #47fff1
|
// color #47fff1
|
||||||
background-color #585858
|
// background-color #585858
|
||||||
border 1px solid #47fff1
|
border 1px solid var(--theme-border-hover)
|
||||||
}
|
}
|
||||||
|
|
||||||
.model {
|
.model {
|
||||||
background-color #383838
|
background: var(--card-bg);
|
||||||
border 1px solid #454545
|
// border 1px solid #454545
|
||||||
border-radius 5px
|
border-radius 8px
|
||||||
padding 5px
|
padding 5px
|
||||||
margin-bottom 10px
|
margin-bottom 10px
|
||||||
display flex
|
display flex
|
||||||
flex-flow column
|
flex-flow column
|
||||||
align-items center
|
align-items center
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
border 1px solid var(--chat-bg)
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #585858
|
border 1px solid var(--theme-border-hover)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-image {
|
.el-image {
|
||||||
height 30px
|
height 40px
|
||||||
width 100%
|
width 100%
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,9 +113,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.model.active {
|
.model.active {
|
||||||
color #47fff1
|
// color #47fff1
|
||||||
background-color #585858
|
// background-color #585858
|
||||||
border 1px solid #47fff1
|
border 1px solid var(--theme-border-hover)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-item-inner {
|
.form-item-inner {
|
||||||
@ -113,16 +124,16 @@
|
|||||||
align-items: center
|
align-items: center
|
||||||
|
|
||||||
.el-select {
|
.el-select {
|
||||||
--el-select-input-focus-border-color: #47FFF1;
|
--el-select-input-focus-border-color: var(--el-color-primary)
|
||||||
--el-input-focus-border-color: #47FFF1;
|
--el-input-focus-border-color: var(--el-color-primary)
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input__wrapper {
|
.el-input__wrapper {
|
||||||
background: #383838;
|
background: var(--chat-bg)
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
color: #fff
|
color: var(--text-theme-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-icon {
|
.el-icon {
|
||||||
@ -167,7 +178,7 @@
|
|||||||
|
|
||||||
.el-form {
|
.el-form {
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input, .el-slider {
|
.el-input, .el-slider {
|
||||||
@ -182,9 +193,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.task-list-box {
|
.task-list-box {
|
||||||
|
background: var(--chat-bg);
|
||||||
width 100%
|
width 100%
|
||||||
padding 0 10px 10px 10px
|
//padding 0 10px 10px 10px
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
|
|
||||||
.task-list-inner {
|
.task-list-inner {
|
||||||
@ -193,26 +205,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-tabs__item {
|
.el-tabs__item {
|
||||||
color: #fff;
|
color: var(--text-theme-color);
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-tabs .el-tabs__item.is-active {
|
.title-tabs .el-tabs__item.is-active {
|
||||||
color: #47FFF1;
|
color: var( --theme-textcolor-normal);
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-tabs .el-tabs__active-bar {
|
.title-tabs .el-tabs__active-bar {
|
||||||
background-color: #47FFF1;
|
background-color: var( --theme-textcolor-normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-textarea {
|
.el-textarea {
|
||||||
--el-input-focus-border-color: #47FFF1;
|
--el-input-focus-border-color: var(--el-color-primary)
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-textarea__inner {
|
.el-textarea__inner {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: #fff;
|
color: var(--text-theme-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input__wrapper {
|
.el-input__wrapper {
|
||||||
@ -241,7 +253,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 图片上传样式
|
// 图片上传样式
|
||||||
@ -367,7 +379,7 @@
|
|||||||
display block
|
display block
|
||||||
cursor pointer
|
cursor pointer
|
||||||
background-color #4E5058
|
background-color #4E5058
|
||||||
color #ffffff
|
color #fff
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #6D6F78
|
background-color #6D6F78
|
||||||
@ -422,7 +434,7 @@
|
|||||||
justify-content center
|
justify-content center
|
||||||
align-items center
|
align-items center
|
||||||
min-height 220px
|
min-height 220px
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
.err-msg-container {
|
.err-msg-container {
|
||||||
|
@ -250,7 +250,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.page-sd .inner .task-list-box .task-list-inner .job-list-box .finish-job-list .animate:hover {
|
.page-sd .inner .task-list-box .task-list-inner .job-list-box .finish-job-list .animate:hover {
|
||||||
box-shadow: 0 0 10px rgba(71,255,241,0.6); /* 添加阴影效果 */
|
box-shadow: 0 0 10px rgba(223,71,255,0.6); /* 添加阴影效果 */
|
||||||
transform: translateY(-10px); /* 向上移动10像素 */
|
transform: translateY(-10px); /* 向上移动10像素 */
|
||||||
}
|
}
|
||||||
.page-sd .inner .task-list-box .task-list-inner .job-list-box .el-image {
|
.page-sd .inner .task-list-box .task-list-inner .job-list-box .el-image {
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
.page-sd {
|
.page-sd {
|
||||||
background-color: #282c34;
|
// background-color: #282c34;
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.sd-box {
|
.sd-box {
|
||||||
margin 10px
|
margin 10px
|
||||||
background-color #262626
|
// background-color #262626
|
||||||
border 1px solid #454545
|
// border 1px solid #454545
|
||||||
min-width 300px
|
min-width 300px
|
||||||
max-width 300px
|
max-width 300px
|
||||||
padding 10px 10px 20px 10px
|
padding 10px 10px 20px 10px
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
color #ffffff;
|
color var(--text-theme-color);
|
||||||
font-size 14px
|
font-size 14px
|
||||||
overflow auto
|
overflow auto
|
||||||
|
|
||||||
@ -20,7 +20,8 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size 20px
|
font-size 20px
|
||||||
text-align center
|
text-align center
|
||||||
color #47fff1
|
color var( --theme-textcolor-normal)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 隐藏滚动条
|
// 隐藏滚动条
|
||||||
@ -67,25 +68,23 @@
|
|||||||
text-align center
|
text-align center
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
width 100%
|
width 200px
|
||||||
|
|
||||||
span {
|
|
||||||
color #2D3A4B
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form {
|
.el-form {
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color #ffffff
|
color: var(--text-theme-color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-list-box {
|
.task-list-box {
|
||||||
|
background: var(--chat-bg);
|
||||||
width 100%
|
width 100%
|
||||||
padding 0 10px 10px 10px
|
color: var(--text-theme-color)
|
||||||
color #ffffff
|
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
|
|
||||||
.task-list-inner {
|
.task-list-inner {
|
||||||
@ -108,7 +107,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-textarea {
|
.el-textarea {
|
||||||
--el-input-focus-border-color: #47FFF1;
|
// --el-input-focus-border-color: #47FFF1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-textarea__inner {
|
.el-textarea__inner {
|
||||||
@ -142,7 +141,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color #ffffff
|
color: var(--text-theme-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 图片上传样式
|
// 图片上传样式
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
|
|
||||||
.page-images-wall {
|
.page-images-wall {
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: #282c34;
|
// background-color: #282c34;
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
width 100%
|
width 100%
|
||||||
color #ffffff
|
color var(--text-theme-color);
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
@ -33,7 +33,7 @@
|
|||||||
font-size 16px
|
font-size 16px
|
||||||
|
|
||||||
.el-radio {
|
.el-radio {
|
||||||
color #ffffff
|
color var(--text-theme-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -52,6 +52,8 @@
|
|||||||
|
|
||||||
.list-item {
|
.list-item {
|
||||||
|
|
||||||
|
display flex
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
@ -68,7 +70,7 @@
|
|||||||
width 100%
|
width 100%
|
||||||
bottom 0
|
bottom 0
|
||||||
left 0
|
left 0
|
||||||
color #ffffff
|
color var(--text-theme-color);
|
||||||
padding 8px 10px
|
padding 8px 10px
|
||||||
line-height 1.2
|
line-height 1.2
|
||||||
border-top-right-radius 10px
|
border-top-right-radius 10px
|
||||||
@ -77,11 +79,15 @@
|
|||||||
span {
|
span {
|
||||||
word-break break-all
|
word-break break-all
|
||||||
}
|
}
|
||||||
|
.iconfont{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
.el-icon, .iconfont {
|
.el-icon, .iconfont {
|
||||||
top 2px
|
top 2px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
border 1px solid #ffffff
|
color: #fff !important;
|
||||||
|
border 1px solid #fff !important;
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
padding 2px
|
padding 2px
|
||||||
font-size 16px;
|
font-size 16px;
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
.index-page {
|
.index-page {
|
||||||
margin: 0
|
margin: 0
|
||||||
overflow hidden
|
overflow hidden
|
||||||
color #ffffff
|
color var(--text-color)
|
||||||
display flex
|
display flex
|
||||||
justify-content center
|
align-items center
|
||||||
align-items baseline
|
background: var(--theme-bg) !important
|
||||||
padding-top 150px
|
flex-flow column
|
||||||
|
height: 100vh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.color-bg {
|
.color-bg {
|
||||||
position absolute
|
position absolute
|
||||||
@ -30,33 +33,47 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.menu-box {
|
.menu-box {
|
||||||
position absolute
|
|
||||||
top 0
|
|
||||||
width 100%
|
width 100%
|
||||||
display flex
|
display flex
|
||||||
|
height 80px
|
||||||
|
align-items center
|
||||||
|
|
||||||
.el-menu {
|
.el-menu {
|
||||||
padding 0 30px
|
padding 0 30px
|
||||||
width 100%
|
width 100%
|
||||||
display flex
|
display flex
|
||||||
justify-content space-between
|
justify-content space-between
|
||||||
|
align-items center
|
||||||
background none
|
background none
|
||||||
border none
|
border none
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
display flex
|
display flex
|
||||||
padding 20px 0
|
// padding 20px 0
|
||||||
|
height 40px
|
||||||
|
align-items center
|
||||||
|
|
||||||
color #ffffff
|
color var(--text-color);
|
||||||
|
.iconfont{
|
||||||
|
color var(--text-color);
|
||||||
|
font-size: 28px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.icon-book{
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
.title {
|
.title {
|
||||||
font-size 24px
|
color var(--text-color);
|
||||||
|
font-size: 24px;
|
||||||
padding 10px 10px 0 10px
|
padding 10px 10px 0 10px
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
height 50px
|
height 60px
|
||||||
border-radius 50%
|
border-radius 50%
|
||||||
|
background: #fff
|
||||||
|
border: 2px solid #754ff6
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
@ -112,6 +129,34 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.nav-item-box{
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s cubic-bezier(0.645,0.045,0.355,1);
|
||||||
|
aspect-ratio: 1.1028 / 1;
|
||||||
|
background: var( --card-bg)
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 160px
|
||||||
|
// min-height: 190px;
|
||||||
|
i{
|
||||||
|
display: inline-block
|
||||||
|
min-width: 48px;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
font-size: 38px
|
||||||
|
border-radius: 24px;
|
||||||
|
color: var(--normal-color)
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
box-shadow: 0 4px 14px 0 rgba(17, 13, 83, .18);
|
||||||
|
transform: translateY(-8px);}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,4 +166,49 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.cursor-ani {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cursor-ani::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 28px;
|
||||||
|
background: #333;
|
||||||
|
transform: translateX(3px) translateY(3px);
|
||||||
|
animation: cursor-blinks 0.8s infinite forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes cursor-blinks {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.cursor-ani {
|
||||||
|
display: inline-block;
|
||||||
|
min-height: 34px;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.msg-text span {
|
||||||
|
transition: color 0.3s ease; /* 平滑的颜色过渡 */
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.logo-box{
|
||||||
|
width: 60px
|
||||||
|
height: 60px
|
||||||
|
background: #fff
|
||||||
|
border-radius: 50%
|
||||||
|
img{
|
||||||
|
width: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,117 +1,62 @@
|
|||||||
.bg {
|
.loginPage{
|
||||||
position fixed
|
background: var(--card-bg) !important
|
||||||
left 0
|
background-color: var(---card-bg) !important
|
||||||
right 0
|
|
||||||
top 0
|
.form-title{
|
||||||
bottom 0
|
color:var( --text-theme-color)
|
||||||
background-color #313237
|
}
|
||||||
background-image url("~@/assets/img/login-bg.jpg")
|
|
||||||
background-size cover
|
|
||||||
background-position center
|
|
||||||
background-repeat repeat-y
|
|
||||||
//filter: blur(10px); /* 调整模糊程度,可以根据需要修改值 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.left{
|
||||||
.contain {
|
width: 50%;
|
||||||
position fixed
|
|
||||||
left 50%
|
.login-box{
|
||||||
top 40%
|
width: 410px;
|
||||||
width 90%
|
margin: 0 auto;
|
||||||
max-width 400px;
|
min-height: calc(100vh - 48px);
|
||||||
transform translate(-50%, -50%)
|
|
||||||
padding 20px 10px;
|
}
|
||||||
color #ffffff
|
|
||||||
border-radius 10px;
|
.wechatLog{
|
||||||
|
width: 410px;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
text-align: center
|
||||||
|
background: var( --sign-bg)
|
||||||
|
a{
|
||||||
|
color: var(--text-theme-color)
|
||||||
|
|
||||||
.logo {
|
|
||||||
text-align center
|
|
||||||
|
|
||||||
.el-image {
|
|
||||||
width 120px;
|
|
||||||
cursor pointer
|
|
||||||
border-radius 50%
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
font-size: 14px;
|
||||||
.header {
|
margin-bottom: 26px
|
||||||
width 100%
|
border-radius: 16px;
|
||||||
margin-bottom 24px
|
.icon-wechat{
|
||||||
font-size 24px
|
color: #0bc15f
|
||||||
color $white_v1
|
margin-right: 9px
|
||||||
letter-space 2px
|
font-size: 20px;
|
||||||
text-align center
|
|
||||||
padding-top 10px
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
width 100%
|
|
||||||
height: auto
|
|
||||||
border-radius 3px
|
|
||||||
|
|
||||||
.block {
|
|
||||||
margin-bottom 16px
|
|
||||||
|
|
||||||
.el-input__inner {
|
|
||||||
border 1px solid $gray-v6 !important
|
|
||||||
|
|
||||||
.el-icon-user, .el-icon-lock {
|
|
||||||
font-size 20px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-row {
|
|
||||||
padding-top 10px;
|
|
||||||
|
|
||||||
.login-btn {
|
|
||||||
width 100%
|
|
||||||
font-size 16px
|
|
||||||
letter-spacing 2px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-line {
|
|
||||||
justify-content center
|
|
||||||
padding-top 10px;
|
|
||||||
font-size 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.opt {
|
|
||||||
padding 15px
|
|
||||||
.el-col {
|
|
||||||
text-align center
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.divider {
|
|
||||||
border-top: 2px solid #c1c1c1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clogin {
|
|
||||||
padding 15px
|
|
||||||
display flex
|
|
||||||
justify-content center
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
font-size 20px
|
|
||||||
background: #E9F1F6;
|
|
||||||
padding: 8px;
|
|
||||||
border-radius: 50%
|
|
||||||
cursor pointer
|
|
||||||
}
|
|
||||||
.iconfont.icon-wechat {
|
|
||||||
color #0bc15f
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.text-color-primary{
|
||||||
color #ffffff;
|
cursor :pointer
|
||||||
|
|
||||||
.container {
|
|
||||||
padding 20px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.login-btn {
|
||||||
|
width :100%
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
.code-input{
|
||||||
|
width: 306px;
|
||||||
|
margin-right: 9px;
|
||||||
|
}
|
||||||
|
:deep(.el-tabs__item.is-active), :deep(.el-tabs__item:hover) {
|
||||||
|
color: var(--common-text-color) !important
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tabs__item) {
|
||||||
|
color: var(--text-theme-color)
|
||||||
}
|
}
|
@ -1,12 +1,14 @@
|
|||||||
.page-luma {
|
.page-luma {
|
||||||
display flex
|
display flex
|
||||||
height 100%
|
height 100%
|
||||||
background-color #0E0808
|
// background-color #0E0808
|
||||||
|
// background: var(--chat-bg);
|
||||||
|
|
||||||
overflow auto
|
overflow auto
|
||||||
//justify-content center
|
//justify-content center
|
||||||
flex-flow column
|
flex-flow column
|
||||||
align-items center
|
align-items center
|
||||||
background: linear-gradient(180deg, rgba(75, 62, 53, 0.8), rgba(144, 50, 181, 0.3));
|
// background: linear-gradient(180deg, rgba(75, 62, 53, 0.8), rgba(144, 50, 181, 0.3));
|
||||||
|
|
||||||
|
|
||||||
.prompt-box {
|
.prompt-box {
|
||||||
@ -50,7 +52,7 @@
|
|||||||
.btn-swap {
|
.btn-swap {
|
||||||
margin-right 10px
|
margin-right 10px
|
||||||
.icon-exchange{
|
.icon-exchange{
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
cursor pointer
|
cursor pointer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,18 +62,20 @@
|
|||||||
.prompt-container {
|
.prompt-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.input-container {
|
.input-container {
|
||||||
background: linear-gradient(90deg, rgba(75, 62, 53, 0.8), rgba(144, 50, 181, 0.3));
|
background: var(--chat-bg);
|
||||||
|
// background: linear-gradient(90deg, rgba(75, 62, 53, 0.8), rgba(144, 50, 181, 0.3));
|
||||||
border-radius: 28px;
|
border-radius: 28px;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
margin-bottom: 16px;
|
||||||
|
// box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
|
||||||
.prompt-input {
|
.prompt-input {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
color: white;
|
color var(--text-theme-color);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@ -82,16 +86,14 @@
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
|
||||||
scrollbar-width: none; /* 隐藏滚动条 */
|
scrollbar-width: none; /* 隐藏滚动条 */
|
||||||
&::placeholder {
|
|
||||||
color: rgba(255, 255, 255, 0.6);
|
|
||||||
}
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-icon, .send-icon {
|
.upload-icon, .send-icon {
|
||||||
color #e1e1e1
|
color var( --el-color-primary)
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-size 20px
|
font-size 20px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
@ -104,7 +106,7 @@
|
|||||||
.params {
|
.params {
|
||||||
display flex
|
display flex
|
||||||
justify-content right
|
justify-content right
|
||||||
color #e1e1e1
|
color var(--text-theme-color);
|
||||||
font-size 14px
|
font-size 14px
|
||||||
padding 10px 30px
|
padding 10px 30px
|
||||||
|
|
||||||
@ -129,9 +131,9 @@
|
|||||||
padding 0 40px
|
padding 0 40px
|
||||||
|
|
||||||
.h-title {
|
.h-title {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
width 100%
|
width 100%
|
||||||
font-size 36px
|
// font-size 36px
|
||||||
text-align left
|
text-align left
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,11 +147,10 @@
|
|||||||
padding 10px 15px
|
padding 10px 15px
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
margin-bottom 10px
|
margin-bottom 20px
|
||||||
|
background: var(--chat-bg);
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color #2A2525
|
|
||||||
}
|
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
.container {
|
.container {
|
||||||
@ -189,7 +190,8 @@
|
|||||||
border-radius 5px
|
border-radius 5px
|
||||||
background rgba(100, 100, 100, 0.3)
|
background rgba(100, 100, 100, 0.3)
|
||||||
cursor pointer
|
cursor pointer
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
|
|
||||||
opacity 0
|
opacity 0
|
||||||
transform: translate(-50%, 0px);
|
transform: translate(-50%, 0px);
|
||||||
transition opacity 0.3s ease 0s
|
transition opacity 0.3s ease 0s
|
||||||
@ -214,7 +216,7 @@
|
|||||||
padding 0 20px
|
padding 0 20px
|
||||||
|
|
||||||
.prompt,.failed {
|
.prompt,.failed {
|
||||||
padding 6px 0
|
padding 0
|
||||||
font-size 16px
|
font-size 16px
|
||||||
max-height 80px
|
max-height 80px
|
||||||
line-height 28px
|
line-height 28px
|
||||||
@ -222,7 +224,8 @@
|
|||||||
text-overflow ellipsis
|
text-overflow ellipsis
|
||||||
}
|
}
|
||||||
.prompt {
|
.prompt {
|
||||||
color rgb(250 247 245)
|
color var( --text-fb)
|
||||||
|
cursor: text
|
||||||
}
|
}
|
||||||
.failed {
|
.failed {
|
||||||
color #E4696B
|
color #E4696B
|
||||||
@ -248,7 +251,6 @@
|
|||||||
|
|
||||||
.text {
|
.text {
|
||||||
margin-right 10px
|
margin-right 10px
|
||||||
color #e1e1e1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,11 +258,12 @@
|
|||||||
background none
|
background none
|
||||||
padding 6px
|
padding 6px
|
||||||
transition background 0.6s ease 0s
|
transition background 0.6s ease 0s
|
||||||
color #726E6C
|
color #919191
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background #5f5958
|
// background #5f5958
|
||||||
color #e1e1e1
|
// color #e1e1e1
|
||||||
|
color:var(--el-color-primary)
|
||||||
}
|
}
|
||||||
|
|
||||||
.downloading {
|
.downloading {
|
||||||
@ -274,7 +277,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pagination {
|
.pagination {
|
||||||
padding 10px 20px
|
margin-top 20px
|
||||||
display flex
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
}
|
}
|
||||||
@ -317,7 +320,7 @@
|
|||||||
// border-radius 20px
|
// border-radius 20px
|
||||||
// padding 3px 15px
|
// padding 3px 15px
|
||||||
// cursor pointer
|
// cursor pointer
|
||||||
// color #ffffff
|
// color var(--text-theme-color)
|
||||||
// font-size 14px
|
// font-size 14px
|
||||||
//
|
//
|
||||||
// .iconfont {
|
// .iconfont {
|
||||||
@ -344,14 +347,15 @@
|
|||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
margin-right 10px
|
margin-right 10px
|
||||||
background-color #363030
|
|
||||||
border none
|
border none
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
padding 5px 10px
|
padding 5px 10px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
color: var(--theme-text-color-primary)
|
||||||
|
background-color var(--btn-bg)
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #5F5958
|
opacity: 0.7
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,8 @@ body {
|
|||||||
.container {
|
.container {
|
||||||
padding: 15px 20px 30px 20px;
|
padding: 15px 20px 30px 20px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
margin-bottom 80px
|
margin-bottom 20px
|
||||||
|
max-width 100%
|
||||||
}
|
}
|
||||||
|
|
||||||
.crumbs {
|
.crumbs {
|
||||||
@ -170,24 +171,68 @@ body {
|
|||||||
.content-collapse {
|
.content-collapse {
|
||||||
left: 65px;
|
left: 65px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-table {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.el-table__body-header {
|
||||||
|
height 40px
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-100 {
|
||||||
|
width 100%
|
||||||
|
}
|
||||||
.mr-1 {
|
.mr-1 {
|
||||||
margin-right 5px
|
margin-right 0.5rem
|
||||||
}
|
}
|
||||||
|
|
||||||
.mr-2 {
|
.mr-2 {
|
||||||
margin-right 10px
|
margin-right 1rem
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml-1 {
|
.ml-1 {
|
||||||
margin-left 5px
|
margin-left 0.5rem
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml-2 {
|
.ml-2 {
|
||||||
margin-left 10px
|
margin-left 1rem
|
||||||
|
}
|
||||||
|
|
||||||
|
.d-flex {
|
||||||
|
display flex !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.justify-center {
|
||||||
|
justify-content center
|
||||||
|
}
|
||||||
|
.justify-between {
|
||||||
|
justify-content space-between
|
||||||
|
}
|
||||||
|
|
||||||
|
.justify-end {
|
||||||
|
justify-content flex-end
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-center {
|
||||||
|
align-items center
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.p-1 {
|
||||||
|
padding 0.5rem
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-2 {
|
||||||
|
padding 1rem
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-1 {
|
||||||
|
margin 0.5rem
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-2 {
|
||||||
|
margin 1rem
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.page-mark-map {
|
.page-mark-map {
|
||||||
background-color: #282c34;
|
// background-color: #282c34;
|
||||||
height 100%
|
height 100%
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
@ -7,20 +7,20 @@
|
|||||||
|
|
||||||
.mark-map-box {
|
.mark-map-box {
|
||||||
margin 10px
|
margin 10px
|
||||||
background-color #262626
|
// background-color #262626
|
||||||
border 1px solid #454545
|
// border 1px solid #454545
|
||||||
min-width 300px
|
min-width 300px
|
||||||
max-width 300px
|
max-width 300px
|
||||||
padding 10px
|
padding 10px
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
color #ffffff;
|
color var(--text-theme-color);
|
||||||
font-size 14px
|
font-size 14px
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size 20px
|
font-size 20px
|
||||||
text-align center
|
text-align center
|
||||||
color #47fff1
|
color var( --theme-textcolor-normal)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 隐藏滚动条
|
// 隐藏滚动条
|
||||||
@ -43,7 +43,7 @@
|
|||||||
width 100%
|
width 100%
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color #2D3A4B
|
color #fff
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,13 +61,15 @@
|
|||||||
|
|
||||||
.el-form {
|
.el-form {
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.chat-box {
|
.chat-box {
|
||||||
width 100%
|
width 100%
|
||||||
|
background: var(--chat-bg);
|
||||||
|
|
||||||
|
|
||||||
.top-bar {
|
.top-bar {
|
||||||
display flex
|
display flex
|
||||||
@ -77,13 +79,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown {
|
.markdown {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
display flex
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
align-items center
|
align-items center
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
color: #47fff1;
|
color: var( --theme-textcolor-normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
@ -116,7 +118,7 @@
|
|||||||
|
|
||||||
.markmap {
|
.markmap {
|
||||||
width 100%
|
width 100%
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
font-size 12px
|
font-size 12px
|
||||||
|
|
||||||
.markmap-foreign {
|
.markmap-foreign {
|
||||||
@ -128,10 +130,13 @@
|
|||||||
position: absolute
|
position: absolute
|
||||||
bottom: 10px
|
bottom: 10px
|
||||||
right: 20px
|
right: 20px
|
||||||
|
display: flex;
|
||||||
|
|
||||||
.mm-toolbar {
|
.mm-toolbar {
|
||||||
|
line-height: 36px;
|
||||||
display flex
|
display flex
|
||||||
flex-flow row
|
flex-flow row
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
.mm-toolbar-brand {
|
.mm-toolbar-brand {
|
||||||
display none
|
display none
|
||||||
@ -139,7 +144,7 @@
|
|||||||
|
|
||||||
.mm-toolbar-item {
|
.mm-toolbar-item {
|
||||||
cursor pointer
|
cursor pointer
|
||||||
color var(--el-color-white)
|
color var( --text-fb)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
list-style: normal;
|
list-style: normal;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
color: #42b983;
|
|
||||||
font-weight: 600;
|
color :var(--a-link-color);
|
||||||
|
text-decoration: underline;
|
||||||
|
|
||||||
padding: 0 2px;
|
padding: 0 2px;
|
||||||
text-decoration: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
.member .inner .product-box .list-box .product-item:hover {
|
.member .inner .product-box .list-box .product-item:hover {
|
||||||
box-shadow: 0 0 10px rgba(71,255,241,0.6); /* 添加阴影效果 */
|
box-shadow: 0 0 10px var(--shadow-color); /* 添加阴影效果 */
|
||||||
transform: translateY(-10px); /* 向上移动10像素 */
|
transform: translateY(-10px); /* 向上移动10像素 */
|
||||||
}
|
}
|
||||||
.member .inner .product-box .headline {
|
.member .inner .product-box .headline {
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
.member {
|
.member {
|
||||||
background-color: #282c34;
|
// background-color: #282c34;
|
||||||
height 100%
|
height 100%
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
text-align center
|
text-align center
|
||||||
background-color #25272d
|
background-color #25272d
|
||||||
font-size 24px
|
font-size 24px
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
padding 10px
|
padding 10px
|
||||||
border-bottom 1px solid #3c3c3c
|
border-bottom 1px solid #3c3c3c
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
padding 15px 0 15px 15px;
|
padding 15px 0 15px 15px;
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
overflow-y visible
|
overflow-y visible
|
||||||
@ -22,13 +22,13 @@
|
|||||||
.user-profile {
|
.user-profile {
|
||||||
padding 10px 20px 20px 20px
|
padding 10px 20px 20px 20px
|
||||||
width 300px
|
width 300px
|
||||||
background-color #393F4A
|
background-color var(--chat-bg)
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
//height 100vh
|
//height 100vh
|
||||||
|
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
justify-content start
|
justify-content start
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +58,8 @@
|
|||||||
|
|
||||||
.list-box {
|
.list-box {
|
||||||
.product-item {
|
.product-item {
|
||||||
border 1px solid #666666
|
// border 1px solid #666666
|
||||||
|
background-color var(--chat-bg)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
cursor pointer
|
cursor pointer
|
||||||
@ -87,7 +88,7 @@
|
|||||||
text-align center
|
text-align center
|
||||||
font-size 16px
|
font-size 16px
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #47fff1
|
color var( --el-color-primary)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +136,8 @@
|
|||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
margin 10px 5px 0 5px
|
margin 10px 5px 0 5px
|
||||||
padding 0
|
height 32px
|
||||||
|
filter: none;
|
||||||
|
|
||||||
.icon-alipay,.icon-wechat-pay {
|
.icon-alipay,.icon-wechat-pay {
|
||||||
color #ffffff
|
color #ffffff
|
||||||
@ -145,7 +147,7 @@
|
|||||||
font-size 24px
|
font-size 24px
|
||||||
}
|
}
|
||||||
.icon-jd-pay {
|
.icon-jd-pay {
|
||||||
color #ffffff
|
color var(--text-theme-color)
|
||||||
font-size 24px
|
font-size 24px
|
||||||
}
|
}
|
||||||
.icon-douyin {
|
.icon-douyin {
|
||||||
@ -161,8 +163,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0 0 10px rgba(71, 255, 241, 0.6); /* 添加阴影效果 */
|
// box-shadow: 0 0 10px rgba(71, 255, 241, 0.6); /* 添加阴影效果 */
|
||||||
transform: translateY(-10px); /* 向上移动10像素 */
|
transform: translateY(-10px); /* 向上移动10像素 */
|
||||||
|
box-shadow: 0 0 10px var(--shadow-color);
|
||||||
|
background-color: var(--hover-deep-color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,12 +79,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-theme-dark {
|
// .van-theme-dark {
|
||||||
.mobile-chat {
|
// .mobile-chat {
|
||||||
.chat-list-wrapper {
|
// .chat-list-wrapper {
|
||||||
background #232425;
|
// background #232425;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@import "model-select.styl"
|
@import "model-select.styl"
|
@ -183,6 +183,7 @@
|
|||||||
display flex
|
display flex
|
||||||
flex-flow column
|
flex-flow column
|
||||||
justify-content center
|
justify-content center
|
||||||
|
height 200px
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin-bottom 20px
|
margin-bottom 20px
|
||||||
|
@ -4,15 +4,20 @@
|
|||||||
width 100%
|
width 100%
|
||||||
display flex
|
display flex
|
||||||
flex-flow row
|
flex-flow row
|
||||||
|
|
||||||
|
.image-slot {
|
||||||
|
color var(--theme-text-color-primary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.job-item {
|
.job-item {
|
||||||
margin-right 10px
|
margin-right 10px
|
||||||
width 200px
|
width 200px
|
||||||
height 200px
|
height 200px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
padding 2px
|
padding 2px
|
||||||
background-color #555555
|
background-color var( --gray-btn-bg)
|
||||||
|
|
||||||
.job-item-inner {
|
.job-item-inner {
|
||||||
position relative
|
position relative
|
||||||
@ -31,7 +36,7 @@
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
font-size 20px
|
font-size 20px
|
||||||
color #ffffff
|
color var(--theme-text-color-primary)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.el-overlay-dialog {
|
.el-overlay-dialog {
|
||||||
.el-dialog {
|
.el-dialog {
|
||||||
background-color #1a1b1e
|
// background-color #1a1b1e
|
||||||
|
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
@ -33,14 +33,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.task-info {
|
.task-info {
|
||||||
background-color #25262b
|
// background-color #25262b
|
||||||
padding 1rem 1.5rem
|
padding 1rem 1.5rem
|
||||||
|
|
||||||
|
|
||||||
.info-line {
|
.info-line {
|
||||||
width 100%
|
width 100%
|
||||||
|
|
||||||
.prompt {
|
.prompt {
|
||||||
background-color #35363b
|
// background-color #35363b
|
||||||
padding 10px
|
padding 10px
|
||||||
color #999999
|
color #999999
|
||||||
overflow auto
|
overflow auto
|
||||||
@ -64,16 +65,16 @@
|
|||||||
label {
|
label {
|
||||||
display flex
|
display flex
|
||||||
width 100px
|
width 100px
|
||||||
color #a5a5a5
|
color :var(--text-fb)
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-value {
|
.item-value {
|
||||||
display flex
|
display flex
|
||||||
width 100%
|
width 100%
|
||||||
background-color #35363b
|
// background-color #35363b
|
||||||
padding 2px 5px
|
padding 2px 5px
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
color #F5F5F5
|
color: var(--text-theme-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
.page-suno {
|
.page-suno {
|
||||||
display flex
|
display flex
|
||||||
height 100%
|
height 100%
|
||||||
background-color #0E0808
|
// background-color #0E0808
|
||||||
overflow auto
|
overflow auto
|
||||||
|
.item-group{
|
||||||
|
scrollbar-width: auto !important; /* 恢复滚动条(Firefox) */
|
||||||
|
-ms-overflow-style: auto !important; /* 恢复滚动条(IE、Edge) */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.left-bar {
|
.left-bar {
|
||||||
max-width 340px
|
max-width 340px
|
||||||
min-width 340px
|
min-width 340px
|
||||||
@ -13,6 +20,7 @@
|
|||||||
display flex
|
display flex
|
||||||
flex-flow row
|
flex-flow row
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items center
|
||||||
|
|
||||||
.upload-music {
|
.upload-music {
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@ -24,7 +32,7 @@
|
|||||||
|
|
||||||
.params {
|
.params {
|
||||||
padding 20px 0
|
padding 20px 0
|
||||||
color rgb(250 247 245)
|
color: var(--text-theme-color);
|
||||||
position relative
|
position relative
|
||||||
|
|
||||||
.pure-music {
|
.pure-music {
|
||||||
@ -77,6 +85,7 @@
|
|||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.song {
|
.song {
|
||||||
display flex
|
display flex
|
||||||
@ -137,6 +146,8 @@
|
|||||||
bottom 10px
|
bottom 10px
|
||||||
font-size 12px
|
font-size 12px
|
||||||
padding 2px 5px
|
padding 2px 5px
|
||||||
|
background-color var(--sm-btn-bg)
|
||||||
|
color: #fff
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,8 +155,14 @@
|
|||||||
position relative
|
position relative
|
||||||
overflow-x auto
|
overflow-x auto
|
||||||
overflow-y hidden
|
overflow-y hidden
|
||||||
|
scrollbar-width: auto !important; /* 恢复滚动条(Firefox) */
|
||||||
|
-ms-overflow-style: auto !important; /* 恢复滚动条(IE、Edge) */
|
||||||
width 100%
|
width 100%
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
display flex
|
display flex
|
||||||
flex-flow row
|
flex-flow row
|
||||||
@ -154,12 +171,16 @@
|
|||||||
.tag {
|
.tag {
|
||||||
margin-right 10px
|
margin-right 10px
|
||||||
word-break keep-all
|
word-break keep-all
|
||||||
background-color #312C2C
|
background: var(--card-bg);
|
||||||
color #e1e1e1
|
color:var(--theme-text-color-primary);
|
||||||
border-radius 5px
|
opacity 0.7
|
||||||
|
border-radius 8px
|
||||||
padding 3px 6px
|
padding 3px 6px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
font-size 13px
|
font-size 13px
|
||||||
|
&:hover{
|
||||||
|
color:var( --el-color-primary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,9 +190,11 @@
|
|||||||
width 100%
|
width 100%
|
||||||
color rgb(250 247 245)
|
color rgb(250 247 245)
|
||||||
overflow auto
|
overflow auto
|
||||||
|
background: var(--chat-bg)
|
||||||
|
|
||||||
|
|
||||||
.list-box {
|
.list-box {
|
||||||
padding 0 0 0 20px
|
padding 20px
|
||||||
.item {
|
.item {
|
||||||
display flex
|
display flex
|
||||||
flex-flow row
|
flex-flow row
|
||||||
@ -180,7 +203,7 @@
|
|||||||
margin-bottom 10px
|
margin-bottom 10px
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #2A2525
|
background: rgba(188,149,236,0.08)
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
@ -247,18 +270,18 @@
|
|||||||
font-weight 700
|
font-weight 700
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color rgb(250 247 245)
|
color var( --a-link-color)
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration underline
|
text-decoration underline
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.model {
|
.model {
|
||||||
color #E2E8F0
|
color #8f8f8f
|
||||||
background-color #1C1616
|
// background-color #1C1616
|
||||||
border 1px solid #8f8f8f
|
// border 1px solid #8f8f8f
|
||||||
font-weight normal
|
font-weight normal
|
||||||
font-size 14px
|
font-size 12px
|
||||||
padding 1px 3px
|
padding 1px 3px
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
margin-left 10px
|
margin-left 10px
|
||||||
@ -271,7 +294,7 @@
|
|||||||
|
|
||||||
.tags {
|
.tags {
|
||||||
font-size 14px
|
font-size 14px
|
||||||
color #d1d1d1
|
color var(--text-fb)
|
||||||
padding 3px 0
|
padding 3px 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -279,11 +302,13 @@
|
|||||||
.right {
|
.right {
|
||||||
min-width 350px;
|
min-width 350px;
|
||||||
font-size 14px
|
font-size 14px
|
||||||
padding 0 15px
|
padding 0 0 0 15px
|
||||||
|
display flex
|
||||||
|
justify-content right
|
||||||
|
|
||||||
.tools {
|
.tools {
|
||||||
display flex
|
display flex
|
||||||
justify-content left
|
justify-content right
|
||||||
align-items center
|
align-items center
|
||||||
flex-flow row
|
flex-flow row
|
||||||
height 90px
|
height 90px
|
||||||
@ -291,20 +316,21 @@
|
|||||||
.btn-publish {
|
.btn-publish {
|
||||||
padding 2px 10px
|
padding 2px 10px
|
||||||
|
|
||||||
.text {
|
// .text {
|
||||||
margin-right 10px
|
// margin-right 10px
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-icon {
|
.btn-icon {
|
||||||
background none
|
background none
|
||||||
padding 6px
|
padding 6px
|
||||||
transition background 0.6s ease 0s
|
transition background 0.6s ease 0s
|
||||||
color #726E6C
|
color #919191
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background #5f5958
|
// background #5f5958
|
||||||
color #e1e1e1
|
// color #e1e1e1
|
||||||
|
color:var(--el-color-primary)
|
||||||
}
|
}
|
||||||
|
|
||||||
.downloading {
|
.downloading {
|
||||||
@ -356,7 +382,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pagination {
|
.pagination {
|
||||||
padding 10px 20px
|
margin-top 20px
|
||||||
display flex
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
}
|
}
|
||||||
@ -372,14 +398,26 @@
|
|||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
margin-right 10px
|
margin-right 10px
|
||||||
background-color #363030
|
color: var((--theme-text-color-primary))
|
||||||
border none
|
border none
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
padding 5px 10px
|
padding 5px 10px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
background: var(--btn-bg)
|
||||||
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color #5F5958
|
opacity :0.8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.submit-btn {
|
||||||
|
display flex
|
||||||
|
align-items: center
|
||||||
|
margin: 20px 0
|
||||||
|
justify-content: center;
|
||||||
|
.el-button {
|
||||||
|
width 200px
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
3
web/src/assets/css/tailwind.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
88
web/src/assets/css/theme-dark.styl
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
|
||||||
|
@import 'font.styl'
|
||||||
|
:root[data-theme="dark"]{
|
||||||
|
--text-fb:#fff;
|
||||||
|
--text-color: rgba(255, 255, 255, 1) !important; // 主要的文本颜色
|
||||||
|
--normal-color: rgba(163, 174, 208, 1); // 普通颜色
|
||||||
|
--el-text-color-primary: #fff;
|
||||||
|
p, h1, h2, h3, h4, h5, h6, article {
|
||||||
|
// color: var(--text-color) !important;
|
||||||
|
font-family: $font-regular;
|
||||||
|
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#app,
|
||||||
|
.wrapper {
|
||||||
|
background: rgb(13, 20, 53)
|
||||||
|
background-color: rgb(13, 20, 53)
|
||||||
|
font-family: $font-regular;
|
||||||
|
}
|
||||||
|
--btnColor: linear-gradient(88deg, #af61f0 1.44%, #5b62ce);
|
||||||
|
--border-active:rgba(255, 255, 255, 0.1);
|
||||||
|
--card-bg:#252d58;
|
||||||
|
--chat-bg:#1f243f
|
||||||
|
--chat-wel-bg:#2d2f38;
|
||||||
|
--card-bg-table: rgba(17, 28, 68, 1);
|
||||||
|
--theme-bg:rgb(13, 20, 53);
|
||||||
|
--theme-bg-color: rgb(13, 20, 53);
|
||||||
|
--theme-bg-all:rgb(13, 20, 53);
|
||||||
|
--sign-bg: rgba(27, 37, 75, 1);
|
||||||
|
--text-theme-color: #fff;
|
||||||
|
--text-color-primary: #d1c7ff;
|
||||||
|
--theme-text-color-secondary: #a3aed0;
|
||||||
|
--theme-text-color-primary: #fff;
|
||||||
|
--theme-text-primary: #f3f3f3;
|
||||||
|
--line-box:rgba(255, 255, 255, 0.1);
|
||||||
|
--el-bg-color:#141a36;
|
||||||
|
--el-fill-color-blank: rgba(17, 28, 68, 1);
|
||||||
|
--el-fill-color-light: rgba(86, 86, 95, .2);
|
||||||
|
--el-color-primary-light-9:rgba(86, 86, 95, .2);
|
||||||
|
--el-text-color-regular: rgba(163, 174, 208, 1)
|
||||||
|
--el-border-color:rgb(79, 80, 85);//黑白切换
|
||||||
|
--el-bg-color-overlay: rgba(17, 28, 68, 1);
|
||||||
|
--el-border-color-light: rgba(255, 255, 255, 0.2);
|
||||||
|
--chat-content-bg:rgba(86, 86, 95, .2);
|
||||||
|
--chat-content-bg-list:rgba(86, 86, 95, .2);
|
||||||
|
--hover-deep-color:#30323c;
|
||||||
|
//layout
|
||||||
|
.more-menus li.moreTitle,
|
||||||
|
.twoTittle .title,
|
||||||
|
.setting-menus span.title,
|
||||||
|
.setting-menus li .el-icon,
|
||||||
|
.setting-menus li .iconfont,
|
||||||
|
.layout .tab-box .menu-list-item{
|
||||||
|
filter: invert(100%);
|
||||||
|
}
|
||||||
|
.more-menus span.title{
|
||||||
|
color:#000;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 操作按钮
|
||||||
|
--btn-bg: rgba(86, 86, 95, .5);
|
||||||
|
|
||||||
|
.el-table {
|
||||||
|
// 表格表头背景
|
||||||
|
--el-fill-color-darker: rgba(100, 100, 100, .5);
|
||||||
|
--el-border-color-darker: #73767a;
|
||||||
|
--el-table-border-color: rgba(100, 100, 100, .5);
|
||||||
|
--el-table-row-hover-bg-color: rgba(16, 21, 43, .8);
|
||||||
|
--el-table-current-row-bg-color: rgba(16, 21, 43, .8);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加载动画
|
||||||
|
--el-mask-color: rgba(255, 255, 255, 0.5);
|
||||||
|
--van-toast-background: rgba(255, 255, 255, 0.3);
|
||||||
|
|
||||||
|
--code-bg-color: #424242;
|
||||||
|
--code-text-color: #fff;
|
||||||
|
|
||||||
|
// vant 主题样式
|
||||||
|
--van-cell-background: #141a36;
|
||||||
|
--van-cell-background-light: #242a46;
|
||||||
|
--van-button-default-background: #141a36;
|
||||||
|
--van-background: #141a36;
|
||||||
|
--van-tabbar-background: #141a36;
|
||||||
|
--van-nav-bar-background: #1B244A;
|
||||||
|
--van-dropdown-menu-background: #141a36;
|
||||||
|
}
|
53
web/src/assets/css/theme-light.styl
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
|
||||||
|
@import 'font.styl'
|
||||||
|
:root[data-theme="light"] {
|
||||||
|
--text-fb:#000;
|
||||||
|
--text-color: #5b62ce; // 主要的文本颜色
|
||||||
|
--normal-color: rgba(43, 54, 116, 1); // 普通颜色
|
||||||
|
p, h1, h2, h3, h4, h5, h6, article {
|
||||||
|
font-family: $font-regular;
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
#app,
|
||||||
|
.wrapper {
|
||||||
|
font-family: $font-regular;
|
||||||
|
}
|
||||||
|
|
||||||
|
--btnColor: linear-gradient(88deg, #af61f0 1.44%, #5b62ce);
|
||||||
|
--border-active:rgba(134, 140, 255, 1);
|
||||||
|
--code-btnColor: linear-gradient(88deg, #af61f0 1.44%, #5b62ce);
|
||||||
|
--card-bg:#fff;
|
||||||
|
--chat-bg:#fff;
|
||||||
|
--theme-bg:linear-gradient(88deg, #fff3f3 1.44%, #e7e8ff);
|
||||||
|
--theme-bg-all:#f5f7fd;
|
||||||
|
--theme-bg-color: #f5f7fd;
|
||||||
|
--sign-bg: rgba(244, 247, 254, 1);
|
||||||
|
--text-theme-color: rgba(43, 54, 116, 1)
|
||||||
|
--text-color-primary: rgba(67, 24, 255, 1);
|
||||||
|
--line-box:rgba(79, 89, 102, 0.122);
|
||||||
|
--theme-text-color-primary: #000;
|
||||||
|
--theme-text-primary: #000;
|
||||||
|
--theme-text-color-secondary: #666;
|
||||||
|
--chat-content-bg:#f5f7fc;
|
||||||
|
--chat-list-bg: #0302020a;
|
||||||
|
--chat-content-bg-list:#fff;
|
||||||
|
--chat-wel-bg:rgba(247, 247, 248, 1);
|
||||||
|
--hover-deep-color:#fff;
|
||||||
|
--el-bg-color-overlay: #fff;
|
||||||
|
--el-bg-color:#fff;
|
||||||
|
--el-fill-color-blank: #fff;
|
||||||
|
--el-pagination-button-bg-color: rgba(86,86,95,0.2);
|
||||||
|
|
||||||
|
// 操作按钮
|
||||||
|
--btn-bg: rgba(100, 100, 100, .1);
|
||||||
|
|
||||||
|
// 加载动画
|
||||||
|
--el-mask-color: rgba(100, 100, 100, 0.2);
|
||||||
|
// code 标签背景
|
||||||
|
--code-bg-color: #ececec;
|
||||||
|
--code-text-color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
.animate {
|
.animate {
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0 0 10px rgba(71, 255, 241, 0.6); /* 添加阴影效果 */
|
box-shadow: 0 0 10px var(--shadow-color); /* 添加阴影效果 */
|
||||||
transform: translateY(-10px); /* 向上移动10像素 */
|
transform: translateY(-10px); /* 向上移动10像素 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
web/src/assets/fonts/OPlusSans3-Medium.ttf
Normal file
BIN
web/src/assets/fonts/OPlusSans3-Regular.ttf
Normal file
@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 4125778 */
|
font-family: "iconfont"; /* Project id 4125778 */
|
||||||
src: url('iconfont.woff2?t=1731289567907') format('woff2'),
|
src: url('iconfont.woff2?t=1734934068681') format('woff2'),
|
||||||
url('iconfont.woff?t=1731289567907') format('woff'),
|
url('iconfont.woff?t=1734934068681') format('woff'),
|
||||||
url('iconfont.ttf?t=1731289567907') format('truetype');
|
url('iconfont.ttf?t=1734934068681') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@ -13,6 +13,154 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-redeem:before {
|
||||||
|
content: "\e61a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-login:before {
|
||||||
|
content: "\e636";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-present:before {
|
||||||
|
content: "\e648";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-icon-warning:before {
|
||||||
|
content: "\e671";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-help:before {
|
||||||
|
content: "\e64a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-success:before {
|
||||||
|
content: "\e61e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-error:before {
|
||||||
|
content: "\e64e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-house:before {
|
||||||
|
content: "\e619";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-vip4:before {
|
||||||
|
content: "\e684";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-vip1:before {
|
||||||
|
content: "\f90b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-vip2:before {
|
||||||
|
content: "\fabb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-vip3:before {
|
||||||
|
content: "\10135";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-conversation:before {
|
||||||
|
content: "\e617";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-arrow-down:before {
|
||||||
|
content: "\e615";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-arrow-up:before {
|
||||||
|
content: "\e616";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-refresh:before {
|
||||||
|
content: "\e90c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-refresh-bold:before {
|
||||||
|
content: "\e614";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-copy:before {
|
||||||
|
content: "\e720";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-new-chat:before {
|
||||||
|
content: "\e613";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-expand:before {
|
||||||
|
content: "\e7a0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-colspan:before {
|
||||||
|
content: "\e79e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-question:before {
|
||||||
|
content: "\e8e9";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-AIduihua_jihuo:before {
|
||||||
|
content: "\e6bb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-MidJourney:before {
|
||||||
|
content: "\e60e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-stable-diffusion:before {
|
||||||
|
content: "\e60f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-info:before {
|
||||||
|
content: "\e6a0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-more-horizontal:before {
|
||||||
|
content: "\e60d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-xinghao:before {
|
||||||
|
content: "\e8d6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-plus:before {
|
||||||
|
content: "\e61f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-plus-circle:before {
|
||||||
|
content: "\e822";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-taiyang:before {
|
||||||
|
content: "\e60b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-yueliang:before {
|
||||||
|
content: "\e679";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-prev-page:before {
|
||||||
|
content: "\e8ef";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-next-page:before {
|
||||||
|
content: "\e8f0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-search:before {
|
||||||
|
content: "\e618";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-sub_menu:before {
|
||||||
|
content: "\e75e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-google:before {
|
||||||
|
content: "\ea0c";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-linggan:before {
|
.icon-linggan:before {
|
||||||
content: "\e641";
|
content: "\e641";
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,265 @@
|
|||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "3624396",
|
||||||
|
"name": "兑换码",
|
||||||
|
"font_class": "redeem",
|
||||||
|
"unicode": "e61a",
|
||||||
|
"unicode_decimal": 58906
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "8760110",
|
||||||
|
"name": "login",
|
||||||
|
"font_class": "login",
|
||||||
|
"unicode": "e636",
|
||||||
|
"unicode_decimal": 58934
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "29565277",
|
||||||
|
"name": "礼物",
|
||||||
|
"font_class": "present",
|
||||||
|
"unicode": "e648",
|
||||||
|
"unicode_decimal": 58952
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "13519527",
|
||||||
|
"name": "警告",
|
||||||
|
"font_class": "icon-warning",
|
||||||
|
"unicode": "e671",
|
||||||
|
"unicode_decimal": 58993
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "145466",
|
||||||
|
"name": "帮助",
|
||||||
|
"font_class": "help",
|
||||||
|
"unicode": "e64a",
|
||||||
|
"unicode_decimal": 58954
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "1951950",
|
||||||
|
"name": "成功",
|
||||||
|
"font_class": "success",
|
||||||
|
"unicode": "e61e",
|
||||||
|
"unicode_decimal": 58910
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "6204756",
|
||||||
|
"name": "失败",
|
||||||
|
"font_class": "error",
|
||||||
|
"unicode": "e64e",
|
||||||
|
"unicode_decimal": 58958
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "3916695",
|
||||||
|
"name": "首页",
|
||||||
|
"font_class": "house",
|
||||||
|
"unicode": "e619",
|
||||||
|
"unicode_decimal": 58905
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "10583159",
|
||||||
|
"name": "会员",
|
||||||
|
"font_class": "vip4",
|
||||||
|
"unicode": "e684",
|
||||||
|
"unicode_decimal": 59012
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "23942994",
|
||||||
|
"name": "会员",
|
||||||
|
"font_class": "vip1",
|
||||||
|
"unicode": "f90b",
|
||||||
|
"unicode_decimal": 63755
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "24111538",
|
||||||
|
"name": "会员",
|
||||||
|
"font_class": "vip2",
|
||||||
|
"unicode": "fabb",
|
||||||
|
"unicode_decimal": 64187
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "37305926",
|
||||||
|
"name": "会员VIP",
|
||||||
|
"font_class": "vip3",
|
||||||
|
"unicode": "10135",
|
||||||
|
"unicode_decimal": 65845
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "41134022",
|
||||||
|
"name": "新会话",
|
||||||
|
"font_class": "conversation",
|
||||||
|
"unicode": "e617",
|
||||||
|
"unicode_decimal": 58903
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "17411805",
|
||||||
|
"name": "Arrow Down",
|
||||||
|
"font_class": "arrow-down",
|
||||||
|
"unicode": "e615",
|
||||||
|
"unicode_decimal": 58901
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "17411857",
|
||||||
|
"name": "Arrow Up",
|
||||||
|
"font_class": "arrow-up",
|
||||||
|
"unicode": "e616",
|
||||||
|
"unicode_decimal": 58902
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "7736305",
|
||||||
|
"name": "refresh",
|
||||||
|
"font_class": "refresh",
|
||||||
|
"unicode": "e90c",
|
||||||
|
"unicode_decimal": 59660
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "1391302",
|
||||||
|
"name": "Refresh",
|
||||||
|
"font_class": "refresh-bold",
|
||||||
|
"unicode": "e614",
|
||||||
|
"unicode_decimal": 58900
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "19418384",
|
||||||
|
"name": "copy",
|
||||||
|
"font_class": "copy",
|
||||||
|
"unicode": "e720",
|
||||||
|
"unicode_decimal": 59168
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "20584689",
|
||||||
|
"name": "New Chat",
|
||||||
|
"font_class": "new-chat",
|
||||||
|
"unicode": "e613",
|
||||||
|
"unicode_decimal": 58899
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "23995596",
|
||||||
|
"name": "收起展开-展开",
|
||||||
|
"font_class": "expand",
|
||||||
|
"unicode": "e7a0",
|
||||||
|
"unicode_decimal": 59296
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "23995626",
|
||||||
|
"name": "收起展开-收起",
|
||||||
|
"font_class": "colspan",
|
||||||
|
"unicode": "e79e",
|
||||||
|
"unicode_decimal": 59294
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "1727527",
|
||||||
|
"name": "306问号-线性圆框",
|
||||||
|
"font_class": "question",
|
||||||
|
"unicode": "e8e9",
|
||||||
|
"unicode_decimal": 59625
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "35446270",
|
||||||
|
"name": "AI对话_激活",
|
||||||
|
"font_class": "AIduihua_jihuo",
|
||||||
|
"unicode": "e6bb",
|
||||||
|
"unicode_decimal": 59067
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "39584617",
|
||||||
|
"name": "MidJourney-copy",
|
||||||
|
"font_class": "MidJourney",
|
||||||
|
"unicode": "e60e",
|
||||||
|
"unicode_decimal": 58894
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "42109955",
|
||||||
|
"name": "stable-diffusion",
|
||||||
|
"font_class": "stable-diffusion",
|
||||||
|
"unicode": "e60f",
|
||||||
|
"unicode_decimal": 58895
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "1227734",
|
||||||
|
"name": "info",
|
||||||
|
"font_class": "info",
|
||||||
|
"unicode": "e6a0",
|
||||||
|
"unicode_decimal": 59040
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "159969",
|
||||||
|
"name": "more",
|
||||||
|
"font_class": "more-horizontal",
|
||||||
|
"unicode": "e60d",
|
||||||
|
"unicode_decimal": 58893
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "8434022",
|
||||||
|
"name": "星号",
|
||||||
|
"font_class": "xinghao",
|
||||||
|
"unicode": "e8d6",
|
||||||
|
"unicode_decimal": 59606
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "831577",
|
||||||
|
"name": "plus",
|
||||||
|
"font_class": "plus",
|
||||||
|
"unicode": "e61f",
|
||||||
|
"unicode_decimal": 58911
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "6151285",
|
||||||
|
"name": "plus-circle",
|
||||||
|
"font_class": "plus-circle",
|
||||||
|
"unicode": "e822",
|
||||||
|
"unicode_decimal": 59426
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "15056491",
|
||||||
|
"name": "太阳",
|
||||||
|
"font_class": "taiyang",
|
||||||
|
"unicode": "e60b",
|
||||||
|
"unicode_decimal": 58891
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "40094190",
|
||||||
|
"name": "月亮-copy",
|
||||||
|
"font_class": "yueliang",
|
||||||
|
"unicode": "e679",
|
||||||
|
"unicode_decimal": 59001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "1727538",
|
||||||
|
"name": "上一页",
|
||||||
|
"font_class": "prev-page",
|
||||||
|
"unicode": "e8ef",
|
||||||
|
"unicode_decimal": 59631
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "1727540",
|
||||||
|
"name": "下一页",
|
||||||
|
"font_class": "next-page",
|
||||||
|
"unicode": "e8f0",
|
||||||
|
"unicode_decimal": 59632
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "2488134",
|
||||||
|
"name": "搜索",
|
||||||
|
"font_class": "search",
|
||||||
|
"unicode": "e618",
|
||||||
|
"unicode_decimal": 58904
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "9845558",
|
||||||
|
"name": "sub_menu",
|
||||||
|
"font_class": "sub_menu",
|
||||||
|
"unicode": "e75e",
|
||||||
|
"unicode_decimal": 59230
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "11983544",
|
||||||
|
"name": "google",
|
||||||
|
"font_class": "google",
|
||||||
|
"unicode": "ea0c",
|
||||||
|
"unicode_decimal": 59916
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "15330210",
|
"icon_id": "15330210",
|
||||||
"name": "创意灵感",
|
"name": "创意灵感",
|
||||||
|
BIN
web/src/assets/img/371731933156_.pic.jpg
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
web/src/assets/img/avatar.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
web/src/assets/img/login-bg.png
Normal file
After Width: | Height: | Size: 824 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
BIN
web/src/assets/img/logo.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
web/src/assets/img/no-data.png
Normal file
After Width: | Height: | Size: 39 KiB |
60
web/src/components/AccountBg.vue
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<div class="right flex-center">
|
||||||
|
<div class="logo">
|
||||||
|
<img src="@/assets/img/logo.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div>welcome</div>
|
||||||
|
<footer-bar />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import FooterBar from "@/components/FooterBar.vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.right{
|
||||||
|
font-size: 40px
|
||||||
|
font-weight: bold
|
||||||
|
color:#fff
|
||||||
|
flex-direction: column
|
||||||
|
background-image url("~@/assets/img/login-bg.png")
|
||||||
|
background-size cover
|
||||||
|
background-position center
|
||||||
|
width: 50%;
|
||||||
|
min-height: 100vh
|
||||||
|
max-height: 100vh
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 1;
|
||||||
|
:deep(.foot-container){
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
width: 100%;
|
||||||
|
background: none;
|
||||||
|
color: var(--sm-txt);
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.footer{
|
||||||
|
a,
|
||||||
|
span{
|
||||||
|
color: var(--text-fff)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.logo{
|
||||||
|
margin-bottom: 26px;
|
||||||
|
width: 200px
|
||||||
|
height: 200px
|
||||||
|
background: #fff
|
||||||
|
border-radius: 50%
|
||||||
|
img{
|
||||||
|
width: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
101
web/src/components/AccountTop.vue
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<ThemeChange />
|
||||||
|
<div
|
||||||
|
@click="goBack"
|
||||||
|
class="flex back animate__animated animate__pulse animate__infinite"
|
||||||
|
>
|
||||||
|
<el-icon><ArrowLeftBold /></el-icon
|
||||||
|
>{{ title === "注册" ? "首页" : "返回" }}
|
||||||
|
</div>
|
||||||
|
<div class="title">{{ title }}</div>
|
||||||
|
<div class="smTitle" v-if="title !== '重置密码'">
|
||||||
|
{{ title === "登录" ? "没有账号?" : "已有账号?"
|
||||||
|
}}<span @click="goPageFun" class="text-color-primary sign"
|
||||||
|
>赶紧{{ title === "登录" ? "注册" : "登录" }}</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<slot></slot>
|
||||||
|
<div class="flex orline" v-if="title !== '重置密码'">
|
||||||
|
<div class="lineor"></div>
|
||||||
|
<span>或</span>
|
||||||
|
<div class="lineor"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ArrowLeftBold } from "@element-plus/icons-vue";
|
||||||
|
import ThemeChange from "@/components/ThemeChange.vue";
|
||||||
|
import { defineProps } from "vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "登录"
|
||||||
|
},
|
||||||
|
smTitle: { type: String, default: "没有账号?" },
|
||||||
|
goPage: {
|
||||||
|
type: String,
|
||||||
|
default: "/register"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const goBack = () => {
|
||||||
|
if (props.title === "注册") {
|
||||||
|
router.push("/");
|
||||||
|
} else {
|
||||||
|
router.go(-1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const goPageFun = () => {
|
||||||
|
if (props.title === "登录") {
|
||||||
|
router.push("/register");
|
||||||
|
} else {
|
||||||
|
router.push("/login");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.back{
|
||||||
|
color:var(--sm-txt)
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 140px
|
||||||
|
margin-top: 18px
|
||||||
|
cursor: pointer
|
||||||
|
.el-icon{
|
||||||
|
margin-right: 6px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-size: 36px
|
||||||
|
margin-bottom: 16px
|
||||||
|
color: var(--text-color)
|
||||||
|
|
||||||
|
}
|
||||||
|
.smTitle{
|
||||||
|
color: var(--text-color)
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 36px
|
||||||
|
}
|
||||||
|
.sign{
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor :pointer
|
||||||
|
}
|
||||||
|
.orline{
|
||||||
|
color:var(--text-secondary)
|
||||||
|
span{
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 0 10px
|
||||||
|
|
||||||
|
}
|
||||||
|
.lineor{
|
||||||
|
|
||||||
|
width: 182px; height: 1px;
|
||||||
|
background: var(--text-secondary)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<button v-if="showButton" @click="scrollToTop" class="scroll-to-top" :style="{bottom: bottom + 'px', right: right + 'px', backgroundColor: bgColor}">
|
<button
|
||||||
|
v-if="showButton"
|
||||||
|
@click="scrollToTop"
|
||||||
|
class="scroll-to-top"
|
||||||
|
:style="{
|
||||||
|
bottom: bottom + 'px',
|
||||||
|
right: right + 'px',
|
||||||
|
backgroundColor: bgColor
|
||||||
|
}"
|
||||||
|
>
|
||||||
<el-icon><ArrowUpBold /></el-icon>
|
<el-icon><ArrowUpBold /></el-icon>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {ArrowUpBold} from "@element-plus/icons-vue";
|
import { ArrowUpBold } from "@element-plus/icons-vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BackTop',
|
name: "BackTop",
|
||||||
components: {ArrowUpBold},
|
components: { ArrowUpBold },
|
||||||
props: {
|
props: {
|
||||||
bottom: {
|
bottom: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30
|
default: 155
|
||||||
},
|
},
|
||||||
right: {
|
right: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@ -21,7 +30,7 @@ export default {
|
|||||||
},
|
},
|
||||||
bgColor: {
|
bgColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '#007bff'
|
default: "#b6aaf9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -31,19 +40,19 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkScroll();
|
this.checkScroll();
|
||||||
window.addEventListener('resize', this.checkScroll);
|
window.addEventListener("resize", this.checkScroll);
|
||||||
this.$el.parentElement.addEventListener('scroll', this.checkScroll);
|
this.$el.parentElement.addEventListener("scroll", this.checkScroll);
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
window.removeEventListener('resize', this.checkScroll);
|
window.removeEventListener("resize", this.checkScroll);
|
||||||
this.$el.parentElement.removeEventListener('scroll', this.checkScroll);
|
this.$el.parentElement.removeEventListener("scroll", this.checkScroll);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
scrollToTop() {
|
scrollToTop() {
|
||||||
const container = this.$el.parentElement;
|
const container = this.$el.parentElement;
|
||||||
container.scrollTo({
|
container.scrollTo({
|
||||||
top: 0,
|
top: 0,
|
||||||
behavior: 'smooth'
|
behavior: "smooth"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkScroll() {
|
checkScroll() {
|
||||||
@ -51,7 +60,7 @@ export default {
|
|||||||
this.showButton = container.scrollTop > 50;
|
this.showButton = container.scrollTop > 50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="stylus">
|
<style scoped lang="stylus">
|
||||||
@ -63,15 +72,15 @@ export default {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition: opacity 0.3s;
|
transition: opacity 0.3s;
|
||||||
width 40px
|
width 30px
|
||||||
height 40px
|
height 30px
|
||||||
display flex
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
align-items center
|
align-items center
|
||||||
font-size 20px
|
font-size 18px
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<el-input v-model="form.code" maxlength="6"/>
|
<el-input v-model="form.code" maxlength="6"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" style="padding-left: 10px">
|
<el-col :span="8" style="padding-left: 10px">
|
||||||
<send-msg :receiver="form.mobile" type="mobile"/>
|
<send-msg :receiver="form.mobile" size="default" type="mobile"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|