Commit 4e66dee0 authored by zhangzhaohui's avatar zhangzhaohui

接口名修改

parent c3a1989d
...@@ -3,7 +3,7 @@ import request from '../utils/request' ...@@ -3,7 +3,7 @@ import request from '../utils/request'
// 获取验证码 // 获取验证码
export function getCodeImg() { export function getCodeImg() {
return request({ return request({
url: '/code', url: '/captchaImage',
headers: { headers: {
isToken: false isToken: false
}, },
...@@ -15,7 +15,7 @@ export function getCodeImg() { ...@@ -15,7 +15,7 @@ export function getCodeImg() {
// 登录方法 // 登录方法
export function login(username, password, code, uuid) { export function login(username, password, code, uuid) {
return request({ return request({
url: '/auth/login', url: '/login',
headers: { headers: {
isToken: false isToken: false
}, },
......
...@@ -99,7 +99,9 @@ const submitForm = async (formEl) => { ...@@ -99,7 +99,9 @@ const submitForm = async (formEl) => {
login(username, password, code, uuid) login(username, password, code, uuid)
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
setToken(res.data.access_token); console.log('aaaaaaaaaaaaaa')
console.log(res)
setToken(res.token);
router.push("/"); router.push("/");
} }
}) })
......
...@@ -24,8 +24,9 @@ export default defineConfig({ ...@@ -24,8 +24,9 @@ export default defineConfig({
"/prod-api": { "/prod-api": {
// target: "http://192.168.10.4:10024", // target: "http://192.168.10.4:10024",
target: "https://xcsq.zjhmit.com", target: "https://xcsq.zjhmit.com",
// target: "http://o5476b3227.oicp.vip:10081",
changeOrigin: true, 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