Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 58384bb8
authored
Feb 23, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加图片上传地址
1 parent
e1a59d58
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
src/store/getters.js
src/store/modules/app.js
src/utils/http/http.js
src/store/getters.js
View file @
58384bb
...
@@ -12,6 +12,7 @@ const getters = {
...
@@ -12,6 +12,7 @@ const getters = {
curBreadCrumb
:
state
=>
state
.
menu
.
curBreadCrumb
,
curBreadCrumb
:
state
=>
state
.
menu
.
curBreadCrumb
,
updateMenu
:
state
=>
state
.
menu
.
updateMenu
,
updateMenu
:
state
=>
state
.
menu
.
updateMenu
,
curMenuAuth
:
state
=>
state
.
menu
.
curMenuAuth
,
curMenuAuth
:
state
=>
state
.
menu
.
curMenuAuth
,
fileUploadURL
:
state
=>
state
.
app
.
fileUploadURL
}
}
export
default
getters
;
export
default
getters
;
\ No newline at end of file
\ No newline at end of file
src/store/modules/app.js
View file @
58384bb
...
@@ -61,6 +61,9 @@ export default {
...
@@ -61,6 +61,9 @@ export default {
},
},
SET_FULLSCREEN
(
state
,
data
)
{
SET_FULLSCREEN
(
state
,
data
)
{
state
.
fullscreen
=
data
;
state
.
fullscreen
=
data
;
},
SET_UPLOADFILE_PATH
(
state
,
data
){
state
.
fileUploadURL
=
data
;
}
}
},
},
actions
:
{
actions
:
{
...
@@ -93,5 +96,9 @@ export default {
...
@@ -93,5 +96,9 @@ export default {
setFullscreen
({
commit
},
data
)
{
setFullscreen
({
commit
},
data
)
{
commit
(
'SET_FULLSCREEN'
,
data
)
commit
(
'SET_FULLSCREEN'
,
data
)
},
},
// 更新接口地址
updateFileUploadUrl
({
commit
},
data
)
{
commit
(
'SET_UPLOADFILE_PATH'
,
data
)
},
}
}
}
}
\ No newline at end of file
\ No newline at end of file
src/utils/http/http.js
View file @
58384bb
...
@@ -104,9 +104,12 @@ const getBaseUrl = () => {
...
@@ -104,9 +104,12 @@ const getBaseUrl = () => {
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
const
resData
=
res
.
data
;
const
resData
=
res
.
data
;
if
(
resData
)
{
if
(
resData
)
{
console
.
log
(
'resData:'
+
resData
)
const
resBaseURL
=
resData
.
axios
.
baseURL
;
const
resBaseURL
=
resData
.
axios
.
baseURL
;
localStorage
.
setItem
(
'BASE_URL'
,
resBaseURL
);
localStorage
.
setItem
(
'BASE_URL'
,
resBaseURL
);
localStorage
.
setItem
(
'FILE_UPLOAD_URL'
,
resData
.
axios
.
fileUploadURL
);
store
.
dispatch
(
'app/updateBaseURL'
,
resBaseURL
);
store
.
dispatch
(
'app/updateBaseURL'
,
resBaseURL
);
store
.
dispatch
(
'app/updateFileUploadUrl'
,
resData
.
axios
.
fileUploadURL
);
baseFlag
=
!
resBaseURL
;
baseFlag
=
!
resBaseURL
;
resolve
(
resBaseURL
);
resolve
(
resBaseURL
);
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment