From 93b1d66885d96bf485114eec08da86cba27fa6da Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Wed, 22 Sep 2021 14:40:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/available.go | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/models/available.go b/models/available.go index d4b4e12..e42037b 100644 --- a/models/available.go +++ b/models/available.go @@ -182,18 +182,20 @@ func updateCookie() { PtKey: ptKey, PtPin: ptPin, } - if nck, err := GetJdCookie(ck.PtPin); err == nil { - xx++ - nck.InPool(ck.PtKey) - nck.Update(Available, True) - //msg := fmt.Sprintf("定时更新账号,%s", ck.PtPin) - ////不再发送成功提醒 - //(&JdCookie{}).Push(msg) - //logs.Info(msg) - } else { - yy++ - ck.Update(Available, False) - (&JdCookie{}).Push(fmt.Sprintf("转换失败,%s", ck.PtPin)) + if ptPin != "" || ptKey != "" { + if nck, err := GetJdCookie(ck.PtPin); err == nil { + xx++ + nck.InPool(ck.PtKey) + nck.Update(Available, True) + //msg := fmt.Sprintf("定时更新账号,%s", ck.PtPin) + ////不再发送成功提醒 + //(&JdCookie{}).Push(msg) + //logs.Info(msg) + } else { + yy++ + ck.Update(Available, False) + (&JdCookie{}).Push(fmt.Sprintf("查无匹配得ptpin,%s", ck.PtPin)) + } } go func() { Save <- &JdCookie{}