예제 #1
0
 /**
  * 图文回复
  * @param $responseId
  * @return WeChatArticleResponse
  */
 private function _getImageTextReplay($responseId, $type)
 {
     $responseInfo = ImagetextreplayModel::model()->findByPk($responseId);
     $responseObj = new WeChatArticleResponse();
     $responseObj->add_article($responseInfo->title, $responseInfo->description, $responseInfo->imgUrl, $responseInfo->url);
     $list = ImagetextreplayModel::model()->findAll('type=:type and parentId=:parentId', array(':type' => $type, ':parentId' => $responseId));
     if ($list) {
         foreach ($list as $article) {
             $responseObj->add_article($article->title, $article->description, $article->imgUrl, $article->url);
         }
     }
     return $responseObj;
 }
예제 #2
0
 public function actionDeleteImgList($id)
 {
     $status = -1;
     $textImg = ImagetextreplayModel::model()->findByPk($id);
     if ($textImg) {
         $textImg->delete();
         $status = 1;
     }
     echo json_encode(array('status' => $status));
 }