Browse Source

弹窗居中

lushuncheng 6 years ago
parent
commit
cc23eed58e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      plugins/common.js

+ 5 - 1
plugins/common.js

@@ -10,7 +10,9 @@ Vue.mixin({
     let headers = req && req.headers
     let res = await $axios.$get('/api/user/getInfo', {
       headers
-    }, {neverLogout: true});
+    }, {
+      neverLogout: true
+    });
     if (res && res.data) {
       store.commit('updateUserinfo', {
         userinfo: res.data || {}
@@ -96,6 +98,7 @@ Vue.mixin({
         let that = this;
         this.$alert('未登录, 前往登录', '提示', {
           confirmButtonText: '确定',
+          center: true,
           callback: action => {
             if (that.$deviceType.app) {
               location.href = "proginn://login?backToPage=true";
@@ -109,6 +112,7 @@ Vue.mixin({
     noCompetence(title = "没有权限") {
       this.$alert(title, '提示', {
         confirmButtonText: '确定',
+        center: true,
         callback: action => {
           location.go(-1)
         }