TradeRule后台完成

This commit is contained in:
Jerry Yan 2020-05-28 22:03:21 +08:00
parent 4854268cd2
commit fe37d065c7
2 changed files with 13 additions and 4 deletions

View File

@ -8,10 +8,11 @@ use think\Db;
class TradeRule extends Base
{
protected $createTime = "create_time";
protected $dateFormat = false;
protected $updateTime = false;
/**
* 分页
*/
public function pageQuery(){
@ -61,6 +62,14 @@ class TradeRule extends Base
return WSTReturn($this->getError(),-1);
}
}
/**
* 获取指定对象
*/
public function getById($id){
$single = $this->where(['id'=>$id,'dataFlag'=>1])->find();
$single['content'] = htmlspecialchars_decode($single['content']);
return $single;
}
/**
* 编辑

View File

@ -11,7 +11,7 @@
<script>
$(function () {
{if condition="$object['id']!=0 "}
WST.setValues({$object});
WST.setValues({:json_encode($object)});
{/if}
$('#articleForm').validator({
fields: {