diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts
index 1251244..48e5d91 100644
--- a/src/api/system/tool.ts
+++ b/src/api/system/tool.ts
@@ -118,8 +118,10 @@
}
// 获取图片地址
export function getPhotoUrl(fileName: string) {
+ // 手动编码
+ const encodedValue = encodeURIComponent(fileName).replace(/%20/g, '+')
return request({
- url: `/minio/file/url?fileName=${fileName}`,
+ url: `/minio/file/url?fileName=${encodedValue}`,
method: 'get',
})
}
diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts
index 1251244..48e5d91 100644
--- a/src/api/system/tool.ts
+++ b/src/api/system/tool.ts
@@ -118,8 +118,10 @@
}
// 获取图片地址
export function getPhotoUrl(fileName: string) {
+ // 手动编码
+ const encodedValue = encodeURIComponent(fileName).replace(/%20/g, '+')
return request({
- url: `/minio/file/url?fileName=${fileName}`,
+ url: `/minio/file/url?fileName=${encodedValue}`,
method: 'get',
})
}
diff --git a/src/main.ts b/src/main.ts
index 4b34f48..583c005 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,5 +1,5 @@
import { createApp } from 'vue'
-import ElementPlus from 'element-plus'
+import ElementPlus, { ElMessageBox } from 'element-plus'
import 'element-plus/theme-chalk/el-checkbox.css'
import print from 'vue3-print-nb'
import axios from 'axios'
@@ -61,11 +61,23 @@
// 2. 判断证书生成状态
if (sessionStorage.getItem('createCerting') === 'true') {
- // 必需的核心代码
+ // // 必需的核心代码
e.preventDefault()
e.returnValue = '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!' // 任意字符串均可(浏览器不会显示)
-
- // 可选:开发环境调试输出
+ // const message =
+ // '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!'
+ // // // 可选:开发环境调试输出
console.log('[DEBUG] 已拦截页面离开')
+ // ElMessageBox.confirm(message, '警告', {
+ // confirmButtonText: '确定刷新',
+ // cancelButtonText: '取消刷新',
+ // type: 'warning',
+ // })
+ // .then(() => {
+ // e.preventDefault()
+ // // e.returnValue =
+ // // '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!' // 任意字符串均可(浏览器不会显示)
+ // })
+ // .catch(() => {})
}
})
diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts
index 1251244..48e5d91 100644
--- a/src/api/system/tool.ts
+++ b/src/api/system/tool.ts
@@ -118,8 +118,10 @@
}
// 获取图片地址
export function getPhotoUrl(fileName: string) {
+ // 手动编码
+ const encodedValue = encodeURIComponent(fileName).replace(/%20/g, '+')
return request({
- url: `/minio/file/url?fileName=${fileName}`,
+ url: `/minio/file/url?fileName=${encodedValue}`,
method: 'get',
})
}
diff --git a/src/main.ts b/src/main.ts
index 4b34f48..583c005 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,5 +1,5 @@
import { createApp } from 'vue'
-import ElementPlus from 'element-plus'
+import ElementPlus, { ElMessageBox } from 'element-plus'
import 'element-plus/theme-chalk/el-checkbox.css'
import print from 'vue3-print-nb'
import axios from 'axios'
@@ -61,11 +61,23 @@
// 2. 判断证书生成状态
if (sessionStorage.getItem('createCerting') === 'true') {
- // 必需的核心代码
+ // // 必需的核心代码
e.preventDefault()
e.returnValue = '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!' // 任意字符串均可(浏览器不会显示)
-
- // 可选:开发环境调试输出
+ // const message =
+ // '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!'
+ // // // 可选:开发环境调试输出
console.log('[DEBUG] 已拦截页面离开')
+ // ElMessageBox.confirm(message, '警告', {
+ // confirmButtonText: '确定刷新',
+ // cancelButtonText: '取消刷新',
+ // type: 'warning',
+ // })
+ // .then(() => {
+ // e.preventDefault()
+ // // e.returnValue =
+ // // '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!' // 任意字符串均可(浏览器不会显示)
+ // })
+ // .catch(() => {})
}
})
diff --git a/src/views/system/tool/fileTemplate/list.vue b/src/views/system/tool/fileTemplate/list.vue
index 359523d..911293f 100644
--- a/src/views/system/tool/fileTemplate/list.vue
+++ b/src/views/system/tool/fileTemplate/list.vue
@@ -247,7 +247,7 @@
-
+
编辑
diff --git a/src/api/system/tool.ts b/src/api/system/tool.ts
index 1251244..48e5d91 100644
--- a/src/api/system/tool.ts
+++ b/src/api/system/tool.ts
@@ -118,8 +118,10 @@
}
// 获取图片地址
export function getPhotoUrl(fileName: string) {
+ // 手动编码
+ const encodedValue = encodeURIComponent(fileName).replace(/%20/g, '+')
return request({
- url: `/minio/file/url?fileName=${fileName}`,
+ url: `/minio/file/url?fileName=${encodedValue}`,
method: 'get',
})
}
diff --git a/src/main.ts b/src/main.ts
index 4b34f48..583c005 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,5 +1,5 @@
import { createApp } from 'vue'
-import ElementPlus from 'element-plus'
+import ElementPlus, { ElMessageBox } from 'element-plus'
import 'element-plus/theme-chalk/el-checkbox.css'
import print from 'vue3-print-nb'
import axios from 'axios'
@@ -61,11 +61,23 @@
// 2. 判断证书生成状态
if (sessionStorage.getItem('createCerting') === 'true') {
- // 必需的核心代码
+ // // 必需的核心代码
e.preventDefault()
e.returnValue = '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!' // 任意字符串均可(浏览器不会显示)
-
- // 可选:开发环境调试输出
+ // const message =
+ // '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!'
+ // // // 可选:开发环境调试输出
console.log('[DEBUG] 已拦截页面离开')
+ // ElMessageBox.confirm(message, '警告', {
+ // confirmButtonText: '确定刷新',
+ // cancelButtonText: '取消刷新',
+ // type: 'warning',
+ // })
+ // .then(() => {
+ // e.preventDefault()
+ // // e.returnValue =
+ // // '证书未生成完成, 离开页面会使证书生成失败或者自动检完失效,确定离开页面吗?请谨慎选择!' // 任意字符串均可(浏览器不会显示)
+ // })
+ // .catch(() => {})
}
})
diff --git a/src/views/system/tool/fileTemplate/list.vue b/src/views/system/tool/fileTemplate/list.vue
index 359523d..911293f 100644
--- a/src/views/system/tool/fileTemplate/list.vue
+++ b/src/views/system/tool/fileTemplate/list.vue
@@ -247,7 +247,7 @@
-
+
编辑
diff --git a/src/views/system/tool/showPhoto.vue b/src/views/system/tool/showPhoto.vue
index b0f8768..b289a47 100644
--- a/src/views/system/tool/showPhoto.vue
+++ b/src/views/system/tool/showPhoto.vue
@@ -17,12 +17,13 @@
const isPhoto = computed(() => {
return props.minioFileName.split('.')[1] === 'png' || props.minioFileName.split('.')[1] === 'jpg' || props.minioFileName.split('.')[1] === 'jpeg'
})
+
const url = ref('')
const getPhoto = () => {
if (props.minioFileName) {
- console.log('090909090', props.minioFileName)
-
- getPhotoUrl(props.minioFileName).then((res) => {
+ const file = decodeURIComponent(props.minioFileName)
+ console.log('090909090', file)
+ getPhotoUrl(file).then((res) => {
url.value = res.data
})
}