|
@@ -65,20 +65,29 @@ class Base
|
|
|
parse_str($content, $param);
|
|
|
}
|
|
|
|
|
|
- if ($this->config['sdk'] != 'url') {
|
|
|
- $result = Dever::load('sms/lib/' . $this->config['sdk'] . '.send', $param, $this->config);
|
|
|
- } else {
|
|
|
- if (!$this->config['url']) {
|
|
|
- $result = 'url error';
|
|
|
+ $debug = false;
|
|
|
+ $mobileCode = Dever::config('base', 'project')->mobileCode;
|
|
|
+ if ($mobileCode && isset($mobileCode['debug'])) {
|
|
|
+ $debug = $mobileCode['debug'];
|
|
|
+ }
|
|
|
+ if (!$debug) {
|
|
|
+ if ($this->config['sdk'] != 'url') {
|
|
|
+ $result = Dever::load('sms/lib/' . $this->config['sdk'] . '.send', $param, $this->config);
|
|
|
} else {
|
|
|
- $json = false;
|
|
|
- if ($this->config['json'] == 1) {
|
|
|
- $json = true;
|
|
|
+ if (!$this->config['url']) {
|
|
|
+ $result = 'url error';
|
|
|
} else {
|
|
|
$json = false;
|
|
|
+ if ($this->config['json'] == 1) {
|
|
|
+ $json = true;
|
|
|
+ } else {
|
|
|
+ $json = false;
|
|
|
+ }
|
|
|
+ $result = Dever::curl($this->config['url'], $param, $this->config['method'], $json, $this->config['header']);
|
|
|
}
|
|
|
- $result = Dever::curl($this->config['url'], $param, $this->config['method'], $json, $this->config['header']);
|
|
|
}
|
|
|
+ } else {
|
|
|
+ $result = 'debug true';
|
|
|
}
|
|
|
|
|
|
# 记录当前的短信信息
|