From 86e76b965eca189b0d000cbadce383f5d4ecadba Mon Sep 17 00:00:00 2001 From: yz3456 <2753272399@qq.com> Date: 星期一, 25 三月 2024 23:54:21 +0800 Subject: [PATCH] 修改了bug --- ruoyi-ui/src/views/pet/noteInfo.vue | 55 ++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 38 insertions(+), 17 deletions(-) diff --git a/ruoyi-ui/src/views/pet/noteInfo.vue b/ruoyi-ui/src/views/pet/noteInfo.vue index 9c7ef03..36114ef 100644 --- a/ruoyi-ui/src/views/pet/noteInfo.vue +++ b/ruoyi-ui/src/views/pet/noteInfo.vue @@ -270,21 +270,32 @@ this.formData = response.data; let paths = response.data.url.split(","); for(let i = 0; i < paths.length; i++) - { - if(paths[i]!="") { + { + if(paths[i]!="") { - let pth = paths[i].substr(paths[i].length - 4, paths[i].length) + let pth = paths[i].substr(paths[i].length - 4, paths[i].length) + // alert(pth) + if (_this.fot.includes(pth) === true) + { + if(paths[i][0]=="/") + _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false}) + else + _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false}) + } + else { + // alert(paths[i]) + // alert() + let nms = paths[i].split("\/") + let nm = nms[nms.length - 1] + if(paths[i][0]=="/") + _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false}) + else + _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false}) - if (_this.fot.includes(pth) === true) - _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) - else { - // alert(paths[i]) - let nms = paths[i].split("\/") - let nm = nms[nms.length - 1] - _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) - } - } - } + } + } + // _this.fileList1 = _this.fileList + } this.loading = false; }); @@ -322,10 +333,18 @@ this.$refs['elForm'].resetFields() }, handleFileCardPreview(file){ - this.dialogFileUrl = file.url; - const Base64 = require('js-base64').Base64 - this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl)); - myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300'); + + this.dialogFileUrl = file.url; + if(this.dialogFileUrl.includes("47.93.189.255")==true) + this.dialogFileUrl = this.dialogFileUrl.replace("47.93.189.255","www.bendudu.com") + //alert(this.dialogFileUrl) + const Base64 = require('js-base64').Base64 + + this.desurl = process.env.VUE_APP_BASE_OTHER_API+"preview/"+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl)); + let myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300'); + + + }, handlePreview(file) { @@ -488,9 +507,11 @@ let _this = this this.uploading = true; + // alert(234) uploadPic(formData).then(response => { _this.uploadFileList1 = [] _this.formData.url = _this.formData.url+","+response.fileNames + // alert(2346) updatenotePet(_this.formData).then(response => { this.$modal.msgSuccess("鏂囨。涓婁紶鎴愬姛"); // this.open = false; -- Gitblit v1.9.1