Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
中汽测评-信息安全测评系统
web
Commits
f4d14069
Commit
f4d14069
authored
Jan 25, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(图片上传): 修改图片上传组件,更换上传地址
parent
51bfceb0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
32 deletions
+40
-32
.env.development
.env.development
+14
-11
.env.production
.env.production
+10
-8
.env.staging
.env.staging
+12
-10
index.vue
src/components/ImageUpload/index.vue
+4
-3
No files found.
.env.development
View file @
f4d14069
# 页面标题
VUE_APP_TITLE = 中汽研安全检测平台管理系统
# 开发环境配置
ENV = 'development'
# 中汽研安全检测平台管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 页面标题
VUE_APP_TITLE = 中汽研安全检测平台管理系统
# 开发环境配置
ENV = 'development'
# 中汽研安全检测平台管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 图片服务器地址
VUE_APP_IMAGE_API = http://49.232.167.247:22039
\ No newline at end of file
.env.production
View file @
f4d14069
# 页面标题
VUE_APP_TITLE = 中汽研安全检测平台管理系统
# 生产环境配置
ENV = 'production'
# 中汽研安全检测平台管理系统/生产环境
VUE_APP_BASE_API = 'http://49.232.167.247:22032'
# 页面标题
VUE_APP_TITLE = 中汽研安全检测平台管理系统
# 生产环境配置
ENV = 'production'
# 中汽研安全检测平台管理系统/生产环境
VUE_APP_BASE_API = 'http://49.232.167.247:22032'
# 图片服务器地址
VUE_APP_IMAGE_API = http://49.232.167.247:22039
\ No newline at end of file
.env.staging
View file @
f4d14069
# 页面标题
VUE_APP_TITLE = 中汽研安全检测平台管理系统
NODE_ENV = production
# 测试环境配置
ENV = 'staging'
# 中汽研安全检测平台管理系统/测试环境
VUE_APP_BASE_API = '/stage-api'
# 页面标题
VUE_APP_TITLE = 中汽研安全检测平台管理系统
NODE_ENV = production
# 测试环境配置
ENV = 'staging'
# 中汽研安全检测平台管理系统/测试环境
VUE_APP_BASE_API = '/stage-api'
# 图片服务器地址
VUE_APP_IMAGE_API = http://49.232.167.247:22039
\ No newline at end of file
src/components/ImageUpload/index.vue
View file @
f4d14069
...
...
@@ -80,8 +80,8 @@ export default {
dialogImageUrl
:
''
,
dialogVisible
:
false
,
hideUpload
:
false
,
baseUrl
:
process
.
env
.
VUE_APP_
BAS
E_API
,
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
'/common/upload'
,
// 上传的图片服务器地址
baseUrl
:
process
.
env
.
VUE_APP_
IMAG
E_API
,
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
'/common/upload
Minio
'
,
// 上传的图片服务器地址
headers
:
{
Authorization
:
'Bearer '
+
getToken
()
},
...
...
@@ -161,7 +161,8 @@ export default {
// 上传成功回调
handleUploadSuccess
(
res
,
file
)
{
if
(
res
.
code
===
200
)
{
this
.
uploadList
.
push
({
name
:
res
.
fileName
,
url
:
res
.
fileName
})
// const Image = process.env.VUE_APP_IMAGE_API + res.url
this
.
uploadList
.
push
({
name
:
res
.
originalFilename
,
url
:
res
.
url
})
this
.
uploadedSuccessfully
()
}
else
{
this
.
number
--
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment