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