解决两个问题:
1、config.js中写错URL导致axios请求失败; 2、axios为CROS发送两次请求,第一次的method是options,在token过滤器中需要忽略。
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2022-12-14 15:23:54
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-02-03 15:46:55
|
||||
* @FilePath: \IT工具综合平台\src\views\account\Login32.vue
|
||||
* @LastEditTime: 2023-02-04 16:55:12
|
||||
* @FilePath: /IT工具综合平台/src/views/account/Login.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
@@ -43,8 +43,8 @@
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="el-button-block" @click="login" :disabled="submit_btn_disable"
|
||||
:loading="submit_btn_loading">
|
||||
<el-button type="primary" class="el-button-block" @click="login" :disabled="ui.submit_btn_disable"
|
||||
:loading="ui.submit_btn_loading">
|
||||
{{ ui.current_menu === "login" ? "登录" : "注册" }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -183,6 +183,8 @@ export default {
|
||||
//将获取到的用户信息和token保存到vuex和localStorage
|
||||
const saveUserInfo = (userInfo) =>
|
||||
{
|
||||
console.log("保存用户信息");
|
||||
console.log("保存用户信息", store);
|
||||
//保存到vuex
|
||||
store.commit("app/SET_USERINFO", userInfo);
|
||||
|
||||
|
Reference in New Issue
Block a user