From 78ca9bebc41a7636ddbd8eb650c370a9d83ded42 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sun, 7 Mar 2021 10:52:08 +0800 Subject: [PATCH] rm --- catch/.DS_Store | Bin 6148 -> 0 bytes catch/cms/controller/Form.php | 1 - catch/cms/form/Form.php | 161 --------------------------------- catch/cms/form/FormFactory.php | 11 --- 4 files changed, 173 deletions(-) delete mode 100644 catch/.DS_Store delete mode 100644 catch/cms/controller/Form.php delete mode 100644 catch/cms/form/Form.php delete mode 100644 catch/cms/form/FormFactory.php diff --git a/catch/.DS_Store b/catch/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0rule($this->fields()); - } - - /** - * form rule - * - * @time 2021年03月06日 - * @param array $rules - * @return array - */ - public function rule(array $rules): array - { - try { - return Elm::createForm('', $rules)->formRule(); - } catch (FormBuilderException $e) { - throw new FailedException('Form Created Failed: ' .$e->getMessage()); - } - } - - - /** - * 上传图片地址 - * - * @time 2021年03月03日 - * @return string - */ - protected function uploadImageUrl(): string - { - return env('app.domain') . '/cms/upload/image'; - } - - - /** - * 上传图片地址 - * - * @time 2021年03月03日 - * @return string - */ - protected function uploadFileUrl(): string - { - return env('app.domain') . '/cms/upload/file'; - } - - - protected function authorization(): array - { - return [ - 'authorization' => 'Bearer ' . request()->user()->remember_token, - ]; - } - - /** - * 上传图片 - * - * @time 2021年03月03日 - * @param $title - * @param string $value - * @return \FormBuilder\UI\Elm\Components\Upload - */ - public function image(string $title, string $value = ''): Upload - { - return self::uploadImage('image', $title, $this->uploadImageUrl(), $value) - ->uploadName('image') - ->data(['none' => '']) - ->headers($this->authorization()); - } - - /** - * 多图 - * - * @time 2021年03月03日 - * @param $title - * @param array $value - * @return \FormBuilder\UI\Elm\Components\Upload - */ - public function images(string $title, array $value = []): Upload - { - return self::uploadImages('image', $title, $this->uploadImageUrl(), $value) - ->uploadName('image') - ->data(['none' => '']) - ->headers($this->authorization()); - } -} diff --git a/catch/cms/form/FormFactory.php b/catch/cms/form/FormFactory.php deleted file mode 100644 index 389940e..0000000 --- a/catch/cms/form/FormFactory.php +++ /dev/null @@ -1,11 +0,0 @@ -