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
b1d00679
Commit
b1d00679
authored
Jan 02, 2020
by
孙磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门、留言验证错误提示修改
Signed-off-by:
sunlei
<
sunlei@romens.cn
>
parent
350a8396
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
UserComplainController.php
backend/controllers/v1/shopuser/UserComplainController.php
+3
-3
UserDepartmentController.php
backend/controllers/v1/shopuser/UserDepartmentController.php
+3
-3
No files found.
backend/controllers/v1/shopuser/UserComplainController.php
View file @
b1d00679
...
@@ -10,7 +10,7 @@ use yii\web\BadRequestHttpException;
...
@@ -10,7 +10,7 @@ use yii\web\BadRequestHttpException;
class
UserComplainController
extends
BaseController
class
UserComplainController
extends
BaseController
{
{
public
$modelClass
=
'app\models\v1\shopuser\UserComplain'
;
public
$modelClass
=
'app\models\v1\shopuser\UserComplain'
;
/**
/**
* @OA\Get(
* @OA\Get(
* path="/backend/web/v1/shopuser/user-complains/user-complain",
* path="/backend/web/v1/shopuser/user-complains/user-complain",
...
@@ -40,8 +40,8 @@ class UserComplainController extends BaseController
...
@@ -40,8 +40,8 @@ class UserComplainController extends BaseController
return
$info
;
return
$info
;
}
else
{
}
else
{
//验证失败:$errors 是一个包含错误信息的数组
//验证失败:$errors 是一个包含错误信息的数组
$errors
=
$model
->
errors
;
Yii
::
$app
->
response
->
statusCode
=
422
;
return
$errors
;
return
$
model
->
errors
;
}
}
}
}
}
}
backend/controllers/v1/shopuser/UserDepartmentController.php
View file @
b1d00679
...
@@ -10,7 +10,7 @@ use yii\web\BadRequestHttpException;
...
@@ -10,7 +10,7 @@ use yii\web\BadRequestHttpException;
class
UserDepartmentController
extends
BaseController
class
UserDepartmentController
extends
BaseController
{
{
public
$modelClass
=
'app\models\v1\shopuser\UserDepartment'
;
public
$modelClass
=
'app\models\v1\shopuser\UserDepartment'
;
/**
/**
* @OA\Get(
* @OA\Get(
* path="/backend/web/v1/shopuser/user-departments/department",
* path="/backend/web/v1/shopuser/user-departments/department",
...
@@ -43,8 +43,8 @@ class UserDepartmentController extends BaseController
...
@@ -43,8 +43,8 @@ class UserDepartmentController extends BaseController
return
$info
;
return
$info
;
}
else
{
}
else
{
//验证失败:$errors 是一个包含错误信息的数组
//验证失败:$errors 是一个包含错误信息的数组
$errors
=
$model
->
errors
;
Yii
::
$app
->
response
->
statusCode
=
422
;
return
$errors
;
return
$
model
->
errors
;
}
}
}
}
}
}
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