fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
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://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 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) => {
|
||||
});
|
||||
|
||||
@@ -38,6 +38,7 @@ axios.interceptors.request.use((config) => {
|
||||
// config.data = JSON.stringify(config.data);
|
||||
}
|
||||
|
||||
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
|
||||
config.headers.Authorization = getCookie('token');
|
||||
return config;
|
||||
},(error) =>{
|
||||
@@ -106,6 +107,11 @@ export const Https = {
|
||||
deleteNoLoginRequired:`/api/third/party/deleteNoLoginRequired`, //机房用户注销
|
||||
noLoginRequired:`api/account/noLoginRequired`, //机房用户登录
|
||||
existNoLoginRequired:`/api/third/party/existNoLoginRequired`, //获取唯一标识是否存在
|
||||
|
||||
deleteNoLoginRequiredNew:`/api/third/party/deleteNoLoginRequiredNew`, //机房用户注销
|
||||
addNoLoginRequiredNew:`api/third/party/addNoLoginRequiredNew`, //机房用户注册
|
||||
|
||||
endpoint:`api/third/party/your-secured-endpoint`, //获取唯一标识是否存在
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<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('delete')">注销浏览器标识</div>
|
||||
</div>
|
||||
@@ -28,11 +29,13 @@ export default defineComponent({
|
||||
let userInfo: any = {};
|
||||
let status: any = ref(0);
|
||||
let voluntarily: any = ref(false);
|
||||
let setId: any = ref();
|
||||
return {
|
||||
collectionList,
|
||||
userInfo,
|
||||
status,
|
||||
voluntarily,
|
||||
setId,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -67,18 +70,31 @@ export default defineComponent({
|
||||
});
|
||||
})
|
||||
let data = {
|
||||
browserIdentifiers:murmur
|
||||
browserIdentifiers:murmur,
|
||||
id:this.setId
|
||||
}
|
||||
// console.log(data);
|
||||
// return
|
||||
|
||||
if(str == 'set'){
|
||||
Https.axiosPost(Https.httpUrls.addNoLoginRequired, data)
|
||||
// return
|
||||
Https.axiosPost(Https.httpUrls.addNoLoginRequiredNew, data)
|
||||
.then((rv) => {
|
||||
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');
|
||||
})
|
||||
.catch((res) => {
|
||||
});
|
||||
}else{
|
||||
Https.axiosPost(Https.httpUrls.deleteNoLoginRequired, data)
|
||||
Https.axiosPost(Https.httpUrls.deleteNoLoginRequiredNew, data)
|
||||
.then((rv) => {
|
||||
message.success('successfully delete');
|
||||
localStorage.removeItem('murmurStr')
|
||||
@@ -103,6 +119,7 @@ export default defineComponent({
|
||||
padding-left: 10px;
|
||||
border: 2px solid rgba(0, 0, 0, 0.2);
|
||||
border-radius: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.button {
|
||||
margin-top: 20px;
|
||||
|
||||
@@ -2,7 +2,6 @@ const {defineConfig} = require('@vue/cli-service')
|
||||
const path = require('path');
|
||||
const webpack = require('webpack')
|
||||
module.exports = defineConfig({
|
||||
|
||||
transpileDependencies: ['vuetify'],
|
||||
lintOnSave:false,//关闭语法检查
|
||||
productionSourceMap: false,//打包不生成map文件,减少文件大小
|
||||
@@ -38,7 +37,7 @@ module.exports = defineConfig({
|
||||
}
|
||||
}
|
||||
},
|
||||
https:true,
|
||||
// https:true,
|
||||
},
|
||||
pluginOptions: {
|
||||
"style-resources-loader": {
|
||||
|
||||
Reference in New Issue
Block a user