1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00
This commit is contained in:
scjtqs 2020-08-30 02:29:29 +08:00
parent fc18b84d4b
commit bcdbefb355
2 changed files with 6 additions and 7 deletions

View File

@ -44,12 +44,12 @@ func QQMusicSongInfo(id string) (gjson.Result, error) {
return gjson.ParseBytes(d).Get("songinfo.data"), nil return gjson.ParseBytes(d).Get("songinfo.data"), nil
} }
func NewXmlMsg(template string,ResId int64) *message.ServiceElement{ func NewXmlMsg(template string, ResId int64) *message.ServiceElement {
var serviceid string var serviceid string
if ResId == 0{ if ResId == 0 {
serviceid ="2" //默认值2 serviceid = "2" //默认值2
}else{ } else {
serviceid = strconv.FormatInt(ResId,10) serviceid = strconv.FormatInt(ResId, 10)
} }
//println(serviceid) //println(serviceid)
return &message.ServiceElement{ return &message.ServiceElement{
@ -60,7 +60,7 @@ func NewXmlMsg(template string,ResId int64) *message.ServiceElement{
} }
} }
func NewJsonMsg(template string) *message.ServiceElement{ func NewJsonMsg(template string) *message.ServiceElement {
return &message.ServiceElement{ return &message.ServiceElement{
Id: 1, Id: 1,
Content: template, Content: template,

View File

@ -400,7 +400,6 @@ func getParamOrDefault(c *gin.Context, k, def string) string {
return def return def
} }
func getParam(c *gin.Context, k string) string { func getParam(c *gin.Context, k string) string {
p, _ := getParamWithType(c, k) p, _ := getParamWithType(c, k)
return p return p