| | |
| | | <template> |
| | | <div> |
| | | <div v-show="currNav == 'xboot'" class="home"> |
| | | <a :href="this.token" target="_blank">大屏地址</a> |
| | | <!--<Row :gutter="10">--> |
| | | <!--<!– 左上侧 用户信息及github链接 –>--> |
| | | <!--<Col :xs="24" :sm="24" :lg="24" :xl="8">--> |
| | |
| | | </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"; |
| | |
| | | import Cookies from "js-cookie"; |
| | | // import "gitalk/dist/gitalk.css"; |
| | | import Gitalk from "gitalk"; |
| | | |
| | | |
| | | export default { |
| | | name: "home", |
| | |
| | | userType: "无", |
| | | time: "", |
| | | price: "...", |
| | | token:"" |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | 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.init(); |
| | | // 通知 |
| | | let noticeFlag = "noticeShowed"; |
| | | let notice = Cookies.get(noticeFlag); |
| | | if (notice != noticeFlag) { |
| | | this.showNotice(); |
| | | Cookies.set(noticeFlag, noticeFlag); |
| | | } |
| | | // 价格 |
| | | AV.init({ |
| | | appId: "6Bstbxl4NDU69I77D3nzf61h-gzGzoHsz", |
| | | appKey: "gaFTnYlTul3M8qdiGlbfvoJK", |
| | | serverURL: "https://6bstbxl4.lc-cn-n1-shared.com", |
| | | }); |
| | | const query = new AV.Query("Price"); |
| | | query.equalTo("objectId", "6080216c2a5bb23590bcaedb"); |
| | | query.first().then((e) => { |
| | | this.price = e.attributes.price; |
| | | }); |
| | | // Gitalk |
| | | var gitalk = new Gitalk({ |
| | | clientID: "a128de2dd7383614273a", |
| | | clientSecret: "a77691ecb662a8303a6c686ae651ae035868da6e", |
| | | repo: "xboot-comments", |
| | | owner: "Exrick", |
| | | admin: ["Exrick"], |
| | | distractionFreeMode: false, // 遮罩效果 |
| | | }); |
| | | gitalk.render("comments"); |
| | | // 宣传视频 |
| | | let videoFlag = "videoShowed"; |
| | | let xbootVideo = Cookies.get(videoFlag); |
| | | if (xbootVideo != videoFlag) { |
| | | this.showVideo = true; |
| | | Cookies.set(videoFlag, videoFlag); |
| | | } |
| | | 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"; |
| | | // let notice = Cookies.get(noticeFlag); |
| | | // if (notice != noticeFlag) { |
| | | // this.showNotice(); |
| | | // Cookies.set(noticeFlag, noticeFlag); |
| | | // } |
| | | // // 价格 |
| | | // AV.init({ |
| | | // appId: "6Bstbxl4NDU69I77D3nzf61h-gzGzoHsz", |
| | | // appKey: "gaFTnYlTul3M8qdiGlbfvoJK", |
| | | // serverURL: "https://6bstbxl4.lc-cn-n1-shared.com", |
| | | // }); |
| | | // const query = new AV.Query("Price"); |
| | | // query.equalTo("objectId", "6080216c2a5bb23590bcaedb"); |
| | | // query.first().then((e) => { |
| | | // this.price = e.attributes.price; |
| | | // }); |
| | | // // Gitalk |
| | | // var gitalk = new Gitalk({ |
| | | // clientID: "a128de2dd7383614273a", |
| | | // clientSecret: "a77691ecb662a8303a6c686ae651ae035868da6e", |
| | | // repo: "xboot-comments", |
| | | // owner: "Exrick", |
| | | // admin: ["Exrick"], |
| | | // distractionFreeMode: false, // 遮罩效果 |
| | | // }); |
| | | // gitalk.render("comments"); |
| | | // // 宣传视频 |
| | | // let videoFlag = "videoShowed"; |
| | | // let xbootVideo = Cookies.get(videoFlag); |
| | | // if (xbootVideo != videoFlag) { |
| | | // this.showVideo = true; |
| | | // Cookies.set(videoFlag, videoFlag); |
| | | // } |
| | | }, |
| | | }; |
| | | </script> |