Commit 972de477 authored by 蔡闯's avatar 蔡闯

2021-6-25

parent 805a2a2e
...@@ -52,7 +52,12 @@ class Company extends Base ...@@ -52,7 +52,12 @@ class Company extends Base
public function getBusInfo() public function getBusInfo()
{ {
$res = Db::name('bus')->where(['id'=>1])->find(); $res = Db::name('bus')->where(['id'=>1])->find();
$res['content'] = json_decode($res['content'],true); if($res['content']) {
$res['content'] = json_decode($res['content'],true);
} else {
$res['content'] = [];
}
return $this->returnJson($res); return $this->returnJson($res);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment