mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-03-26 15:23:15 +00:00
56 lines
1.8 KiB
PHP
56 lines
1.8 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||
// +----------------------------------------------------------------------
|
||
// | Author: CRMEB Team <admin@crmeb.com>
|
||
// +----------------------------------------------------------------------
|
||
namespace app\adminapi\controller\v1\application\routine;
|
||
|
||
use app\adminapi\controller\AuthController;
|
||
use app\services\wechat\RoutineSchemeServices;
|
||
use think\facade\App;
|
||
|
||
class RoutineScheme extends AuthController
|
||
{
|
||
public function __construct(App $app, RoutineSchemeServices $services)
|
||
{
|
||
parent::__construct($app);
|
||
$this->services = $services;
|
||
}
|
||
|
||
public function schemeList()
|
||
{
|
||
$where = $this->request->postMore([
|
||
['title', ''],
|
||
]);
|
||
return app('json')->success($this->services->schemeList($where));
|
||
}
|
||
|
||
public function schemeForm($id)
|
||
{
|
||
return app('json')->success($this->services->schemeForm($id));
|
||
}
|
||
|
||
public function schemeSave($id)
|
||
{
|
||
$data = $this->request->postMore([
|
||
['title', ''],
|
||
['path', ''],
|
||
['expire_type', -1],
|
||
['expire_num', 0],
|
||
]);
|
||
$this->services->schemeSave($id, $data);
|
||
return app('json')->success('保存成功');
|
||
}
|
||
|
||
public function schemeDel($id)
|
||
{
|
||
$res = $this->services->delete($id);
|
||
if (!$res) return app('json')->fail('删除失败');
|
||
return app('json')->success('删除成功');
|
||
}
|
||
} |