Tiroble 3 éve
szülő
commit
6b28024752

+ 2 - 1
index.html

@@ -5,7 +5,8 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <title>工业互联网平台 iCore-ICP</title>
     <script>
-      window.location.href='./views/index.html';
+     
+      window.location.href='./views/download.html';
     </script>
   </head>
   <body>

BIN
src/assets/download/down.png


BIN
src/assets/download/image.png


BIN
src/assets/download/login.png


+ 4 - 2
src/config/routerBefore.js

@@ -16,7 +16,7 @@ import {
 } from '@/config/config.js';
 
 // 免登录白名单
-const whiteList = ['/', '/login', '/page404', '/dingtalkTaskMobileEnd', '/dingtalkWorkFlowMobileEnd'];
+const whiteList = ['/', '/login', '/download', '/page404', '/dingtalkTaskMobileEnd', '/dingtalkWorkFlowMobileEnd'];
 
 /**
  * 当前路由取标题
@@ -96,9 +96,9 @@ const breadcrumbFn = function (to, menu) {
 //  路由前置操作
 const routerBefore = function (router, constantRouterMap) {
   let flag = false
+  console.log('开始了')
   router.beforeEach((to, from, next) => {
     //  面包屑
-    console.log('进入路由', to)
     if (document.domain.indexOf('steerinfo.com') > -1) {
       document.domain = 'steerinfo.com';
     }
@@ -110,6 +110,7 @@ const routerBefore = function (router, constantRouterMap) {
       document.title = to.meta.title + ' ' + document.title.substr(document.title.indexOf('-'));
     }
     if (to.query.ticket) {
+      console.log('开始了2')
       setCookie('ticket', to.query.ticket, '', '/');
       let res = axios.get('pass/auth/ticket', {
         params: {
@@ -125,6 +126,7 @@ const routerBefore = function (router, constantRouterMap) {
           Message('登陆账户异常, 请联系管理员')
         });
     } else {
+      console.log('开始了3')
       DoneCookie(to, from, next, to.query.accessToken, flag)
     }
   });

+ 82 - 0
src/views/index/components/download.vue

@@ -0,0 +1,82 @@
+<template>
+     <div class="content" v-bind:style="{backgroundImage:'url(' + bg + ')'}" iud="body">
+        <img v-show="show_wx" :src="wx"   width="100%"  /> 
+        <!-- <img  :src="logo" style="margin:100px auto auto 150px;text-align:center; height:100px; width:85px;"  />  -->
+        <img   style="margin:90% auto auto 25%; height:8%; width:50%;"  :src="btn" id="btn_img" @click="download()"/>
+    </div> 
+</template> 
+
+<script>
+
+export default {
+    data() {
+        return {
+            type : "android",
+            // logo:require('@/assets/img/logoApp.png'),
+            wx:require('@/assets/download/image.png'),
+            btn:require('@/assets/download/down.png'),
+            show_wx :false,
+             bg: require('@/assets/download/login.png'),
+        };
+    },
+    created() {
+
+        let ua = navigator.userAgent.toLowerCase();
+
+        if (/iphone|ipad|ipod/.test(ua)) {
+
+            this.type = "ios";
+
+        } else if (/android/.test(ua)) {
+            this.type = "android";
+        }
+
+        if(isWeixinBrowser()){
+            this.show_wx = true;
+        }
+        function isWeixinBrowser() {
+            return (/micromessenger/.test(ua)) ? true : false;
+        }
+    },
+
+    methods: {
+
+        download() {
+
+            const that = this;
+
+            if(that.type == 'android') {
+
+                window.location.href = 'https://wl.dasteel.cn:32322 /%E6%95%B0%E8%A3%81%E7%89%A9%E6%B5%81.apk';
+                
+
+            } else {
+
+                window.location.href = 'IOS下载地址';
+
+            }
+
+        },
+
+    }
+
+};
+
+</script>
+<style>
+    .content {
+        position:relative;
+        margin:0px auto;
+        background-size: cover;
+        width: 100%;
+        height: 100%;
+ }
+
+
+
+
+div img:first-of-type { 
+    position: absolute; 
+   
+} 
+</style>

+ 12 - 1
src/views/index/router/index.js

@@ -6,7 +6,9 @@ import routerBefore from '@/config/routerBefore.js'
 import main from '@/components/main.vue'
 
 // 登录
-import login from '@/views/index/components/login.vue'
+import login from '@/views/index/components/login.vue'// 登录
+import download from '@/views/index/components/download.vue'
+
 
 // 网页登录不可访问
 import page404 from '@/views/index/components/page404.vue'
@@ -23,6 +25,15 @@ export const constantRouterMap = [{
         },
         component: login
     },
+    
+    {
+        path: '/download',
+        name: 'download',
+        meta: {
+            'title': '下载'
+        },
+        component: download
+    },
     {
         path: '/login',
         name: 'login',