fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
# VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||||
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
||||||
# VUE_APP_BASE_URL = 'http://192.168.1.6:5567'
|
VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
||||||
|
|||||||
41
src/main.ts
41
src/main.ts
@@ -21,28 +21,31 @@ import { getCookie, setCookie } from "@/tool/cookie";
|
|||||||
let token = getCookie("token");
|
let token = getCookie("token");
|
||||||
let routerName:any = router.currentRoute
|
let routerName:any = router.currentRoute
|
||||||
let isLogin = routerName._value.name
|
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() {
|
async function isMurmur() {
|
||||||
let murmurStr: any = localStorage.getItem('murmurStr')
|
let murmurStr: any = localStorage.getItem('murmurStr')
|
||||||
if (!murmurStr) {
|
let id: any = localStorage.getItem('id')
|
||||||
await murmur().then((rv) => {
|
|
||||||
murmurStr = rv
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let isSxis = false
|
let isSxis = false
|
||||||
let data = {
|
let data = {
|
||||||
browserIdentifiers: murmurStr
|
browserIdentifiers: murmurStr,
|
||||||
|
id:id?id:window.location.search.substring(1)
|
||||||
}
|
}
|
||||||
await Https.axiosPost(Https.httpUrls.existNoLoginRequired, data)
|
// await Https.axiosPost(Https.httpUrls.existNoLoginRequired, data)
|
||||||
.then((rv) => {
|
// .then((rv) => {
|
||||||
isSxis = rv
|
// isSxis = rv
|
||||||
})
|
// })
|
||||||
.catch((res) => {
|
// .catch((res) => {
|
||||||
});
|
// });
|
||||||
if (isSxis && (router.currentRoute as any)._value.name != 'setIdentification') {
|
if ((router.currentRoute as any)._rawValue.name != 'setIdentification') {
|
||||||
// if (isSxis&&!token) {
|
|
||||||
// if(isLogin != 'login'){
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
Https.axiosPost(Https.httpUrls.noLoginRequired, data)
|
Https.axiosPost(Https.httpUrls.noLoginRequired, data)
|
||||||
.then((rv) => {
|
.then((rv) => {
|
||||||
let isTest = rv.isTrial == 1 ? true : false
|
let isTest = rv.isTrial == 1 ? true : false
|
||||||
@@ -56,8 +59,8 @@ async function isMurmur() {
|
|||||||
sessionStorage.setItem('isTimeOne', JSON.stringify(false));//是否需要公告 提示 弹窗
|
sessionStorage.setItem('isTimeOne', JSON.stringify(false));//是否需要公告 提示 弹窗
|
||||||
let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
|
let randomNum: any = Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
|
||||||
sessionStorage.setItem('sessionId', randomNum);
|
sessionStorage.setItem('sessionId', randomNum);
|
||||||
router.push("/home");
|
// router.push("/home");
|
||||||
localStorage.setItem('murmurStr',murmurStr)
|
// localStorage.setItem('murmurStr',murmurStr)
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ axios.interceptors.request.use((config) => {
|
|||||||
// config.data = JSON.stringify(config.data);
|
// config.data = JSON.stringify(config.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
|
||||||
config.headers.Authorization = getCookie('token');
|
config.headers.Authorization = getCookie('token');
|
||||||
return config;
|
return config;
|
||||||
},(error) =>{
|
},(error) =>{
|
||||||
@@ -107,6 +108,11 @@ export const Https = {
|
|||||||
noLoginRequired:`api/account/noLoginRequired`, //机房用户登录
|
noLoginRequired:`api/account/noLoginRequired`, //机房用户登录
|
||||||
existNoLoginRequired:`/api/third/party/existNoLoginRequired`, //获取唯一标识是否存在
|
existNoLoginRequired:`/api/third/party/existNoLoginRequired`, //获取唯一标识是否存在
|
||||||
|
|
||||||
|
deleteNoLoginRequiredNew:`/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销
|
||||||
|
addNoLoginRequiredNew:`api/third/party/addNoLoginRequiredNew`, //机房用户注册
|
||||||
|
|
||||||
|
endpoint:`api/third/party/your-secured-endpoint`, //获取唯一标识是否存在
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
preLogin:'/api/account/preLogin',//预先登入
|
preLogin:'/api/account/preLogin',//预先登入
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="identification_page">
|
<div class="identification_page">
|
||||||
<div>密钥:<input type="text" autofocus /></div>
|
<div>序号:<input v-model="setId" type="text" autofocus /></div>
|
||||||
|
<div>密钥:<input type="text" /></div>
|
||||||
<div class="button" @click="setFingerprint2('set')">记录浏览器标识</div>
|
<div class="button" @click="setFingerprint2('set')">记录浏览器标识</div>
|
||||||
<div class="button" @click="setFingerprint2('delete')">注销浏览器标识</div>
|
<div class="button" @click="setFingerprint2('delete')">注销浏览器标识</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,11 +29,13 @@ export default defineComponent({
|
|||||||
let userInfo: any = {};
|
let userInfo: any = {};
|
||||||
let status: any = ref(0);
|
let status: any = ref(0);
|
||||||
let voluntarily: any = ref(false);
|
let voluntarily: any = ref(false);
|
||||||
|
let setId: any = ref();
|
||||||
return {
|
return {
|
||||||
collectionList,
|
collectionList,
|
||||||
userInfo,
|
userInfo,
|
||||||
status,
|
status,
|
||||||
voluntarily,
|
voluntarily,
|
||||||
|
setId,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -67,18 +70,31 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
let data = {
|
let data = {
|
||||||
browserIdentifiers:murmur
|
browserIdentifiers:murmur,
|
||||||
|
id:this.setId
|
||||||
}
|
}
|
||||||
|
// console.log(data);
|
||||||
|
// return
|
||||||
|
|
||||||
if(str == 'set'){
|
if(str == 'set'){
|
||||||
Https.axiosPost(Https.httpUrls.addNoLoginRequired, data)
|
// return
|
||||||
|
Https.axiosPost(Https.httpUrls.addNoLoginRequiredNew, data)
|
||||||
.then((rv) => {
|
.then((rv) => {
|
||||||
localStorage.setItem('murmurStr',murmur)
|
localStorage.setItem('murmurStr',murmur)
|
||||||
|
|
||||||
|
const htmlContent = rv
|
||||||
|
const blob = new Blob([htmlContent], { type: "text/html" });
|
||||||
|
const downloadLink = document.createElement("a");
|
||||||
|
downloadLink.href = URL.createObjectURL(blob);
|
||||||
|
downloadLink.download = "AiDA.html";
|
||||||
|
downloadLink.click();
|
||||||
|
localStorage.setItem('id',this.setId)
|
||||||
message.success('Created successfully');
|
message.success('Created successfully');
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
Https.axiosPost(Https.httpUrls.deleteNoLoginRequired, data)
|
Https.axiosPost(Https.httpUrls.deleteNoLoginRequiredNew, data)
|
||||||
.then((rv) => {
|
.then((rv) => {
|
||||||
message.success('successfully delete');
|
message.success('successfully delete');
|
||||||
localStorage.removeItem('murmurStr')
|
localStorage.removeItem('murmurStr')
|
||||||
@@ -103,6 +119,7 @@ export default defineComponent({
|
|||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
border: 2px solid rgba(0, 0, 0, 0.2);
|
border: 2px solid rgba(0, 0, 0, 0.2);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
.button {
|
.button {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ const {defineConfig} = require('@vue/cli-service')
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
|
|
||||||
transpileDependencies: ['vuetify'],
|
transpileDependencies: ['vuetify'],
|
||||||
lintOnSave:false,//关闭语法检查
|
lintOnSave:false,//关闭语法检查
|
||||||
productionSourceMap: false,//打包不生成map文件,减少文件大小
|
productionSourceMap: false,//打包不生成map文件,减少文件大小
|
||||||
@@ -38,7 +37,7 @@ module.exports = defineConfig({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
https:true,
|
// https:true,
|
||||||
},
|
},
|
||||||
pluginOptions: {
|
pluginOptions: {
|
||||||
"style-resources-loader": {
|
"style-resources-loader": {
|
||||||
|
|||||||
Reference in New Issue
Block a user