diff --git a/app/Admin/Forms/v3/OfficialSubscribeInfoForm.php b/app/Admin/Forms/v3/OfficialSubscribeInfoForm.php index 60db58b..858737c 100644 --- a/app/Admin/Forms/v3/OfficialSubscribeInfoForm.php +++ b/app/Admin/Forms/v3/OfficialSubscribeInfoForm.php @@ -39,6 +39,7 @@ class OfficialSubscribeInfoForm extends Form implements LazyRenderable 'redirect_url' => $input['not_redirect_url'], ]; + $data = [ 'subscribed' => json_encode($subscribed), 'not_subscribed' => json_encode($notSubscribed) @@ -64,26 +65,26 @@ class OfficialSubscribeInfoForm extends Form implements LazyRenderable $this->column(6,function(Form $form) use($subscribed){ $this->display( 'setting', ' ')->value('已关注公众号提示信息设置'); - $this->text('head_title','顶部标题')->value($subscribed['head_title']); - $this->image('logo','公众号logo连接')->autoUpload()->saveFullUrl() + $this->text('head_title','顶部标题')->required()->value($subscribed['head_title']); + $this->image('logo','公众号logo连接')->required()->autoUpload()->saveFullUrl() ->customFormat(function() use($subscribed){ return [$subscribed['logo']]; }); - $this->text('title','公众号名称或标题')->value($subscribed['title']); - $this->text('sub_title','副标题,提示语')->value($subscribed['sub_title']); - $this->text('redirect_url','跳转连接')->value($subscribed['redirect_url']); + $this->text('title','公众号名称或标题')->required()->value($subscribed['title']); + $this->text('sub_title','副标题,提示语')->required()->value($subscribed['sub_title']); + $this->text('redirect_url','跳转连接')->required()->value($subscribed['redirect_url']); }); $this->column(6,function(Form $form) use($notSubscribed){ $this->display( 'setting', ' ')->value('未关注公众号提示信息设置'); - $this->text('not_head_title','顶部标题')->value($notSubscribed['head_title']); - $this->image('not_logo','公众号logo连接')->autoUpload()->saveFullUrl() + $this->text('not_head_title','顶部标题')->required()->value($notSubscribed['head_title']); + $this->image('not_logo','公众号logo连接')->required()->autoUpload()->saveFullUrl() ->customFormat(function() use($notSubscribed){ return [$notSubscribed['logo']]; }); - $this->text('not_title','公众号名称或标题')->value($notSubscribed['title']); - $this->text('not_sub_title','副标题,提示语')->value($notSubscribed['sub_title']); - $this->text('not_redirect_url','跳转连接')->value($notSubscribed['redirect_url']); + $this->text('not_title','公众号名称或标题')->required()->value($notSubscribed['title']); + $this->text('not_sub_title','副标题,提示语')->required()->value($notSubscribed['sub_title']); + $this->text('not_redirect_url','跳转连接')->required()->value($notSubscribed['redirect_url']); }); } diff --git a/app/Admin/Forms/v3/ShareCardCreateForm.php b/app/Admin/Forms/v3/ShareCardCreateForm.php index a6b1c45..9188845 100644 --- a/app/Admin/Forms/v3/ShareCardCreateForm.php +++ b/app/Admin/Forms/v3/ShareCardCreateForm.php @@ -44,8 +44,8 @@ class ShareCardCreateForm extends Form { $this->display('setting' , ' ')->value('小程序分享卡片设置'); - $this->text('title','标题'); - $this->image('image','图片')->autoUpload()->saveFullUrl()->width(3); + $this->text('title','标题')->required(); + $this->image('image','图片')->required()->autoUpload()->saveFullUrl()->width(3); } /** diff --git a/app/Admin/Forms/v3/ShareCardEditForm.php b/app/Admin/Forms/v3/ShareCardEditForm.php index 83f5db8..0fb9dac 100644 --- a/app/Admin/Forms/v3/ShareCardEditForm.php +++ b/app/Admin/Forms/v3/ShareCardEditForm.php @@ -48,8 +48,8 @@ class ShareCardEditForm extends Form implements LazyRenderable $image = $this->payload['image'] ?? ''; $this->display('setting' , ' ')->value('小程序分享卡片设置'); $this->hidden('id')->value($id); - $this->text('title','标题')->value($title); - $this->image('image','图片')->autoUpload() + $this->text('title','标题')->required()->value($title); + $this->image('image','图片')->required()->autoUpload() ->customFormat(function() use($image){ return [$image]; })