交易规则内容
This commit is contained in:
parent
da8b0d7268
commit
01c0302b8a
@ -78,6 +78,7 @@ class TradeRule extends Base
|
||||
public function edit(){
|
||||
$id = input('post.id/d');
|
||||
$data = input('post.');
|
||||
$data['content'] = htmlspecialchars_decode($data['content']);
|
||||
WSTUnset($data,'id,dataFlag,isShow,create_time');
|
||||
Db::startTrans();
|
||||
try{
|
||||
|
@ -13,6 +13,10 @@ class TradeRule extends Base
|
||||
$model = Db::name("trade_rule")->field(true)
|
||||
->order("create_time", "desc")
|
||||
->select();
|
||||
foreach ($model as $detail) {
|
||||
$detail['content'] = htmlspecialchars_decode($detail['content']);
|
||||
return $detail;
|
||||
}
|
||||
return WSTReturn("OK", 1, $model);
|
||||
}
|
||||
|
||||
@ -21,8 +25,8 @@ class TradeRule extends Base
|
||||
if(($id = (int)input( 'id', 0)) > 0){
|
||||
$detail = Db::name("trade_rule")->field(true)
|
||||
->where(["id"=>$id])->find();
|
||||
$detail['content'] = htmlspecialchars_decode($detail['content']);
|
||||
if(!$detail) return WSTReturn("该条内容已被删除",0);
|
||||
$detail['content'] = htmlspecialchars_decode($detail['content']);
|
||||
return WSTReturn("OK", 1, $detail);
|
||||
}
|
||||
return WSTReturn("异常请求",0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user