/** * 设置图片 * * @param string $path * * @return Image */ public function media($path) { $this->setAttribute('media_id', Wechat::media()->image($path)); return $this; }
/** * 设置音乐消息封面图 * * @param string $path * * @return Music */ public function thumb($path) { $this->setAttribute('thumb_media_id', Wechat::media()->thumb($path)); return $this; }