Commit 30319e51 by LiuJunYi

上传

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