|
@@ -1146,16 +1146,32 @@ export default {
|
|
// window.location.href = './index.html';
|
|
// window.location.href = './index.html';
|
|
// /*
|
|
// /*
|
|
// ajax
|
|
// ajax
|
|
- this.store.dispatch('loginOut').then(function (res) {
|
|
|
|
- instance.confirmButtonText = '确定';
|
|
|
|
- instance.confirmButtonLoading = false;
|
|
|
|
- done();
|
|
|
|
- window.location.href = './index.html';
|
|
|
|
- }).catch(function () {
|
|
|
|
- instance.confirmButtonText = '确定';
|
|
|
|
- instance.confirmButtonLoading = false;
|
|
|
|
- done();
|
|
|
|
- });
|
|
|
|
|
|
+ if (getCookie('ticket')) {
|
|
|
|
+ let res = this.axios.get('pass/logout', {
|
|
|
|
+ params: {
|
|
|
|
+ authorization: getCookie('accessToken')
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ res.then(function (res) {
|
|
|
|
+ console.log(111)
|
|
|
|
+ instance.confirmButtonText = "确定";
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ window.location.href = "./index.html";
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.store.dispatch('loginOut').then(function (res) {
|
|
|
|
+ instance.confirmButtonText = '确定';
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ window.location.href = './index.html';
|
|
|
|
+ }).catch(function () {
|
|
|
|
+ instance.confirmButtonText = '确定';
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
+ done();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
// */
|
|
// */
|
|
} else {
|
|
} else {
|
|
done();
|
|
done();
|