mirror of
https://gitee.com/XiaoLFeng/JSL_OrganizeInternalOA_Web.git
synced 2025-02-04 11:32:36 +08:00
测试1
This commit is contained in:
parent
ba97ff11fc
commit
4e7fed412b
|
@ -12,7 +12,7 @@
|
|||
</svg>
|
||||
用户名
|
||||
</label>
|
||||
<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>
|
||||
<input type="email" id="email" v-model="data.user" 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 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">
|
||||
|
@ -57,30 +57,31 @@ import axios from 'axios';
|
|||
import getCurrentTimestamp from '../public/methods.js';
|
||||
|
||||
const data = {
|
||||
userNum: '',
|
||||
user: '',
|
||||
password: ''
|
||||
}
|
||||
|
||||
function loginUser(){
|
||||
axios({
|
||||
url: "api/user/login",
|
||||
method: "post",
|
||||
data: {
|
||||
"userNum": data.userNum,
|
||||
"password": data.password
|
||||
},
|
||||
url: "http://nbxt.oa.x-lf.cn/auth/login",
|
||||
method: "get",
|
||||
data: data,
|
||||
headers: {
|
||||
'content-type': 'application/json;charset=utf-8',
|
||||
'Timestamp': getCurrentTimestamp()
|
||||
},
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.data.code === 200) {
|
||||
//登录成功,跳转页面+消息提示+存储登录用户的数据
|
||||
|
||||
} else {
|
||||
//登录失败,消息提示
|
||||
}
|
||||
|
||||
});
|
||||
console.log("data.userNum:"+data.user)
|
||||
console.log("data.password:"+data.password)
|
||||
}
|
||||
|
||||
</script>
|
|
@ -14,9 +14,7 @@ export default defineConfig({
|
|||
server: {
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "https://jsl-oa.x-lf.com", // 后端服务器的地址
|
||||
// target: "http://localhost:8080", // 后端服务器的地址
|
||||
changeOrigin: true,
|
||||
target: "http://nbxt.oa.x-lf.cn", // 后端服务器的地址
|
||||
rewrite: (path) => path.replace(/^\/api/, ""), // 将请求路径中的 '/api' 前缀移除
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user