multi-store/app/api/controller/user/UserFeedbackController.php

36 lines
836 B
PHP

<?php
namespace app\api\controller\user;
use app\api\lists\user\UserFeedbackLists;
use app\api\logic\user\UserFeedbackLogic;
use app\admin\validate\user\UserFeedbackValidate;
use app\api\controller\BaseApiController;
class UserFeedbackController extends BaseApiController
{
/**
* @notes 获取用户反馈表列表
* @return \support\Response
* @author likeadmin
* @date 2024/05/13 16:56
*/
public function lists()
{
return $this->dataLists(new UserFeedbackLists());
}
public function add()
{
$params = (new UserFeedbackValidate())->post()->goCheck('add');
$result = UserFeedbackLogic::add($params,$this->request->userInfo['user_id']);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(UserFeedbackLogic::getError());
}
}