Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
e9959acc
Commit
e9959acc
authored
May 24, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
04623daf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
index.js
src/plug/index.js
+18
-3
No files found.
src/plug/index.js
View file @
e9959acc
...
...
@@ -227,6 +227,7 @@ export default {
//警告提示
Vue
.
prototype
.
Warning
=
function
(
msg
)
{
this
.
$message
({
message
:
msg
,
duration
:
2000
,
type
:
"warning"
...
...
@@ -1162,10 +1163,22 @@ export default {
co
(
function
*
()
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
let
fileName
=
nameList
[
index
]
fileName
=
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
()
fileName
=
path
+
fileName
+
"."
+
files
[
index
].
name
.
split
(
'.'
).
pop
();
var
newPath
=
""
;
if
(
!
that
.
isOnline
())
{
newPath
=
"/2024Test"
+
path
;
}
else
{
newPath
=
path
;
}
var
formData
=
new
FormData
();
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadToALiOSS?filePath="
+
p
ath
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadToALiOSS?filePath="
+
newP
ath
;
formData
.
append
(
"myfile"
,
files
[
index
]);
// var parms = {
// isppt:"1",
// uid: "Bm++E7WftLk=",
// gid: "1"
// }
// formData.append("parms", JSON.stringify(parms));
that
.
$http
.
post
(
uploadUrl
,
formData
,
{})
.
then
(
res
=>
{
successCall
(
res
);
...
...
@@ -1176,7 +1189,9 @@ export default {
});
}
}).
catch
(
function
(
err
)
{
that
.
$refs
[
'my-upload'
].
clearFiles
();
if
(
that
.
$refs
[
'my-upload'
])
{
that
.
$refs
[
'my-upload'
].
clearFiles
();
}
that
.
$message
.
error
(
'上传失败!'
);
});
}
...
...
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