TradeRule后台完成
This commit is contained in:
parent
4854268cd2
commit
fe37d065c7
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
|
@ -10,8 +10,8 @@
|
||||
<script src="__ADMIN__/trade_rule/trade_rule.js?v={$v}" type="text/javascript"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
{if condition="$object['id'] !=0 "}
|
||||
WST.setValues({$object});
|
||||
{if condition="$object['id']!=0 "}
|
||||
WST.setValues({:json_encode($object)});
|
||||
{/if}
|
||||
$('#articleForm').validator({
|
||||
fields: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user