初始版本

This commit is contained in:
贾祥聪
2025-08-19 14:16:51 +08:00
commit f937a1f9b9
4373 changed files with 359728 additions and 0 deletions

View File

@@ -0,0 +1,137 @@
<?php
namespace app\shopapi\controller;
use app\shopapi\logic\ShopLogic;
use app\shopapi\validate\ShopValidate;
class ShopController extends BaseShopController
{
/**
* @notes 个人中心
* @return \think\response\Json
* @author cjhao
* @date 2024/10/20 03:11
*/
public function centre()
{
$result = (new ShopLogic())->centre($this->shopId);
return $this->success('',$result);
}
/**
* @notes 获取商家信息
* @return \think\response\Json
* @author cjhao
* @date 2024/11/19 11:03
*/
public function info()
{
$result = (new ShopLogic())->info($this->shopId);
return $this->success('',$result);
}
/**
* @notes 申请
* @return \think\response\Json
* @author cjhao
* @date 2024/10/5 17:33
*/
public function apply()
{
$params = (new ShopValidate())->post()->goCheck('',$this->shopInfo);
$result = (new ShopLogic())->apply($params);
if(true === $result){
return $this->success('申请成功,请等待管理员审核',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 店铺详情
* @return \think\response\Json
* @author cjhao
* @date 2024/10/5 20:25
*/
public function detail()
{
$result = (new ShopLogic())->detail($this->shopUserId);
return $this->success('',$result);
}
/**
* @notes 更新信息
* @return \think\response\Json
* @author cjhao
* @date 2024/10/6 12:13
*/
public function updateInfo()
{
$params = (new ShopValidate())->post()->goCheck('update',$this->shopInfo);
$result = (new ShopLogic())->updateInfo($params);
if ($result === true){
return $this->success('提交成功,请等待管理员审核',[],1,1);
}
return $this->fail($result);
}
/**
* @notes 获取更新资料接口
* @return \think\response\Json
* @author cjhao
* @date 2024/11/25 11:10
*/
public function updateInfoDetail(){
$result = (new ShopLogic())->updateInfoDetail($this->shopUserId);
return $this->success('',$result);
}
/**
* @notes 设置营业时间
* @return \think\response\Json
* @author cjhao
* @date 2024/10/22 09:25
*/
public function getBusiness()
{
$result = (new ShopLogic())->getBusiness($this->shopId);
return $this->success('',$result);
}
/**
* @notes 设置营业时间
* @return \think\response\Json
* @author cjhao
* @date 2024/10/22 09:25
*/
public function setBusiness()
{
$params = $this->request->post();
$params['shop_id'] = $this->shopId;
(new ShopLogic())->setBusiness($params);
return $this->success('设置成功',[],1,1);
}
/**
* @notes 绑定手机号
* @return \think\response\Json
* @author Tab
* @date 2021/8/25 17:46
*/
public function bindMobile()
{
$params = $this->request->post();
$params['shop_id'] = $this->shopId;
$result = (new ShopLogic())->bindMobile($params);
if($result === true) {
return $this->success('绑定成功', [], 1, 1);
}
return $this->fail($result);
}
}