first commit + add fe component vue accone

This commit is contained in:
2026-05-07 17:10:10 +07:00
parent fd8e4d694b
commit 38a182641a
327 changed files with 263946 additions and 0 deletions

37
libs/one_auth.js Normal file
View File

@@ -0,0 +1,37 @@
function one_verif( url_redir ) {
let verif = async function (token) {
try {
var resp = await axios.post(BASE_URL + '/one-api/v2/verif/do',
{ token: token });
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
let x = async () => {
try {
let resp = await verif(window.one_token())
if (resp.status != "OK") {
window.localStorage.removeItem("token")
window.localStorage.removeItem("user")
} else {
location.replace(url_redir)
}
} catch (e) {
}
}
x()
// window.location = urllogout
}
window.one_verif = one_verif