From 69b5efb3430bd338e8405bfa8c92cf791f448c50 Mon Sep 17 00:00:00 2001 From: Mike Wang Date: Mon, 3 May 2021 16:57:24 +0800 Subject: [PATCH] Replace Model '+' to '%20' --- client/model_show.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/model_show.go b/client/model_show.go index f20685ff..c61b6cdd 100644 --- a/client/model_show.go +++ b/client/model_show.go @@ -3,6 +3,7 @@ package client import ( "fmt" "net/url" + "strings" "time" jsoniter "github.com/json-iterator/go" @@ -56,7 +57,7 @@ func (c *QQClient) GetModelShow(modelName string) ([]*ModelVariant, error) { Req: ModelReq{ Req: ModelReqData{ Uin: c.Uin, - Model: url.QueryEscape(modelName), + Model: strings.ReplaceAll(url.QueryEscape(modelName), "+", "%20"), AppType: 0, IMei: SystemDeviceInfo.IMEI, ShowInfo: true, @@ -99,11 +100,11 @@ func (c *QQClient) SetModelShow(modelName string, modelShow string) error { Req: ModelReq{ Req: ModelReqData{ Uin: c.Uin, - Model: url.QueryEscape(modelName), + Model: strings.ReplaceAll(url.QueryEscape(modelName), "+", "%20"), AppType: 0, IMei: SystemDeviceInfo.IMEI, ShowInfo: true, - ModelShow: url.QueryEscape(modelShow), + ModelShow: strings.ReplaceAll(url.QueryEscape(modelShow), "+", "%20"), RecoverDefault: recover, }, },