Browse Source

通过打包配置 丘比智能巡店IT后台相关信息

chenrui 4 years ago
parent
commit
466d7c2400

+ 7 - 2
.env

@@ -1,5 +1,10 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=false
-VUE_APP_API_BASE_URL=https://aitour-it.qiubcar.com/at-it
+VUE_APP_API_BASE_URL=https://aitour-it.zyucgj.com/at-it
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=智能巡店IT后台
+VUE_APP_PRO_NAME=智能巡店IT后台
+VUE_APP_ANOTHEN_NAME=章鱼
+VUE_APP_LOGO=@/assets/logo.png
+VUE_APP_THEME_COLOR=#1890FF
+VUE_APP_COM_NAME=陕西山海高科信息技术有限公司
+VUE_APP_ICP=陕ICP备20006268号

+ 6 - 1
.env.development

@@ -2,4 +2,9 @@ NODE_ENV=development
 VUE_APP_PREVIEW=true
 VUE_APP_API_BASE_URL=/api
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=智能巡店IT后台-dev
+VUE_APP_PRO_NAME=智能巡店IT后台-dev
+VUE_APP_ANOTHEN_NAME=章鱼
+VUE_APP_LOGO=@/assets/logo.png
+VUE_APP_THEME_COLOR=#1890FF
+VUE_APP_COM_NAME=陕西山海高科信息技术有限公司
+VUE_APP_ICP=陕ICP备20006268号

+ 7 - 2
.env.preview

@@ -1,5 +1,10 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=true
-VUE_APP_API_BASE_URL=https://aitour-it.test.qiubcar.com/at-it
+VUE_APP_API_BASE_URL=https://aitour-it.test.zyucgj.com/at-it
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=智能巡店IT后台-pro
+VUE_APP_PRO_NAME=智能巡店IT后台-pro
+VUE_APP_ANOTHEN_NAME=章鱼
+VUE_APP_LOGO=@/assets/logo.png
+VUE_APP_THEME_COLOR=#1890FF
+VUE_APP_COM_NAME=陕西山海高科信息技术有限公司
+VUE_APP_ICP=陕ICP备20006268号

+ 10 - 0
.env.qbdev

@@ -0,0 +1,10 @@
+NODE_ENV=qbdev
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+VUE_APP_VERSION=V1.0.1
+VUE_APP_PRO_NAME=智能巡店IT后台-qbdev
+VUE_APP_ANOTHEN_NAME=丘比
+VUE_APP_LOGO=@/assets/logos.png
+VUE_APP_THEME_COLOR=#eb6b2d
+VUE_APP_COM_NAME=成都丘比象科技有限公司
+VUE_APP_ICP=蜀ICP备2020036400号-2

+ 10 - 0
.env.qbpre

@@ -0,0 +1,10 @@
+NODE_ENV=qbpreview
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=https://aitour-it.test.qiubcar.com/at-it
+VUE_APP_VERSION=V1.0.1
+VUE_APP_PRO_NAME=智能巡店IT后台-qbpre
+VUE_APP_ANOTHEN_NAME=丘比
+VUE_APP_LOGO=@/assets/logos.png
+VUE_APP_THEME_COLOR=#eb6b2d
+VUE_APP_COM_NAME=成都丘比象科技有限公司
+VUE_APP_ICP=蜀ICP备2020036400号-2

+ 10 - 0
.env.qbpro

@@ -0,0 +1,10 @@
+NODE_ENV=qbpreview
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=https://aitour-it.qiubcar.com/at-it
+VUE_APP_VERSION=V1.0.1
+VUE_APP_PRO_NAME=智能巡店IT后台
+VUE_APP_ANOTHEN_NAME=丘比
+VUE_APP_LOGO=@/assets/logos.png
+VUE_APP_THEME_COLOR=#eb6b2d
+VUE_APP_COM_NAME=成都丘比象科技有限公司
+VUE_APP_ICP=蜀ICP备2020036400号-2

+ 3 - 1
package.json

@@ -6,8 +6,10 @@
     "serve": "vue-cli-service serve",
     "dev": "vue-cli-service serve",
     "build": "vue-cli-service build",
-    "build:preview": "vue-cli-service build --mode preview",
     "uat": "vue-cli-service build --mode preview",
+    "dev:qbyc": "vue-cli-service serve --mode qbdev",
+    "uat:qbyc": "vue-cli-service build --mode qbpre",
+    "build:qbyc": "vue-cli-service build --mode qbpro",
     "lint": "vue-cli-service lint",
     "lint:nofix": "vue-cli-service lint --no-fix",
     "test:unit": "vue-cli-service test:unit",

BIN
src/assets/logo.png


BIN
src/assets/logos.png


+ 4 - 2
src/components/GlobalFooter/GlobalFooter.vue

@@ -16,7 +16,7 @@
     </div> -->
     <div class="copyright">
       Copyright
-      <a-icon type="copyright" /> 2020 <span> 陕西山海高科信息技术有限公司</span>
+      <a-icon type="copyright" /> 2020 <span> {{ company }}</span>
     </div>
   </div>
 </template>
@@ -25,7 +25,9 @@
 export default {
   name: 'GlobalFooter',
   data () {
-    return {}
+    return {
+      company: process.env.VUE_APP_COM_NAME //  公司
+    }
   }
 }
 </script>

+ 1 - 1
src/components/global.less

@@ -407,7 +407,7 @@ body {
 
     h1 {
       color: #fff;
-      font-size: 20px;
+      font-size: 18px;
       margin: 0 0 0 12px;
       font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
       font-weight: 600;

+ 3 - 2
src/components/tools/Logo.vue

@@ -2,7 +2,7 @@
   <div class="logo">
     <router-link :to="{name:'index'}">
       <!-- <LogoSvg alt="logo" /> -->
-      <img :src="LogoSvg" />
+      <img :src="logo" />
       <h1 v-if="showTitle">{{ title }}</h1>
     </router-link>
   </div>
@@ -30,7 +30,8 @@ export default {
   },
   data () {
     return {
-      LogoSvg: LogoSvg
+      LogoSvg: LogoSvg,
+      logo: require(process.env.VUE_APP_LOGO) //  logo
     }
   }
 }

+ 8 - 5
src/layouts/UserLayout.vue

@@ -1,16 +1,16 @@
 <template>
   <div id="userLayout" :class="['user-layout-wrapper', device]">
-    <canvas id='canvas'></canvas>
+    <canvas id="canvas"></canvas>
     <div class="container">
       <div class="top">
         <div class="header">
           <a href="/">
-            <img src="~@/assets/logo.png" class="logo" alt="logo">
+            <img :src="logo" class="logo" alt="logo">
             <!-- <span class="title">{{logo}}</span> -->
           </a>
         </div>
         <div class="desc">
-          {{title}}
+          {{ title }}
         </div>
       </div>
 
@@ -23,7 +23,7 @@
           <a href="_self">条款</a>
         </div> -->
         <div class="copyright">
-          Copyright &copy; 2020 陕西山海高科信息技术有限公司 <a href="http://beian.miit.gov.cn/" target="_blank">陕ICP备20006268号</a>
+          Copyright &copy; 2020 {{ company }} <a href="http://beian.miit.gov.cn/" target="_blank">{{ icp }}</a>
         </div>
       </div>
     </div>
@@ -41,7 +41,10 @@ export default {
   mixins: [mixinDevice],
   data () {
     return {
-      title: process.env.VUE_APP_PRO_NAME
+      title: process.env.VUE_APP_PRO_NAME,
+      company: process.env.VUE_APP_COM_NAME, //  公司
+      icp: process.env.VUE_APP_ICP, //  备案号
+      logo: require(process.env.VUE_APP_LOGO) //  logo
     }
   },
   mounted () {

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

@@ -121,6 +121,7 @@ import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha'
 import { mapActions } from 'vuex'
 import { timeFix } from '@/utils/util'
 import { getSmsCaptcha, get2step } from '@/api/login'
+import { updateTheme } from '@/components/SettingDrawer/settingConfig'
 
 export default {
   components: {
@@ -164,6 +165,11 @@ export default {
       this.password = rem.password
       this.rememberMe = rem.rememberMe
     }
+    //  设置主题色
+    if (process.env.VUE_APP_THEME_COLOR) {
+      this.$store.dispatch('ToggleColor', process.env.VUE_APP_THEME_COLOR)
+      updateTheme(process.env.VUE_APP_THEME_COLOR)
+    }
   },
   methods: {
     ...mapActions(['Login', 'Logout']),

+ 2 - 1
vue.config.js

@@ -109,7 +109,8 @@ const vueConfig = {
     proxy: {
       '/api': {
         // target: 'http://192.168.16.100:9102/at-it/',
-        target: 'https://aitour-it.test.zyucgj.com/at-it',
+        // target: 'https://aitour-it.test.zyucgj.com/at-it',
+        target: 'https://aitour-it.qiubcar.com/at-it',
         ws: false,
         changeOrigin: true,
         pathRewrite: {