终于可以登录了
This commit is contained in:
parent
e751ac581b
commit
92a1ca8cd6
|
@ -1,5 +1,5 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
NODE_ENV: '"development"',
|
NODE_ENV: '"development"',
|
||||||
ENV_CONFIG: '"dev"',
|
ENV_CONFIG: '"dev"',
|
||||||
BASE_API: '"http://localhost:3000/api"'
|
BASE_API: '"http://localhost:3000"'
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,11 +10,12 @@ module.exports = {
|
||||||
assetsSubDirectory: 'static',
|
assetsSubDirectory: 'static',
|
||||||
assetsPublicPath: '/',
|
assetsPublicPath: '/',
|
||||||
proxyTable: {
|
proxyTable: {
|
||||||
'/api':{
|
'/public':{
|
||||||
target: 'http://chenwenlong.site:8088', // 接口域名
|
target: 'http://chenwenlong.site:8088', // 接口域名
|
||||||
|
// target: 'http://localhost', // 接口域名
|
||||||
changeOrigin: true, //是否跨域
|
changeOrigin: true, //是否跨域
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/api': '' //需要rewrite重写的,
|
'^/public': '' //需要rewrite重写的,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
export function loginByUsername(username, password) {
|
export function loginByUsername(username, password) {
|
||||||
const data = {
|
|
||||||
username,
|
|
||||||
password
|
|
||||||
}
|
|
||||||
return request({
|
return request({
|
||||||
url: 'user/login',
|
url: 'public/user/login',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
params: {
|
||||||
|
username: username,
|
||||||
|
password: password
|
||||||
|
}
|
||||||
|
// params: data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue