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

@@ -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;