| | |
| | | <template> |
| | | <div id="app"> |
| | | <!-- <div id="status-bar" style="position: relative;"></div> --> |
| | | <div class="w-full h-full"> |
| | | <keep-alive> |
| | | <router-view |
| | |
| | | <Footer v-if="$route.meta.footer"></Footer> |
| | | </div> |
| | | </div> |
| | | <!-- <loading v-else /> --> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from "vuex"; |
| | | // import Loading from '@/components/loading' |
| | | import Footer from "@/components/footer"; |
| | | import { mapActions, mapMutations, mapGetters } from "vuex"; |
| | | import { SET_CURRENCY, SET_KEFU, SET_CONFIG } from "@/store/const.store"; |
| | |
| | | getStorage, |
| | | setSessionStorage, |
| | | getSessionStorage, |
| | | fetchData, |
| | | } from "@/utils/utis"; |
| | | import { encryptDes, decryptDes } from "@/utils/des"; |
| | | import axios from "axios"; |
| | | import { BASE_URL } from "@/config"; |
| | | import { signatureGenerate } from "@/utils/signatureUtil"; |
| | | import store from "./store"; |
| | | export default { |
| | | name: "App", |
| | | data() { |
| | |
| | | } |
| | | }); |
| | | var lastTouchEnd = 0; |
| | | |
| | | document.addEventListener( |
| | | "touchend", |
| | | function (event) { |
| | |
| | | await this.init(); |
| | | //document.addEventListener('touchmove', function (e) { e.cancelable && e.preventDefault(); }, false); |
| | | }, |
| | | async mounted() { |
| | | const res = await fetchData(); |
| | | let arr = []; |
| | | res.url.map(async (item, index) => { |
| | | const data = (await this.pingServer(item)) || 0; |
| | | const url = new URL(item); |
| | | const domain = url.hostname; |
| | | arr.push({ |
| | | title: "线路", |
| | | type: domain, |
| | | value: data, |
| | | id: index, |
| | | }); |
| | | if (res.url.length === arr.length) { |
| | | this.setBaic(arr); |
| | | } |
| | | }); |
| | | |
| | | // window.localStorage.setItem("phones", userInfo.adminPhone); |
| | | |
| | | mounted() { |
| | | window.document.documentElement.setAttribute("data-theme", this.theme); |
| | | changeTheme(this.theme); |
| | | this.GET_UERS_KYC(); |
| | | }, |
| | | components: { |
| | | // loading: Loading, |
| | | Footer, |
| | | }, |
| | | methods: { |
| | | ...mapActions("home", [SET_KEFU, "setBaic"]), |
| | | ...mapActions("user", [SET_CONFIG]), |
| | | ...mapActions("home", [SET_KEFU]), |
| | | ...mapActions("user", [SET_CONFIG, "GET_UERS_KYC"]), |
| | | ...mapMutations("language", ["setLanguage"]), |
| | | ...mapMutations("home", [SET_CURRENCY]), |
| | | async pingServer(url) { |
| | | try { |
| | | const startTime = performance.now(); |
| | | const response = await fetch(url, { |
| | | method: "POST", |
| | | }); |
| | | const endTime = performance.now(); |
| | | const latency = endTime - startTime; |
| | | |
| | | if (response.ok) { |
| | | return latency; |
| | | } else { |
| | | console.log(`Server ${url} is unreachable.${latency}`); |
| | | } |
| | | } catch (error) { |
| | | console.error("Error occurred:", error); |
| | | } |
| | | }, |
| | | |
| | | async init() { |
| | | await this.verifyLink(); |
| | | this.setLanguage(this.$i18n.locale); |
| | |
| | | // tab标签短横线颜色 |
| | | .van-tabs__line { |
| | | @include themify() { |
| | | background: themed("active_line"); |
| | | background: transparent; |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | .list-quatation { |
| | | .van-cell { |
| | | padding: 30px 32px !important; |
| | | |
| | | margin-bottom: 25px; |
| | | padding: 10px 32px 10px 0px !important ; |
| | | box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.05); |
| | | line-height: 35px !important; |
| | | .anniu { |
| | | width: 10px; |
| | | height: 50px; |
| | | background-color: #2ebd85; |
| | | margin-right: 60px; |
| | | } |
| | | @include themify() { |
| | | background: themed("cont_round") !important; |
| | | } |
| | | |
| | | &::after { |
| | | @include themify() { |
| | | border-bottom: 1px solid themed("line_color") !important; |
| | | border-bottom: 0 !important; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | .van-popup { |
| | | @include themify() { |
| | | background: themed("main_background"); |
| | | // background: themed("main_background"); |
| | | } |
| | | } |
| | | |
| | |
| | | color: themed("text_color"); |
| | | } |
| | | } |
| | | .box-show { |
| | | box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.05); |
| | | } |
| | | </style> |