2016-12-16 10:46:43 3024次浏览 1条回答 0 悬赏 10 金钱
$history = new History();
$history->uid = $uid;
$history->type = $type;
$history->ceid = $ceid;
$history->duration = $playedduration;
$history->dateline = time();
if($history->validate()&&$history->save()){
    return JsonWidget::widget(array(
        'success'=>true,
        'message'=>'',
        'data'=>array('hid'=>$history->hid)
    ));
}else{
    return JsonWidget::widget(array(
        'success'=>false,
            'message'=>'',
            'data'=>array()
    ));  
} 
补充于 2016-12-16 11:37

我找到原因了,是字段类型验证的时候没有通过

您需要登录后才可以回答。登录 | 立即注册
cleargo
副董事长

cleargo 北京

注册时间:2016-12-05
最后登录:2024-04-10
在线时长:53小时23分
  • 粉丝33
  • 金钱21685
  • 威望30
  • 积分22515

热门问题