提交其他文件

This commit is contained in:
2026-03-11 18:24:59 +08:00
parent 4b490670f1
commit f0d7f60fd5
1377 changed files with 73456 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\teamapi\controller;
use app\common\controller\BaseLikeAdminController;
class BaseApiController extends BaseLikeAdminController
{
protected int $userId = 0;
protected array $userInfo = [];
public function initialize()
{
if (isset($this->request->userInfo) && $this->request->userInfo) {
$this->userInfo = $this->request->userInfo;
$this->userId = $this->request->userInfo['user_id'];
}
}
}

View File

@ -0,0 +1,183 @@
<?php
namespace app\teamapi\controller;
use app\teamapi\logic\OrderLogic;
class OrderController extends BaseApiController
{
public array $notNeedLogin = [];
/**
* @notes 茶艺师订单列表
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data id
*/
public function orderTeamList(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderTeamList($data,$userId);
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 茶艺师订单详情
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data id
*/
public function orderDetails(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderDetails($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('', $result, 1, 1);
}
/**
* @notes 茶艺师接单
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data id
*/
public function orderTake(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderTake($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 茶艺师取消接单
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data idcancel
*/
public function orderCancel(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderCancel($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 茶艺师出发
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data idcancel
*/
public function orderDepart(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderDepart($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 茶艺师到达
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data idcancel
*/
public function orderArrive(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderArrive($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 茶艺师打卡
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data idcancel
*/
public function orderImage(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderImage($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 完成订单
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data idcancel
*/
public function orderFinish(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderFinish($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 删除订单
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data idcancel
*/
public function orderDel(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::orderDel($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 费用明细
* @return \think\response\Json
* @author Yzt
* @date 2025/12/31 15:03
* @data idcancel
*/
public function amountDetails(){
$userId = $this->userId;
$data = $this->request->post();
$result = OrderLogic::amountDetails($data,$userId);
if ($result === false) {
return $this->fail(OrderLogic::getError());
}
return $this->success('', $result, 1, 1);
}
}

View File

@ -0,0 +1,49 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\storeapi\controller;
use app\api\logic\SmsLogic;
use app\api\validate\SendSmsValidate;
/**
* 短信
* Class SmsController
* @package app\api\controller
*/
class SmsController extends BaseApiController
{
public array $notNeedLogin = ['sendCode'];
/**
* @notes 发送短信验证码
* @return \think\response\Json
* @author 段誉
* @date 2022/9/15 16:17
*/
public function sendCode()
{
$params = (new SendSmsValidate())->post()->goCheck();
$result = SmsLogic::sendCode($params);
if (true === $result) {
return $this->success('发送成功');
}
return $this->fail(SmsLogic::getError());
}
}

View File

@ -0,0 +1,89 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\teamapi\controller;
use app\common\cache\StoreUserTokenCache;
use app\common\model\store\StoreUserSession;
use app\teamapi\logic\TeamLoginLogic;
use app\teamapi\validate\{LoginAccountValidate, PasswordValidate, WechatLoginValidate};
/**
* 登录注册
* Class LoginController
* @package app\api\controller
*/
class TeamLoginController extends BaseApiController
{
public array $notNeedLogin = [ 'account', 'logout', 'codeUrl','resetPassword'];
/**
* @notes 账号密码/手机号密码/手机号验证码登录
* @return \think\response\Json
* @author 段誉
* @date 2022/9/16 10:42
*/
public function account()
{
// $userTokenCache = new StoreUserTokenCache();
// $userSession = StoreUserSession::where([['user_id', '=', 1], ['terminal', '=', 1]])->find();
// $userTokenCache->deleteUserInfo($userSession->token);
$params = (new LoginAccountValidate())->post()->goCheck();
$result = TeamLoginLogic::login($params);
if (false === $result) {
return $this->fail(TeamLoginLogic::getError());
}
return $this->data($result);
}
/**
* @notes 重置密码
* @return \think\response\Json
* @author 胥聪
* @date 2025/12/16 14:30
*/
public function resetPassword()
{
$params = (new PasswordValidate())->post()->goCheck('resetPassword');
$result = TeamLoginLogic::resetPassword($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(TeamLoginLogic::getError());
}
/**
* @notes 退出登录
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/9/16 10:42
*/
public function logout()
{
TeamLoginLogic::logout($this->userInfo);
return $this->success();
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace app\teamapi\controller;
use app\teamapi\logic\TrainingLogic;
class TrainingController extends BaseApiController
{
/**
* @notes 茶艺师培训列表
* @return \think\response\Json
* @author 胥聪
* @date 2026/2/12 1:02
*/
public function trainingList(){
$data = $this->request->post();
$result = TrainingLogic::trainingList($data);
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 茶艺师培训详情
* @return \think\response\Json
* @author 胥聪
* @date 2026/2/12 1:34
*/
public function trainingDetails(){
$data = $this->request->post();
$result = TrainingLogic::trainingDetails($data);
return $this->success('查询成功', $result, 1, 1);
}
}

View File

@ -0,0 +1,63 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\teamapi\controller;
use app\common\enum\FileEnum;
use app\common\service\UploadService;
use Exception;
use think\response\Json;
/** 上传文件
* Class UploadController
* @package app\api\controller
*/
class UploadController extends BaseApiController
{
/**
* @notes 上传图片
* @return Json
* @author 胥聪
* @date 2025/12/17 16:34
*/
public function image()
{
try {
$result = UploadService::image(0, $this->userId,FileEnum::SOURCE_USER);
return $this->success('上传成功', $result);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
/**
* @notes 上传视频
* @return Json
* @author 胥聪
* @date 2025/12/17 16:34
*/
public function video()
{
try {
$cid = $this->request->post('cid', 0);
$result = UploadService::video($cid);
return $this->success('上传成功', $result);
} catch (Exception $e) {
return $this->fail($e->getMessage());
}
}
}

View 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);
}
}