修复device请求问题
This commit is contained in:
parent
3c22de6e2f
commit
dc76811e15
|
|
@ -39,7 +39,7 @@ export const addDeviceService = (data) => {
|
||||||
export const getDeviceListService = (data) => {
|
export const getDeviceListService = (data) => {
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
for (let d in data) {
|
for (let d in data) {
|
||||||
if(key == "token") continue;
|
if(d == "token") continue;
|
||||||
params.append(d, data[d]);
|
params.append(d, data[d]);
|
||||||
}
|
}
|
||||||
// request.headers["Content-Type"] = "application/json";
|
// request.headers["Content-Type"] = "application/json";
|
||||||
|
|
|
||||||
|
|
@ -69,16 +69,16 @@ const param = reactive({
|
||||||
password: defParam ? defParam.password : "",
|
password: defParam ? defParam.password : "",
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
// onMounted(async () => {
|
||||||
// 保存登录参数到本地存储
|
// // 保存登录参数到本地存储
|
||||||
let res = await getMyUserInfo(localStorage.getItem("userId"));
|
// let res = await getMyUserInfo(localStorage.getItem("userId"));
|
||||||
if(res.code === 0){
|
// if(res.code === 0){
|
||||||
// 如果已经登录,跳转到用户页面
|
// // 如果已经登录,跳转到用户页面
|
||||||
router.push("/user");
|
// router.push("/user");
|
||||||
}else{
|
// }else{
|
||||||
window.location.href = "https://sv.ljsea.top/#/login?site=gs-vp"; //https://sv.ljsea.top/
|
// window.location.href = "https://sv.ljsea.top/#/login?site=gs-vp"; //https://sv.ljsea.top/
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
const rules = {
|
const rules = {
|
||||||
|
|
@ -114,6 +114,7 @@ const onLogin = async () => {
|
||||||
|
|
||||||
loginData.value.username = param.username;
|
loginData.value.username = param.username;
|
||||||
loginData.value.password = param.password;
|
loginData.value.password = param.password;
|
||||||
|
loginData.value.fingerprint = "cc913e1ef0c3a6fd2a5e5b55a7063e46";
|
||||||
let result = await loginService(loginData);
|
let result = await loginService(loginData);
|
||||||
console.log("login result:", result);
|
console.log("login result:", result);
|
||||||
if (result.code !== 0) {
|
if (result.code !== 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue