master
tangyi 2022-01-07 09:35:42 +08:00
commit afc0d2b1e7
20 changed files with 27944 additions and 0 deletions

23
.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

24
README.md Normal file
View File

@ -0,0 +1,24 @@
# hello-world
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
babel.config.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

27472
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

45
package.json Normal file
View File

@ -0,0 +1,45 @@
{
"name": "hello-world",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.24.0",
"core-js": "^3.6.5",
"vue": "^3.0.0",
"vue-axios": "^3.4.0",
"vue-router": "^4.0.12"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
public/index.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

20
src/App.vue Normal file
View File

@ -0,0 +1,20 @@
<template>
<router-view></router-view>
</template>
<script>
</script>
<style>
body{
margin: 0px;
}
p{
margin: 0px;
}
a{
text-decoration: none;
}
*{outline: none;}
</style>

BIN
src/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/assets/logoBer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

BIN
src/assets/name.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

BIN
src/assets/pwd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

BIN
src/assets/user.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

BIN
src/assets/xiangmu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

BIN
src/assets/zhanghu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

108
src/components/nav.vue Normal file
View File

@ -0,0 +1,108 @@
<template>
<div class="nav">
<div class="logo">
<img src="../assets/logo.png" alt="" />
<div>
<p>巴音孟克</p>
<p>火眼识才系统</p>
</div>
</div>
<div class="user">
<img src="" alt="" />
<p><span>用户名</span><span>Loretta</span></p>
</div>
<div class="navigation">
<router-link class="navigationList" to="/foo"
><img src="../assets/user.png" alt="" />
<p>用户管理</p>
</router-link>
<router-link class="navigationList" to="/foo"
><img src="../assets/xiangmu.png" alt="" />
<p>项目管理</p>
</router-link>
<div>
<div class="navigationList">
<img src="../assets/zhanghu.png" alt="" />
<p>账户管理</p>
<img src="" alt="">
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
msg: String,
},
};
</script>
<style scoped>
.nav {
width: 260px;
height: 100vh;
background: linear-gradient(126deg, #0d338a 0%, #0d338a 0%, #2884d3 100%);
border-radius: 0px 30px 30px 0px;
padding-top: 30px;
box-sizing: border-box;
}
.logo {
display: flex;
align-items: flex-end;
justify-content: center;
}
.logo div {
margin-left: 17px;
}
.logo div p {
font-size: 22px;
font-family: PangMenZhengDao;
color: #ffffff;
letter-spacing: 3px;
text-align: center;
}
.user {
width: 260px;
height: 50px;
margin-top: 40px;
display: flex;
align-items: center;
padding-left: 40px;
background: rgba(255, 255, 255, 0.15);
}
.user img {
width: 36px;
border-radius: 50%;
margin-right: 31px;
height: 36px;
}
.user p {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
}
.navigation {
margin-top: 58px;
}
.navigationList{
display: flex;
margin-bottom: 42px;
justify-content: center;
}
.navigationList p{
font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 25px;
margin-left: 20px;
}
</style>

14
src/main.js Normal file
View File

@ -0,0 +1,14 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from "./router/router.js"
import axios from 'axios'
import VueAxios from 'vue-axios'
let app=createApp(App)
app.use(router)
app.use(VueAxios,axios)
app.mount('#app')

27
src/router/router.js Normal file
View File

@ -0,0 +1,27 @@
// 引入vue-router
import {
createRouter,
createWebHistory
} from 'vue-router'
import login from '../view/login.vue'
import index from '../view/index.vue'
//配置路由
const router = createRouter({
history: createWebHistory(),
routes: [{
path: '/', //登录页
name: 'login',
component: login
},
{
path: '/index', //
name: 'index',
component: index
}
]
})
// 导出router
export default router;

27
src/view/index.vue Normal file
View File

@ -0,0 +1,27 @@
<template>
<div >
<NavLeft />
</div>
</template>
<script>
import NavLeft from "../components/nav.vue";
export default {
components: {
NavLeft,
},
props: {
msg: String,
},
data() {
return {};
},
methods: {},
};
</script>
<style scoped>
</style>

162
src/view/login.vue Normal file
View File

@ -0,0 +1,162 @@
<template>
<div class="login">
<div class="loginCon">
<div class="title">
<img class="logo" src="../assets/logo.png" alt="" />
<p>巴音孟克火眼识才系统</p>
</div>
<div class="input">
<div>
<label for="name"><img src="../assets/name.png" alt="" /></label>
<input type="text" id="name" placeholder="请输入用户名" />
</div>
<div>
<label for="pwd"><img src="../assets/pwd.png" alt="" /></label>
<input id="pwd" type="password" placeholder="请输入密码" />
</div>
</div>
<button class="btn" @click="login()" type="button">登录</button>
</div>
<div class="footer">
<p>版权所有©2021巴音孟克投资集团有限公司 保留所有权利</p>
<p>粤ICP备12345689号-8</p>
</div>
</div>
</template>
<script>
export default {
props: {
msg: String,
},
data() {
return {};
},
methods: {
login() {
this.axios
.post("/user", {
firstName: "Fred",
lastName: "Flintstone",
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
this.$router.push("/index");
},
},
};
</script>
<style scoped>
.login {
background-image: url("../assets/logoBer.png");
background-size: 100%;
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.loginCon {
width: 460px;
height: 400px;
background: linear-gradient(
138deg,
rgba(40, 132, 211, 0.7) 0%,
rgba(13, 51, 138, 0.7) 100%,
rgba(13, 51, 138, 0.7) 100%
);
border-radius: 6px;
padding-top: 35px;
text-align: center;
box-sizing: border-box;
}
.loginCon .title {
display: flex;
justify-content: center;
align-items: center;
}
.logo {
width: 55px;
height: 47px;
}
.loginCon .title p {
font-size: 22px;
font-family: STYuanti-SC-Regular, STYuanti-SC;
font-weight: 400;
margin-left: 12px;
color: #ffffff;
}
.input {
margin-top: 58px;
text-align: center;
}
.input input {
width: 350px;
height: 40px;
border-radius: 4px;
background-color: rgba(0, 0, 0, 0);
padding-left: 51px;
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 0.5);
}
.input input::placeholder {
font-size: 16px;
font-family: STYuanti-SC-Regular, STYuanti-SC;
font-weight: 400;
color: #dddde8;
letter-spacing: 2px;
}
.input > div {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 30px;
position: relative;
}
.input div label {
position: absolute;
left: 66px;
}
.input div img {
width: 100%;
}
.btn {
width: 200px;
height: 40px;
margin: auto;
background: #083c7e;
border: none;
border-radius: 4px;
font-size: 16px;
font-family: STYuanti-SC-Regular, STYuanti-SC;
font-weight: 400;
color: #dddde8;
}
.footer {
width: 100%;
height: 100px;
background: rgba(0, 15, 35, 0.8);
position: fixed;
bottom: 0px;
box-sizing: border-box;
padding-top: 10px;
left: 0px;
}
.footer p {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #d4d4d4;
line-height: 24px;
text-align: center;
}
</style>