Browse Source

退出登录

修改样式逻辑
yangteng 1 week ago
parent
commit
b457795d43
2 changed files with 15 additions and 2 deletions
  1. 14
    2
      stores/user.js
  2. 1
    0
      utils/network/api.js

+ 14
- 2
stores/user.js View File

@@ -14,7 +14,7 @@ import {
appId,
getToken,
wechatAppID,
getOpenId
getOpenId,logout
} from "@/utils/network/api";
import {
stringToJson
@@ -147,13 +147,25 @@ export const useUserStore = defineStore("userStore", {
url: "/login/login"
});
},
/*退出登录请求*/
logoutRequest() {
const options = {
type: 2,
data: {},
method: "POST",
showLoading: true,
};
requestNew(logout, options).then((res) => {
this.loginOutNoConfirm()
})
},

/*退出登录*/
loginOut() {
confirm(
"确定要退出登录吗?",
() => {
this.loginOutNoConfirm();
this.logoutRequest();
},
"提示",
true

+ 1
- 0
utils/network/api.js View File

@@ -489,3 +489,4 @@ export const licenseInforChangeApply = "/iaw/aftersale/vehicleInformationChange/


export const vehicleTypeCount = "/iaw/aftersale/vehicleInformationChange/vehicleTypeCount" //车型计算
export const logout = "/iaw/portal/logout" //退出登录

Loading…
Cancel
Save