Commit 47b41a12 authored by clone's avatar clone

bug

parent f275a0ab
......@@ -71,7 +71,7 @@ class AppointmentTime extends Basic
return $this->response("101", "楼盘信息不能为空");
}
//todo 参数校验
if (!isset($params["phone"]) || !preg_match('/^1[345678]\d{9}$/', $params["phone"])) {
if (!isset($params["phone"]) || !preg_match('/^1[3456789]\d{9}$/', $params["phone"])) {
return $this->response("101", "手机号为空或手机号无效");
}
......
......@@ -106,7 +106,7 @@ class Response
$this->header['Cache-Control'] = 'max-age=' . $cache[1] . ',must-revalidate';
$this->header['Last-Modified'] = gmdate('D, d M Y H:i:s') . ' GMT';
$this->header['Expires'] = gmdate('D, d M Y H:i:s', $_SERVER['REQUEST_TIME'] + $cache[1]) . ' GMT';
Cache::tag($cache[2])->set($cache[0], [$data, $this->header], $cache[1]);
Cache::tag($cache[2])->set($cache[0], [ $data, $this->header ], $cache[1]);
}
}
......@@ -206,7 +206,7 @@ class Response
throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content)));
}
$this->content = (string) $content;
$this->content = (string)$content;
return $this;
}
......@@ -309,7 +309,7 @@ class Response
{
if (null == $this->content) {
$content = $this->output($this->data);
Log::record("response msg:" . $content);
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable([
$content,
'__toString',
......@@ -318,7 +318,7 @@ class Response
throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content)));
}
$this->content = (string) $content;
$this->content = (string)$content;
}
return $this->content;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment