|
@@ -17,6 +17,7 @@ export interface MainStateType {
|
|
|
videohandle: any;
|
|
|
videoisshow: Boolean;
|
|
|
videotitle: string;
|
|
|
+ userticket: string;
|
|
|
}
|
|
|
|
|
|
export interface MainActionsType {
|
|
@@ -36,7 +37,8 @@ export default defineStore<'main', MainStateType, {}, MainActionsType>('main', {
|
|
|
isshoweventlist: false,
|
|
|
videohandle: {},
|
|
|
videoisshow: false,
|
|
|
- videotitle:"-",
|
|
|
+ videotitle: '-',
|
|
|
+ userticket:"",
|
|
|
}),
|
|
|
actions: {
|
|
|
async getMessage(params) {
|
|
@@ -48,7 +50,7 @@ export default defineStore<'main', MainStateType, {}, MainActionsType>('main', {
|
|
|
}
|
|
|
},
|
|
|
setEventListshow(isshow) {
|
|
|
- this.isshoweventlist = isshow;
|
|
|
+ this.isshoweventlist = isshow;
|
|
|
},
|
|
|
async getUserInfo(ticket) {
|
|
|
try {
|
|
@@ -65,20 +67,21 @@ export default defineStore<'main', MainStateType, {}, MainActionsType>('main', {
|
|
|
console.log(err);
|
|
|
}
|
|
|
},
|
|
|
- async getUserTicket() {
|
|
|
+ async getUserTicket() {
|
|
|
const data = await getTicket();
|
|
|
+ this.userticket = data.data;
|
|
|
return data.data;
|
|
|
},
|
|
|
pushReqToken(cancelToken) {
|
|
|
this.cancelReqToken.push(cancelToken);
|
|
|
},
|
|
|
removeToken() {
|
|
|
- window.localStorage.removeItem('Authorization');
|
|
|
+ window.localStorage.removeItem('Authorization');
|
|
|
},
|
|
|
clearReqToken() {
|
|
|
- this.cancelReqToken.forEach((cancel) => {
|
|
|
- cancel('axios cancel by router change');
|
|
|
- });
|
|
|
+ this.cancelReqToken.forEach((cancel) => {
|
|
|
+ cancel('axios cancel by router change');
|
|
|
+ });
|
|
|
this.cancelReqToken = [];
|
|
|
},
|
|
|
},
|