fix 新增会员中心
This commit is contained in:
parent
4a7cf87cb9
commit
ff6aa8f298
@ -11,6 +11,7 @@ containers:
|
||||
AtTime: #填写1-12之间的数 填错自负默认为10 10点容易出现高峰超时。
|
||||
IsHelp: #填写true或者false false
|
||||
IsOldV4: #填写true或者false false是否新版或者旧版V4
|
||||
ApiToken: #为空默认随机禁用
|
||||
theme:
|
||||
static: ./static
|
||||
master:
|
||||
|
||||
@ -371,6 +371,7 @@ func (c *LoginController) CkLogin() {
|
||||
if !models.HasPin(ptPin) {
|
||||
models.NewJdCookie(ck)
|
||||
result.Message = fmt.Sprintf("添加成功")
|
||||
result.Data = ck.Query()
|
||||
jsons, errs := json.Marshal(result) //转换成JSON返回的是byte[]
|
||||
if errs != nil {
|
||||
fmt.Println(errs.Error())
|
||||
@ -380,6 +381,7 @@ func (c *LoginController) CkLogin() {
|
||||
ck, _ := models.GetJdCookie(ptPin)
|
||||
ck.InPool(ptKey)
|
||||
result.Message = fmt.Sprintf("更新成功")
|
||||
result.Data = ck.Query()
|
||||
jsons, errs := json.Marshal(result) //转换成JSON返回的是byte[]
|
||||
if errs != nil {
|
||||
fmt.Println(errs.Error())
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/Mrs4s/MiraiGo/utils"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
@ -34,6 +35,7 @@ type Yaml struct {
|
||||
CTime string `yaml:"AtTime"`
|
||||
IsHelp bool `yaml:"IsHelp"`
|
||||
IsOldV4 bool `yaml:"IsOldV4"`
|
||||
ApiToken string `yaml:"ApiToken"`
|
||||
Node string
|
||||
Npm string
|
||||
Python string
|
||||
@ -102,6 +104,9 @@ func initConfig() {
|
||||
if Config.Npm == "" {
|
||||
Config.Npm = "npm"
|
||||
}
|
||||
if Config.ApiToken == "" {
|
||||
Config.ApiToken = utils.RandomString(17)
|
||||
}
|
||||
if Config.Node == "" {
|
||||
Config.Node = "node"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user