Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
front-document
/
vue-front
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 89c85d54
authored
Feb 23, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改配置
1 parent
d98fe972
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
30 deletions
src/plugins/axios/index.js
src/views/documentation/index.vue
vue.config.js
src/plugins/axios/index.js
View file @
89c85d5
...
...
@@ -7,7 +7,7 @@
import
axios
from
'axios'
import
{
message
}
from
"ant-design-vue"
;
let
url
=
process
.
env
.
NODE_ENV
==
"development"
?
"/api"
:
"http://192.168.
2.9
:7001"
let
url
=
process
.
env
.
NODE_ENV
==
"development"
?
"/api"
:
"http://192.168.
1.68
:7001"
const
service
=
axios
.
create
({
withCredentials
:
true
,
baseURL
:
url
...
...
@@ -24,11 +24,11 @@ service.interceptors.request.use(function (config) {
// 添加响应拦截器
service
.
interceptors
.
response
.
use
(
response
=>
{
// 对响应数据做点什么
const
{
data
:
{
status
,
msg
}
}
=
response
const
{
data
:
{
status
,
msg
}
}
=
response
console
.
log
(
response
)
if
(
status
!=
0
)
{
message
.
error
(
msg
)
return
Promise
.
reject
({
status
,
msg
})
return
Promise
.
reject
({
status
,
msg
})
}
else
{
return
Promise
.
resolve
(
response
.
data
.
data
)
}
...
...
@@ -36,6 +36,6 @@ service.interceptors.response.use(response => {
// 对响应错误做点什么
message
.
error
(
JSON
.
stringify
(
error
))
return
Promise
.
reject
(
error
);
});
});
export
default
service
src/views/documentation/index.vue
View file @
89c85d5
...
...
@@ -19,54 +19,53 @@
<
script
>
const
data
=
[
{
title
:
"广联赛讯Vue模板及组件"
,
content
:
"vue模板介绍与使用"
,
url
:
"http://192.168.3.171:8080/#/installNode"
doc_
title
:
"广联赛讯Vue模板及组件"
,
doc_description
:
"vue模板介绍与使用"
,
doc_url
:
"http://192.168.3.171:8080/#/installNode"
,
},
{
title
:
"glsx-vue-common使用文档"
,
content
:
"介绍使用方法;内置方法介绍"
,
url
:
"http://192.168.3.171:8089/"
doc_
title
:
"glsx-vue-common使用文档"
,
doc_description
:
"介绍使用方法;内置方法介绍"
,
doc_url
:
"http://192.168.3.171:8089/"
,
},
{
title
:
"easy mock 地址"
,
content
:
"通用配置"
,
url
:
"https://oss-config.test.glsx.com.cn"
doc_
title
:
"easy mock 地址"
,
doc_description
:
"通用配置"
,
doc_url
:
"https://oss-config.test.glsx.com.cn"
,
},
{
title
:
"公司git仓库"
,
content
:
"公司git仓库地址(使用svn账号)"
,
url
:
"http://192.168.3.233:8090"
doc_
title
:
"公司git仓库"
,
doc_description
:
"公司git仓库地址(使用svn账号)"
,
doc_url
:
"http://192.168.3.233:8090"
,
},
{
title
:
"上线发版OPS"
,
content
:
"公司上线发版地址"
,
url
:
"http://192.168.3.233:8888/login"
}
doc_
title
:
"上线发版OPS"
,
doc_description
:
"公司上线发版地址"
,
doc_url
:
"http://192.168.3.233:8888/login"
,
}
,
];
export
default
{
name
:
"Developers"
,
data
()
{
return
{
docData
:
data
docData
:
data
,
};
},
mounted
()
{
this
.
getList
()
this
.
getList
()
;
},
methods
:
{
getList
()
{
this
.
api
.
documentation
.
getList
().
then
(
res
=>
{
console
.
log
(
res
)
this
.
docData
=
res
})
this
.
api
.
documentation
.
getList
().
then
(
(
res
)
=>
{
console
.
log
(
res
)
;
this
.
docData
=
res
;
})
;
},
add
()
{
this
.
to
(
'DocAdd'
)
}
this
.
to
(
"DocAdd"
);
}
,
},
};
</
script
>
<
style
>
</
style
>
vue.config.js
View file @
89c85d5
/*
* @Author: your name
* @Date: 2022-02-23 10:42:47
* @LastEditTime: 2022-02-23 15:04:41
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \vue-front\vue.config.js
*/
module
.
exports
=
{
devServer
:
{
port
:
8080
,
// 端口
proxy
:
{
//配置跨域
"/api"
:
{
target
:
"http://192.168.
2.9
:7001"
,
target
:
"http://192.168.
1.68
:7001"
,
// ws:true,
changOrigin
:
true
,
pathRewrite
:
{
...
...
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