2026-03-23 14:57:47 +08:00

56 lines
1.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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('删除成功');
}
}