Compare commits
merge into: Leadfyy.co:master
Leadfyy.co:dev
Leadfyy.co:develop
Leadfyy.co:master
pull from: Leadfyy.co:dev
Leadfyy.co:dev
Leadfyy.co:develop
Leadfyy.co:master
2 Commits
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
294ffa338e |
代理商编辑产品增加标题、图片、内容
|
5 years ago |
|
|
ac6b1d7712 |
代理商系统设置
|
5 years ago |
17 changed files with 275 additions and 87 deletions
-
12MySQL_change.sql
-
10app/Admin/Controllers/SupplierController.php
-
120app/AdminAgent/Controllers/AgentProductController.php
-
18app/AdminAgent/Controllers/SettingController.php
-
21app/AdminAgent/Controllers/SpecialController.php
-
2app/AdminAgent/Controllers/UserController.php
-
43app/AdminAgent/Forms/Setting.php
-
16app/AdminAgent/Renderable/SelectAgentProduct.php
-
1app/AdminAgent/routes.php
-
14app/Http/Controllers/Api/AgentProductController.php
-
5app/Http/Controllers/Api/ChannelController.php
-
4app/Http/Controllers/Api/IndexController.php
-
2app/Http/Controllers/Api/SpecialController.php
-
26app/Models/AgentProduct.php
-
7app/Models/Product.php
-
6resources/lang/zh_CN/agent-product.php
-
13resources/lang/zh_CN/setting.php
@ -0,0 +1,18 @@ |
|||
<?php |
|||
|
|||
namespace App\AdminAgent\Controllers; |
|||
|
|||
use App\AdminAgent\Forms\Setting; |
|||
use Dcat\Admin\Layout\Content; |
|||
use Dcat\Admin\Http\Controllers\AdminController; |
|||
use Dcat\Admin\Widgets\Card; |
|||
|
|||
class SettingController extends AdminController |
|||
{ |
|||
public function index(Content $content) |
|||
{ |
|||
return $content |
|||
->title('系统设置') |
|||
->body(new Card(' ', new Setting())); |
|||
} |
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
<?php |
|||
|
|||
namespace App\AdminAgent\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);
|
|||
|
|||
admin_setting($input); |
|||
|
|||
return $this->response()->success('保存成功')->refresh(); |
|||
} |
|||
|
|||
/** |
|||
* Build a form here. |
|||
*/ |
|||
public function form() |
|||
{ |
|||
$this->text('earnest')->required()->help('用户支付订金、定金、首付款的金额'); |
|||
$this->text('earnest_timeout')->required()->help('单位:分钟。当通过订金、定金、首付款支付时,用户超过该时间未支付将关闭订单,且定金不退'); |
|||
} |
|||
|
|||
/** |
|||
* The data of the form. |
|||
* |
|||
* @return array |
|||
*/ |
|||
public function default() |
|||
{ |
|||
return admin_setting()->toArray(); |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<?php |
|||
return [ |
|||
'labels' => [ |
|||
'Setting' => '系统设置', |
|||
'setting' => '系统设置', |
|||
], |
|||
'fields' => [ |
|||
'earnest' => '定金金额', |
|||
'earnest_timeout' => '定金支付超时时间', |
|||
], |
|||
'options' => [ |
|||
], |
|||
]; |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue