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