Browse Source

公众号-关注设置和分享卡片设置-添加必须验证

master
liangyuyan 5 years ago
parent
commit
17f3c5d806
  1. 21
      app/Admin/Forms/v3/OfficialSubscribeInfoForm.php
  2. 4
      app/Admin/Forms/v3/ShareCardCreateForm.php
  3. 4
      app/Admin/Forms/v3/ShareCardEditForm.php

21
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']);
});
}

4
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);
}
/**

4
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];
})

Loading…
Cancel
Save