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
cb042075
Commit
cb042075
authored
Jun 09, 2021
by
liyadong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
http://gitlab.cccwangluo.com/zhoujun/uc_card
into test
parents
cd544fe7
c26d2b0c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
4 deletions
+31
-4
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
+10
-2
src/config/sign.php
src/config/sign.php
+19
-0
src/resources/views/card/card.blade.php
src/resources/views/card/card.blade.php
+1
-1
No files found.
src/app/Exceptions/Handler.php
View file @
cb042075
...
...
@@ -62,7 +62,7 @@ class Handler extends ExceptionHandler
}
if
(
$exception
instanceof
QueryException
)
{
return
new
JsonResponse
([
'error'
=>
5001
,
'message'
=>
'网络错误'
]);
return
response
()
->
json
([
'error'
=>
5001
,
'message'
=>
'网络错误'
]);
}
if
(
$exception
instanceof
ErrorException
)
{
...
...
src/app/Http/Controllers/Card/CardController.php
View file @
cb042075
...
...
@@ -156,6 +156,9 @@ class CardController extends Controller
$first
=
$rankConfig
[
$first
]
??
''
;
if
(
$first
!=
''
)
$maxRank
=
$first
.
$second
;
}
$honorLevel
=
$roleInfo
[
'HonorLevel'
]
??
0
;
$armsIds
=
[];
$armsScore
=
[];
$armsStrong
=
[];
...
...
@@ -221,7 +224,7 @@ class CardController extends Controller
if
(
$braveTime
<
1
)
$braveTime
=
0
;
if
(
$mercenaryScore
<
1
)
$mercenaryScore
=
0
;
$arrayData
=
[
'uid'
=>
$userId
,
'server_id'
=>
$serverId
,
'server_name'
=>
$serverName
,
'user_id'
=>
$targetRole
[
'userId'
],
'role_id'
=>
$roleId
,
'role_name'
=>
$targetRole
[
'roleName'
],
'job'
=>
$targetRole
[
'occupation'
],
'guild'
=>
$targetRole
[
'guild'
],
'online_time'
=>
$targetRole
[
'onlineTime'
],
'register_time'
=>
date
(
'Y-m-d H:i:s'
,
$targetRole
[
'createTime'
]),
'role_score'
=>
$roleScore
,
'arms_score'
=>
$armsScoreArr
,
'arms_strong'
=>
$armsStrongArr
,
'arms_exciting'
=>
$armsExcitingArr
,
'duel_total'
=>
$duelTotal
,
'duel_win'
=>
$duelWin
,
'duel_continuity_win'
=>
$duelContinuityWin
,
'max_rank'
=>
$maxRank
,
'brave_num'
=>
$braveNum
,
'brave_time'
=>
$braveTime
,
'mercenary_score'
=>
$mercenaryScore
,
'created_at'
=>
$time
,
'updated_at'
=>
$time
];
$arrayData
=
[
'uid'
=>
$userId
,
'server_id'
=>
$serverId
,
'server_name'
=>
$serverName
,
'user_id'
=>
$targetRole
[
'userId'
],
'role_id'
=>
$roleId
,
'role_name'
=>
$targetRole
[
'roleName'
],
'job'
=>
$targetRole
[
'occupation'
],
'guild'
=>
$targetRole
[
'guild'
],
'online_time'
=>
$targetRole
[
'onlineTime'
],
'register_time'
=>
date
(
'Y-m-d H:i:s'
,
$targetRole
[
'createTime'
]),
'role_score'
=>
$roleScore
,
'arms_score'
=>
$armsScoreArr
,
'arms_strong'
=>
$armsStrongArr
,
'arms_exciting'
=>
$armsExcitingArr
,
'duel_total'
=>
$duelTotal
,
'duel_win'
=>
$duelWin
,
'duel_continuity_win'
=>
$duelContinuityWin
,
'max_rank'
=>
$maxRank
,
'brave_num'
=>
$braveNum
,
'brave_time'
=>
$braveTime
,
'mercenary_score'
=>
$mercenaryScore
,
'
honor_level'
=>
$honorLevel
,
'
created_at'
=>
$time
,
'updated_at'
=>
$time
];
$result
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
$tableName
)
->
insert
(
$arrayData
);
if
(
$result
)
return
$array
;
...
...
@@ -239,7 +242,7 @@ class CardController extends Controller
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
)
{
$table
->
bigIncrements
(
'id'
)
->
comment
(
'自增主键'
);
$table
->
integer
(
'uid'
)
->
default
(
0
)
->
comment
(
'用户id'
);
...
...
@@ -263,6 +266,7 @@ class CardController extends Controller
$table
->
integer
(
'brave_num'
)
->
default
(
0
)
->
comment
(
'勇者之塔最高层数'
);
$table
->
integer
(
'brave_time'
)
->
default
(
0
)
->
comment
(
'勇者之塔过关时间'
);
$table
->
integer
(
'mercenary_score'
)
->
default
(
0
)
->
comment
(
'佣兵团评分'
);
$table
->
integer
(
'honor_level'
)
->
default
(
0
)
->
comment
(
'荣誉等级'
);
$table
->
timestamps
();
$table
->
index
([
'uid'
,
'role_id'
]);
$table
->
engine
=
'InnoDB'
;
...
...
@@ -339,6 +343,7 @@ class CardController extends Controller
$roleId
=
$request
->
input
(
'roleId'
);
$serverId
=
$request
->
input
(
'serverId'
);
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
();
if
(
!
$info
)
return
redirect
(
route
(
'index'
));
$serverName
=
''
;
...
...
@@ -380,6 +385,9 @@ class CardController extends Controller
$data
[
'roleScore'
]
=
$roleScore
;
$data
[
'jobImg'
]
=
$jobInco
[
$info
->
job
]
??
''
;
$honorConfig
=
config
(
'sign.honor'
);
$data
[
'honor'
]
=
$honorConfig
[
$info
->
honor_level
]
??
$honorConfig
[
0
];
if
(
$info
->
mercenary_score
==
2
){
$data
[
'ybImg'
]
=
'img-B'
;
}
elseif
(
$info
->
mercenary_score
==
3
){
...
...
src/config/sign.php
View file @
cb042075
...
...
@@ -133,6 +133,25 @@ return [
'阵魔'
=>
'https://aldzn-ios-cdn.aldzn.cn/ucCard/images/role/22.png'
,
],
'honor'
=>
[
0
=>
'决斗练习者'
,
1
=>
'决斗练习者'
,
2
=>
'入门决斗者'
,
3
=>
'初级决斗者'
,
4
=>
'中级决斗者'
,
5
=>
'高级决斗者'
,
6
=>
'特级决斗者'
,
7
=>
'职业决斗家'
,
8
=>
'明星决斗家'
,
9
=>
'武道高手'
,
10
=>
'决斗达人'
,
11
=>
'竞技大师'
,
12
=>
'传奇武士'
,
13
=>
'格斗之王'
,
14
=>
'荣耀天王'
,
15
=>
'神·职业'
],
'WX_APPID'
=>
'wx2db57391553aa064'
,
'WX_AppSecret'
=>
'f6d533f6d0851c629da52cd10fab910b'
,
'rank'
=>
[
1
=>
'青铜'
,
2
=>
'白银'
,
3
=>
'黄金'
,
4
=>
'铂金'
,
5
=>
'钻石'
,
6
=>
'最强王者'
],
...
...
src/resources/views/card/card.blade.php
View file @
cb042075
...
...
@@ -59,7 +59,7 @@
0
@endif
小时
</span></li>
<li
class=
"role6"
><span>
荣誉称号
</span></li>
<li
class=
"role6"
><span>
{{ $honor }}
</span></li>
</ul>
</div>
<div
class=
"bottom"
>
...
...
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