Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
0bcb729a
Commit
0bcb729a
authored
Feb 11, 2020
by
wangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'ss'
parent
2e3dd108
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
index.html
index.html
+1
-1
uploader.js
src/models/uploader.js
+1
-0
index.js
src/utils/index.js
+1
-1
No files found.
index.html
View file @
0bcb729a
...
...
@@ -18,5 +18,5 @@
</head>
<body>
<div
id=
"root"
></div>
<script
type=
"text/javascript"
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.
3d780e
.js"
></script></body>
<script
type=
"text/javascript"
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.
fdbac2
.js"
></script></body>
</html>
\ No newline at end of file
src/models/uploader.js
View file @
0bcb729a
...
...
@@ -137,6 +137,7 @@ export default {
const
file
=
files
.
files
?
files
.
files
[
0
]
:
null
;
uploaderLoading
();
const
filename
=
`
${
signature
.
dir
}${
getRandomFilename
(
file
.
name
)}
`
;
console
.
log
(
filename
,
'filename'
);
const
params
=
{
key
:
filename
,
policy
:
signature
.
policy
,
...
...
src/utils/index.js
View file @
0bcb729a
...
...
@@ -13,7 +13,7 @@ function decode(data) {
}
function
getRandomFilename
(
filename
)
{
const
file
=
filename
.
match
(
/^
(
.*
)(\.[
A-z
]
+
)
$/
);
return
file
===
null
?
md5
(
String
(
Date
.
now
()
+
Math
.
random
())
+
filename
)
:
(
md5
(
String
(
Date
.
now
()
+
Math
.
random
())
+
file
[
1
])
+
file
[
2
]
);
return
md5
(
String
(
Date
.
now
()
+
Math
.
random
())
);
}
// export function imagify(src, params) {
// let url = src || '';
...
...
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