更新子应用
This commit is contained in:
parent
8f94005440
commit
929ca134cd
|
@ -12,10 +12,13 @@ class SystemLogic extends BaseLogic
|
|||
{
|
||||
try{
|
||||
System::create([
|
||||
'name' => $params['name'],
|
||||
'url' => $params['url'],
|
||||
'app_id' => create_app_id(),
|
||||
'app_key' => create_app_key(),
|
||||
'name' => $params['name'],
|
||||
'url' => $params['url'],
|
||||
'down_url' => $params['down_url'],
|
||||
'icon' => $params['icon'],
|
||||
'app_version' => $params['app_version'],
|
||||
'register_status' => $params['register_status'],
|
||||
'status' => 0,
|
||||
]);
|
||||
|
@ -50,8 +53,11 @@ class SystemLogic extends BaseLogic
|
|||
'id' => $params['id'],
|
||||
'name' => $params['name'],
|
||||
'url' => $params['url'],
|
||||
'status' => $params['status'],
|
||||
'down_url' => $params['down_url'],
|
||||
'icon' => $params['icon'],
|
||||
'app_version' => $params['app_version'],
|
||||
'register_status' => $params['register_status'],
|
||||
'status' => $params['status'],
|
||||
'update_time' => time()
|
||||
]);
|
||||
return true;
|
||||
|
@ -64,7 +70,7 @@ class SystemLogic extends BaseLogic
|
|||
// 查看
|
||||
public static function detail($params) : array
|
||||
{
|
||||
$data = System::field('id,name,app_id,app_key,url,register_status,status,create_time')->findOrEmpty($params['id']);
|
||||
$data = System::field('*')->findOrEmpty($params['id']);
|
||||
$data['status_text'] = $data->status_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
|
|
|
@ -14,8 +14,6 @@ class SystemValidate extends BaseValidate
|
|||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'name' => 'require|unique:system',
|
||||
'app_id' => 'require',
|
||||
'app_key' => 'require',
|
||||
'icon' => 'require',
|
||||
'app_version' => 'require',
|
||||
'down_url' => 'require',
|
||||
|
@ -39,12 +37,12 @@ class SystemValidate extends BaseValidate
|
|||
|
||||
public function sceneAdd(): SystemValidate
|
||||
{
|
||||
return $this->only(['name','app_id','app_key','icon','app_version','down_url','url','status','register_status']);
|
||||
return $this->only(['name','icon','app_version','down_url','url','status','register_status']);
|
||||
}
|
||||
|
||||
public function sceneEdit(): SystemValidate
|
||||
{
|
||||
return $this->only(['id','name','app_id','app_key','icon','app_version','down_url','url','status','register_status']);
|
||||
return $this->only(['id','name','icon','app_version','down_url','url','status','register_status']);
|
||||
}
|
||||
|
||||
public function sceneDetail(): SystemValidate
|
||||
|
|
Loading…
Reference in New Issue