1.提交缺失的东西
This commit is contained in:
17
app/api/controller/ShopController.php
Normal file
17
app/api/controller/ShopController.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\api\controller;
|
||||||
|
|
||||||
|
use app\api\logic\ShopLogic;
|
||||||
|
|
||||||
|
class ShopController extends BaseApiController
|
||||||
|
{
|
||||||
|
public array $notNeedLogin = ['getShopList'];
|
||||||
|
|
||||||
|
|
||||||
|
public function getShopList(){
|
||||||
|
$result = ShopLogic::getShopList();
|
||||||
|
return $this->success('获取成功',$result);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
app/api/logic/ShopLogic.php
Normal file
11
app/api/logic/ShopLogic.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\api\logic;
|
||||||
|
use think\facade\Db;
|
||||||
|
class ShopLogic
|
||||||
|
{
|
||||||
|
public static function getShopList()
|
||||||
|
{
|
||||||
|
return Db::name('shop')->where("state",1)->select()->toArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user