Commit 4e66dee0 authored by zhangzhaohui's avatar zhangzhaohui

接口名修改

parent c3a1989d
......@@ -3,7 +3,7 @@ import request from '../utils/request'
// 获取验证码
export function getCodeImg() {
return request({
url: '/code',
url: '/captchaImage',
headers: {
isToken: false
},
......@@ -15,7 +15,7 @@ export function getCodeImg() {
// 登录方法
export function login(username, password, code, uuid) {
return request({
url: '/auth/login',
url: '/login',
headers: {
isToken: false
},
......
......@@ -99,7 +99,9 @@ const submitForm = async (formEl) => {
login(username, password, code, uuid)
.then((res) => {
if (res.code === 200) {
setToken(res.data.access_token);
console.log('aaaaaaaaaaaaaa')
console.log(res)
setToken(res.token);
router.push("/");
}
})
......
......@@ -24,8 +24,9 @@ export default defineConfig({
"/prod-api": {
// target: "http://192.168.10.4:10024",
target: "https://xcsq.zjhmit.com",
// target: "http://o5476b3227.oicp.vip:10081",
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/prod-api/, ""),
rewrite: (path) => path.replace(/^\/prod-api/, ""),
},
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment