Skip to content

Commit

Permalink
refactor:change request url
Browse files Browse the repository at this point in the history
  • Loading branch information
Ewall1106 committed Sep 12, 2020
1 parent 88bc82a commit 82bcce2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@

## 介绍

一个商城小项目,目的是能通过使用不同的技术栈来实现多个端的开发,并且可以涵盖各种丰富的实用功能。
Panda-mall 商城的前端项目,技术栈主要使用 `vue+vant+axios` 来实现。
目的是能通过使用不同的技术栈来实现多个端的开发,并且可以涵盖各种丰富的实用功能。

- [项目预览](https://ewall1106.github.io/panda-mall)
- [文档说明](https://ewall1106.github.io/docs-mall)
- [项目预览](https://mall.xwhx.top/)
- [文档说明](https://docs.xwhx.top/base/)

## 使用

Expand Down
2 changes: 1 addition & 1 deletion src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import store from '@/store'
import { getToken } from '@/utils/auth'

const baseURL =
process.env.NODE_ENV === 'development' ? '/dev-api' : 'https://xwhx.top/prod-api'
process.env.NODE_ENV === 'development' ? '/dev-api' : 'https://api.xwhx.top'

// 创建一个axios实例
const service = axios.create({
Expand Down
4 changes: 2 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function resolve(dir) {

const port = process.env.port || process.env.npm_config_port || 8080
// const mockUrl = 'http://xwhx.top:20080/mock/5f507c0322c575000bec5c87'
const mockUrl = 'https://xwhx.top'
const mockUrl = 'https://api.xwhx.top'

// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
Expand All @@ -27,7 +27,7 @@ module.exports = {
proxy: {
'/dev-api': {
target: mockUrl,
pathRewrite: { '^/dev-api': '/prod-api' },
pathRewrite: { '^/dev-api': '/' },
secure: false,
changeOrigin: true
}
Expand Down

0 comments on commit 82bcce2

Please sign in to comment.