diff --git a/hyhproject/admin/model/TradeRule.php b/hyhproject/admin/model/TradeRule.php
index 62c3375..5e1d927 100644
--- a/hyhproject/admin/model/TradeRule.php
+++ b/hyhproject/admin/model/TradeRule.php
@@ -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;
+ }
/**
* 编辑
diff --git a/hyhproject/admin/view/trade_rule/edit.html b/hyhproject/admin/view/trade_rule/edit.html
index 95eee9e..76d5552 100644
--- a/hyhproject/admin/view/trade_rule/edit.html
+++ b/hyhproject/admin/view/trade_rule/edit.html
@@ -10,8 +10,8 @@