Commit e9959acc authored by 黄奎's avatar 黄奎

1111

parent 04623daf
......@@ -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=" + path;
var uploadUrl = that.domainManager().UploadUrl + "/Upload/UploadToALiOSS?filePath=" + newPath;
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('上传失败!');
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment