add QQ扫码登录
This commit is contained in:
parent
64e29b5727
commit
9d5718d820
@ -155,7 +155,6 @@ var codeSignals = []CodeSignal{
|
||||
}
|
||||
logs.Info(s.Data.QqLoginQrcode.Bytes)
|
||||
//ddd, _ := base64.StdEncoding.DecodeString("data:image/png;base64,"+s.Data.QqLoginQrcode.Bytes)
|
||||
|
||||
return "data:image/png;base64," + s.Data.QqLoginQrcode.Bytes
|
||||
},
|
||||
},
|
||||
|
||||
@ -9,6 +9,7 @@ import (
|
||||
"encoding/hex"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
@ -77,12 +78,7 @@ func Main() {
|
||||
if bot != nil {
|
||||
if strings.Contains(msg.(string), "data:image") {
|
||||
photo := msg.(string)
|
||||
//i := strings.Index(photo, ",")
|
||||
//if i < 0 {
|
||||
// log.Fatal("no comma")
|
||||
//}
|
||||
//
|
||||
//dec := base64.NewDecoder(base64.StdEncoding, strings.NewReader(photo[i+1:]))
|
||||
logs.Info(photo)
|
||||
b := []byte(photo)
|
||||
bot.SendPrivateMessage(uid, models.Config.QQGroupID, &message.SendingMessage{Elements: []message.IMessageElement{&coolq.LocalImageElement{Stream: bytes.NewReader(b)}}})
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user