From a0654f2c21511a0e16b977427a563a3ccdfd1fba Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期二, 14 三月 2023 15:34:06 +0800 Subject: [PATCH] 搜索bug --- src/views/home/home.vue | 97 ++++++++++++++++++++++++++++++------------------ 1 files changed, 61 insertions(+), 36 deletions(-) diff --git a/src/views/home/home.vue b/src/views/home/home.vue index df17bf1..12dbdab 100644 --- a/src/views/home/home.vue +++ b/src/views/home/home.vue @@ -5,6 +5,7 @@ <template> <div> <div v-show="currNav == 'xboot'" class="home"> + <a :href="this.token" target="_blank">澶у睆鍦板潃</a> <!--<Row :gutter="10">--> <!--<!– 宸︿笂渚� 鐢ㄦ埛淇℃伅鍙奼ithub閾炬帴 –>--> <!--<Col :xs="24" :sm="24" :lg="24" :xl="8">--> @@ -454,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"; @@ -466,6 +468,7 @@ import Cookies from "js-cookie"; // import "gitalk/dist/gitalk.css"; import Gitalk from "gitalk"; + export default { name: "home", @@ -493,6 +496,7 @@ userType: "鏃�", time: "", price: "...", + token:"" }; }, computed: { @@ -543,44 +547,65 @@ } }); }, + 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; //姹俇nicode缂栫爜鍊煎緱浣欐暟 + 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"); - // 瀹d紶瑙嗛 - 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"); + // // 瀹d紶瑙嗛 + // let videoFlag = "videoShowed"; + // let xbootVideo = Cookies.get(videoFlag); + // if (xbootVideo != videoFlag) { + // this.showVideo = true; + // Cookies.set(videoFlag, videoFlag); + // } }, }; </script> -- Gitblit v1.9.1