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
0e4f7649
Commit
0e4f7649
authored
Nov 25, 2021
by
顾敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审核图片实时给结果
parent
df1ecdf0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
39 deletions
+34
-39
src/app/Http/Controllers/Card/CardController.php
src/app/Http/Controllers/Card/CardController.php
+34
-39
No files found.
src/app/Http/Controllers/Card/CardController.php
View file @
0e4f7649
...
@@ -347,15 +347,20 @@ class CardController extends Controller
...
@@ -347,15 +347,20 @@ class CardController extends Controller
$roleId
=
$request
->
input
(
'roleId'
);
$roleId
=
$request
->
input
(
'roleId'
);
$serverId
=
$request
->
input
(
'serverId'
);
$serverId
=
$request
->
input
(
'serverId'
);
$result
=
$this
->
getVerityLogin
(
$userId
);
if
(
$result
[
'code'
]
!=
200
)
return
$this
->
jsonReturn
(
$result
[
'code'
],
$result
[
'msg'
]);
if
(
empty
(
$roleId
)
||
empty
(
$serverId
))
return
$this
->
jsonReturn
(
7002
,
'参数错误'
);
$data
=
[];
$data
=
[];
if
(
Cache
::
has
(
'card:info:'
.
$userId
.
':'
.
$roleId
)){
if
(
Cache
::
has
(
'card:info:'
.
$userId
.
':'
.
$roleId
)){
$data
=
Cache
::
get
(
'card:info:'
.
$userId
.
':'
.
$roleId
);
$data
=
Cache
::
get
(
'card:info:'
.
$userId
.
':'
.
$roleId
);
}
else
{
}
else
{
$
result
=
$this
->
getVerityLogin
(
$userId
);
$
info
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
'wx_card_role_'
.
$serverId
)
if
(
$result
[
'code'
]
!=
200
)
return
$this
->
jsonReturn
(
$result
[
'code'
],
$result
[
'msg'
]);
->
where
(
'uid'
,
$userId
)
if
(
empty
(
$roleId
)
||
empty
(
$serverId
))
return
$this
->
jsonReturn
(
7002
,
'参数错误'
);
->
where
(
'role_id'
,
$roleId
)
// if (!Schema::connection('wx_mysql')->hasTable('wx_card_role_'.$serverId)) return redirect(route('index'));
->
where
(
'server_id'
,
$serverId
)
$info
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
'wx_card_role_'
.
$serverId
)
->
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
where
(
'server_id'
,
$serverId
)
->
first
();
->
first
();
if
(
!
$info
)
return
redirect
(
route
(
'index'
));
if
(
!
$info
)
return
redirect
(
route
(
'index'
));
$filterElems
=
[
'越狱'
,
'IOS'
,
'mg77'
,
'抖音'
,
'硬核'
,
'非硬核'
,
'zy'
,
'915转移'
,
'转移'
,
'小米'
,
'百度'
];
$filterElems
=
[
'越狱'
,
'IOS'
,
'mg77'
,
'抖音'
,
'硬核'
,
'非硬核'
,
'zy'
,
'915转移'
,
'转移'
,
'小米'
,
'百度'
];
...
@@ -366,23 +371,6 @@ class CardController extends Controller
...
@@ -366,23 +371,6 @@ class CardController extends Controller
$data
[
'userName'
]
=
$user
->
account
??
''
;
$data
[
'userName'
]
=
$user
->
account
??
''
;
$data
[
'serverName'
]
=
$serverName
;
$data
[
'serverName'
]
=
$serverName
;
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$info
->
id
)
->
where
(
'server_id'
,
$info
->
server_id
)
->
select
(
'id'
,
'img_url'
,
'status'
,
'is_upload'
)
->
first
();
if
(
$img
){
if
(
$img
->
status
==
1
){
if
(
$img
->
is_upload
==
1
){
$data
[
'userImgStatus'
]
=
1
;
}
else
{
$data
[
'userImgStatus'
]
=
0
;
}
}
else
{
$data
[
'userImgStatus'
]
=
$img
->
status
;
}
$data
[
'userImg'
]
=
$img
->
img_url
;
}
else
{
$data
[
'userImg'
]
=
''
;
$data
[
'userImgStatus'
]
=
-
1
;
}
$armsScore
=
[];
$armsScore
=
[];
$armsStrong
=
[];
$armsStrong
=
[];
$armsExciting
=
[];
$armsExciting
=
[];
...
@@ -390,13 +378,6 @@ class CardController extends Controller
...
@@ -390,13 +378,6 @@ class CardController extends Controller
if
(
$info
->
arms_strong
!=
''
)
$armsStrong
=
json_decode
(
$info
->
arms_strong
,
true
);
if
(
$info
->
arms_strong
!=
''
)
$armsStrong
=
json_decode
(
$info
->
arms_strong
,
true
);
if
(
$info
->
arms_exciting
!=
''
)
$armsExciting
=
json_decode
(
$info
->
arms_exciting
,
true
);
if
(
$info
->
arms_exciting
!=
''
)
$armsExciting
=
json_decode
(
$info
->
arms_exciting
,
true
);
// $roleScore = '00000';
// if(strlen($info->role_score) == 1) $roleScore = '0000'.(string)$info->role_score;
// if(strlen($info->role_score) == 2) $roleScore = '000'.(string)$info->role_score;
// if(strlen($info->role_score) == 3) $roleScore = '00'.(string)$info->role_score;
// if(strlen($info->role_score) == 4) $roleScore = '0'.(string)$info->role_score;
// if(strlen($info->role_score) == 5) $roleScore = (string)$info->role_score;
$roleScore
=
str_pad
(
$info
->
role_score
,
5
,
"0"
,
STR_PAD_LEFT
);
$roleScore
=
str_pad
(
$info
->
role_score
,
5
,
"0"
,
STR_PAD_LEFT
);
$jobInco
=
config
(
'sign.jobInco'
);
$jobInco
=
config
(
'sign.jobInco'
);
...
@@ -423,13 +404,6 @@ class CardController extends Controller
...
@@ -423,13 +404,6 @@ class CardController extends Controller
$data
[
'rank'
]
=
empty
(
$info
->
max_rank
)
?
'青铜5'
:
$info
->
max_rank
;
$data
[
'rank'
]
=
empty
(
$info
->
max_rank
)
?
'青铜5'
:
$info
->
max_rank
;
if
(
!
empty
(
$armsScore
)){
if
(
!
empty
(
$armsScore
)){
// $armsScoreNum = '00000';
// if(strlen($armsScore[0]['score']) == 1) $armsScoreNum = '0000'.(string)$armsScore[0]['score'];
// if(strlen($armsScore[0]['score']) == 2) $armsScoreNum = '000'.(string)$armsScore[0]['score'];
// if(strlen($armsScore[0]['score']) == 3) $armsScoreNum = '00'.(string)$armsScore[0]['score'];
// if(strlen($armsScore[0]['score']) == 4) $armsScoreNum = '0'.(string)$armsScore[0]['score'];
// if(strlen($armsScore[0]['score']) == 5) $armsScoreNum = (string)$armsScore[0]['score'];
$armsScoreNum
=
str_pad
(
$armsScore
[
0
][
'score'
],
5
,
"0"
,
STR_PAD_LEFT
);
$armsScoreNum
=
str_pad
(
$armsScore
[
0
][
'score'
],
5
,
"0"
,
STR_PAD_LEFT
);
$data
[
'armsScoreName'
]
=
$armsScore
[
0
][
'name'
];
$data
[
'armsScoreName'
]
=
$armsScore
[
0
][
'name'
];
$data
[
'armsScore'
]
=
$armsScoreNum
;
$data
[
'armsScore'
]
=
$armsScoreNum
;
...
@@ -473,6 +447,27 @@ class CardController extends Controller
...
@@ -473,6 +447,27 @@ class CardController extends Controller
Cache
::
put
(
'card:info:'
.
$userId
.
':'
.
$roleId
,
$data
,
86400
);
Cache
::
put
(
'card:info:'
.
$userId
.
':'
.
$roleId
,
$data
,
86400
);
}
}
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
where
(
'server_id'
,
$serverId
)
->
select
(
'id'
,
'img_url'
,
'status'
,
'is_upload'
)
->
first
();
if
(
$img
){
if
(
$img
->
status
==
1
){
if
(
$img
->
is_upload
==
1
){
$data
[
'userImgStatus'
]
=
1
;
}
else
{
$data
[
'userImgStatus'
]
=
0
;
}
}
else
{
$data
[
'userImgStatus'
]
=
$img
->
status
;
}
$data
[
'userImg'
]
=
$img
->
img_url
;
}
else
{
$data
[
'userImg'
]
=
''
;
$data
[
'userImgStatus'
]
=
-
1
;
}
return
view
(
'card.card'
,
$data
);
return
view
(
'card.card'
,
$data
);
}
}
}
}
\ No newline at end of file
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