xuefei
2023-05-04 d583ee91ff627890ce0a2a1055dcdc394d2391e2
src/views/home/home.vue
@@ -5,7 +5,7 @@
<template>
  <div>
    <div v-show="currNav == 'xboot'" class="home">
      <a :href="this.token" target="_blank">唐山烟草大屏地址</a>
      <a :href="this.token" target="_blank">大屏地址</a>
      <!--<Row :gutter="10">-->
        <!--&lt;!&ndash; 左上侧 用户信息及github链接 &ndash;&gt;-->
        <!--<Col :xs="24" :sm="24" :lg="24" :xl="8">-->
@@ -455,6 +455,7 @@
</template>
<script>
  import { getStore } from '../../libs/storage';
import { ipInfo, getNotice } from "@/api/index";
import visitVolume from "./components/visitVolume.vue";
import visitSeparation from "./components/visitSeparation.vue";
@@ -467,6 +468,7 @@
import Cookies from "js-cookie";
// import "gitalk/dist/gitalk.css";
import Gitalk from "gitalk";
export default {
  name: "home",
@@ -545,11 +547,29 @@
        }
      });
    },
    toCode(str) {  //加密字符串
      //定义密钥,36个字母和数字
      var key = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
      var st = key.length;  //获取密钥的长度
      var a = key.split("");  //把密钥字符串转换为字符数组
      var s = "",b, b1, b2, b3;  //定义临时变量
      for (var i = 0; i <str.length; i ++) {  //遍历字符串
        b = str.charCodeAt(i);  //逐个提取每个字符,并获取Unicode编码值
        b1 = b % st;  //求Unicode编码值得余数
        b = (b - b1) / st;  //求最大倍数
        b2 = b % st;  //求最大倍数的于是
        b = (b - b2) / st;  //求最大倍数
        b3 = b % st;  //求最大倍数的余数
        s += a[b3] + a[b2] + a[b1];  //根据余数值映射到密钥中对应下标位置的字符
      }
      return s;  //返回这些映射的字符
    }
  },
  mounted() {
    //this.token = 'http://111.63.178.115:9093?token='+new Date().getTime();
    this.token = 'http://localhost:8080?token='+new Date().getTime();
    //this.token = 'http://localhost:8080'
    this.token = 'http://111.63.178.115:9093?token=$vj$xCShfaQRUQlF8lqL1lwWi2auOrkLfkoecRuDWiJXlTnSg1mh6BODfjieo3ncsosjiocew';
    //alert(this.toCode('管理员'))
    //this.token = 'http://localhost:8080?token='+this.toCode('管理员');
    //this.token = 'http://localhost:8080?token=$vj$xCShfaQRUQlF8lqL1lwWi2auOrkLfkoecRuDWiJXlTnSg1mh6BODfjieo3ncsosjiocew';
    // this.init();
    // // 通知
    // let noticeFlag = "noticeShowed";