更新子应用管理

This commit is contained in:
yaooo 2023-11-22 09:54:27 +08:00
parent 929ca134cd
commit 155e7428c0
3 changed files with 10 additions and 2 deletions

View File

@ -18,6 +18,7 @@ class SystemLogic extends BaseLogic
'url' => $params['url'], 'url' => $params['url'],
'down_url' => $params['down_url'], 'down_url' => $params['down_url'],
'icon' => $params['icon'], 'icon' => $params['icon'],
'sort' => $params['sort'] ?? 9999,
'app_version' => $params['app_version'], 'app_version' => $params['app_version'],
'register_status' => $params['register_status'], 'register_status' => $params['register_status'],
'status' => 0, 'status' => 0,
@ -55,6 +56,7 @@ class SystemLogic extends BaseLogic
'url' => $params['url'], 'url' => $params['url'],
'down_url' => $params['down_url'], 'down_url' => $params['down_url'],
'icon' => $params['icon'], 'icon' => $params['icon'],
'sort' => $params['sort'] ?? 9999,
'app_version' => $params['app_version'], 'app_version' => $params['app_version'],
'register_status' => $params['register_status'], 'register_status' => $params['register_status'],
'status' => $params['status'], 'status' => $params['status'],

View File

@ -3,6 +3,7 @@
namespace app\api\controller; namespace app\api\controller;
use app\common\enum\notice\NoticeEnum; use app\common\enum\notice\NoticeEnum;
use app\common\model\systems\System;
use think\facade\Log; use think\facade\Log;
use think\response\Json; use think\response\Json;
@ -13,7 +14,7 @@ use think\response\Json;
*/ */
class IndexController extends BaseApiController class IndexController extends BaseApiController
{ {
public array $notNeedLogin = ['code']; public array $notNeedLogin = ['code', 'miniapp'];
// 获取短信验证码 // 获取短信验证码
public function code(): Json public function code(): Json
@ -47,4 +48,9 @@ class IndexController extends BaseApiController
} }
} }
public function miniapp(): Json
{
return $this->success('获取成功', System::where('status','<>',2)->order('sort asc')->select()->toArray());
}
} }

View File

@ -16,7 +16,7 @@ class SystemValidate extends BaseValidate
'name' => 'require|unique:system', 'name' => 'require|unique:system',
'icon' => 'require', 'icon' => 'require',
'app_version' => 'require', 'app_version' => 'require',
'down_url' => 'require', 'down_url' => 'require|uri',
'url' => 'require|uri|unique:system', 'url' => 'require|uri|unique:system',
'status' => 'require|in:0,1', 'status' => 'require|in:0,1',
'register_status' => 'require|in:0,1', 'register_status' => 'require|in:0,1',