提交其他文件
This commit is contained in:
392
app/teamapi/controller/UserController.php
Normal file
392
app/teamapi/controller/UserController.php
Normal file
@ -0,0 +1,392 @@
|
||||
<?php
|
||||
|
||||
namespace app\teamapi\controller;
|
||||
|
||||
use app\api\validate\SendSmsValidate;
|
||||
use app\teamapi\logic\UserLogic;
|
||||
use app\teamapi\validate\AddressValidate;
|
||||
|
||||
class UserController extends BaseApiController
|
||||
{
|
||||
public array $notNeedLogin = ['teaStoreCity'];
|
||||
/**
|
||||
* @notes 获取个人信息
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
$result = UserLogic::info($this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改头像
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function editAvatar()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$result = UserLogic::editAvatar($data,$this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改昵称
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function editNickname()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$result = UserLogic::editNickname($data,$this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取已开通城市列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function teaStoreCity()
|
||||
{
|
||||
$result = UserLogic::getTeaStoreCity();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function editServer()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$result = UserLogic::editServer($data,$this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改工作时间
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function editWork()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$result = UserLogic::editWork($data,$this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师地址簿列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function addressList()
|
||||
{
|
||||
$result = UserLogic::addressList($this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师详情
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function addressDetails()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::addressDetails($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师地址簿列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function addAddress()
|
||||
{
|
||||
$params = (new AddressValidate())->post()->goCheck('addAddress');
|
||||
$result = UserLogic::addAddress($params,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
/**
|
||||
* @notes 茶艺师地址簿列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function editAddress()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::editAddress($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
/**
|
||||
* @notes 茶艺师选择地址
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function selAddress()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::selAddress($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师地址簿列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function delAddress()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::delAddress($post,$this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师个人介绍页
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function Introduction()
|
||||
{
|
||||
$result = UserLogic::Introduction($this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师个人介绍页
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function editIntrod()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::editIntrod($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师资质信息
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function certDetails()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::certDetails($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师资质上传
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function addCert()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::addCert($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师资质上传
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function editCert()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::editCert($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 新增银行卡
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/28 19:46
|
||||
*/
|
||||
|
||||
public function addBank()
|
||||
{
|
||||
$post = (new SendSmsValidate())->post()->goCheck('addBank');
|
||||
$result = UserLogic::addBank($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 银行卡列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/29 19:46
|
||||
*/
|
||||
|
||||
public function checkBank()
|
||||
{
|
||||
$result = UserLogic::checkBank($this->userId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除银行卡
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/29 19:46
|
||||
*/
|
||||
|
||||
public function delBank()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::delBank($post);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 流水明细列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/29 19:46
|
||||
*/
|
||||
|
||||
public function checkAccountList()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::checkAccountList($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 流水明细列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/29 19:46
|
||||
*/
|
||||
|
||||
public function accounDetails()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::accounDetails($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 流水明细列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/29 19:46
|
||||
*/
|
||||
|
||||
public function reflectDetails()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::reflectDetails($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师提现
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2025/12/29 19:46
|
||||
*/
|
||||
|
||||
public function submitReflect()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = UserLogic::submitReflect($post,$this->userId);
|
||||
if (false === $result) {
|
||||
return $this->fail(UserLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user