/** * @author : NanQi * @date : 20150515 10:01 * * @desc 意见反馈 * @param String otype 系统类型 * @param String ptype 手机型号 * @param String content 反馈内容 * @return bool */ public function feedback() { $userID = authUserID(); M()->validation(array(array('otype', 'require', '系统类型不能为空', Model::MUST_VALIDATE, 'regex'), array('content', 'require', '反馈内容不能为空', Model::MUST_VALIDATE, 'regex'), array('content', '1,2000', '反馈内容长度不正确', Model::MUST_VALIDATE, 'length'))); D('Feedback')->addFeedback($userID, I('otype'), I('ptype'), I('content')); $this->retSuccess(); }
function _initialize() { $this->userID = authUserID(); // $movieTime = S("user_movietime_".$this->userID); // $this->scid = $movieTime['id']; $this->scid = C('CURRENT_SCID'); if (empty($this->scid)) { $this->scid = 0; } }
function _initialize() { $this->userID = authUserID(); $this->im = D('Im', 'Logic'); // $movieTime = S("user_movietime_".$this->userID); // $this->scid = $movieTime['id']; $this->scid = C('CURRENT_SCID'); if (empty($this->scid)) { $this->retError(201, '你还没有加入一个社交圈'); } }
function _initialize() { $this->userID = authUserID(); }