This commit is contained in:
X1627315083
2024-01-17 17:52:40 +08:00
parent 0ce5862f92
commit 8d4614a6e1
5 changed files with 52 additions and 27 deletions

View File

@@ -21,28 +21,31 @@ import { getCookie, setCookie } from "@/tool/cookie";
let token = getCookie("token");
let routerName:any = router.currentRoute
let isLogin = routerName._value.name
console.log(window.location.search.substring(1));
// Https.axiosGet(Https.httpUrls.endpoint)
// .then((rv) => {
// console.log(rv);
// })
// .catch((res) => {
// });
async function isMurmur() {
let murmurStr: any = localStorage.getItem('murmurStr')
if (!murmurStr) {
await murmur().then((rv) => {
murmurStr = rv
})
}
let id: any = localStorage.getItem('id')
let isSxis = false
let data = {
browserIdentifiers: murmurStr
browserIdentifiers: murmurStr,
id:id?id:window.location.search.substring(1)
}
await Https.axiosPost(Https.httpUrls.existNoLoginRequired, data)
.then((rv) => {
isSxis = rv
})
.catch((res) => {
});
if (isSxis && (router.currentRoute as any)._value.name != 'setIdentification') {
// if (isSxis&&!token) {
// if(isLogin != 'login'){
// return
// }
// await Https.axiosPost(Https.httpUrls.existNoLoginRequired, data)
// .then((rv) => {
// isSxis = rv
// })
// .catch((res) => {
// });
if ((router.currentRoute as any)._rawValue.name != 'setIdentification') {
Https.axiosPost(Https.httpUrls.noLoginRequired, data)
.then((rv) => {
let isTest = rv.isTrial == 1 ? true : false
@@ -56,8 +59,8 @@ async function isMurmur() {
sessionStorage.setItem('isTimeOne', JSON.stringify(false));//是否需要公告 提示 弹窗
let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
sessionStorage.setItem('sessionId', randomNum);
router.push("/home");
localStorage.setItem('murmurStr',murmurStr)
// router.push("/home");
// localStorage.setItem('murmurStr',murmurStr)
})
.catch((res) => {
});