mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-15 10:02:21 +08:00
使用hardcode的方式修改了url
请在后续版本改善 仅用于测试!!!! web请求方式被改回旧版了,请在柚子发布新web后改回
This commit is contained in:
parent
8f39710cdb
commit
cf59aeb4eb
5
debian/changelog
vendored
5
debian/changelog
vendored
@ -1,3 +1,8 @@
|
||||
spark-store (4.2.3.2~only-for-test1) stable; urgency=medium
|
||||
* 注意!!!!!! 此版本仅为启动测试,还需要进一步完善——hardcode需要改善——关于web界面的调用方式需要在柚子做好之后修改成新的
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (4.2.3.1) stable; urgency=medium
|
||||
* 修复: ssinstall验证签名出错
|
||||
|
||||
|
@ -54,7 +54,7 @@ void SparkAPI::getRAW(QUrl url)
|
||||
|
||||
void SparkAPI::getAppList(QString type)
|
||||
{
|
||||
get(QUrl(getServerUrl() + "store/" + type + "/applist.json"));
|
||||
get(QUrl(getServerUrl() + "aarch64-store/" + type + "/applist.json"));
|
||||
}
|
||||
|
||||
void SparkAPI::getSearchList(QString keyword)
|
||||
@ -64,12 +64,12 @@ void SparkAPI::getSearchList(QString keyword)
|
||||
|
||||
void SparkAPI::getAppInfo(QUrl spk)
|
||||
{
|
||||
get(QUrl(getServerUrl() + "store" + spk.path().replace("+", "%2B") + "/app.json"));
|
||||
get(QUrl(getServerUrl() + "aarch64-store" + spk.path().replace("+", "%2B") + "/app.json"));
|
||||
}
|
||||
|
||||
void SparkAPI::getAppDownloadTimes(QUrl spk)
|
||||
{
|
||||
getRAW(QUrl(getServerUrl() + "store" + spk.path().replace("+", "%2B") + "/download-times.txt"));
|
||||
getRAW(QUrl(getServerUrl() + "aarch64-store" + spk.path().replace("+", "%2B") + "/download-times.txt"));
|
||||
}
|
||||
|
||||
QString SparkAPI::getServerUrl()
|
||||
|
@ -55,8 +55,8 @@ void AppIntoPage::openUrl(const QUrl &url)
|
||||
// 获取图标
|
||||
QNetworkRequest request;
|
||||
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
|
||||
qDebug() << api->getImgServerUrl() + "store" + url.path() + "/icon.png";
|
||||
request.setUrl(QUrl(api->getImgServerUrl() + "store" + url.path() + "/icon.png"));
|
||||
qDebug() << api->getImgServerUrl() + "aarch64-store" + url.path() + "/icon.png";
|
||||
request.setUrl(QUrl(api->getImgServerUrl() + "aarch64-store" + url.path() + "/icon.png"));
|
||||
request.setRawHeader("User-Agent", "Mozilla/5.0");
|
||||
request.setRawHeader("Content-Type", "charset='utf-8'");
|
||||
manager->get(request);
|
||||
@ -175,7 +175,7 @@ void AppIntoPage::openUrl(const QUrl &url)
|
||||
ui->downloadButton->show();
|
||||
}
|
||||
|
||||
isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString());
|
||||
isDownloading(SparkAPI::getServerUrl() + "aarch64-store" + spk.path() + "/" + info["Filename"].toString());
|
||||
}
|
||||
|
||||
api1->disconnect();
|
||||
@ -267,7 +267,7 @@ void AppIntoPage::setDownloadWidget(DownloadListWidget *w)
|
||||
|
||||
dw = w;
|
||||
connect(w, &DownloadListWidget::downloadFinished, [=]()
|
||||
{ isDownloading(SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString()); });
|
||||
{ isDownloading(SparkAPI::getServerUrl() + "aarch64-store" + spk.path() + "/" + info["Filename"].toString()); });
|
||||
}
|
||||
|
||||
void AppIntoPage::initUI()
|
||||
@ -375,7 +375,7 @@ void AppIntoPage::setAppinfoTags(const QStringList &tagList)
|
||||
|
||||
void AppIntoPage::on_downloadButton_clicked()
|
||||
{
|
||||
QString downloadUrl = SparkAPI::getServerUrl() + "store" + spk.path() + "/" + info["Filename"].toString();
|
||||
QString downloadUrl = SparkAPI::getServerUrl() + "aarch64-store" + spk.path() + "/" + info["Filename"].toString();
|
||||
if (ui->downloadButton->text() == tr("Install"))
|
||||
{
|
||||
DownloadItem *item = dw->getDIList()[dw->getUrlList().lastIndexOf(downloadUrl)];
|
||||
|
@ -37,19 +37,19 @@ void AppListPage::getAppList(QString type)
|
||||
QString theme;
|
||||
if (isDark)
|
||||
{
|
||||
theme = "theme=dark";
|
||||
theme = "dark";
|
||||
}
|
||||
else
|
||||
{
|
||||
theme = "theme=light";
|
||||
theme = "";
|
||||
}
|
||||
if (type == "")
|
||||
{
|
||||
url = api->getServerUrl() + "store/#/flamescion/?" + theme;
|
||||
url = api->getServerUrl() + "aarch64-store/#/"+ theme;
|
||||
}
|
||||
else
|
||||
{
|
||||
url = api->getServerUrl() + "store/#/flamescion/applist?type=" + type + "&" + theme;
|
||||
url = api->getServerUrl() + "aarch64-store/#/"+ theme + type;
|
||||
}
|
||||
|
||||
ui->webEngineView->setUrl(url);
|
||||
@ -86,7 +86,7 @@ void AppListPage::on_webEngineView_urlChanged(const QUrl &arg1)
|
||||
if (arg1.path().right(8) == "app.json")
|
||||
{
|
||||
QString url = arg1.toString();
|
||||
url = url.mid(url.indexOf("/store/"));
|
||||
url = url.mid(url.indexOf("/aarch64-store/"));
|
||||
url = "spk:/" + url;
|
||||
url = url.mid(0, url.indexOf("/app.json"));
|
||||
qDebug() << "程序跳转链接地址:" << url;
|
||||
|
Loading…
x
Reference in New Issue
Block a user