+4
-28
@@ -18,9 +18,8 @@ var (
|
||||
)
|
||||
|
||||
type AppConfigs struct {
|
||||
AppName string `json:"app_name"`
|
||||
Settings Settings `json:"settings"`
|
||||
UserPrefs UserPrefs `json:"user_prefs"`
|
||||
AppName string `json:"app_name"`
|
||||
Settings Settings `json:"settings"`
|
||||
}
|
||||
|
||||
type Settings struct {
|
||||
@@ -29,19 +28,7 @@ type Settings struct {
|
||||
BackupCdnServer string `json:"backup_cdn_server"`
|
||||
}
|
||||
|
||||
type UserPrefs struct {
|
||||
Name string `json:"name"` // 用户名
|
||||
Level int `json:"level"` // 用户等级
|
||||
ExpNumerator int `json:"exp_numerator"` // Exp 分子
|
||||
ExpDenominator int `json:"exp_denominator"` // Exp 分母
|
||||
GameCoin int `json:"game_coin"` // 游戏金币
|
||||
SnsCoin int `json:"sns_coin"` // 游戏爱心
|
||||
EnergyMax int `json:"energy_max"` // 体力上限
|
||||
OverMaxEnergy int `json:"over_max_energy"` // 实际体力,为 0 时与 EnergyMax 一致
|
||||
InviteCode string `json:"invite_code"` // 用户 ID
|
||||
}
|
||||
|
||||
func init() {
|
||||
func InitConfig() {
|
||||
Conf = Load("./config.json")
|
||||
}
|
||||
|
||||
@@ -50,20 +37,9 @@ func DefaultConfigs() *AppConfigs {
|
||||
AppName: "honoka-chan",
|
||||
Settings: Settings{
|
||||
ListenPort: "8080",
|
||||
CdnServer: "http://192.168.1.123/static",
|
||||
CdnServer: "http://127.0.0.1:8080/static",
|
||||
BackupCdnServer: "",
|
||||
},
|
||||
UserPrefs: UserPrefs{
|
||||
Name: "梦路 @bilibili",
|
||||
Level: 1028,
|
||||
ExpNumerator: 1089696,
|
||||
ExpDenominator: 1207185,
|
||||
GameCoin: 112124104,
|
||||
SnsCoin: 0,
|
||||
EnergyMax: 417,
|
||||
OverMaxEnergy: 0,
|
||||
InviteCode: "377385143",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user