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
c105c75c
Commit
c105c75c
authored
Jun 10, 2021
by
zhoujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回归测试
parent
18b7df84
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
3 deletions
+6
-3
src/app/Http/Controllers/Admin/AdminController.php
src/app/Http/Controllers/Admin/AdminController.php
+1
-1
src/app/Http/Controllers/Card/CardController.php
src/app/Http/Controllers/Card/CardController.php
+3
-2
src/public/cardImg/202106/10/2021061009424833748-1.png
src/public/cardImg/202106/10/2021061009424833748-1.png
+0
-0
src/resources/views/admin/img.blade.php
src/resources/views/admin/img.blade.php
+2
-0
No files found.
src/app/Http/Controllers/Admin/AdminController.php
View file @
c105c75c
...
@@ -95,7 +95,7 @@ class AdminController extends Controller
...
@@ -95,7 +95,7 @@ class AdminController extends Controller
return
$query
->
where
(
'updated_at'
,
'<'
,
$endTime
);
return
$query
->
where
(
'updated_at'
,
'<'
,
$endTime
);
})
->
when
(
$status
==
0
,
function
(
$query
)
use
(
$status
)
{
})
->
when
(
$status
==
0
,
function
(
$query
)
use
(
$status
)
{
return
$query
->
orderBy
(
'status'
,
'ASC'
);
return
$query
->
orderBy
(
'status'
,
'ASC'
);
})
->
orderBy
(
'updated_at'
,
'DESC'
)
->
select
(
'id'
,
'uid'
,
'loacl_url'
,
'img_url'
,
'status'
,
'is_upload'
,
'updated_at'
)
->
paginate
(
$pageNum
);
})
->
orderBy
(
'updated_at'
,
'DESC'
)
->
select
(
'id'
,
'uid'
,
'role_id'
,
'role'
,
'loacl_url'
,
'img_url'
,
'status'
,
'is_upload'
,
'updated_at'
)
->
paginate
(
$pageNum
);
if
(
$startTime
!=
''
)
$paginateAppends
[
'startTime'
]
=
$startTime
;
if
(
$startTime
!=
''
)
$paginateAppends
[
'startTime'
]
=
$startTime
;
if
(
$endTime
!=
''
)
$paginateAppends
[
'endTime'
]
=
$endTime
;
if
(
$endTime
!=
''
)
$paginateAppends
[
'endTime'
]
=
$endTime
;
if
(
$userName
!=
''
)
$paginateAppends
[
'user'
]
=
$userName
;
if
(
$userName
!=
''
)
$paginateAppends
[
'user'
]
=
$userName
;
...
...
src/app/Http/Controllers/Card/CardController.php
View file @
c105c75c
...
@@ -293,7 +293,7 @@ class CardController extends Controller
...
@@ -293,7 +293,7 @@ class CardController extends Controller
$tableName
=
'wx_card_role_'
.
$serverId
;
$tableName
=
'wx_card_role_'
.
$serverId
;
$role
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
$tableName
)
->
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
select
(
'id'
)
->
first
();
$role
=
DB
::
connection
(
'wx_mysql'
)
->
table
(
$tableName
)
->
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
select
(
'id'
)
->
first
();
$img
=
$this
->
getUpdateImg
(
$result
[
'data'
],
$userId
,
$role
->
id
,
$serverId
);
$img
=
$this
->
getUpdateImg
(
$result
[
'data'
],
$userId
,
$role
->
id
,
$serverId
,
$roleId
);
if
(
$img
)
return
$this
->
jsonReturn
(
0
,
'上传成功'
);
if
(
$img
)
return
$this
->
jsonReturn
(
0
,
'上传成功'
);
Cache
::
forget
(
$userId
.
':card:upload:image'
);
Cache
::
forget
(
$userId
.
':card:upload:image'
);
return
$this
->
jsonReturn
(
10060
,
'上传失败'
);
return
$this
->
jsonReturn
(
10060
,
'上传失败'
);
...
@@ -306,7 +306,7 @@ class CardController extends Controller
...
@@ -306,7 +306,7 @@ class CardController extends Controller
* @date 2021/06/01
* @date 2021/06/01
* @author live
* @author live
*/
*/
public
function
getUpdateImg
(
$data
,
$userId
,
$roleId
,
$serverId
)
public
function
getUpdateImg
(
$data
,
$userId
,
$roleId
,
$serverId
,
$role
=
''
)
{
{
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
where
(
'server_id'
,
$serverId
)
->
first
();
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
where
(
'server_id'
,
$serverId
)
->
first
();
if
(
$img
){
if
(
$img
){
...
@@ -321,6 +321,7 @@ class CardController extends Controller
...
@@ -321,6 +321,7 @@ class CardController extends Controller
$row
->
uid
=
$userId
;
$row
->
uid
=
$userId
;
$row
->
role_id
=
$roleId
;
$row
->
role_id
=
$roleId
;
$row
->
server_id
=
$serverId
;
$row
->
server_id
=
$serverId
;
$row
->
role
=
$role
;
$row
->
loacl_url
=
$data
[
'url'
];
$row
->
loacl_url
=
$data
[
'url'
];
$row
->
img_url
=
$data
[
'yunUrl'
];
$row
->
img_url
=
$data
[
'yunUrl'
];
$row
->
status
=
0
;
$row
->
status
=
0
;
...
...
src/public/cardImg/202106/10/2021061009424833748-1.png
0 → 100644
View file @
c105c75c
750 KB
src/resources/views/admin/img.blade.php
View file @
c105c75c
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
<
th
>
操作
<
input
type
=
"checkbox"
value
=
"all"
onclick
=
"return imgCheck(this);"
/><
label
class
=
"ml-sm"
>
全选
</
label
><
button
type
=
"button"
class
=
"btn btn-success"
onclick
=
"return setAllStatus();"
>
审核
</
button
></
th
>
<
th
>
操作
<
input
type
=
"checkbox"
value
=
"all"
onclick
=
"return imgCheck(this);"
/><
label
class
=
"ml-sm"
>
全选
</
label
><
button
type
=
"button"
class
=
"btn btn-success"
onclick
=
"return setAllStatus();"
>
审核
</
button
></
th
>
<
th
>
编号
</
th
>
<
th
>
编号
</
th
>
<
th
>
用户名
</
th
>
<
th
>
用户名
</
th
>
<
th
>
角色
</
th
>
<
th
>
审核
</
th
>
<
th
>
审核
</
th
>
<
th
>
状态
</
th
>
<
th
>
状态
</
th
>
<
th
>
图片
</
th
>
<
th
>
图片
</
th
>
...
@@ -56,6 +57,7 @@
...
@@ -56,6 +57,7 @@
<
td
>
<
input
type
=
"checkbox"
name
=
"ids[]"
value
=
"{{
$li->id
}}"
class
=
"imgIDCheckbox"
/></
td
>
<
td
>
<
input
type
=
"checkbox"
name
=
"ids[]"
value
=
"{{
$li->id
}}"
class
=
"imgIDCheckbox"
/></
td
>
<
td
>
{{
@
$li
->
id
}}
</
td
>
<
td
>
{{
@
$li
->
id
}}
</
td
>
<
td
>
{{
$USER_INFO
[
$li
->
uid
]
??
''
}}
</
td
>
<
td
>
{{
$USER_INFO
[
$li
->
uid
]
??
''
}}
</
td
>
<
td
>
{{
$li
->
role
??
''
}}
</
td
>
<
td
>
<
td
>
@
if
(
$li
->
status
==
0
)
@
if
(
$li
->
status
==
0
)
<
button
type
=
"button"
class
=
"btn btn-success"
onclick
=
"return setStatus({{
$li->id
}});"
>
审核
</
button
>
<
button
type
=
"button"
class
=
"btn btn-success"
onclick
=
"return setStatus({{
$li->id
}});"
>
审核
</
button
>
...
...
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