Commit 555d6086 authored by zhengke's avatar zhengke

部分上传修改

parent 40d737a9
......@@ -132,6 +132,7 @@ export default {
this.apipost("travel_post_GetPriceAdvert", this.msg, res => {
if(res.data.resultCode==1){
this.dataList = res.data.data;
console.log(this.dataList,'dataListtttt');
}else{
this.Error(res.data.message);
}
......@@ -153,11 +154,11 @@ export default {
let fileName = file.file.name;
var path = "/Upload/DMC/Price/";
var imgArr = [];
this.uploadFile(path, newArr, x => {
this.UploadSelfFile(path, newArr, x => {
var obj = this.$DMCUtils.DMCImageObj();
var str = x.name;
var imgUrl = this.domainManager().AliUrl + str;
obj.Path = str;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
obj.Path = x.data.FilePath;
obj.ShowPath = imgUrl;
imgArr.push(obj.ShowPath);
let msg = {
......
......@@ -813,20 +813,20 @@
newArr.push(file.file);
let path = "/Upload/DMC/";
this.$message.info("上传中...");
this.uploadFile(path, newArr, x => {
this.UploadSelfFile(path, newArr, x => {
let fileSize =
file.file.size < 1024
? file.file.size
: (file.file.size / 1024).toFixed(0);
this.saveMsg = [];
this.saveMsg.push({
Path: x.name,
FileName: file.file.name,
Path: this.domainManager().ViittoFileUrl + x.data.FilePath,
FileName: x.data.FileName,
MD5Sign: file.file.uid,
FileSize: fileSize
});
this.uploadList.push({
Url: this.domainManager().AliUrl + x.name,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath,
Name: file.file.name
});
});
......
......@@ -316,11 +316,12 @@ export default {
let newArr = [];
newArr.push(item.file);
let path = "/Upload/DMC/";
this.uploadFile(path, newArr, x => {
var str = x.res.requestUrls[0];
this.UploadSelfFile(path, newArr, x => {
// var str = x.res.requestUrls[0];
var fileObj = this.$commonUtils.FileObject();
fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.fileName = x.name;
// fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.Url = this.domainManager().ViittoFileUrl + x.data.FilePath,
fileObj.fileName = x.data.FileName;
item.data.ImaArray.push(fileObj);
});
},
......
......@@ -219,11 +219,12 @@
let newArr = [];
newArr.push(item.file);
let path = "/Upload/DMC/";
this.uploadFile(path, newArr, x => {
var str = x.res.requestUrls[0];
this.UploadSelfFile(path, newArr, x => {
// var str = x.res.requestUrls[0];
var fileObj = this.$commonUtils.FileObject();
fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.fileName = x.name;
// fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.Url = this.domainManager().ViittoFileUrl + x.data.FilePath,
fileObj.fileName = x.data.FileName;
item.data.ImaArray.push(fileObj);
});
},
......
......@@ -144,11 +144,12 @@
let newArr = [];
newArr.push(item.file);
let path = "/Upload/DMC/";
this.uploadFile(path, newArr, x => {
var str = x.res.requestUrls[0];
this.UploadSelfFile(path, newArr, x => {
// var str = x.res.requestUrls[0];
var fileObj = this.$commonUtils.FileObject();
fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.fileName = x.name;
// fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.Url = this.domainManager().ViittoFileUrl + x.data.FilePath,
fileObj.fileName = x.data.FileName;
item.data.ImaArray.push(fileObj);
});
},
......
......@@ -370,11 +370,12 @@ export default {
let newArr = [];
newArr.push(item.file);
let path = "/Upload/DMC/";
this.uploadFile(path, newArr, x => {
var str = x.res.requestUrls[0];
this.UploadSelfFile(path, newArr, x => {
// var str = x.res.requestUrls[0];
var fileObj = this.$commonUtils.FileObject();
fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.fileName = x.name;
// fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.Url = this.domainManager().ViittoFileUrl + x.data.FilePath,
fileObj.fileName = x.data.FileName;
item.data.ImaArray.push(fileObj);
});
},
......
......@@ -214,11 +214,12 @@
let newArr = [];
newArr.push(item.file);
let path = "/Upload/DMC/";
this.uploadFile(path, newArr, x => {
var str = x.res.requestUrls[0];
this.UploadSelfFile(path, newArr, x => {
// var str = x.res.requestUrls[0];
var fileObj = this.$commonUtils.FileObject();
fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.fileName = x.name;
// fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.Url = this.domainManager().ViittoFileUrl + x.data.FilePath,
fileObj.fileName = x.data.FileName;
item.data.ImaArray.push(fileObj);
});
},
......
......@@ -303,11 +303,12 @@
let newArr = [];
newArr.push(item.file);
let path = "/Upload/DMC/";
this.uploadFile(path, newArr, x => {
var str = x.res.requestUrls[0];
this.UploadSelfFile(path, newArr, x => {
// var str = x.res.requestUrls[0];
var fileObj = this.$commonUtils.FileObject();
fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.fileName = x.name;
// fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.Url = this.domainManager().ViittoFileUrl + x.data.FilePath,
fileObj.fileName = x.data.FileName;
item.data.ImaArray.push(fileObj);
});
},
......
......@@ -199,8 +199,9 @@
this.uploadFile(path, newArr, x => {
var str = x.res.requestUrls[0];
var fileObj = this.$commonUtils.FileObject();
fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.fileName = x.name;
// fileObj.Url = this.$commonUtils.GetALiFileUrl(str);
fileObj.Url = this.domainManager().ViittoFileUrl + x.data.FilePath,
fileObj.fileName = x.data.FileName;
item.data.ImaArray.push(fileObj);
});
},
......
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