forked from lin-xin/vue-manage-system
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request lin-xin#183 from lin-xin/dev
请求不使用代理
- Loading branch information
Showing
12 changed files
with
88 additions
and
118 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import request from '../utils/request'; | ||
|
||
export const fetchData = (query) => { | ||
return request({ | ||
url: '/ms/table/list', | ||
method: 'post', | ||
data: query | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,6 +127,12 @@ | |
} | ||
] | ||
} | ||
, | ||
{ | ||
icon: 'el-icon-lx-redpacket_fill', | ||
index: '/donate', | ||
title: '支持作者' | ||
} | ||
] | ||
} | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<div> | ||
<div class="crumbs"> | ||
<el-breadcrumb separator="/"> | ||
<el-breadcrumb-item><i class="el-icon-lx-redpacket_fill"></i> 支持作者</el-breadcrumb-item> | ||
</el-breadcrumb> | ||
</div> | ||
<div class="container"> | ||
<div class="plugins-tips"> | ||
如果该框架对你有帮助,那就请作者喝杯饮料吧!加微信号linxin_20探讨问题。 | ||
</div> | ||
<div><img src="http://blog.gdfengshuo.com/images/weixin.jpg"></div> | ||
</div> | ||
|
||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import axios from 'axios'; | ||
|
||
const service = axios.create({ | ||
// process.env.NODE_ENV === 'development' 来判断是否开发环境 | ||
baseURL: 'https://www.easy-mock.com/mock/592501a391470c0ac1fab128', | ||
timeout: 5000 | ||
}) | ||
|
||
service.interceptors.request.use( config => { | ||
return config; | ||
}, error => { | ||
console.log(error); | ||
return Promise.reject(); | ||
}) | ||
|
||
service.interceptors.response.use(response => { | ||
if(response.status === 200){ | ||
return response.data; | ||
}else{ | ||
Promise.reject(); | ||
} | ||
}, error => { | ||
console.log(error); | ||
return Promise.reject(); | ||
}) | ||
|
||
export default service; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
module.exports = { | ||
baseUrl: './', | ||
assetsDir: 'static', | ||
productionSourceMap: false, | ||
devServer: { | ||
proxy: { | ||
'/api':{ | ||
target:'http://jsonplaceholder.typicode.com', | ||
changeOrigin:true, | ||
pathRewrite:{ | ||
'/api':'' | ||
} | ||
}, | ||
'/ms':{ | ||
target: 'https://www.easy-mock.com/mock/592501a391470c0ac1fab128', | ||
changeOrigin: true | ||
} | ||
// '/api':{ | ||
// target:'http://jsonplaceholder.typicode.com', | ||
// changeOrigin:true, | ||
// pathRewrite:{ | ||
// '/api':'' | ||
// } | ||
// } | ||
} | ||
} | ||
} |