/** * $id 单图文的ID * $openid 谁从公众号获得单图文,文章传播的起点 * $shareby 文章是通过那个分享活动获得的 * $ooid 谁在打开的单图文 */ public function __construct($id, $openid, $shareby) { $article = \TMS_APP::model('matter\\article')->byId($id, "*"); $article->type = 'article'; if ($article->has_attachment === 'Y') { $article->attachments = \TMS_APP::model()->query_objs_ss(array('*', 'xxt_article_attachment', "article_id='{$id}'")); } $this->article = $article; parent::__construct($this->article, $openid); $this->shareby = $shareby; }
/** * */ public function __construct(&$link, $openid) { $this->link = $link; parent::__construct($this->link, $openid); }