编写登录用的api和后端代码

This commit is contained in:
Kane Wang 2023-02-28 19:58:03 +08:00
parent e49f4426f3
commit 1fa3b7cfdc
9 changed files with 78 additions and 20 deletions

View File

@ -2,9 +2,11 @@
* @Author: Kane * @Author: Kane
* @Date: 2023-02-15 09:25:52 * @Date: 2023-02-15 09:25:52
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2023-02-28 18:45:57 * @LastEditTime: 2023-02-28 19:05:15
* @FilePath: /deskop_task_schedule/code/web/task_schedule/src/App.vue * @FilePath: /deskop_task_schedule/code/web/task_schedule/src/App.vue
* @Description: * @Description:
* 应用的框架
* 1配置el-config-provider配置为中文
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
--> -->

View File

@ -0,0 +1,4 @@
$bg-color-01: #ba1800;
$bg-color-02: #f27620;
$bg-color-03: #fecb96;

View File

@ -2,7 +2,7 @@
* @Author: Kane * @Author: Kane
* @Date: 2023-02-15 09:25:52 * @Date: 2023-02-15 09:25:52
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2023-02-15 16:21:24 * @LastEditTime: 2023-02-28 19:14:16
* @FilePath: /task_schedule/src/main.js * @FilePath: /task_schedule/src/main.js
* @Description: * @Description:
* *
@ -19,7 +19,7 @@ import './style.css';
import("element-plus/dist/index.css"); import("element-plus/dist/index.css");
//element-plus //element-plus
import ElementPlus from "element-plus";; import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue"; import * as ElementPlusIconsVue from "@element-plus/icons-vue";
const app = createApp(App); const app = createApp(App);

View File

@ -2,7 +2,7 @@
* @Author: Kane * @Author: Kane
* @Date: 2023-02-28 01:22:48 * @Date: 2023-02-28 01:22:48
* @LastEditors: Kane * @LastEditors: Kane
* @FilePath: /deskop_task_schedule/code/web/task_schedule/src/router/index.js * @FilePath: /task_schedule/src/router/index.js
* @Description: * @Description:
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
@ -21,7 +21,13 @@ const routes = [
path: "/login", path: "/login",
name: "Login", name: "Login",
hidden: true, hidden: true,
component: () => import("@/components/login/login.vue"), component: () => import("@/views/Login.vue"),
},
{
path: "/public",
name: "Public",
hidden: true,
component: () => import("@/views/Public.vue"),
}, },
]; ];

View File

@ -0,0 +1,32 @@
/*
* @Author: Kane
* @Date: 2023-02-28 19:30:40
* @LastEditors: Kane
* @FilePath: /task_schedule/src/utils/api/account.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
/**
* url的参数拆分成对象
* @param url 访url
* @returns
*/
function getURL(url: string)
{
const arr = url.split('?');
const params = arr[1].split('&');
const obj = {};
for (let i = 0; i < params.length; i++)
{
const param = params[i].split('=');
obj[param[0]] = param[1];
}
return obj;
}
export { getURL };

View File

@ -4,12 +4,12 @@
* @LastEditors: Kane * @LastEditors: Kane
* @FilePath: /deskop_task_schedule/code/web/task_schedule/src/components/login/Login.vue * @FilePath: /deskop_task_schedule/code/web/task_schedule/src/components/login/Login.vue
* @Description: * @Description:
* 登录页面路由默认指向这个页面
* 1判断url中的参数取得用户信息根据用户的部门改变路由
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
--> -->
<template> <template>
<el-input v-model.lazy.trim="ui.p13uid"></el-input>
<el-button type="danger" @click="onSave">保存</el-button>
<span>{{ ui.p13uid }}</span> <span>{{ ui.p13uid }}</span>
<br> <br>
<span>存储的P13:{{ ui.savedP13uid }} <span>存储的P13:{{ ui.savedP13uid }}
@ -18,7 +18,6 @@
<script lang="ts"> <script lang="ts">
import { reactive } from "vue"; import { reactive } from "vue";
import { StuffInfo } from "@/data/cpicxim/StuffInfo";
import { service as instance } from "@/utils/api/request"; import { service as instance } from "@/utils/api/request";
const URL = "http://222.76.244.118:11001/admin-system/account/p13_account_check"; const URL = "http://222.76.244.118:11001/admin-system/account/p13_account_check";
@ -32,16 +31,7 @@ export default {
savedP13uid: "", savedP13uid: "",
}); });
const onSave = () =>
{
debugger;
const stuff = new StuffInfo();
//@ts-ignore
stuff.P13UID = ui.p13uid;
// saveStuffInfo(stuff);
};
const userInfo = { const userInfo = {
p13account: "wangwei-202", p13account: "wangwei-202",
@ -70,7 +60,7 @@ export default {
ui.savedP13uid = error; ui.savedP13uid = error;
}); });
return { ui, onSave, }; return { ui, };
}, },
}; };
</script> </script>

View File

@ -0,0 +1,24 @@
<!--
* @Author: Kane
* @Date: 2023-02-28 19:10:54
* @LastEditors: Kane
* @FilePath: /task_schedule/src/views/Public.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
公共页面
</template>
<script lang="ts">
export default {
name: "PublicPage",
setup()
{
},
};
</script>
<style lang="scss"></style>

View File

@ -2,7 +2,7 @@
* @Author: Kane * @Author: Kane
* @Date: 2023-02-15 09:25:52 * @Date: 2023-02-15 09:25:52
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2023-02-28 01:06:12 * @LastEditTime: 2023-02-28 19:22:19
* @FilePath: /task_schedule/vite.config.js * @FilePath: /task_schedule/vite.config.js
* @Description: * @Description:
* *
@ -14,7 +14,7 @@ import path from 'path';
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [vue()], plugins: [vue(),],
base: './', base: './',
resolve: { resolve: {
//配置别名 //配置别名

BIN
文档/界面/ui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB