This commit is contained in:
2023-09-17 13:18:59 +08:00
parent bf05f771f7
commit 9e871e4079
23 changed files with 1086 additions and 606 deletions

View File

@@ -43,6 +43,13 @@ const useUserStore = defineStore({
resolve();
})
},
//过期登出
logoutWithoutToken(force = false) {
return new Promise((resolve, reject) => {
this.resetUserData();
resolve();
})
},
// 获取用户信息
getUserInfo() {
getInfo().then(resp => {
@@ -63,6 +70,7 @@ const useUserStore = defineStore({
},
// 查询当前用户的vip开通情况
async searchUserVip() {
this.currentCartype=storage.get('carType') || '1001'
const resp=await queryVip({ carTypeId: this.currentCartype,memberId: null, subject:'' })
if(resp.code == '0000') {
this.vipOnList = resp.data
@@ -70,6 +78,7 @@ const useUserStore = defineStore({
},
// 查询所有的vip
queryVipList() {
this.currentCartype= storage.get('carType') || '1001'
getVipList({ carTypeId: this.currentCartype,memberId: null, subject:'' }).then(resp => {
if(resp.code == '0000') {
this.vipAllList = resp.data