Skip to content

Commit

Permalink
配置路径别名,修改Request名称
Browse files Browse the repository at this point in the history
Signed-off-by: exploit <eitsxiaozhai@gmail.com>
  • Loading branch information
EITSxiaozhai committed Sep 18, 2024
1 parent cf62183 commit 59dee76
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
13 changes: 7 additions & 6 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions blogvuets/src/utils/backApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const apis = {

const baseURL = process.env.NODE_ENV === 'production' ? apis.production : apis.development;

const ajax = axios.create({
const backApi = axios.create({
baseURL: baseURL
});

export default ajax;
export default backApi;
5 changes: 4 additions & 1 deletion blogvuets/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmitOnError": true
"noEmitOnError": true,
"paths": {
"@/*": ["src/*"] // 配置路径别名
}
},
"include": [
"src/**/*.ts",
Expand Down

0 comments on commit 59dee76

Please sign in to comment.