if ($openid != "") { $infoId = $_REQUEST['infoId']; //获取显示具体内容的文章信息ID $content = $_REQUEST['content']; $leaveword = $lwd->lwdAdd($infoId, $content, $openid); } else { $leaveword['error'] = 5; //信息获取失败,请退出网页重新进入 } echo json_encode($leaveword); } elseif ($type == 'zan') { /** * *****************用户点赞********************** */ if ($openid != "") { $infoId = $_REQUEST['infoId']; //获取显示具体内容的文章信息ID echo $zan->zanAdd($infoId, $openid); } else { echo 4; //信息获取失败,请退出网页重新进入 } } elseif ($type == 'deleteLeaveword') { /** * *****************删除某篇文章的评论********************** */ $id = $_REQUEST['id']; //评论ID echo $lwd->delLwd($id); } // }
echo 4; //参数错误 } } elseif ($type == 'zan') { /** * *****************用户点赞********************** */ $activityId = $_GET['activityId']; //获取评论对象的ID $openid = $_GET['openid']; if ($regex->isNumber($activityId)) { $sql_valid = "select b.valid from wx_activity_interact as a left join wx_activity_interact_project as b on a.projectId=b.id where a.id=" . $activityId; $res_valid = $db->getrow($sql_valid); if ($res_valid['valid']) { if ($openid != "") { echo $zan->zanAdd($activityId, $openid); } else { echo 4; //信息获取失败,请退出网页重新进入 } } else { echo 5; //活动已结束 } } else { echo 3; //参数错误 } } elseif ($type == "deleteSomeone") { /****************删除参与内容以及其他用户对其的评论********************/ $activityId = $_GET['activityId'];