fix: 修复一些bug

This commit is contained in:
2022-12-10 13:22:54 +08:00
parent 5cc34e7e3d
commit 67c0cbf27b
4 changed files with 25 additions and 18 deletions

View File

@@ -12,7 +12,7 @@ void SparkAPI::get(QUrl url)
{
QNetworkRequest request;
HttpRequest *httprequest=new HttpRequest;
request.setUrl(url);
request.setUrl(QUrl(url.toString().replace("+","%2B")));
connect(httprequest,&HttpRequest::finished,[=](QString data){
QByteArray arr = data.toUtf8();
//解析Json
@@ -40,7 +40,7 @@ void SparkAPI::getSearchList(QString keyword)
}
void SparkAPI::getAppInfo(QUrl spk)
{
get(QUrl(getServerUrl()+"store"+spk.path() + "/app.json"));
get(QUrl(getServerUrl()+"store"+spk.path().replace("+","%2B") + "/app.json"));
}
QString SparkAPI::getServerUrl()
{