Commit 9bd364c6 authored by 华国豪's avatar 华国豪 🙄

'分支上传图片修改!'

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