add QQ扫码登录
This commit is contained in:
parent
7d712ef402
commit
8927b8b622
@ -507,7 +507,7 @@ func (c *LoginController) SMSLogin() {
|
||||
ck.Query()
|
||||
msg := fmt.Sprintf("来自短信的添加,账号:%s,QQ: %s", ck.PtPin, qq)
|
||||
(&models.JdCookie{}).Push(msg)
|
||||
} else if !models.HasKey(ptKey) {
|
||||
} else {
|
||||
ck, _ := models.GetJdCookie(ptPin)
|
||||
ck.InPool(ptKey)
|
||||
if qq != "" {
|
||||
|
||||
@ -202,6 +202,7 @@ func (ck *JdCookie) Removes(values interface{}) {
|
||||
db.Model(ck).Delete(values)
|
||||
}
|
||||
if ck.PtPin != "" {
|
||||
db.Model(&JdCookiePool{}).Where(PtPin+" = ?", ck.PtPin).Delete(values)
|
||||
db.Model(ck).Where(PtPin+" = ?", ck.PtPin).Delete(values)
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +80,10 @@ func Main() {
|
||||
case *http.Response:
|
||||
data, _ := ioutil.ReadAll(msg.(*http.Response).Body)
|
||||
bot.SendPrivateMessage(uid, models.Config.QQGroupID, &message.SendingMessage{Elements: []message.IMessageElement{&coolq.LocalImageElement{Stream: bytes.NewReader(data)}}})
|
||||
case byte:
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
models.SendQQGroup = func(gid int64, uid int64, msg interface{}) {
|
||||
if bot == nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user