Commit 918617c1 by 汪睦雄

Merge branch 'master' of 123.56.28.111:qz-tour/backend

parents c617a0bc 30319e51
......@@ -28,10 +28,10 @@ class Base extends Controller
// echo $this->getSignature($params); exit;
// 验证签名
// if (!$this->checkSignature($params)) {
// echo json_encode(["code" => 1, "msg" => "auth failed"]);
// die;
// }
if (!$this->checkSignature($params)) {
echo json_encode(["code" => 1, "msg" => "auth failed"]);
die;
}
// 用户信息
if (input('post.token')) {
......
......@@ -93,7 +93,7 @@ class Project extends Base
$newProjects = ProjectModel::all(function ($query) {
$query->where('type', 1)
->order('id', 'desc')
->limit(3);
->limit(6);
});
$newProjects = $newProjects ? collection($newProjects)->visible(['id', 'title', 'poster', 'night_num', 'price', 'vip_price'])->toArray() : [];
......@@ -103,13 +103,13 @@ class Project extends Base
->where('heat', 'neq', 0)
->order('heat', 'desc')
->order('id', 'desc')
->limit(3);
->limit(6);
});
$heatProjects = $heatProjects ? collection($heatProjects)->visible(['id', 'title', 'poster', 'night_num', 'price', 'vip_price'])->toArray() : [];
// 酒店预订
$businessProjects = ProjectModel::all(function ($query) {
$query->where('type', 2)
$query->where('catalog_id', 5)
->order('id', 'desc')
->limit(4);
});
......@@ -191,7 +191,7 @@ class Project extends Base
public function businessProjects($p = 1, $page = 8)
{
$businessProjects = ProjectModel::all(function ($query) use ($p, $page) {
$query->where('type', 2)
$query->where('catalog_id', 5)
->order('id', 'desc')
->page($p, $page);
});
......
......@@ -14,7 +14,7 @@
// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
define('APP_DEBUG', true);
define('APP_DEBUG', false);
// require __DIR__ . '/../vendor/autoload.php';
......
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