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
e85b1fa9
Commit
e85b1fa9
authored
Jun 07, 2021
by
liyadong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
roleId
parent
f6b5cbc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/resources/views/card/card.blade.php
src/resources/views/card/card.blade.php
+10
-1
No files found.
src/resources/views/card/card.blade.php
View file @
e85b1fa9
...
...
@@ -150,6 +150,14 @@
<script>
$
(
function
()
{
function
getQueryString
(
name
)
{
let
reg
=
new
RegExp
(
"
(^|&)
"
+
name
+
"
=([^&]*)(&|$)
"
,
"
i
"
);
let
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
decodeURIComponent
(
r
[
2
]);
}
return
null
;
}
function
renderHtml
(
dom
,
num
)
{
var
str
=
num
.
toString
();
var
arr
=
str
.
split
(
""
);
...
...
@@ -159,7 +167,6 @@
})
$
(
dom
).
html
(
html
);
}
@
if
(
$info
->
online_time
>
0
)
renderHtml
(
'
#bNum
'
,{{
ceil
(
$info
->
online_time
/
86400
)
}});
@
else
...
...
@@ -174,6 +181,7 @@
var
formData
=
new
FormData
();
var
file
=
$
(
"
#file
"
)[
0
].
files
[
0
];
var
acceptFileTypes
=
/^image
\/(
gif|jpe
?
g|png
)
$/i
;
var
roleId
=
getQueryString
(
'
roleId
'
);
//文件类型判断
if
(
file
.
type
.
length
&&
!
acceptFileTypes
.
test
(
file
.
type
))
{
alert
(
'
请上传gif、jpg、jpeg或png格式的文件
'
);
...
...
@@ -185,6 +193,7 @@
return
false
;
}
formData
.
append
(
"
imgFile
"
,
file
);
formData
.
append
(
"
roleId
"
,
roleId
);
formData
.
append
(
"
_token
"
,
"
{{ csrf_token() }}
"
)
$
.
ajax
({
url
:
"
/upload/img
"
,
...
...
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