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