mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
改为使用全新Web接口
This commit is contained in:
@@ -271,14 +271,14 @@ void MainWindow::updateUi(int now)
|
|||||||
QStringList itemlist;
|
QStringList itemlist;
|
||||||
itemlist << ""
|
itemlist << ""
|
||||||
<< "network"
|
<< "network"
|
||||||
<< "relations"
|
<< "chat"
|
||||||
<< "musicandsound"
|
<< "music"
|
||||||
<< "videos"
|
<< "video"
|
||||||
<< "photos"
|
<< "image_graphics"
|
||||||
<< "games"
|
<< "games"
|
||||||
<< "office"
|
<< "office"
|
||||||
<< "reading"
|
<< "reading"
|
||||||
<< "programming"
|
<< "development"
|
||||||
<< "tools"
|
<< "tools"
|
||||||
<< "themes"
|
<< "themes"
|
||||||
<< "others";
|
<< "others";
|
||||||
|
|||||||
@@ -31,12 +31,20 @@ void AppListPage::getAppList(QString type)
|
|||||||
nowType=type;
|
nowType=type;
|
||||||
SparkAPI *api=new SparkAPI(this);
|
SparkAPI *api=new SparkAPI(this);
|
||||||
QString url;
|
QString url;
|
||||||
|
QString theme;
|
||||||
if(isDark)
|
if(isDark)
|
||||||
{
|
{
|
||||||
url=api->getServerUrl()+"store/#/dark"+type;
|
theme="theme=dark";
|
||||||
}else{
|
}else{
|
||||||
url=api->getServerUrl()+"store/#/"+type;
|
theme="theme=light";
|
||||||
}
|
}
|
||||||
|
if(type=="")
|
||||||
|
{
|
||||||
|
url=api->getServerUrl()+"store/#/new/?"+theme;
|
||||||
|
}else{
|
||||||
|
url=api->getServerUrl()+"store/#/new/applist?type="+type+"&"+theme;
|
||||||
|
}
|
||||||
|
|
||||||
ui->webEngineView->setUrl(url);
|
ui->webEngineView->setUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,12 +54,14 @@ void AppListPage::getSearchList(QString keyword)
|
|||||||
nowType=keyword;
|
nowType=keyword;
|
||||||
SparkAPI *api=new SparkAPI(this);
|
SparkAPI *api=new SparkAPI(this);
|
||||||
QString url;
|
QString url;
|
||||||
|
QString theme;
|
||||||
if(isDark)
|
if(isDark)
|
||||||
{
|
{
|
||||||
url=api->getServerUrl()+"store/#/darksearch?keywords="+keyword;
|
theme="theme=dark";
|
||||||
}else{
|
}else{
|
||||||
url=api->getServerUrl()+"store/#/search?keywords="+keyword;
|
theme="theme=light";
|
||||||
}
|
}
|
||||||
|
url=api->getServerUrl()+"store/#/new/search?keywords="+keyword+"&"+theme;
|
||||||
ui->webEngineView->setUrl(url);
|
ui->webEngineView->setUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user