海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
2.1 KiB

<?php
namespace App\Admin\Forms;
use Dcat\Admin\Widgets\Form;
class Setting extends Form
{
/**
* Handle the form request.
*
* @param array $input
*
* @return mixed
*/
public function handle(array $input)
{
// dump($input);
// return $this->response()->error('Your error message.');
admin_setting($input);
return $this->response()->success('保存成功')->refresh();
}
/**
* Build a form here.
*/
public function form()
{
$this->tab('入驻配置', function () {
$this->number('settled_supplier_cost', '供应商入驻费用')->min(0)->default(0)->required();
$this->file('settled_supplier_contract', '供应商入驻合同')->uniqueName()->autoUpload()->required()
->help('建议为doc/docx/pdf格式,供应商可在入驻页面下载后打印');
$this->file('settled_supplier_agreement', '供应商入驻协议')->uniqueName()->autoUpload()->required()
->help('建议为doc/docx/pdf格式,供应商可在入驻页面下载后查看');
})->tab('支付小程序配置', function () {
$this->text('payee_appid', '收款小程序APPID')->required();
$this->text('payee_appsecret', '收款小程序APP_SECRET')->required();
$this->text('payee_mchid', '收款小程序MCH_ID')->required();
$this->text('payee_mchkey', '收款小程序MCH_KEY')->required();
})->tab('小程序服务商配置', function () {
$this->text('service_appid', '小程序第三方平台APPID');
$this->text('service_appsecret', '小程序第三方平台APP_SECRET');
$this->text('service_token', '消息校验Token')->help('跟小程序管理后台的一致,请勿随意更改');
$this->text('service_aeskey', '消息加解密Key')->help('跟小程序管理后台的一致,请勿随意更改');
$this->text('service_component_phone', '联系电话')->help('为代理商注册小程序时,腾讯下发注册认证信息时,代理商会看到此电话');
});
}
/**
* The data of the form.
*
* @return array
*/
public function default()
{
return admin_setting()->toArray();
}
}