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.
yanzong/app/store/controller/Invite.php

33 lines
770 B

10 months ago
<?php
namespace app\store\controller;
use app\common\model\invite\InviteConfig;
use think\response\Json;
class Invite extends Controller
{
/**获取配置
* @notes:
* @return Json
* @author: wanghousheng
*/
public function getConfig(): Json
{
$info = InviteConfig::detail();
return $this->renderSuccess(compact('info'));
}
10 months ago
public function editConfig(): Json
10 months ago
{
$data = $this->postForm();
if (!$data) {
return $this->renderError('缺少必要参数');
}
10 months ago
$model = new InviteConfig();
if ($model->add($data)) {
10 months ago
return $this->renderSuccess('编辑成功');
}
return $this->renderError($model->getError() ?: '编辑失败');
}
}