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
da4dba3b
Commit
da4dba3b
authored
Jun 08, 2021
by
zhoujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
514a378f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
14 deletions
+119
-14
src/app/Http/Controllers/Admin/AdminController.php
src/app/Http/Controllers/Admin/AdminController.php
+5
-2
src/app/Http/Controllers/Card/CardController.php
src/app/Http/Controllers/Card/CardController.php
+5
-4
src/config/sign.php
src/config/sign.php
+1
-1
src/resources/views/admin/img.blade.php
src/resources/views/admin/img.blade.php
+62
-7
src/resources/views/admin/mode.blade.php
src/resources/views/admin/mode.blade.php
+46
-0
No files found.
src/app/Http/Controllers/Admin/AdminController.php
View file @
da4dba3b
...
...
@@ -85,11 +85,14 @@ class AdminController extends Controller
}
else
{
return
$query
->
where
(
'uid'
,
'-1'
);
}
})
->
when
(
$status
>
0
,
function
(
$query
)
use
(
$status
)
{
$imgStatus
=
$status
-
1
;
return
$query
->
where
(
'status'
,
$imgStatus
);
})
->
when
(
$startTime
!=
''
,
function
(
$query
)
use
(
$startTime
)
{
return
$query
->
where
(
'updated_at'
,
'>'
,
$startTime
);
})
->
when
(
$endTime
!=
''
,
function
(
$query
)
use
(
$endTime
)
{
return
$query
->
where
(
'updated_at'
,
'<'
,
$endTime
);
})
->
where
(
'status'
,
$status
)
->
orderBy
(
'id'
,
'ASC'
)
->
select
(
'id'
,
'uid'
,
'img_url'
,
'status'
,
'updated_at'
)
->
paginate
(
$pageNum
);
})
->
orderBy
(
'id'
,
'ASC'
)
->
select
(
'id'
,
'uid'
,
'img_url'
,
'status'
,
'updated_at'
)
->
paginate
(
$pageNum
);
if
(
$startTime
!=
''
)
$paginateAppends
[
'startTime'
]
=
$startTime
;
if
(
$endTime
!=
''
)
$paginateAppends
[
'endTime'
]
=
$endTime
;
if
(
$userName
!=
''
)
$paginateAppends
[
'user'
]
=
$userName
;
...
...
@@ -122,7 +125,7 @@ class AdminController extends Controller
if
(
$id
<
1
||
!
in_array
(
$status
,[
1
,
2
]))
return
$this
->
getErrorMsg
(
'10060'
,
'参数错误'
);
$row
=
WxUserImg
::
find
(
$id
);
if
(
!
$row
)
return
$this
->
getErrorMsg
(
'10061'
,
'数据异常'
);
if
(
$row
->
status
>
0
)
return
$this
->
getErrorMsg
(
'10062'
,
'请勿重复审核'
);
if
(
$row
->
status
==
1
)
return
$this
->
getErrorMsg
(
'10062'
,
'请勿重复审核'
);
$row
->
status
=
$status
;
if
(
$row
->
save
())
return
$this
->
getSuccessMsg
([]);
return
$this
->
getErrorMsg
(
'10063'
,
'审核失败'
);
...
...
src/app/Http/Controllers/Card/CardController.php
View file @
da4dba3b
...
...
@@ -291,7 +291,7 @@ class CardController extends Controller
$tableName
=
'wx_card_role_'
.
$serverId
;
$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
);
$img
=
$this
->
getUpdateImg
(
$result
[
'data'
],
$userId
,
$role
->
id
,
$serverId
);
if
(
$img
)
return
$this
->
jsonReturn
(
0
,
'上传成功'
,[
'src'
=>
$result
[
'data'
]]);
return
$this
->
jsonReturn
(
10060
,
'上传失败'
);
}
...
...
@@ -303,9 +303,9 @@ class CardController extends Controller
* @date 2021/06/01
* @author live
*/
public
function
getUpdateImg
(
$data
,
$userId
,
$roleId
)
public
function
getUpdateImg
(
$data
,
$userId
,
$roleId
,
$serverId
)
{
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
first
();
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$roleId
)
->
where
(
'server_id'
,
$serverId
)
->
first
();
if
(
$img
){
$img
->
loacl_url
=
$data
[
'url'
];
$img
->
img_url
=
$data
[
'yunUrl'
];
...
...
@@ -315,6 +315,7 @@ class CardController extends Controller
$row
=
new
WxUserImg
();
$row
->
uid
=
$userId
;
$row
->
role_id
=
$roleId
;
$row
->
server_id
=
$serverId
;
$row
->
loacl_url
=
$data
[
'url'
];
$row
->
img_url
=
$data
[
'yunUrl'
];
$row
->
status
=
0
;
...
...
@@ -343,7 +344,7 @@ class CardController extends Controller
$user
=
User
::
where
(
'uid'
,
$userId
)
->
select
(
'uid'
,
'account'
)
->
first
();
$data
[
'userName'
]
=
$user
->
account
??
''
;
$img
=
WxUserImg
::
where
(
'uid'
,
$userId
)
->
where
(
'role_id'
,
$info
->
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
){
$data
[
'userImgStatus'
]
=
$img
->
status
;
$data
[
'userImg'
]
=
$img
->
img_url
;
...
...
src/config/sign.php
View file @
da4dba3b
...
...
@@ -106,7 +106,7 @@ return [
'OSS_ACCESS_KEY'
=>
'EeXzbGCqPdpLYrnHm3FpjsSmk68NQL'
,
'OSS_ENDPOINT'
=>
'oss-cn-shanghai.aliyuncs.com'
,
'OSS_DOMAIN'
=>
'http://aldzn-img.oss-cn-shanghai.aliyuncs.com/'
,
'OSS_CDN'
=>
'http
://static-card
.aldzn.cn/'
,
'OSS_CDN'
=>
'http
s://static-card-cdn
.aldzn.cn/'
,
'jobInco'
=>
[
'爆裂玫瑰'
=>
'https://aldzn-ios-cdn.aldzn.cn/ucCard/images/role/1.png'
,
...
...
src/resources/views/admin/img.blade.php
View file @
da4dba3b
...
...
@@ -21,9 +21,10 @@
</
div
>
<
div
class
=
"col-lg-2"
>
<
select
class
=
"form-control"
name
=
"status"
>
<
option
value
=
"0"
@
if
(
@
$SEARCH
[
'status'
]
==
0
)
selected
=
"selected"
@
endif
>
待审核
</
option
>
<
option
value
=
"1"
@
if
(
@
$SEARCH
[
'status'
]
==
1
)
selected
=
"selected"
@
endif
>
审核通过
</
option
>
<
option
value
=
"2"
@
if
(
@
$SEARCH
[
'status'
]
==
2
)
selected
=
"selected"
@
endif
>
审核拒绝
</
option
>
<
option
value
=
"0"
@
if
(
@
$SEARCH
[
'status'
]
==
0
)
selected
=
"selected"
@
endif
>
全部
</
option
>
<
option
value
=
"1"
@
if
(
@
$SEARCH
[
'status'
]
==
1
)
selected
=
"selected"
@
endif
>
待审核
</
option
>
<
option
value
=
"2"
@
if
(
@
$SEARCH
[
'status'
]
==
2
)
selected
=
"selected"
@
endif
>
审核通过
</
option
>
<
option
value
=
"3"
@
if
(
@
$SEARCH
[
'status'
]
==
3
)
selected
=
"selected"
@
endif
>
审核拒绝
</
option
>
</
select
>
</
div
>
<
div
class
=
"col-lg-2"
>
...
...
@@ -39,6 +40,7 @@
<
table
id
=
"basic-table2"
class
=
"data-table table table-striped nowrap table-hover"
cellspacing
=
"0"
width
=
"100%"
>
<
thead
>
<
tr
>
<
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
>
...
...
@@ -51,11 +53,14 @@
<
tbody
>
@
foreach
(
$LIST
as
$li
)
<
tr
>
<
td
>
<
input
type
=
"checkbox"
name
=
"ids[]"
value
=
"{{
$li->id
}}"
class
=
"imgIDCheckbox"
/></
td
>
<
td
>
{{
@
$li
->
id
}}
</
td
>
<
td
>
{{
$USER_INFO
[
$li
->
uid
]
??
''
}}
</
td
>
<
td
>
@
if
(
$li
->
status
==
0
)
<
button
type
=
"button"
class
=
"btn btn-success"
onclick
=
"return setStatus({{
$li->id
}});"
>
审核
</
button
>
@
else
<
button
type
=
"button"
class
=
"btn btn-success"
onclick
=
"return setStatus({{
$li->id
}});"
>
重新审核
</
button
>
@
endif
<
td
>
@
if
(
$li
->
status
==
0
)
待审核
@
endif
...
...
@@ -88,11 +93,57 @@
<
script
src
=
"/html/javascripts/My97DatePicker/WdatePicker.js"
></
script
>
@
include
(
'admin.common.foot'
)
<
script
>
function
setAllStatus
(){
$
(
'#ALL_VERITY'
)
.
modal
(
'show'
)
}
function
imgCheck
(
obj
){
var
box
=
document
.
getElementsByClassName
(
'imgIDCheckbox'
);
for
(
i
=
0
;
i
<
box
.
length
;
i
++
){
if
(
obj
.
checked
){
box
[
i
]
.
checked
=
true
;
}
else
{
box
[
i
]
.
checked
=
false
;
}
}
}
function
setStatus
(
id
){
$
(
'#img_id'
)
.
val
(
id
);
$
(
'#VERITY'
)
.
modal
(
'show'
)
}
function
saveStatusCir
()
{
var
id
=
$
(
'#img_id'
)
.
val
();
var
token
=
$
(
"input[name='_token']"
)
.
val
();
var
status
=
2
;
$
(
'#change_status'
)
.
attr
(
"disabled"
,
true
);
$
(
'#cancel_change_status'
)
.
attr
(
"disabled"
,
true
);
$
.
ajax
({
type
:
'POST'
,
url
:
'/admin/save/status'
,
data
:
{
_token
:
token
,
id
:
id
,
status
:
status
},
success
:
function
(
data
){
$
(
'#show_error_info'
)
.
html
(
data
.
info
);
$
(
'#show_success_info'
)
.
html
(
data
.
info
);
$
(
'#change_status'
)
.
attr
(
"disabled"
,
false
);
$
(
'#cancel_change_status'
)
.
attr
(
"disabled"
,
false
);
$
(
'#CONFIRM'
)
.
modal
(
'hide'
)
if
(
data
.
code
==
200
){
$
(
'#message-success-modal'
)
.
modal
(
'show'
)
}
else
{
$
(
"#message-error-modal"
)
.
modal
(
'show'
);
}
}
});
}
function
saveStatus
(){
var
id
=
$
(
'#img_id'
)
.
val
();
var
token
=
$
(
"input[name='_token']"
)
.
val
();
...
...
@@ -100,7 +151,10 @@
$
(
'#change_status'
)
.
attr
(
"disabled"
,
true
);
$
(
'#cancel_change_status'
)
.
attr
(
"disabled"
,
true
);
if
(
status
==
2
){
$
(
'#VERITY'
)
.
modal
(
'hide'
);
$
(
'#CONFIRM'
)
.
modal
(
'show'
);
}
else
{
$
.
ajax
({
type
:
'POST'
,
url
:
'/admin/save/status'
,
...
...
@@ -121,6 +175,7 @@
}
});
}
}
function
showImg
(
img
)
{
...
...
src/resources/views/admin/mode.blade.php
View file @
da4dba3b
...
...
@@ -46,4 +46,50 @@
</div>
</div>
<div
class=
"modal fade"
id=
"CONFIRM"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"modal-error-label"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header state modal-danger"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
id=
"modal-error-label"
><i
class=
"fa fa-warning"
></i>
确认框
</h4>
</div>
<div
class=
"modal-body"
id=
"change_info"
>
确认拒绝?
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-danger"
onclick=
"return saveStatusCir();"
id=
"change_status"
>
确认
</button>
<button
type=
"button"
class=
"btn btn-default"
onclick=
"return cir_cancel('CONFIRM');"
id=
"cancel_change_status"
>
取消
</button>
</div>
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"ALL_VERITY"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
审核图片
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"panel-content"
>
<div
class=
"row"
>
<div
class=
"form-group col-lg-12"
>
<h6>
审核状态
</h6>
<input
type=
"radio"
value=
"1"
name=
"imgStatus"
checked=
"checked"
/><label
class=
"ml-sm"
>
通过
</label>
<input
type=
"radio"
value=
"2"
name=
"imgStatus"
/><label
class=
"ml-sm"
>
拒绝
</label>
</div>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-primary active"
id=
"change_status"
onclick=
"return saveStatus();"
>
提交
</button>
<button
type=
"button"
class=
"btn btn-default active"
id=
"cancel_change_status"
onclick=
"return cir_cancel('VERITY');"
>
关闭
</button>
</div>
</div>
</div>
</div>
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