1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

Merge pull request #157 from MikeWang000000/master

Replace Model '+' to '%20'
This commit is contained in:
Mrs4s 2021-05-03 17:47:55 +08:00 committed by GitHub
commit b12e45fea9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
},
},