mirror of
https://gitee.com/XiaoLFeng/JSL_OrganizeInternalOA_Web.git
synced 2025-06-08 11:43:04 +08:00
登录和注册请求的完善
This commit is contained in:
parent
e974a231dd
commit
cef88b13e2
95
node_modules/yaml/package.json
generated
vendored
Normal file
95
node_modules/yaml/package.json
generated
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
{
|
||||||
|
"name": "yaml",
|
||||||
|
"version": "2.3.4",
|
||||||
|
"license": "ISC",
|
||||||
|
"author": "Eemeli Aro <eemeli@gmail.com>",
|
||||||
|
"repository": "github:eemeli/yaml",
|
||||||
|
"description": "JavaScript parser and stringifier for YAML",
|
||||||
|
"keywords": [
|
||||||
|
"YAML",
|
||||||
|
"parser",
|
||||||
|
"stringifier"
|
||||||
|
],
|
||||||
|
"homepage": "https://eemeli.org/yaml/",
|
||||||
|
"files": [
|
||||||
|
"browser/",
|
||||||
|
"dist/",
|
||||||
|
"util.js"
|
||||||
|
],
|
||||||
|
"type": "commonjs",
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"browser": {
|
||||||
|
"./dist/index.js": "./browser/index.js",
|
||||||
|
"./dist/util.js": "./browser/dist/util.js",
|
||||||
|
"./util.js": "./browser/dist/util.js"
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"node": "./dist/index.js",
|
||||||
|
"default": "./browser/index.js"
|
||||||
|
},
|
||||||
|
"./package.json": "./package.json",
|
||||||
|
"./util": {
|
||||||
|
"types": "./dist/util.d.ts",
|
||||||
|
"node": "./dist/util.js",
|
||||||
|
"default": "./browser/dist/util.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "npm run build:node && npm run build:browser",
|
||||||
|
"build:browser": "rollup -c config/rollup.browser-config.mjs",
|
||||||
|
"build:node": "rollup -c config/rollup.node-config.mjs",
|
||||||
|
"clean": "git clean -fdxe node_modules",
|
||||||
|
"lint": "eslint src/",
|
||||||
|
"prettier": "prettier --write .",
|
||||||
|
"prestart": "npm run build:node",
|
||||||
|
"start": "node -i -e 'YAML=require(\"./dist/index.js\")'",
|
||||||
|
"test": "jest --config config/jest.config.js",
|
||||||
|
"test:all": "npm test && npm run test:types && npm run test:dist && npm run test:dist:types",
|
||||||
|
"test:browsers": "cd playground && npm test",
|
||||||
|
"test:dist": "npm run build:node && jest --config config/jest.config.js",
|
||||||
|
"test:dist:types": "tsc --allowJs --moduleResolution node --noEmit --target es5 dist/index.js",
|
||||||
|
"test:types": "tsc --noEmit && tsc --noEmit -p tests/tsconfig.json",
|
||||||
|
"docs:install": "cd docs-slate && bundle install",
|
||||||
|
"docs:deploy": "cd docs-slate && ./deploy.sh",
|
||||||
|
"docs": "cd docs-slate && bundle exec middleman server",
|
||||||
|
"preversion": "npm test && npm run build",
|
||||||
|
"prepublishOnly": "npm run clean && npm test && npm run build"
|
||||||
|
},
|
||||||
|
"browserslist": "defaults, not ie 11",
|
||||||
|
"prettier": {
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "none"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.12.10",
|
||||||
|
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
|
||||||
|
"@babel/plugin-transform-typescript": "^7.12.17",
|
||||||
|
"@babel/preset-env": "^7.12.11",
|
||||||
|
"@rollup/plugin-babel": "^6.0.3",
|
||||||
|
"@rollup/plugin-replace": "^5.0.2",
|
||||||
|
"@rollup/plugin-typescript": "^11.0.0",
|
||||||
|
"@types/jest": "^29.2.4",
|
||||||
|
"@types/node": "^14.18.35",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
||||||
|
"@typescript-eslint/parser": "^6.4.1",
|
||||||
|
"babel-jest": "^29.0.1",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"eslint": "^8.2.0",
|
||||||
|
"eslint-config-prettier": "^9.0.0",
|
||||||
|
"fast-check": "^2.12.0",
|
||||||
|
"jest": "^29.0.1",
|
||||||
|
"jest-ts-webcompat-resolver": "^1.0.0",
|
||||||
|
"prettier": "^3.0.2",
|
||||||
|
"rollup": "^3.7.5",
|
||||||
|
"tslib": "^2.1.0",
|
||||||
|
"typescript": "^5.0.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 14"
|
||||||
|
}
|
||||||
|
}
|
@ -12,7 +12,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
用户名
|
用户名
|
||||||
</label>
|
</label>
|
||||||
<input type="email" id="email" class="mt-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
|
<input type="email" id="email" v-model="data.userNum" class="mt-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<label for="password" class="flex items-center space-x-4 mb-2 text-sm font-medium text-gray-900 dark:text-white">
|
<label for="password" class="flex items-center space-x-4 mb-2 text-sm font-medium text-gray-900 dark:text-white">
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
密码
|
密码
|
||||||
</label>
|
</label>
|
||||||
<input type="password" id="password" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
|
<input type="password" v-model="data.password" id="password" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-start mb-5">
|
<div class="flex items-start mb-5">
|
||||||
<div class="flex items-center h-5">
|
<div class="flex items-center h-5">
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<label for="remember" class="ms-2 text-sm font-medium text-gray-900 dark:text-gray-300">记住我</label>
|
<label for="remember" class="ms-2 text-sm font-medium text-gray-900 dark:text-gray-300">记住我</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col ">
|
<div class="flex flex-col ">
|
||||||
<a href="/success" class="text-white bg-sky-500 hover:bg-sky-700 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-32 sm:w-auto mt-2 mb-3 mx-8 px-10 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">登录</a>
|
<a @click="loginUser" class="text-white bg-sky-500 hover:bg-sky-700 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-32 sm:w-auto mt-2 mb-3 mx-8 px-10 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">登录</a>
|
||||||
<div class="flex space-x-2 ml-24">
|
<div class="flex space-x-2 ml-24">
|
||||||
<a href="" class="text-blue-500 font-medium rounded-lg text-sm sm:w-auto text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">忘记密码? |</a>
|
<a href="" class="text-blue-500 font-medium rounded-lg text-sm sm:w-auto text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">忘记密码? |</a>
|
||||||
<a href="/register" class="text-blue-500 font-medium rounded-lg text-sm sm:w-auto text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">注册 |</a>
|
<a href="/register" class="text-blue-500 font-medium rounded-lg text-sm sm:w-auto text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">注册 |</a>
|
||||||
@ -53,5 +53,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
userNum: '',
|
||||||
|
password: ''
|
||||||
|
}
|
||||||
|
|
||||||
|
function loginUser(){
|
||||||
|
axios({
|
||||||
|
url: "api/user/login",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
"userNum": data.userNum,
|
||||||
|
"password": data.password
|
||||||
|
},
|
||||||
|
Headers: {
|
||||||
|
'content-type': 'application/json;charset=utf-8',
|
||||||
|
'Timestamp':''
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user