x
This commit is contained in:
parent
ea466ce5b4
commit
81ecbb9e97
@ -106,7 +106,7 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
if !isAdmin(msgs...) {
|
||||
return "你没有权限操作"
|
||||
}
|
||||
return fmt.Sprintf("操作成功,更新%d条记录", db.Model(JdCookie{}).Update(Hack, False).RowsAffected)
|
||||
return fmt.Sprintf("操作成功,更新%d条记录", db.Model(JdCookie{}).Where(fmt.Sprintf("%s != ?", Hack), False).Update(Hack, False).RowsAffected)
|
||||
case "status", "状态":
|
||||
if !isAdmin(msgs...) {
|
||||
return "你没有权限操作"
|
||||
|
||||
@ -48,7 +48,6 @@ func initDB() {
|
||||
keys[jp.PtKey] = true
|
||||
pins[jp.PtPin] = true
|
||||
}
|
||||
db.Model(JdCookie{}).Where(fmt.Sprintf("%s = ?", Hack), "").Update(Hack, False)
|
||||
}
|
||||
|
||||
func HasPin(pin string) bool {
|
||||
@ -224,6 +223,9 @@ func (ck *JdCookie) OutPool() (string, error) {
|
||||
}
|
||||
|
||||
func NewJdCookie(ck *JdCookie) error {
|
||||
if ck.Hack == "" {
|
||||
ck.Hack = False
|
||||
}
|
||||
ck.Priority = Config.DefaultPriority
|
||||
date := Date()
|
||||
ck.CreateAt = date
|
||||
|
||||
@ -64,7 +64,7 @@ module.exports = cookies`, cookies))
|
||||
f.Close()
|
||||
tmp = []JdCookie{}
|
||||
for _, ck := range cks {
|
||||
if ck.Hack == False {
|
||||
if ck.Hack != True {
|
||||
tmp = append(tmp, ck)
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
var version = "2021082005"
|
||||
var version = "2021082006"
|
||||
var AppName = "xdd"
|
||||
var pname = regexp.MustCompile(`/([^/\s]+)`).FindStringSubmatch(os.Args[0])[1]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user