config = Dever::db('account_sms', $msg)->find(['account_id' => $config_id, 'template_id' => $template_id]); if (!$this->config) { Dever::error('短信配置不存在'); } $this->config['project'] = $project; $this->config['account'] = $account['mobile']; return $this->config['account']; } # 发送短信 public function send($api, $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($api, 'send_sms', $send, 1, 'run', $this->config['project']); return Dever::json_encode($result); } }