修复device请求问题

This commit is contained in:
lijun 2025-10-16 20:13:42 +08:00
parent 3c22de6e2f
commit dc76811e15
2 changed files with 12 additions and 11 deletions

View File

@ -39,7 +39,7 @@ export const addDeviceService = (data) => {
export const getDeviceListService = (data) => {
const params = new URLSearchParams();
for (let d in data) {
if(key == "token") continue;
if(d == "token") continue;
params.append(d, data[d]);
}
// request.headers["Content-Type"] = "application/json";

View File

@ -69,16 +69,16 @@ const param = reactive({
password: defParam ? defParam.password : "",
});
onMounted(async () => {
//
let res = await getMyUserInfo(localStorage.getItem("userId"));
if(res.code === 0){
//
router.push("/user");
}else{
window.location.href = "https://sv.ljsea.top/#/login?site=gs-vp"; //https://sv.ljsea.top/
}
});
// onMounted(async () => {
// //
// let res = await getMyUserInfo(localStorage.getItem("userId"));
// if(res.code === 0){
// //
// router.push("/user");
// }else{
// window.location.href = "https://sv.ljsea.top/#/login?site=gs-vp"; //https://sv.ljsea.top/
// }
// });
//
const rules = {
@ -114,6 +114,7 @@ const onLogin = async () => {
loginData.value.username = param.username;
loginData.value.password = param.password;
loginData.value.fingerprint = "cc913e1ef0c3a6fd2a5e5b55a7063e46";
let result = await loginService(loginData);
console.log("login result:", result);
if (result.code !== 0) {