调整机房安装方式

This commit is contained in:
X1627315083
2024-09-13 14:36:38 +08:00
parent 5fa1c7b9d1
commit 01b0fa0b7e
3 changed files with 43 additions and 64 deletions

View File

@@ -13,7 +13,7 @@ import VueLazyload from "vue-lazyload";
import i18n from './lang/index'
import { getBrowserInfo, murmur } from './tool/util'
import "../node_modules/@flaticon/flaticon-uicons/css/all/all.css"
import { Https } from "@/tool/https";
// import { Https } from "@/tool/https";
import 'swiper/css';
import 'swiper/css/pagination';
@@ -24,66 +24,6 @@ const app = createApp(App);
flexible()
import { getCookie, setCookie } from "@/tool/cookie";
router.beforeEach((to, from, next) => {
if((to.name == "login" && !from.name) || (to.name == 'SquareWorks' && !from.name) || (to.name == 'works' && !from.name)){
isMurmur()
}
next();
});
async function isMurmur() {
let murmurStr: any = localStorage.getItem('murmurStr')
let id: any = localStorage.getItem('id')
// let isSxis = false
let data = {
browserIdentifiers: murmurStr,
id:id?id:window.location.search.substring(1)
}
// await Https.axiosPost(Https.httpUrls.existNoLoginRequired, data)
// .then((rv) => {
// isSxis = rv
// })
// .catch((res) => {
// });
if(data.id){
Https.axiosPost(Https.httpUrls.noLoginRequired, data)
.then((rv) => {
let isTest = rv.systemUser == 3 ? true : false
let isBeginner = rv.isBeginner == 1 ? true : false
setCookie("isMurmur", true);
setCookie("token", rv.token);
setCookie("isTest", isTest);
setCookie("isBeginner", isBeginner);
setCookie("isBeginnerNum", 0);//从第一步开始,机器人开始的话就是从第二部开始
setCookie("userInfo", JSON.stringify(rv));
sessionStorage.setItem('isTimeOne', JSON.stringify(false));//是否需要公告 提示 弹窗
let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
sessionStorage.setItem('sessionId', randomNum);
router.push("/home");
if(window.location.search.substring(1)){
localStorage.setItem('id',window.location.search.substring(1))
}
})
.catch((res) => {
});
}
}
// app.directive('cliAdmin', {
// mounted(el, binding) {
// el.style.cursor = 'pointer'
// },
// updated (el,binding) {
// // let value = binding.value
// // if(value.state){
// // el.firstElementChild.classList.add(`cliAdmin_${value.type}`)
// // setTimeout(()=>{
// // el.firstElementChild.classList.remove(`cliAdmin_${value.type}`)
// // },500)
// // }
// }
// });
let loadingParam = {
loading: require('./assets/images/homePage/loading.gif'),
attempt: 1