Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uc_card
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoujun
uc_card
Commits
c26d2b0c
Commit
c26d2b0c
authored
Jun 09, 2021
by
zhoujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试图片
parent
a16f993d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/app/Exceptions/Handler.php
src/app/Exceptions/Handler.php
+1
-1
src/app/Http/Controllers/Card/CardController.php
src/app/Http/Controllers/Card/CardController.php
+2
-1
No files found.
src/app/Exceptions/Handler.php
View file @
c26d2b0c
...
@@ -62,7 +62,7 @@ class Handler extends ExceptionHandler
...
@@ -62,7 +62,7 @@ class Handler extends ExceptionHandler
}
}
if
(
$exception
instanceof
QueryException
)
{
if
(
$exception
instanceof
QueryException
)
{
return
new
JsonResponse
([
'error'
=>
5001
,
'message'
=>
'网络错误'
]);
return
response
()
->
json
([
'error'
=>
5001
,
'message'
=>
'网络错误'
]);
}
}
if
(
$exception
instanceof
ErrorException
)
{
if
(
$exception
instanceof
ErrorException
)
{
...
...
src/app/Http/Controllers/Card/CardController.php
View file @
c26d2b0c
...
@@ -242,7 +242,7 @@ class CardController extends Controller
...
@@ -242,7 +242,7 @@ class CardController extends Controller
public
function
getCheckRoleInfoTable
(
$tableName
)
public
function
getCheckRoleInfoTable
(
$tableName
)
{
{
if
(
!
Schema
::
connection
(
'wx_mysql'
)
->
hasTable
(
$tableName
))
{
if
(
!
Schema
::
connection
(
'wx_mysql'
)
->
hasTable
(
$tableName
))
{
Schema
::
connection
(
'wx_mysql'
)
->
create
(
$tableName
,
function
(
Blueprint
$table
)
{
Schema
::
connection
(
'wx_mysql'
)
->
create
(
$tableName
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
)
->
comment
(
'自增主键'
);
$table
->
bigIncrements
(
'id'
)
->
comment
(
'自增主键'
);
$table
->
integer
(
'uid'
)
->
default
(
0
)
->
comment
(
'用户id'
);
$table
->
integer
(
'uid'
)
->
default
(
0
)
->
comment
(
'用户id'
);
...
@@ -343,6 +343,7 @@ class CardController extends Controller
...
@@ -343,6 +343,7 @@ class CardController extends Controller
$roleId
=
$request
->
input
(
'roleId'
);
$roleId
=
$request
->
input
(
'roleId'
);
$serverId
=
$request
->
input
(
'serverId'
);
$serverId
=
$request
->
input
(
'serverId'
);
if
(
empty
(
$roleId
)
||
empty
(
$serverId
))
return
$this
->
jsonReturn
(
7002
,
'参数错误'
);
if
(
empty
(
$roleId
)
||
empty
(
$serverId
))
return
$this
->
jsonReturn
(
7002
,
'参数错误'
);
if
(
!
Schema
::
connection
(
'wx_mysql'
)
->
hasTable
(
'wx_card_role_'
.
$serverId
))
return
redirect
(
route
(
'index'
));
$info
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
'wx_card_role_'
.
$serverId
)
->
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
where
(
'server_id'
,
$serverId
)
->
first
();
$info
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
'wx_card_role_'
.
$serverId
)
->
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
where
(
'server_id'
,
$serverId
)
->
first
();
if
(
!
$info
)
return
redirect
(
route
(
'index'
));
if
(
!
$info
)
return
redirect
(
route
(
'index'
));
$serverName
=
''
;
$serverName
=
''
;
...
...
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