1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

Replace Model '+' to '%20'

This commit is contained in:
Mike Wang 2021-05-03 16:57:24 +08:00
parent 60474fa5d2
commit 69b5efb343

View File

@ -3,6 +3,7 @@ package client
import ( import (
"fmt" "fmt"
"net/url" "net/url"
"strings"
"time" "time"
jsoniter "github.com/json-iterator/go" jsoniter "github.com/json-iterator/go"
@ -56,7 +57,7 @@ func (c *QQClient) GetModelShow(modelName string) ([]*ModelVariant, error) {
Req: ModelReq{ Req: ModelReq{
Req: ModelReqData{ Req: ModelReqData{
Uin: c.Uin, Uin: c.Uin,
Model: url.QueryEscape(modelName), Model: strings.ReplaceAll(url.QueryEscape(modelName), "+", "%20"),
AppType: 0, AppType: 0,
IMei: SystemDeviceInfo.IMEI, IMei: SystemDeviceInfo.IMEI,
ShowInfo: true, ShowInfo: true,
@ -99,11 +100,11 @@ func (c *QQClient) SetModelShow(modelName string, modelShow string) error {
Req: ModelReq{ Req: ModelReq{
Req: ModelReqData{ Req: ModelReqData{
Uin: c.Uin, Uin: c.Uin,
Model: url.QueryEscape(modelName), Model: strings.ReplaceAll(url.QueryEscape(modelName), "+", "%20"),
AppType: 0, AppType: 0,
IMei: SystemDeviceInfo.IMEI, IMei: SystemDeviceInfo.IMEI,
ShowInfo: true, ShowInfo: true,
ModelShow: url.QueryEscape(modelShow), ModelShow: strings.ReplaceAll(url.QueryEscape(modelShow), "+", "%20"),
RecoverDefault: recover, RecoverDefault: recover,
}, },
}, },