登录注册

main
xy 3 weeks ago
parent 54664b5459
commit d2faa5f28f
  1. 17193
      package-lock.json
  2. 2
      package.json
  3. 143
      pnpm-lock.yaml
  4. BIN
      src/assets/images/login.png
  5. 37
      src/layout/index.vue
  6. 230
      src/layout/loginPage.vue
  7. 6
      src/router/index.ts

17193
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@kjgl77/datav-vue3": "^1.7.3",
"axios": "^1.7.2",
"element-plus": "^2.9.5",
@ -23,6 +24,7 @@
"devDependencies": {
"@types/node": "^20.14.9",
"@vitejs/plugin-vue": "^5.0.5",
"less": "^4.2.2",
"postcss": "^8.4.39",
"postcss-html": "^1.7.0",
"postcss-scss": "^4.0.9",

@ -44,7 +44,10 @@ importers:
version: 20.14.9
'@vitejs/plugin-vue':
specifier: ^5.0.5
version: 5.0.5(vite@5.3.1(@types/node@20.14.9)(sass@1.77.6))(vue@3.4.29(typescript@5.2.2))
version: 5.0.5(vite@5.3.1(@types/node@20.14.9)(less@4.2.2)(sass@1.77.6))(vue@3.4.29(typescript@5.2.2))
less:
specifier: ^4.2.2
version: 4.2.2
postcss:
specifier: ^8.4.39
version: 8.4.39
@ -62,7 +65,7 @@ importers:
version: 5.2.2
vite:
specifier: ^5.3.1
version: 5.3.1(@types/node@20.14.9)(sass@1.77.6)
version: 5.3.1(@types/node@20.14.9)(less@4.2.2)(sass@1.77.6)
vue-tsc:
specifier: ^2.0.21
version: 2.0.21(typescript@5.2.2)
@ -540,6 +543,9 @@ packages:
concat-map@0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
copy-anything@2.0.6:
resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==}
css@2.2.4:
resolution: {integrity: sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==}
@ -586,6 +592,10 @@ packages:
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
errno@0.1.8:
resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==}
hasBin: true
esbuild@0.21.5:
resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}
engines: {node: '>=12'}
@ -667,6 +677,15 @@ packages:
htmlparser2@8.0.2:
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
iconv-lite@0.6.3:
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
engines: {node: '>=0.10.0'}
image-size@0.5.5:
resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==}
engines: {node: '>=0.10.0'}
hasBin: true
immutable@4.3.6:
resolution: {integrity: sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==}
@ -693,6 +712,9 @@ packages:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
is-what@3.14.1:
resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
js-base64@2.6.4:
resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==}
@ -706,6 +728,11 @@ packages:
jsonfile@2.4.0:
resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==}
less@4.2.2:
resolution: {integrity: sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==}
engines: {node: '>=6'}
hasBin: true
lib-flexible@0.3.2:
resolution: {integrity: sha512-9yowMWA70tKhKdCJDaltY0mNQG4OWo7pWKScnTp9aiSxS7s20ZYlwBRE3335nweOf5qKXVC7sDxJwMPM8/MFZg==}
@ -729,6 +756,10 @@ packages:
magic-string@0.30.10:
resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==}
make-dir@2.1.0:
resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==}
engines: {node: '>=6'}
memoize-one@6.0.0:
resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
@ -740,6 +771,11 @@ packages:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
mime@1.6.0:
resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==}
engines: {node: '>=4'}
hasBin: true
minimatch@3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
@ -759,6 +795,11 @@ packages:
resolution: {integrity: sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==}
deprecated: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
needle@3.3.1:
resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==}
engines: {node: '>= 4.4.x'}
hasBin: true
neo-async@2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
@ -772,6 +813,10 @@ packages:
once@1.4.0:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
parse-node-version@1.0.1:
resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==}
engines: {node: '>= 0.10'}
path-browserify@1.0.1:
resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}
@ -786,6 +831,10 @@ packages:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'}
pify@4.0.1:
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
engines: {node: '>=6'}
pinia@2.1.7:
resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==}
peerDependencies:
@ -828,6 +877,9 @@ packages:
proxy-from-env@1.1.0:
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
prr@1.0.1:
resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==}
px2rem-loader@0.1.9:
resolution: {integrity: sha512-3Ew8At5W/HHIIUe/KZk+FBRRb20KtgP1N1c/BnMlXk6LNkqrFmUIUF35GF/evzNdj/Q63iWJpkmn/c5qSMplRg==}
@ -856,6 +908,9 @@ packages:
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
safer-buffer@2.1.2:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
sass-loader@14.2.1:
resolution: {integrity: sha512-G0VcnMYU18a4N7VoNDegg2OuMjYtxnqzQWARVWCIVSZwJeiL9kg8QMsuIZOplsJgTzZLF6jGxI3AClj8I9nRdQ==}
engines: {node: '>= 18.12.0'}
@ -882,6 +937,13 @@ packages:
engines: {node: '>=14.0.0'}
hasBin: true
sax@1.4.1:
resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
semver@5.7.2:
resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==}
hasBin: true
semver@7.6.2:
resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==}
engines: {node: '>=10'}
@ -937,6 +999,9 @@ packages:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
tslib@2.8.1:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
typescript@5.2.2:
resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==}
engines: {node: '>=14.17'}
@ -1222,9 +1287,9 @@ snapshots:
'@types/web-bluetooth@0.0.20': {}
'@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.9)(sass@1.77.6))(vue@3.4.29(typescript@5.2.2))':
'@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.9)(less@4.2.2)(sass@1.77.6))(vue@3.4.29(typescript@5.2.2))':
dependencies:
vite: 5.3.1(@types/node@20.14.9)(sass@1.77.6)
vite: 5.3.1(@types/node@20.14.9)(less@4.2.2)(sass@1.77.6)
vue: 3.4.29(typescript@5.2.2)
'@volar/language-core@2.3.4':
@ -1444,6 +1509,10 @@ snapshots:
concat-map@0.0.1: {}
copy-anything@2.0.6:
dependencies:
is-what: 3.14.1
css@2.2.4:
dependencies:
inherits: 2.0.4
@ -1504,6 +1573,11 @@ snapshots:
entities@4.5.0: {}
errno@0.1.8:
dependencies:
prr: 1.0.1
optional: true
esbuild@0.21.5:
optionalDependencies:
'@esbuild/aix-ppc64': 0.21.5
@ -1600,6 +1674,14 @@ snapshots:
domutils: 3.1.0
entities: 4.5.0
iconv-lite@0.6.3:
dependencies:
safer-buffer: 2.1.2
optional: true
image-size@0.5.5:
optional: true
immutable@4.3.6: {}
inflight@1.0.6:
@ -1621,6 +1703,8 @@ snapshots:
is-number@7.0.0: {}
is-what@3.14.1: {}
js-base64@2.6.4: {}
js-tokens@9.0.0: {}
@ -1633,6 +1717,20 @@ snapshots:
optionalDependencies:
graceful-fs: 4.2.11
less@4.2.2:
dependencies:
copy-anything: 2.0.6
parse-node-version: 1.0.1
tslib: 2.8.1
optionalDependencies:
errno: 0.1.8
graceful-fs: 4.2.11
image-size: 0.5.5
make-dir: 2.1.0
mime: 1.6.0
needle: 3.3.1
source-map: 0.6.1
lib-flexible@0.3.2: {}
loader-utils@1.4.2:
@ -1655,6 +1753,12 @@ snapshots:
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
make-dir@2.1.0:
dependencies:
pify: 4.0.1
semver: 5.7.2
optional: true
memoize-one@6.0.0: {}
mime-db@1.52.0: {}
@ -1663,6 +1767,9 @@ snapshots:
dependencies:
mime-db: 1.52.0
mime@1.6.0:
optional: true
minimatch@3.1.2:
dependencies:
brace-expansion: 1.1.11
@ -1677,6 +1784,12 @@ snapshots:
natives@1.1.6: {}
needle@3.3.1:
dependencies:
iconv-lite: 0.6.3
sax: 1.4.1
optional: true
neo-async@2.6.2: {}
normalize-path@3.0.0: {}
@ -1687,6 +1800,8 @@ snapshots:
dependencies:
wrappy: 1.0.2
parse-node-version@1.0.1: {}
path-browserify@1.0.1: {}
path-is-absolute@1.0.1: {}
@ -1695,6 +1810,9 @@ snapshots:
picomatch@2.3.1: {}
pify@4.0.1:
optional: true
pinia@2.1.7(typescript@5.2.2)(vue@3.4.29(typescript@5.2.2)):
dependencies:
'@vue/devtools-api': 6.6.3
@ -1737,6 +1855,9 @@ snapshots:
proxy-from-env@1.1.0: {}
prr@1.0.1:
optional: true
px2rem-loader@0.1.9:
dependencies:
loader-utils: 1.4.2
@ -1784,6 +1905,9 @@ snapshots:
'@rollup/rollup-win32-x64-msvc': 4.18.0
fsevents: 2.3.3
safer-buffer@2.1.2:
optional: true
sass-loader@14.2.1(sass@1.77.6):
dependencies:
neo-async: 2.6.2
@ -1796,6 +1920,12 @@ snapshots:
immutable: 4.3.6
source-map-js: 1.2.0
sax@1.4.1:
optional: true
semver@5.7.2:
optional: true
semver@7.6.2: {}
source-map-js@1.2.0: {}
@ -1836,13 +1966,15 @@ snapshots:
dependencies:
is-number: 7.0.0
tslib@2.8.1: {}
typescript@5.2.2: {}
undici-types@5.26.5: {}
urix@0.1.0: {}
vite@5.3.1(@types/node@20.14.9)(sass@1.77.6):
vite@5.3.1(@types/node@20.14.9)(less@4.2.2)(sass@1.77.6):
dependencies:
esbuild: 0.21.5
postcss: 8.4.39
@ -1850,6 +1982,7 @@ snapshots:
optionalDependencies:
'@types/node': 20.14.9
fsevents: 2.3.3
less: 4.2.2
sass: 1.77.6
vscode-uri@3.0.8: {}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

@ -1,10 +1,13 @@
<template>
<div class="container-bgc">
<div class="top">
<div class="loginBtn">
<p @click="loginFn">登录/注册</p>
</div>
<div class="title">{{ setting.title }}</div>
</div>
<router-view v-slot="{ Component }">
<keep-alive >
<keep-alive>
<component :is="Component"></component>
</keep-alive>
</router-view>
@ -14,10 +17,15 @@
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
const router = useRouter()
// import { onMounted, reactive, ref, toRefs, watch } from "vue";
import settingStore from "@/store/modules/setting";
const setting = settingStore();
console.log(setting.title);
const loginFn=()=>{
router.push('/login')
}
</script>
<style lang="scss" scoped>
@ -28,7 +36,7 @@ console.log(setting.title);
min-height: 100vh;
background-color: #091d22;
background: url("../assets//images/bg2.png") no-repeat;
background-size: cover ;
background-size: cover;
.top {
width: 100%;
@ -40,9 +48,34 @@ console.log(setting.title);
background: url("../assets/images/topbgc.png") no-repeat;
// background-position: center bottom -10px;
background-size: cover;
.title {
color: #fff;
}
.loginBtn {
position: absolute;
/* 清除浮动影响 */
float: left;
/* 向左浮动 */
top: 10px;
left: 230px;
border: 1px solid #33FEFE;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
width: 142px;
height: 40px;
line-height: 37px;
background: linear-gradient(to bottom, #08B9C1, #0758B8);
transform: skew(-30deg);
/* 在X轴方向倾斜 -35 度 */
border-radius: 5%;
p{
transform: skew(30deg);
/* 反向倾斜,抵消父元素的变形 */
font-size: 18px;
color: #fff;
}
}
}
}

@ -0,0 +1,230 @@
<template>
<div class="login_container">
<div class="top">
<div class="title">{{ setting.title }}</div>
</div>
<div class="main-content">
<el-row style="display: flex; justify-content: center;">
<el-col>
<el-form :rules="rules" :model="formModel" ref="formRef" size="large" autocomplete="off"
v-if="isRegister">
<el-form-item prop="username">
<el-input v-model="formModel.username" :prefix-icon="User" placeholder="请输入账号"></el-input>
</el-form-item>
<el-form-item prop="studentNumb">
<el-input v-model="formModel.studentNumb" :prefix-icon="Avatar"
placeholder="请输入学号"></el-input>
</el-form-item>
<el-form-item prop="name">
<el-input v-model="formModel.name" :prefix-icon="Stamp" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="formModel.password" :prefix-icon="Lock" type="password"
placeholder="请输入密码"></el-input>
</el-form-item>
<el-form-item prop="repassword">
<el-input v-model="formModel.repassword" :prefix-icon="Lock" type="password"
placeholder="请输入再次密码"></el-input>
</el-form-item>
<el-form-item>
<el-button style="color: #3ad7e2; background-color: #0e2e5e; width: 150px;" class="button"
type="primary" auto-insert-space @click="register">
注册
</el-button>
<el-button style="color: #3ad7e2;background-color: #0e2e5e;width: 150px;" class="button"
type="primary" auto-insert-space @click="isRegister = false">
返回到登录页
</el-button>
</el-form-item>
<el-form-item>
</el-form-item>
<!-- <el-form-item class="flex">
<el-link type="info" :underline="false" @click="isRegister = false">
返回
</el-link>
</el-form-item> -->
</el-form>
<el-form :model="formModel" :rules="rules" ref="formRef" size="large" autocomplete="off" v-else
class="custom-form">
<el-form-item prop="username">
<div style="display: flex;align-items: center;color: pink; ">
<div class="left" style="display: flex;align-items: center;">
<div style="padding-right: 10px;color: #1084c1;"><el-icon class="bold-icon">
<user />
</el-icon></div>
<div style="padding-right: 10px; color: #2592a1;">用户名</div>
</div>
<div class="right">
<el-input v-model="formModel.username"
style="border-color: #20bec8; background-color: pink;"
placeholder="请输入用户名"></el-input>
</div>
</div>
</el-form-item>
<el-form-item label="学号" prop="studentNumb">
<el-input v-model="formModel.studentNumb" :prefix-icon="Avatar" placeholder="请输入学号"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input name="password" :prefix-icon="Lock" type="password"
placeholder="请输入密码" v-model="formModel.password"></el-input>
</el-form-item>
<el-form-item>
<el-button class="hexagon-button" type="primary" auto-insert-space>登录</el-button>
<el-button class="hexagon-button" type="primary" auto-insert-space
@click="isRegister = true">去注册</el-button>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12" :xs="0"></el-col>
</el-row>
</div>
</div>
</template>
<script setup lang="ts">
// import { ref } from "vue"
// import { onMounted, reactive, ref, toRefs, watch } from "vue";
import settingStore from "@/store/modules/setting";
import { User, Lock, Avatar, Stamp } from '@element-plus/icons-vue'
const setting = settingStore();
console.log(setting.title);
import { ref } from 'vue'
const isRegister = ref(false)
const formRef=ref()
const formModel = ref({
username: '',
studentNumb: '',
name: '',
password: '',
repassword: ''
})
//
const rules = {
username: [
{ required: true, message: '请输入用户名', trigger: 'blur' },
{ min: 5, max: 30, message: '用户名长度最小五位最大三十位', trigger: ['change', 'blur'] }
],
studentNumb:[
{ required: true, message: '请输入学号', trigger: 'blur' },
{ min: 5, max: 11, message: '学号长度最小五位最大三十位', trigger: ['change', 'blur'] }
],
name: [
{ required: true, message: '请输入姓名', trigger: 'blur' },
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{
pattern: /^\S{6,15}$/,
message: '密码长度最小六位最大十五位',
trigger: ['change', 'blur']
}
],
repassword: [
{ required: true, message: '请再次输入密码', trigger: 'blur' },
{
max: 15,
min: 6,
pattern: /^\S{6,15}$/,
message: '密码长度最小六位最大十五位',
trigger: ['change', 'blur']
},
{
validator: (rule, value, callback) => {
if (value !== formModel.value.password) {
callback(new Error('两次输入密码不一致!'))
} else {
callback()
}
},
trigger: 'blur'
}
],
}
const register=async()=>{
await formRef.value.validate()
console.log('开始注册i请求');
}
// import { useRouter } from 'vue-router'
// const router = useRouter()
// const goToPage=()=>{
// router.push('/')
// }
</script>
<style lang="less" scoped>
.login_container {
position: relative;
width: 100%;
// height: 1080px;
min-height: 100vh;
background-color: #091d22;
background: url("../assets//images/bg2.png") no-repeat;
background-size: cover;
.top {
width: 100%;
// height: 75px;
text-align: center;
font-size: 42px;
line-height: 75px;
font-style: italic;
background: url("../assets/images/topbgc.png") no-repeat;
// background-position: center bottom -10px;
background-size: cover;
.title {
color: #fff;
}
}
.main-content {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background: url("../assets/images/login.png") no-repeat;
background-position: center;
}
}
.hexagon-button {
margin-top: 30px;
/* 应用clip-path属性来创建六边形形状 */
width: 180px;
height: 50px;
/* 使用clip-path定义按钮形状 */
clip-path: polygon(15% 0, 85% 0, 100% 50%, 85% 100%, 15% 100%, 0 50%);
/* 模拟边框效果 */
box-shadow: 0 0 0 2px cyan;
background-color: #14213d;
color: #3ad7e2;
background-color: #0e2e5e;
font-size: 18px;
}
// .custom-form .el-form-item__label {
// color: #409eff;
// /* */
// font-size: 14px;
// font-weight: bold;
// }
// .bold-icon svg {
// stroke-width: 9;
// /* */
// }
.el-form-item__label{
color: #0e2e5e;
}
</style>

@ -13,6 +13,12 @@ const routerList :any = [
]
},
{
path: '/login',
name: 'Login',
component: () => import('@/layout/loginPage.vue')
}
];
const router :any = createRouter({
history: createWebHashHistory(),

Loading…
Cancel
Save