wangjinjin0520 4 rokov pred
rodič
commit
40af4fb247

+ 1 - 1
src/components/commons/Header.vue

@@ -329,7 +329,7 @@
     storageSave
   } from '@/js/index'
   import {notify} from '@/constants/index'
-  import {logoTitle} from "../../config";
+  import {CONFIG} from "../../config";
 
   export default {
   name: 'header-container',

+ 3 - 3
src/components/commons/Header2.0.vue

@@ -90,7 +90,7 @@
   import Http from '@/js/http.js'
   import Apis from '@/js/api.js'
   import {mapActions} from 'vuex'
-
+  import {login_url,register_url} from '../../config/index'
   export default {
     name: "Header2.0",
     data(){
@@ -98,8 +98,8 @@
         user: {},
         loading: false,
         fullScreenLoading: true,
-        loginUrl: process.env.LOGIN_URL,
-        registerUrl: process.env.REGISTER_URL,
+        loginUrl: login_url,
+        registerUrl: register_url,
         authInfo: {},
         isShowAuthCheckingDialog: false,
         isShowAuthRejectDialog: false,

+ 3 - 0
src/config/index.js

@@ -133,3 +133,6 @@ export let CONFIG = {};
 export const setConfig = (conf) => {
   CONFIG = conf;
 }
+
+export const login_url = '/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome'
+export const  register_url = '/page/register'

+ 0 - 1
src/main.js

@@ -209,7 +209,6 @@ Vue.prototype.$message = Message
 Vue.config.productionTip = false
 
 
-console.log(storageGet('config'));
 Http.get('/api/common/configuration').then((res) => {
   let config = res.data&&res.data.configurationList;
   let configData = configToJson(config);

+ 2 - 2
src/pages/Homepage/LoginCard.vue

@@ -27,7 +27,7 @@
   import Http from '@/js/http.js'
   import {logout, storageGet} from '@/js/index.js'
   import {mapActions,mapGetters} from 'vuex'
-  import {CONFIG} from "../../config";
+  import {CONFIG,login_url} from "../../config";
 
   export default {
     name: "LoginCard",
@@ -37,7 +37,7 @@
         logo_background:CONFIG.logo_background,
         isLogin: false,
         user: {},
-        loginUrl: process.env.LOGIN_URL,
+        loginUrl: login_url,
         userImg: ''
       }
     },

+ 2 - 1
src/pages/UserCenter/ModifyPsw.vue

@@ -30,6 +30,7 @@
   import Http from '@/js/http.js'
   import {logout, storageGet} from '@/js/index'
   import {notify} from '@/constants/index'
+  import {login_url} from '../../config/index'
 
   export default {
     name: "ModifyPsw",
@@ -77,7 +78,7 @@
                       // notify('success', '密码修改成功,请重新登录!')
                       window.alert('密码修改成功,请重新登录');
                       logout().then((res) => {
-                          window.location.href = process.env.LOGIN_URL;
+                          window.location.href = login_url;
                           // this.$router.push('/home')
                       })
 

+ 2 - 1
src/pages/UserCenter/ReBindingMail.vue

@@ -22,6 +22,7 @@
   import Http from '@/js/http.js'
   import {logout, storageGet} from '@/js/index'
   import {notify} from '@/constants/index'
+  import {login_url} from '../../config/index'
 
   export default {
     name: "ReBindingMail",
@@ -85,7 +86,7 @@
             // notify('success', '绑定成功');
             window.alert('邮箱修改成功, 请重新登录');
             logout().then((res) => {
-              window.location.href = process.env.LOGIN_URL;
+              window.location.href = login_url;
               // this.$router.push('/home')
             })
           }

+ 8 - 0
tool4deploy-privatecloud/conf.d/nginx.conf

@@ -22,6 +22,14 @@ server {
             proxy_pass http://crowd_backend:8080;
         }
 
+        location /page {
+            proxy_pass http://user.mooctest.net:8081;
+        }
+
+        location  ~ ^/(js|vendor|css|fonts|images)/.*$ {
+            proxy_pass http://user.mooctest.net:8081;
+        }
+
         #error_page  404              /404.html;
 
         # redirect server error pages to the static page /50x.html