编写登录用的api和后端代码
This commit is contained in:
parent
e49f4426f3
commit
1fa3b7cfdc
@ -2,9 +2,11 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-15 09:25:52
|
||||
* @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
|
||||
* @Description:
|
||||
* 应用的框架:
|
||||
* 1、配置el-config-provider,配置为中文。
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
|
4
code/web/task_schedule/src/css/public/color.scss
Normal file
4
code/web/task_schedule/src/css/public/color.scss
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
$bg-color-01: #ba1800;
|
||||
$bg-color-02: #f27620;
|
||||
$bg-color-03: #fecb96;
|
@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-15 09:25:52
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-02-15 16:21:24
|
||||
* @LastEditTime: 2023-02-28 19:14:16
|
||||
* @FilePath: /task_schedule/src/main.js
|
||||
* @Description:
|
||||
*
|
||||
@ -19,7 +19,7 @@ import './style.css';
|
||||
import("element-plus/dist/index.css");
|
||||
|
||||
//element-plus
|
||||
import ElementPlus from "element-plus";;
|
||||
import ElementPlus from "element-plus";
|
||||
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
|
||||
|
||||
const app = createApp(App);
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-28 01:22:48
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /deskop_task_schedule/code/web/task_schedule/src/router/index.js
|
||||
* @FilePath: /task_schedule/src/router/index.js
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
@ -21,7 +21,13 @@ const routes = [
|
||||
path: "/login",
|
||||
name: "Login",
|
||||
hidden: true,
|
||||
component: () => import("@/components/login/login.vue"),
|
||||
component: () => import("@/views/Login.vue"),
|
||||
},
|
||||
{
|
||||
path: "/public",
|
||||
name: "Public",
|
||||
hidden: true,
|
||||
component: () => import("@/views/Public.vue"),
|
||||
},
|
||||
];
|
||||
|
||||
|
32
code/web/task_schedule/src/utils/api/url.ts
Normal file
32
code/web/task_schedule/src/utils/api/url.ts
Normal 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 };
|
@ -4,12 +4,12 @@
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /deskop_task_schedule/code/web/task_schedule/src/components/login/Login.vue
|
||||
* @Description:
|
||||
* 登录页面,路由默认指向这个页面
|
||||
* 1、判断url中的参数,取得用户信息,根据用户的部门改变路由
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<el-input v-model.lazy.trim="ui.p13uid"></el-input>
|
||||
<el-button type="danger" @click="onSave">保存</el-button>
|
||||
<span>{{ ui.p13uid }}</span>
|
||||
<br>
|
||||
<span>存储的P13:{{ ui.savedP13uid }}
|
||||
@ -18,7 +18,6 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { reactive } from "vue";
|
||||
import { StuffInfo } from "@/data/cpicxim/StuffInfo";
|
||||
import { service as instance } from "@/utils/api/request";
|
||||
|
||||
const URL = "http://222.76.244.118:11001/admin-system/account/p13_account_check";
|
||||
@ -32,16 +31,7 @@ export default {
|
||||
savedP13uid: "",
|
||||
});
|
||||
|
||||
const onSave = () =>
|
||||
{
|
||||
debugger;
|
||||
const stuff = new StuffInfo();
|
||||
|
||||
//@ts-ignore
|
||||
stuff.P13UID = ui.p13uid;
|
||||
|
||||
// saveStuffInfo(stuff);
|
||||
};
|
||||
|
||||
const userInfo = {
|
||||
p13account: "wangwei-202",
|
||||
@ -70,7 +60,7 @@ export default {
|
||||
ui.savedP13uid = error;
|
||||
});
|
||||
|
||||
return { ui, onSave, };
|
||||
return { ui, };
|
||||
},
|
||||
};
|
||||
</script>
|
24
code/web/task_schedule/src/views/Public.vue
Normal file
24
code/web/task_schedule/src/views/Public.vue
Normal 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>
|
@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-15 09:25:52
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-02-28 01:06:12
|
||||
* @LastEditTime: 2023-02-28 19:22:19
|
||||
* @FilePath: /task_schedule/vite.config.js
|
||||
* @Description:
|
||||
*
|
||||
@ -14,7 +14,7 @@ import path from 'path';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
plugins: [vue(),],
|
||||
base: './',
|
||||
resolve: {
|
||||
//配置别名
|
||||
|
BIN
文档/界面/ui.png
Normal file
BIN
文档/界面/ui.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
Loading…
x
Reference in New Issue
Block a user