Przeglądaj źródła

切换测试分支

朱鑫波 3 lat temu
rodzic
commit
e4d2ef2fa7

+ 1 - 1
.env.production

@@ -14,7 +14,7 @@ VUE_APP_BASE_SCRIPT_URL = http://114.117.193.186:31013
 
 
 #素材大盘相关接口
-VUE_APP_BASE_MATERIAL_URL = http://192.168.0.195:9999/material
+VUE_APP_BASE_MATERIAL_URL = http://api.tjyourong.com.cn/material
 # 泽宇 http://192.168.1.134:9999
 # 测试 http://192.168.0.195:9999
 

+ 12 - 12
src/permission.js

@@ -59,12 +59,12 @@ router.beforeEach((to, from, next) => {
               if( to.path === '/dashboard/analysis' && from.path == '/'){
                 if (store.getters.userInfo.id == '4aba62011120ac565c7f2b9f8f4aa96b' || store.getters.userInfo.id == 'e9ca23d68d884d4ebb19d07889727dae') {
                   const a = document.createElement('a');
-                                      document.body.appendChild(a);
-                                      a.style.display = 'none';
-                                      a.href = 'http://192.168.0.195:9001/boss-data-kanban';
-                                      a.target = '_blank'
-                                      a.click();
-                                      document.body.removeChild(a);
+                  document.body.appendChild(a);
+                  a.style.display = 'none';
+                  a.href = 'http://adsp.c-top.com.cn/boss-data-kanban';
+                  a.target = '_blank'
+                  a.click();
+                  document.body.removeChild(a);
                   // let tempPage = window.open('', '_blank');
                   // tempPage.location="/boss-data-kanban";
                 }
@@ -90,12 +90,12 @@ router.beforeEach((to, from, next) => {
       if( to.path === '/dashboard/analysis' && from.path == '/'){
         if (store.getters.userInfo.id == '4aba62011120ac565c7f2b9f8f4aa96b' || store.getters.userInfo.id == 'e9ca23d68d884d4ebb19d07889727dae') {
           const a = document.createElement('a');
-                              document.body.appendChild(a);
-                              a.style.display = 'none';
-                              a.href = 'http://192.168.0.195:9001/boss-data-kanban';
-                              a.target = '_blank'
-                              a.click();
-                              document.body.removeChild(a);
+          document.body.appendChild(a);
+          a.style.display = 'none';
+          a.href = 'http://adsp.c-top.com.cn/boss-data-kanban';
+          a.target = '_blank'
+          a.click();
+          document.body.removeChild(a);
           // let tempPage = window.open('', '_blank');
           // tempPage.location="/boss-data-kanban";
           return

+ 3 - 0
src/store/modules/user.js

@@ -318,7 +318,10 @@ const user = {
         commit('SET_TOKEN', '')
         commit('SET_PERMISSIONLIST', [])
         Vue.ls.remove(ACCESS_TOKEN)
+        Vue.ls.remove(USER_INFO)
+        commit('SET_INFO', [])
         localStorage.removeItem("roleCode")
+
         //console.log('logoutToken: '+ logoutToken)
         logout(logoutToken).then(() => {
           resolve()

+ 2 - 2
src/utils/request.js

@@ -21,9 +21,9 @@ else if (process.env.NODE_ENV === 'debug') {
 else if (process.env.NODE_ENV === 'production') {
 	// axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot'; // 预生产
 	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
-	// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
+	axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
 	// axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot'; // 测试环境
-	axios.defaults.baseURL = 'http://192.168.0.195:9999/jeecg-boot'; // 测试环境
+	// axios.defaults.baseURL = 'http://192.168.0.195:9999/jeecg-boot'; // 测试环境
 	// axios.defaults.baseURL = 'http://192.168.1.134:9999/jeecg-boot'; // 泽宇环境
 
 }

+ 28 - 7
src/views/bossDataKanban/index.vue

@@ -391,6 +391,7 @@
 
 
 <script>
+    import { mapGetters, mapMutations, mapActions } from 'vuex'
     import { getPie3D, getParametricEquation } from './chart.js'
     import moment from 'moment'
     var echarts = require('echarts');
@@ -468,14 +469,34 @@
             }
         },
         created() {
-         let userInfo=localStorage.getItem('pro__Login_Userinfo')
-         if (!userInfo) {
-         this.$router.push({ path: '/user/login'})
-         }
-
+        //  let userInfo=localStorage.getItem('pro__Login_Userinfo')
+        //  if (!userInfo) {
+        //  this.$router.push({ path: '/user/login'})
+        //  }
+            if(!this.userInfo()){
+                this.$router.push({ path: '/user/login'})
+            }
 
         },
-
+        // updated(){
+
+        
+        // },
+        beforeRouteLeave (to, from) {
+            if(!this.userInfo()){
+                this.$confirm({
+                    title: '提示',
+                    content: '当前登录已失效,请重新登陆',
+                    onOk() {
+                       
+                        window.location.href="/";
+                       
+                    },
+                    onCancel() {
+                    },
+                });
+            }
+        },
         mounted() {
 
             this.getData();
@@ -488,7 +509,7 @@
         },
         methods: {
 
-
+            ...mapGetters(['userInfo']),
             // 开启全屏
             fullScreen() {
                 let elem = document.documentElement;

+ 2 - 1
src/views/dashboard/Analysis.vue

@@ -362,7 +362,8 @@
                     const a = document.createElement('a');
                     document.body.appendChild(a);
                     a.style.display = 'none';
-                    a.href = 'http://192.168.0.195:9001/boss-data-kanban';
+                    a.href = 'http://adsp.c-top.com.cn/boss-data-kanban';
+
                     a.target = '_blank'
                     a.click();
                     document.body.removeChild(a);

+ 6 - 7
src/views/user/Login.vue

@@ -448,13 +448,12 @@ export default {
         path: '/dashboard/analysis',
       })
       if (this.userInfo().id == '4aba62011120ac565c7f2b9f8f4aa96b' || this.userInfo().id == 'e9ca23d68d884d4ebb19d07889727dae') {
-                    const a = document.createElement('a');
-                    document.body.appendChild(a);
-                    a.style.display = 'none';
-                    a.href = 'http://192.168.0.195:9001/boss-data-kanban';
-                    a.target = '_blank'
-                    a.click();
-                    document.body.removeChild(a);
+          const a = document.createElement('a');
+          document.body.appendChild(a);
+          a.style.display = 'none';
+          a.href = 'http://adsp.c-top.com.cn/boss-data-kanban';
+          a.target = '_blank'
+          a.click();
         // let tempPage = window.open('', '_blank');
         // tempPage.location="/boss-data-kanban";
         // window.open("/boss-data-kanban","_blank")