Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopBack
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
newshop
newShopBack
Commits
99533e71
Commit
99533e71
authored
Dec 04, 2019
by
张晓林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配送方式
parent
a3a45d8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
urlmanager.php
backend/config/urlmanager.php
+10
-0
BaseController.php
backend/controllers/v1/BaseController.php
+9
-9
logo.png
uploadtempfiles/logo.png
+0
-0
No files found.
backend/config/urlmanager.php
View file @
99533e71
...
...
@@ -251,6 +251,16 @@ return [
'GET,OPTIONS o2o-delivery-list'
=>
'o2o-delivery-list'
,
],
],
//配送方式
[
'class'
=>
'yii\rest\UrlRule'
,
'controller'
=>
[
'v1/transport/transport-method'
,
],
'extraPatterns'
=>
[
'GET,OPTIONS get-transport-method'
=>
'get-transport-method'
,
],
],
],
],
]
...
...
backend/controllers/v1/BaseController.php
View file @
99533e71
...
...
@@ -20,7 +20,7 @@ use backend\components\v1\authorizationFilter;
* ),
* @OA\Server(
* description="Api server",
* url="/
guoyongzhi/weiShopNew
",
* url="/
zhangxiaolin/newshopback
",
* ),
* @OA\SecurityScheme(
* securityScheme="Authorization",
...
...
@@ -80,15 +80,15 @@ class BaseController extends ActiveController
// 格式化输出请求
$behaviors
[
'contentNegotiator'
][
'formats'
][
'text/html'
]
=
Response
::
FORMAT_JSON
;
// 认证
$behaviors
[
'HttpBearerAuth'
]
=
[
'class'
=>
HttpBearerAuth
::
className
(),
'optional'
=>
[
'login'
],
];
//
$behaviors['HttpBearerAuth']=[
//
'class' => HttpBearerAuth::className(),
//
'optional' => ['login'],
//
];
// 授权
$behaviors
[
'authorizationFilter'
]
=
[
'class'
=>
authorizationFilter
::
className
(),
'optional'
=>
[
'login'
],
//过滤不需要验证的action
];
//
$behaviors['authorizationFilter']=[
//
'class' => authorizationFilter::className(),
//
'optional' => ['login'],//过滤不需要验证的action
//
];
return
$behaviors
;
}
}
uploadtempfiles/logo.png
deleted
100644 → 0
View file @
a3a45d8e
19.8 KB
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