config = Dever::db('template_sms', 'msg')->find(array('template_id' => $template_id)); if (!$this->config) { Dever::error('短信配置不存在'); } $this->config['account'] = $account['mobile']; return $this->config['account']; } # 发送短信 public function send($content, $param) { if (!$this->config) { Dever::error('短信配置不存在'); } $send['mobile'] = $this->config['account']; $send['TemplateCode'] = $this->config['code']; $send['TemplateParam'] = $param; $send['log'] = true; $result = Dever::load('account', 'api')->run($this->config['account_key'], 'send_sms', $send); return Dever::json_encode($result); } }