$comment=$this->getTree($arr,0);hook('portal_before_assign_article', $article);$post_tag=explode(',',$article['post_tag']);$tag_id=array();foreach ($post_tag as $k=>$v){$tag_id[]=Db::name('portal_tag')->where(["name" => $v])->value('id');}$article['tagid']=implode(',',$tag_id);$seocontent = msubstr_add(strip_tags($article['post_content']),0,60);if(!$article['post_keywords']){$article['post_keywords']=$article['post_title'];}if(!$article['post_excerpt']){$article['post_excerpt']=$seocontent;}$this->assign('comment', $comment);$this->assign('article', $article);$this->assign('prev_article', $prevArticle);
| portalCategoryModel | [] |
| postService | {} |
| articleId | 5546 |
| categoryId | 87 |
| sql | SELECT category_id FROM bz_portal_category_post WHERE post_id = 5546 |
| caid | [ { "category_id": 87 }, { "category_id": 88 }, { "category_id": 28 } ] |
| article | { "tagid": "" } |
| prevArticle | Resource |
| nextArticle | Resource |
| tplName | article |
| category | { "id": 87, "parent_id": 28, "post_count": 0, "status": 1, "delete_time": 0, "list_order": 10000, "name": "\u667a\u80fd\u5fae\u8d85", "description": "", "path": "0-28-87", "seo_title": "", "seo_keywords": "", "seo_description": "", "list_tpl": "list", "one_tpl": "article", "more": { "thumbnail": "" }, "type": "xzzx", "keyword": "", "alias": "znwc", "home_show_web": 0, "home_show_mobile": 0, "d_id": 0 } |
| arr | [] |
| comment | |
| post_tag | [ "" ] |
| tag_id | [ null ] |
| v | |
| k | 0 |