This commit is contained in:
toom1996
2025-07-04 09:50:30 +08:00
parent bb9639ce0c
commit b4416260fd
8 changed files with 53 additions and 5 deletions

View File

@ -42,6 +42,7 @@ class WebsiteController extends AbstractController
$model->app_logo = $this->request->post('app_logo');
$model->app_extra = $this->request->post('app_extra');
$model->app_template = $this->request->post('template');
$model->app_extra_tag = $this->request->post('app_extra_tag');
$model->save();
return $this->response->json([]);
@ -110,6 +111,7 @@ class WebsiteController extends AbstractController
$query->app_logo = $this->request->post('app_logo');
$query->app_extra = $this->request->post('app_extra');
$query->app_template = $this->request->post('template');
$query->app_extra_tag = $this->request->post('app_extra_tag');
$query->save();

View File

@ -38,6 +38,7 @@ class NewsFormModel
$model->description = $this->attributes['description'];
$model->cover = $this->attributes['cover'];
$model->content = $this->attributes['content'];
$model->platform = $this->attributes['platform'];
$model->save();
}
}

View File

@ -23,6 +23,9 @@ namespace App\Model;
* @property string $app_extra
* @property string $app_logo
* @property int $app_template
* @property string $app_telephone
* @property string $app_download_url
* @property string $app_extra_tag
*/
class AppWebsiteConfig extends Model
{

View File

@ -46,10 +46,11 @@ class NewsService extends BaseService
* @param int $page
* @return array
*/
public function index(int $limit = 30, int $page = 1): array
public function index(int $id, int $limit = 30, int $page = 1): array
{
$query = AppNews::formatQuery(['created_at'])
->where('is_delete', 0)
->where('platform', $id)
->select(['id'])
->orderBy('id', 'desc');;
$pagination = $query->paginate($limit, page: $page);