Просмотр исходного кода

Merge branch 'develop_qbyc' of chelingzhu-web/storeCheck-admin-html into master

lilei 4 лет назад
Родитель
Сommit
297bbbf5e2

+ 7 - 1
.env

@@ -2,4 +2,10 @@ NODE_ENV=production
 VUE_APP_PREVIEW=false
 VUE_APP_API_BASE_URL=https://aitour.zyucgj.com/at-admin
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=智能巡店运营管理平台
+VUE_APP_PRO_NAME=智能巡店运营管理平台
+VUE_APP_ANOTHEN_NAME=章鱼养车
+VUE_APP_PINYIN=clz
+VUE_APP_LOGO=@/assets/logo.png
+VUE_APP_THEME_COLOR=#1890FF
+VUE_APP_COM_NAME=陕西山海高科信息技术有限公司
+VUE_APP_ICP=陕ICP备20006268号

+ 7 - 1
.env.development

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

+ 7 - 1
.env.preview

@@ -2,4 +2,10 @@ NODE_ENV=production
 VUE_APP_PREVIEW=true
 VUE_APP_API_BASE_URL=https://aitour.test.zyucgj.com/at-admin
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=智能巡店运营平台-pro
+VUE_APP_PRO_NAME=智能巡店运营平台-pro
+VUE_APP_ANOTHEN_NAME=章鱼养车
+VUE_APP_PINYIN=clz
+VUE_APP_LOGO=@/assets/logo.png
+VUE_APP_THEME_COLOR=#1890FF
+VUE_APP_COM_NAME=陕西山海高科信息技术有限公司
+VUE_APP_ICP=陕ICP备20006268号

+ 11 - 0
.env.qbdev

@@ -0,0 +1,11 @@
+NODE_ENV=development
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=/api
+VUE_APP_VERSION=V1.0.1
+VUE_APP_PRO_NAME=智能巡店运营平台-dev
+VUE_APP_ANOTHEN_NAME=丘比养车
+VUE_APP_PINYIN=qbyc
+VUE_APP_LOGO=@/assets/logos.png
+VUE_APP_THEME_COLOR=#eb6b2d
+VUE_APP_COM_NAME=成都丘比象科技有限公司
+VUE_APP_ICP=蜀ICP备2020036400号-2

+ 11 - 0
.env.qbpre

@@ -0,0 +1,11 @@
+NODE_ENV=production
+VUE_APP_PREVIEW=true
+VUE_APP_API_BASE_URL=https://aitour.test.qiubcar.com/at-admin
+VUE_APP_VERSION=V1.0.1
+VUE_APP_PRO_NAME=智能巡店运营平台-pro
+VUE_APP_ANOTHEN_NAME=丘比养车
+VUE_APP_PINYIN=qbyc
+VUE_APP_LOGO=@/assets/logos.png
+VUE_APP_THEME_COLOR=#eb6b2d
+VUE_APP_COM_NAME=成都丘比象科技有限公司
+VUE_APP_ICP=蜀ICP备2020036400号-2

+ 11 - 0
.env.qbpro

@@ -0,0 +1,11 @@
+NODE_ENV=production
+VUE_APP_PREVIEW=false
+VUE_APP_API_BASE_URL=https://aitour.qiubcar.com/at-admin
+VUE_APP_VERSION=V1.0.1
+VUE_APP_PRO_NAME=智能巡店运营管理平台
+VUE_APP_ANOTHEN_NAME=丘比养车
+VUE_APP_PINYIN=qbyc
+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
public/clzlogo.png


+ 1 - 1
public/index.html

@@ -4,7 +4,7 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <link rel="icon" href="<%= BASE_URL %>logo.png">
+    <link rel="icon" href="<%= BASE_URL %><%= VUE_APP_PINYIN %>logo.png">
     <title>智能巡店运营管理平台</title>
     <style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
     <!-- require cdn assets css -->

BIN
public/logo.png


BIN
public/qbyclogo.png


+ 3 - 1
src/App.vue

@@ -20,7 +20,9 @@ export default {
   created () {
     // 在页面加载时读取sessionStorage
     if (sessionStorage.getItem('store')) {
-      this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store'))))
+      const data = JSON.parse(sessionStorage.getItem('store'))
+      sessionStorage.setItem('Access-Token', data.user.token)
+      this.$store.replaceState(Object.assign({}, this.$store.state, data))
     }
     // 在页面刷新时将store保存到sessionStorage里
     window.addEventListener('beforeunload', () => {

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" /> {{new Date().getFullYear()}} <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>

+ 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
     }
   }
 }

+ 6 - 3
src/layouts/UserLayout.vue

@@ -5,7 +5,7 @@
       <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>
@@ -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; {{new Date().getFullYear()}} {{ 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 () {

+ 2 - 2
src/permission.js

@@ -17,8 +17,8 @@ router.beforeEach((to, from, next) => {
   NProgress.start() // start progress bar
   to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
   let token = store.state.user.token || sessionStorage.getItem(ACCESS_TOKEN)
-  token = token != 'undefined' ? token : ''
-  // console.log(token)
+  token = token != 'null' && token != 'undefined' && token ? token : ''
+  // console.log(token,'token')
   // 已登录
   if (token) {
     /* has token */

+ 1 - 1
src/store/modules/user.js

@@ -47,7 +47,7 @@ const user = {
               const users = res.auth_user
               Vue.ls.set('hasError', 0)
               commit('SET_TOKEN', res.access_token)
-              commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
+              commit('SET_NAME', { name: users.userNameCN || users.username, welcome: welcome() })
               Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
               commit('SET_AVATAR', res.avatar ? res.avatar : '')
               // 记住密码

+ 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']),

+ 1 - 2
vue.config.js

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