Files
chuanqi-qycq-web/module/server/config/index.js
艾贤凌 6d4a72161f inint
2026-03-16 12:05:55 +08:00

78 lines
2.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export default {
mysql: {
host: process.env.DB_HOST || '192.168.25.110',
port: parseInt(process.env.DB_PORT) || 3307,
user: process.env.DB_USER || 'root',
password: process.env.DB_PASSWORD || 'mysql_Adkijc',
database: process.env.DB_NAME || 'mir_web'
},
// 游戏基础配置
game: {
name: '清渊传奇',
firstName: '清渊',
description: '经典复古 爽快耐玩',
host: process.env.GAME_HOST || '192.168.25.110',
port: parseInt(process.env.GAME_PORT) || 9000,
pf: 'yfbx',
spid: 1,
// 游戏 GM 命令接口端口HTTP
gmPort: parseInt(process.env.GAME_GM_PORT) || 111,
// 游戏区服数据库连接(默认复用 web 数据库的连接信息)
dbHost: process.env.GAME_DB_HOST || '',
dbPort: parseInt(process.env.GAME_DB_PORT) || 0,
dbUser: process.env.GAME_DB_USER || '',
dbPassword: process.env.GAME_DB_PASSWORD || '',
},
// 帐号配置
account: {
name: '通行证',
nameSuffix: '号',
passwordSuffix: '密文',
adminAccount: 'admin',
retainAccounts: ['admin', 'administrator'],
regOpen: true,
loginOpen: true,
dayMaxReg: 1, // 单IP每日最大注册数
denyIps: [], // 封禁IP列表
},
// 邮件配置
mail: {
from: process.env.MAIL_FROM || 'admin@163.com',
password: process.env.MAIL_PASSWORD || '123456',
host: process.env.MAIL_HOST || 'smtp.163.com',
port: parseInt(process.env.MAIL_PORT) || 465,
secure: true, // 465端口用true587用false
},
// 验证码配置
code: {
open: true, // 总开关
regCodeOpen: false, // 注册是否需要验证码
length: 6,
sendInterval: 60, // 发送间隔(秒)
},
// LinuxDo OAuth
linuxdo: {
clientId: process.env.LINUXDO_CLIENT_ID || 'tfKevot5lSwB5A5gcqPQMMhaXDLjib0P',
clientSecret: process.env.LINUXDO_CLIENT_SECRET || '95KWP8sbRIUu5df7gBo5fIztz6ISmvfa',
redirectUri: process.env.LINUXDO_REDIRECT_URI || 'http://localhost:3001/api/linuxdo/callback',
tokenUrl: 'https://connect.linux.do/oauth2/token',
userUrl: 'https://connect.linux.do/api/user',
authorizeUrl: 'https://connect.linux.do/oauth2/authorize',
},
// 提现配置
withdraw: {
sid: 1,
type: 3, // 2=金币 3=银两 4=元宝
ratio: 10000,
minOnce: 20, // 单次最少提现人民币
intervalSec: 30,
},
// 货币配置
currency: {
list: { 2: '金币', 3: '银两', 4: '元宝' },
field: { 2: 'bindcoin', 3: 'bindyuanbao', 4: 'nonbindyuanbao' },
},
// 用户协议HTML内容
agree: `<div style="padding:15px;color:#000">请在此填写用户协议内容。</div>`,
}