@@ -74,28 +74,28 @@ export default {
7474 host: host + " :6001"
7575 };
7676 window .Echo = new Echo (data);
77- if (process .env .VUE_APP_SINGLE_LOGIN === " ON" ) {
78- // 用户仅能一个点登陆
79- window .channel = window .Echo .channel (" leave." + this .name ).listen (
80- " UserLogin" ,
81- (e ) => {
82- this .$alert (
83- " 当前用户在其它地方已经登录,现在即将退出" ,
84- " 登录警告" ,
85- {
86- confirmButtonText: " 确定" ,
87- callback : (action ) => {
88- this .$store .dispatch (" user/resetFrontendToken" ).then (() => {
89- window .channel .unbind (" UserLogin" );
90- window .channel = null ;
91- this .$router .push (` /login` );
92- });
93- }
94- }
95- );
96- }
97- );
98- }
77+ // if (process.env.VUE_APP_SINGLE_LOGIN === "ON") {
78+ // // 用户仅能一个点登陆
79+ // window.channel = window.Echo.channel("leave." + this.name).listen(
80+ // "UserLogin",
81+ // (e) => {
82+ // this.$alert(
83+ // "当前用户在其它地方已经登录,现在即将退出",
84+ // "登录警告",
85+ // {
86+ // confirmButtonText: "确定",
87+ // callback: (action) => {
88+ // this.$store.dispatch("user/resetFrontendToken").then(() => {
89+ // window.channel.unbind("UserLogin");
90+ // window.channel = null;
91+ // this.$router.push(`/login`);
92+ // });
93+ // }
94+ // }
95+ // );
96+ // }
97+ // );
98+ // }
9999 }
100100 },
101101 methods: {
0 commit comments