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
80d2f996
Commit
80d2f996
authored
Jun 08, 2021
by
zhoujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
替换字符串
parent
ada89979
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
src/app/Http/Controllers/Card/CardController.php
src/app/Http/Controllers/Card/CardController.php
+7
-0
src/resources/views/card/card.blade.php
src/resources/views/card/card.blade.php
+1
-1
No files found.
src/app/Http/Controllers/Card/CardController.php
View file @
80d2f996
...
@@ -340,9 +340,16 @@ class CardController extends Controller
...
@@ -340,9 +340,16 @@ class CardController extends Controller
if
(
empty
(
$roleId
)
||
empty
(
$serverId
))
return
$this
->
jsonReturn
(
7002
,
'参数错误'
);
if
(
empty
(
$roleId
)
||
empty
(
$serverId
))
return
$this
->
jsonReturn
(
7002
,
'参数错误'
);
$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
=
''
;
if
(
$info
->
server_name
!=
''
){
$serverName
=
str_replace
(
'硬核-'
,
''
,
$info
->
server_name
);
$serverName
=
str_replace
(
'非硬核-'
,
''
,
$serverName
);
$serverName
=
str_replace
(
'越狱-'
,
''
,
$serverName
);
}
$user
=
User
::
where
(
'uid'
,
$userId
)
->
select
(
'uid'
,
'account'
)
->
first
();
$user
=
User
::
where
(
'uid'
,
$userId
)
->
select
(
'uid'
,
'account'
)
->
first
();
$data
[
'userName'
]
=
$user
->
account
??
''
;
$data
[
'userName'
]
=
$user
->
account
??
''
;
$data
[
'serverName'
]
=
$serverName
;
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$info
->
id
)
->
where
(
'server_id'
,
$info
->
server_id
)
->
select
(
'id'
,
'img_url'
,
'status'
)
->
first
();
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$info
->
id
)
->
where
(
'server_id'
,
$info
->
server_id
)
->
select
(
'id'
,
'img_url'
,
'status'
)
->
first
();
if
(
$img
){
if
(
$img
){
...
...
src/resources/views/card/card.blade.php
View file @
80d2f996
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</div>
</div>
<ul>
<ul>
<li
class=
"role1"
><span>
{{ $info->role_name ?? '' }}
</span></li>
<li
class=
"role1"
><span>
{{ $info->role_name ?? '' }}
</span></li>
<li
class=
"role2"
><span>
{{ $
info->server_name ?? ''
}}
</span></li>
<li
class=
"role2"
><span>
{{ $
serverName
}}
</span></li>
</ul>
</ul>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
...
...
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