Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
backend
Commits
918617c1
Commit
918617c1
authored
Oct 11, 2018
by
汪睦雄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 123.56.28.111:qz-tour/backend
parents
c617a0bc
30319e51
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
application/api/controller/Base.php
+4
-4
application/api/controller/Project.php
+4
-4
public/index.php
+1
-1
No files found.
application/api/controller/Base.php
View file @
918617c1
...
@@ -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'
))
{
...
...
application/api/controller/Project.php
View file @
918617c1
...
@@ -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
);
});
});
...
...
public/index.php
View file @
918617c1
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
// 定义应用目录
// 定义应用目录
define
(
'APP_PATH'
,
__DIR__
.
'/../application/'
);
define
(
'APP_PATH'
,
__DIR__
.
'/../application/'
);
define
(
'APP_DEBUG'
,
tru
e
);
define
(
'APP_DEBUG'
,
fals
e
);
// require __DIR__ . '/../vendor/autoload.php';
// require __DIR__ . '/../vendor/autoload.php';
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment