fix bug
This commit is contained in:
@@ -80,6 +80,9 @@ class Article
|
|||||||
$article_id = $GLOBALS['data']['data']['article_id'];
|
$article_id = $GLOBALS['data']['data']['article_id'];
|
||||||
$info = Db::name('app_article')->where("id",$article_id)->find();
|
$info = Db::name('app_article')->where("id",$article_id)->find();
|
||||||
if(empty($info)) return show("找不到该动态信息!");
|
if(empty($info)) return show("找不到该动态信息!");
|
||||||
|
if(!empty($info['imgs'])) {
|
||||||
|
$info['imgs'] = json_decode(str_replace(['{', '}'], ['[', ']'], imgs['imgs']), true);
|
||||||
|
}
|
||||||
$info['other_list'] = [];
|
$info['other_list'] = [];
|
||||||
$lists = Db::name('app_article')
|
$lists = Db::name('app_article')
|
||||||
->where("userid",$info["userid"])
|
->where("userid",$info["userid"])
|
||||||
@@ -88,8 +91,9 @@ class Article
|
|||||||
->limit(env("page_count"))
|
->limit(env("page_count"))
|
||||||
->select();
|
->select();
|
||||||
foreach($lists as $vo){
|
foreach($lists as $vo){
|
||||||
|
if(!empty($vo['imgs'])) {
|
||||||
$vo['imgs'] = json_decode(str_replace(['{','}'],['[',']'],$vo['imgs']),true);
|
$vo['imgs'] = json_decode(str_replace(['{', '}'], ['[', ']'], $vo['imgs']), true);
|
||||||
|
}
|
||||||
$info['other_list'][] = $vo;
|
$info['other_list'][] = $vo;
|
||||||
}
|
}
|
||||||
$info['userinfo']=[];
|
$info['userinfo']=[];
|
||||||
|
|||||||
Reference in New Issue
Block a user