Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
vite-integral
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
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c9542946
authored
Aug 19, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更换配置地址
1 parent
b31ccc5a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
src/utils/config.ts
src/utils/http.ts
src/utils/config.ts
View file @
c954294
const
fetchConfig
=
function
(
isEnv
=
true
)
{
const
fetchConfig
=
function
(
isEnv
=
true
)
{
return
window
.
fetch
(
'http
://oss-config.dev
.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/integral-config'
,
{}).
then
(
res
=>
res
.
json
())
return
window
.
fetch
(
'http
s://oss-config.test
.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/integral-config'
,
{}).
then
(
res
=>
res
.
json
())
}
}
// const $mockConfig = await fetchConfig()
// const $mockConfig = await fetchConfig()
export
default
fetchConfig
export
default
fetchConfig
\ No newline at end of file
\ No newline at end of file
src/utils/http.ts
View file @
c954294
...
@@ -73,6 +73,7 @@ service.interceptors.response.use((r: AxiosResponse) => {
...
@@ -73,6 +73,7 @@ service.interceptors.response.use((r: AxiosResponse) => {
Toast
(
res
.
message
||
res
.
msg
||
'出错了,请联系管理员'
)
Toast
(
res
.
message
||
res
.
msg
||
'出错了,请联系管理员'
)
break
break
}
}
if
(
returnAll
)
return
res
return
res
[
data_key
]
return
res
[
data_key
]
},
error
=>
{
},
error
=>
{
Toast
(
error
.
message
)
Toast
(
error
.
message
)
...
...
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