Commit 9bd364c6 authored by 华国豪's avatar 华国豪 :rolling_eyes:

'分支上传图片修改!'

parent a2e58ded
......@@ -696,7 +696,7 @@ export default {
let myTime = year + "/" + month + "/" + day;
let path = "/Upload/IMFile/" + myTime;
newArr.push(ipt.files[0]);
this.uploadFile(path, newArr, x => {
this.UploadSelfFile(path, newArr, x => {
if (that.type === "session") {
this.$store.dispatch("sendMsg", {
type: "custom",
......@@ -710,7 +710,7 @@ export default {
Height: "84",
content: {
fileType: type,
fileUrl: x.res.requestUrls[0].split("?")[0],
fileUrl: this.domainManager().ViittoFileUrl + x.data.FilePath,
fileName: name,
fileSize: size
},
......@@ -730,7 +730,7 @@ export default {
Height: "84",
content: {
fileType: type,
fileUrl: x.res.requestUrls[0].split("?")[0],
fileUrl: this.domainManager().ViittoFileUrl + x.data.FilePath,
fileName: name,
fileSize: size
},
......
......@@ -286,7 +286,7 @@ export default {
inActive: 1, //已选中
notInActive: 0, //未选中
SupplierList: "",
imgBeforeFile: this.domainManager().AliUrl,
imgBeforeFile: this.domainManager().ViittoFileUrl,
isBook: true,
isDinner: false,
dinerList: "",
......@@ -405,14 +405,12 @@ export default {
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
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;
this.HotelImageArray.push(obj);
//this.updatePic();
});
},
//更新酒店图片
......@@ -620,10 +618,7 @@ export default {
obj.ID = imgItem.ID;
obj.Path = imgItem.Path;
obj.PicID = imgItem.PicID;
obj.ShowPath =
_self.imgBeforeFile +
imgItem.Path +
"?x-oss-process=image/resize,l_140";
obj.ShowPath = _self.imgBeforeFile + imgItem.Path;
this.HotelImageArray.push(obj);
});
}
......
......@@ -454,33 +454,6 @@
return
},
uploadFileBtn(file) { //上传
let that = this
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.uploadFile(path, newArr, x => {
this.saveMsg = []
this.saveMsg.push({
Path: x.name,
FileName: file.file.name,
MD5Sign: file.file.uid,
FileSize: (file.file.size / 1024).toFixed(0),
FolderId: this.msg.ParentId
})
that.apipost('user_cloud_SaveFile', this.saveMsg, res => {
if(res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.$refs.upload.clearFiles();
this.getList()
} else {
this.$message.error(res.data.message);
this.$refs.upload.clearFiles();
}
}, err => {})
});
},
dowloadSingle() {
this.list.forEach(item => {
if(item.shareFileType == 2) {
......
......@@ -327,7 +327,7 @@
let newArr=[];
newArr.push(file.file)
let path="/Upload/Temporary/"
this.UploadSelfFile(path,newArr,x=>{
this.uploadFile(path,newArr,x=>{
this.appMsg.Image.push(x.res.requestUrls[0])
this.fileList.push({url:x.res.requestUrls[0]})
});
......
......@@ -523,12 +523,11 @@
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info('上传中...')
this.uploadFile(path, newArr, x => {
console.log(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,
Path: this.domainManager().ViittoFileUrl + x.data.FilePath,
FileName: file.file.name,
MD5Sign: file.file.uid,
FileSize: fileSize,
......
......@@ -277,10 +277,10 @@ export default {
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
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;
var str = x.data.FilePath
var imgUrl = this.domainManager().ViittoFileUrl + str;
obj.Path = str;
obj.ShowPath = imgUrl;
this.uploadImageFile(obj.Path);
......
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