/** * 获取验证码 * */ public function getVerify($mobile) { $code = $this->_buildCode(4); Wind::import('SRV:user.dm.PwUserMobileDm'); $dm = new PwUserMobileDm(); $dm->setMobile($mobile)->setCode($code); $this->_getDs()->addMobileVerify($dm); return $code; }