2023-02-28 01:16:49 +08:00
|
|
|
|
<!--
|
|
|
|
|
* @Author: Kane
|
|
|
|
|
* @Date: 2023-02-28 00:57:21
|
|
|
|
|
* @LastEditors: Kane
|
2023-02-28 09:30:02 +08:00
|
|
|
|
* @FilePath: /deskop_task_schedule/code/web/task_schedule/src/components/login/Login.vue
|
2023-02-28 01:16:49 +08:00
|
|
|
|
* @Description:
|
2023-02-28 19:58:03 +08:00
|
|
|
|
* 登录页面,路由默认指向这个页面
|
|
|
|
|
* 1、判断url中的参数,取得用户信息,根据用户的部门改变路由
|
2023-02-28 01:16:49 +08:00
|
|
|
|
*
|
|
|
|
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
2023-02-28 09:30:02 +08:00
|
|
|
|
<span>{{ ui.p13uid }}</span>
|
2023-02-28 18:48:14 +08:00
|
|
|
|
<br>
|
|
|
|
|
<span>存储的P13:{{ ui.savedP13uid }}
|
|
|
|
|
</span>
|
2023-02-28 01:16:49 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-02-28 09:30:02 +08:00
|
|
|
|
import { reactive } from "vue";
|
2023-02-28 18:48:14 +08:00
|
|
|
|
import { service as instance } from "@/utils/api/request";
|
|
|
|
|
|
|
|
|
|
const URL = "http://222.76.244.118:11001/admin-system/account/p13_account_check";
|
2023-02-28 09:30:02 +08:00
|
|
|
|
|
2023-02-28 01:16:49 +08:00
|
|
|
|
export default {
|
2023-02-28 09:30:02 +08:00
|
|
|
|
name: "LoginPage",
|
|
|
|
|
setup()
|
2023-02-28 01:16:49 +08:00
|
|
|
|
{
|
2023-02-28 09:30:02 +08:00
|
|
|
|
const ui = reactive({
|
|
|
|
|
p13uid: "",
|
2023-02-28 18:48:14 +08:00
|
|
|
|
savedP13uid: "",
|
2023-02-28 09:30:02 +08:00
|
|
|
|
});
|
|
|
|
|
|
2023-02-28 18:48:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const userInfo = {
|
|
|
|
|
p13account: "wangwei-202",
|
|
|
|
|
password: "Kane@1983",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
instance.request(
|
|
|
|
|
{
|
|
|
|
|
method: "post",
|
|
|
|
|
url: URL,
|
|
|
|
|
data: userInfo,
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
.then((response) =>
|
|
|
|
|
{
|
|
|
|
|
// debugger;
|
|
|
|
|
const data = response.data;
|
2023-02-28 09:30:02 +08:00
|
|
|
|
|
2023-02-28 18:48:14 +08:00
|
|
|
|
if (data.success === true)
|
|
|
|
|
{
|
|
|
|
|
ui.savedP13uid = data.staff_info;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((error) =>
|
|
|
|
|
{
|
|
|
|
|
ui.savedP13uid = error;
|
|
|
|
|
});
|
2023-02-28 01:16:49 +08:00
|
|
|
|
|
2023-02-28 19:58:03 +08:00
|
|
|
|
return { ui, };
|
2023-02-28 01:16:49 +08:00
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"></style>
|