Skip to content

Commit 0eeabc3

Browse files
author
piexlmax
committed
修改本地文件的图片路径bug
1 parent 55c6e12 commit 0eeabc3

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

web/src/components/chooseImg/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<el-drawer v-model="drawer" title="媒体库" size="650px">
33
<warning-bar
4-
title="点击“文件名/备注”可以编辑文件名或者备注内容。"
4+
title="点击“文件名/备注”可以编辑文件名或者备注内容。"
55
/>
66
<div class="gva-btn-list">
77
<upload-common
@@ -99,7 +99,7 @@ defineProps({
9999
100100
const drawer = ref(false)
101101
const picList = ref([])
102-
const path = ref(import.meta.env.VITE_BASE_API)
102+
const path = ref(import.meta.env.VITE_BASE_API + '/')
103103
104104
const chooseImg = (url, target, targetKey) => {
105105
if (target && targetKey) {

web/src/view/example/upload/upload.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ const downloadFile = (row) => {
158158
if (row.url.indexOf('http://') > -1 || row.url.indexOf('https://') > -1) {
159159
downloadImage(row.url, row.name)
160160
} else {
161-
downloadImage(path.value + row.url, row.name)
161+
debugger
162+
downloadImage(path.value + '/' + row.url, row.name)
162163
}
163164
}
164165

web/src/view/person/person.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ import { reactive, ref } from 'vue'
237237
import { ElMessage } from 'element-plus'
238238
import { useUserStore } from '@/pinia/modules/user'
239239
240-
const path = ref(import.meta.env.VITE_BASE_API)
240+
const path = ref(import.meta.env.VITE_BASE_API + '/')
241241
const activeName = ref('second')
242242
const rules = reactive({
243243
password: [

web/src/view/superAdmin/user/user.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ import { setUserInfo, resetPassword } from '@/api/user.js'
144144
145145
import { nextTick, ref, watch } from 'vue'
146146
import { ElMessage, ElMessageBox } from 'element-plus'
147-
const path = ref(import.meta.env.VITE_BASE_API)
147+
const path = ref(import.meta.env.VITE_BASE_API + '/')
148148
// 初始化相关
149149
const setAuthorityOptions = (AuthorityData, optionsData) => {
150150
AuthorityData &&

0 commit comments

Comments
 (0)