diff options
Diffstat (limited to 'app/src/serverappmodel.cpp')
-rw-r--r-- | app/src/serverappmodel.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/src/serverappmodel.cpp b/app/src/serverappmodel.cpp index ad79159..f1f1238 100644 --- a/app/src/serverappmodel.cpp +++ b/app/src/serverappmodel.cpp @@ -209,12 +209,12 @@ void ServerAppModel::install(int index) { }); } -void ServerAppModel::getPrevPage(int pageIndex) { - this->getAppPage(pageIndex, PAGE_SIZE, true); +void ServerAppModel::getPrevPage(int PageIndex) { + this->getAppPage(PageIndex, PAGE_SIZE, true); } -void ServerAppModel::getNextPage(int pageIndex) { - this->getAppPage(pageIndex, PAGE_SIZE); +void ServerAppModel::getNextPage(int PageIndex) { + this->getAppPage(PageIndex, PAGE_SIZE); } void ServerAppModel::setNativeApplist(const QList<AppInfo>& applist) { @@ -250,7 +250,7 @@ void ServerAppModel::getAppPage(int pageIndex, int pageSize, bool isPrev) { // .append(QString("&appDeviceTypeId=%1&appDeveloper=%2") // .arg(QString::number(0), "zhang_xu")); QString url = - getUrlWithPage(SERVER_API_LIST, pageIndex, pageSize) + getUrlWithPage(SERVER_API_LIST, pageIndex * pageSize, pageSize) .append(QString("&appDeviceTypeId=%1").arg(QString::number(0))); HttpClient client(url); @@ -273,7 +273,7 @@ void ServerAppModel::getAppPage(int pageIndex, int pageSize, bool isPrev) { if (isPrev || jappList.size() >= PAGE_SIZE) { applist.clear(); } - applist += newList; + applist += newList; endResetModel(); checkAppState(); @@ -283,4 +283,5 @@ void ServerAppModel::getAppPage(int pageIndex, int pageSize, bool isPrev) { [=](const QString& msg) { HMI_ERROR("response", "response error: %s", msg.toStdString().c_str()); }); + } |