Skip to content

Commit

Permalink
chore: remove useless system config items
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjian102621 committed Jan 6, 2024
1 parent 76c5101 commit 7de5b55
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
4 changes: 1 addition & 3 deletions api/core/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,13 @@ type SystemConfig struct {
VipMonthCalls int `json:"vip_month_calls"` // VIP 会员每月赠送的对话次数
VipMonthImgCalls int `json:"vip_month_img_calls"` // VIP 会员每月赠送绘图次数

EnabledRegister bool `json:"enabled_register"` // 是否启用注册功能,关闭注册功能之后将无法注册
RegisterWays []string `json:"register_ways"` // 注册方式:支持手机,邮箱注册
RegisterWays []string `json:"register_ways"` // 注册方式:支持手机,邮箱注册

RewardImg string `json:"reward_img"` // 众筹收款二维码地址
EnabledReward bool `json:"enabled_reward"` // 启用众筹功能
ChatCallPrice float64 `json:"chat_call_price"` // 对话单次调用费用
ImgCallPrice float64 `json:"img_call_price"` // 绘图单次调用费用

EnabledAlipay bool `json:"enabled_alipay"` // 是否启用支付宝支付通道
OrderPayTimeout int `json:"order_pay_timeout"` //订单支付超时时间
DefaultModels []string `json:"default_models"` // 默认开通的 AI 模型
OrderPayInfoText string `json:"order_pay_info_text"` // 订单支付页面说明文字
Expand Down
6 changes: 4 additions & 2 deletions web/src/views/ChatPlus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@
如果觉得好用你就花几分钟自己部署一套,没有API KEY 的同学可以去
<a href="https://gpt.bemore.lol" target="_blank"
style="font-size: 20px;color:#F56C6C">https://gpt.bemore.lol</a>
购买,现在有超级优惠,价格远低于 OpenAI 官方。
购买,现在有超级优惠,价格远低于 OpenAI 官方。<br/>
GPT-3.5,GPT-4,DALL-E3 绘图......你都可以随意使用,无需魔法。
</el-text>

<p style="text-align: right">
Expand All @@ -264,7 +265,8 @@ import {
Check,
Close,
Delete,
Edit, Plus,
Edit,
Plus,
Promotion,
RefreshRight,
Search,
Expand Down
4 changes: 3 additions & 1 deletion web/src/views/Register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ const placeholder = ref("用户名:")
httpGet("/api/admin/config/get?key=system").then(res => {
if (res.data) {
enableRegister.value = res.data['enabled_register']
const registerWays = res.data['register_ways']
if (arrayContains(registerWays, "mobile")) {
enableMobile.value = true
Expand All @@ -156,6 +155,9 @@ httpGet("/api/admin/config/get?key=system").then(res => {
ways.push("邮箱地址")
}
placeholder.value += ways.join("/")
if (ways.length === 0) {
enableRegister.value = false
}
}
}).catch(e => {
ElMessage.error("获取系统配置失败:" + e.message)
Expand Down
17 changes: 0 additions & 17 deletions web/src/views/admin/SysConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
<el-form-item label="VIP每月绘图次数" prop="vip_month_img_calls">
<el-input v-model.number="system['vip_month_img_calls']" placeholder="VIP用户每月赠送绘图次数"/>
</el-form-item>
<el-form-item label="开放注册服务" prop="enabled_register">
<el-switch v-model="system['enabled_register']"/>
</el-form-item>
<el-form-item label="注册方式" prop="register_ways">
<el-checkbox-group v-model="system['register_ways']">
<el-checkbox label="mobile">手机注册</el-checkbox>
Expand Down Expand Up @@ -75,20 +72,6 @@
</el-form-item>
</div>

<el-form-item label="启用支付宝" prop="enabled_alipay">
<el-switch v-model="system['enabled_alipay']"/>
<el-tooltip
effect="dark"
content="是否启用支付宝支付功能,<br />请先在 config.toml 配置文件配置支付秘钥"
raw-content
placement="right"
>
<el-icon>
<InfoFilled/>
</el-icon>
</el-tooltip>
</el-form-item>

<el-form-item label="显示演示公告" prop="show_demo_notice">
<el-switch v-model="system['show_demo_notice']"/>
<el-tooltip
Expand Down

0 comments on commit 7de5b55

Please sign in to comment.