You've already forked qlg.tsgz.moe
TradeRule后台添加大体
This commit is contained in:
@ -18,7 +18,7 @@ class Note extends Base
|
||||
$userId = (int)session('WST_USER.userId');
|
||||
if(($id = (int)input( 'id', 0)) > 0){
|
||||
$detail = model("note")->field(true)
|
||||
->where(["user_id"=>$userId, "id"=>$id])->select();
|
||||
->where(["user_id"=>$userId, "id"=>$id])->find();
|
||||
if(!$detail) return WSTReturn("该条内容已被删除",0);
|
||||
return WSTReturn("OK", 1, $detail);
|
||||
}
|
||||
|
27
hyhproject/app/controller/TradeRule.php
Normal file
27
hyhproject/app/controller/TradeRule.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace wstmart\app\controller;
|
||||
|
||||
|
||||
class TradeRule extends Base
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$model = model("trade_rule")->field(true)
|
||||
->order("create_time", "desc")
|
||||
->select();
|
||||
return WSTReturn("OK", 1, $model);
|
||||
}
|
||||
|
||||
public function detail()
|
||||
{
|
||||
if(($id = (int)input( 'id', 0)) > 0){
|
||||
$detail = model("trade_rule")->field(true)
|
||||
->where(["id"=>$id])->find();
|
||||
if(!$detail) return WSTReturn("该条内容已被删除",0);
|
||||
return WSTReturn("OK", 1, $detail);
|
||||
}
|
||||
return WSTReturn("异常请求",0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user