交易规则list
This commit is contained in:
parent
68663ed74d
commit
cfacbe3954
@ -4,11 +4,13 @@
|
|||||||
namespace wstmart\app\controller;
|
namespace wstmart\app\controller;
|
||||||
|
|
||||||
|
|
||||||
|
use think\Db;
|
||||||
|
|
||||||
class TradeRule extends Base
|
class TradeRule extends Base
|
||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$model = model("trade_rule")->field(true)
|
$model = Db::name("trade_rule")->field(true)
|
||||||
->order("create_time", "desc")
|
->order("create_time", "desc")
|
||||||
->select();
|
->select();
|
||||||
return WSTReturn("OK", 1, $model);
|
return WSTReturn("OK", 1, $model);
|
||||||
@ -17,8 +19,9 @@ class TradeRule extends Base
|
|||||||
public function detail()
|
public function detail()
|
||||||
{
|
{
|
||||||
if(($id = (int)input( 'id', 0)) > 0){
|
if(($id = (int)input( 'id', 0)) > 0){
|
||||||
$detail = model("trade_rule")->field(true)
|
$detail = Db::name("trade_rule")->field(true)
|
||||||
->where(["id"=>$id])->find();
|
->where(["id"=>$id])->find();
|
||||||
|
$detail['content'] = htmlspecialchars_decode($detail['content']);
|
||||||
if(!$detail) return WSTReturn("该条内容已被删除",0);
|
if(!$detail) return WSTReturn("该条内容已被删除",0);
|
||||||
return WSTReturn("OK", 1, $detail);
|
return WSTReturn("OK", 1, $detail);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user