本文整理汇总了PHP中core::outPut方法的典型用法代码示例。如果您正苦于以下问题:PHP core::outPut方法的具体用法?PHP core::outPut怎么用?PHP core::outPut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core
的用法示例。
在下文中一共展示了core::outPut方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: recipientPost
public function recipientPost()
{
if ($this->user) {
core::outPut(1);
} else {
core::outPut(1001, "Please login");
}
}
示例2: get
/**
* api:en.goodsTag.get
* 功能:根据商品id获取商品信息
* 调用:CT_Api::get();
* 参数:$id:商品id
*/
public function get()
{
$id = core::getInput("id");
$data = $this->model->get($id);
if ($data) {
//存在
core::outPut(1, $data);
} else {
//不存在
core::outPut(-1);
}
}
示例3: delete
/**
* api: en.info.delete
* 功能:删除商品描述信息
* 调用:CT_Api::post();
* 参数:$id: 商品id
*/
public function delete()
{
$id = core::getInput("id");
$result = $this->model->delete($id);
if ($result) {
//存在
core::outPut(1, $result);
} else {
//不存在
core::outPut(-1);
}
}
示例4: postComments
public function postComments()
{
if ($this->user) {
$user_id = $this->user['id'];
$goods_id = $_POST['goods_id'];
$the_date = $_POST['the_date'];
$starts = $_POST['starts'];
$comments = $_POST['comments'];
if (!verify::vIsNNUll($comments)) {
core::outPut(-1, "评论内容输入不能为空");
}
if (!verify::vIsNumber($starts)) {
core::outPut(-1, "评论星级选择不能为空");
}
if (!verify::vIsNumber($goods_id)) {
core::outPut(-1, "商品ID不能为空");
}
//先判断该用户是否有购买过该商品
$this->CT_Api->api = "en.order.checkComments";
$this->CT_Api->user_id = $user_id;
$this->CT_Api->goods_id = $goods_id;
$result = $this->CT_Api->get();
if ($result != 1) {
core::outPut(-1, "必须购买了该产品才能评论");
}
$this->CT_Api->api = "en.comments.save";
$this->CT_Api->setParams(array('line_id' => $result['response']['id'], 'user_id' => $user_id, 'goods_id' => $goods_id, 'the_date' => $the_date, 'starts' => $starts, 'content' => $comments));
$result = $this->CT_Api->post();
if ($result['code'] == 1) {
core::outPut(1, "评论发表成功");
} else {
core::outPut(-1);
}
} else {
core::outPut(1001, "Please login");
}
}
示例5: getFreeSampleInfo
/**
* api: en.facebook.getFreeSampleInfo
*/
public function getFreeSampleInfo()
{
$result = $this->model->getFreeSampleInfo();
if ($result) {
core::outPut(1, $result);
} else {
core::outPut(-1);
}
}
示例6: getAmount
/**
* api: en.order.getAmount
* 功能:获取购物车商品总金额
* 调用:CT_Api::get();
* 参数:$goods_qty: 购物车商品串
*/
public function getAmount()
{
$goods_qty = core::getInput("goods_qty");
$data = $this->model->getAmount($goods_qty);
if ($data) {
core::outPut(1, $data);
} else {
core::outPut(-1);
}
}
示例7: deleteMsgs
/**
* api£º en.userMessages.deleteMsgs
* function£ºdelete messages
* call£ºCT_Api::post();
* param£º$ids: message ids array() (must be assigned)
*
* Note: $mode and $uid must be assigned before $ids
*/
public function deleteMsgs()
{
$data = core::getInput();
$mode = $data['mode'];
$uid = $data['uid'];
$ids = $data['id'];
if (!$ids) {
if ($uid) {
$ids = array_slice($data, 3, -4);
} else {
$ids = array_slice($data, 2, -4);
}
}
$result = $this->model->deleteMsgs($ids, $mode, $uid);
if ($result) {
//Exist
core::outPut(1, $result);
} else {
//Not exist
core::outPut(-1);
}
}