Compare commits
3 Commits
e16afd1696
...
c96aad3b0d
Author | SHA1 | Date | |
---|---|---|---|
c96aad3b0d | |||
7e3af7a1e8 | |||
1eae5068fe |
@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-15 11:11:21
|
* @Date: 2022-12-15 11:11:21
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2022-12-16 22:02:03
|
* @LastEditTime: 2022-12-23 19:47:33
|
||||||
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckController.java
|
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckController.java
|
||||||
* @Description: P13账号验证用Controller。
|
* @Description: P13账号验证用Controller。
|
||||||
*
|
*
|
||||||
@ -98,7 +98,7 @@ public class P13AccountCheckController
|
|||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
result.setSuccess( false );
|
result.setSuccess( false );
|
||||||
result.setMessage( "验证失败,密码错误!" );
|
result.setMessage( "密码错误!" );
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-15 11:17:26
|
* @Date: 2022-12-15 11:17:26
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2022-12-16 21:53:30
|
* @LastEditTime: 2022-12-23 17:42:47
|
||||||
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckResult.java
|
* @FilePath: \AdminSys\src\main\java\com\cpic\xim\web\controllers\account\P13AccountCheckResult.java
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@ -80,12 +80,15 @@ public class P13AccountCheckResult
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 验证结果状态,true为成功,false为失败
|
||||||
@JsonProperty( "success")
|
@JsonProperty( "success")
|
||||||
private boolean success;
|
private boolean success;
|
||||||
|
|
||||||
|
// 验证结果消息字符串,用来提示前端。
|
||||||
@JsonProperty( "message")
|
@JsonProperty( "message")
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
|
// 验证成功后查询到的人员信息。
|
||||||
@JsonProperty( "staff_info")
|
@JsonProperty( "staff_info")
|
||||||
CpicXIMStaffInfo staffInfo;
|
CpicXIMStaffInfo staffInfo;
|
||||||
}
|
}
|
||||||
|
1
企业级管理系统/web/admin_system/.env.development
Normal file
1
企业级管理系统/web/admin_system/.env.development
Normal file
@ -0,0 +1 @@
|
|||||||
|
VUE_APP_API_URL_LOGIN = "http://localhost:8080/admin-system/account/p13_account_check.do"
|
14
企业级管理系统/web/admin_system/src/utils/api/config.js
Normal file
14
企业级管理系统/web/admin_system/src/utils/api/config.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2022-12-23 11:10:23
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2022-12-23 11:11:58
|
||||||
|
* @FilePath: \admin_system\src\utils\api\config.js
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const API_URL = {
|
||||||
|
URL_LOGIN: process.env.VUE_APP_API_URL_LOGIN,
|
||||||
|
};
|
@ -2,23 +2,25 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-22 09:10:20
|
* @Date: 2022-12-22 09:10:20
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2022-12-22 20:54:10
|
* @LastEditTime: 2022-12-23 17:26:37
|
||||||
* @FilePath: \admin_system\src\utils\api\info\account.js
|
* @FilePath: \admin_system\src\utils\api\info\account.js
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import instance from "@/utils/api/request";
|
import instance from "@/utils/api/request";
|
||||||
|
import { API_URL } from "@/utils/api/config"; //所有API的地址
|
||||||
const URL_LOGIN = "http://localhost:8000/admin-sys/";
|
|
||||||
|
|
||||||
export function Login(userInfo)
|
export function Login(userInfo)
|
||||||
{
|
{
|
||||||
|
//debugger;
|
||||||
|
console.log(API_URL.URL_LOGIN);
|
||||||
|
|
||||||
return instance.request(
|
return instance.request(
|
||||||
{
|
{
|
||||||
method: "post",
|
method: "post",
|
||||||
url: URL_LOGIN,
|
url: API_URL.URL_LOGIN,
|
||||||
userInfo,
|
data: userInfo,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
<!-- eslint-disable no-unused-vars -->
|
||||||
<!--
|
<!--
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:23:54
|
* @Date: 2022-12-14 15:23:54
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2022-12-21 11:14:57
|
* @LastEditTime: 2022-12-23 18:18:09
|
||||||
* @FilePath: \admin_system\src\views\account\Login.vue
|
* @FilePath: \admin_system\src\views\account\Login.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@ -13,11 +14,11 @@
|
|||||||
<div class="form-warp">
|
<div class="form-warp">
|
||||||
<ul class="menu-tab">
|
<ul class="menu-tab">
|
||||||
<li :class="{ 'current': current_menu === item.type }" @click="onToggleMenu(item.type)" v-for="item in tab_menu"
|
<li :class="{ 'current': current_menu === item.type }" @click="onToggleMenu(item.type)" v-for="item in tab_menu"
|
||||||
:key="item.type">{{ item.label
|
:key="item.type">{{ item.label }}
|
||||||
}}
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<el-form ref="form" :model="form">
|
<!-- <el-form ref="form" :model="form"> -->
|
||||||
|
<el-form ref="form">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<label class="form-label">用户名</label>
|
<label class="form-label">用户名</label>
|
||||||
<el-input type="text" v-model.lazy.trim="loginForm.username"></el-input>
|
<el-input type="text" v-model.lazy.trim="loginForm.username"></el-input>
|
||||||
@ -42,7 +43,9 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" class="el-button-block">立即创建</el-button>
|
<el-button type="primary" class="el-button-block" @click="login">{{ current_menu === "login" ? "登录" :
|
||||||
|
"注册"
|
||||||
|
}}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -50,32 +53,79 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import { ref } from "vue";
|
import { Login } from "@/utils/api/info/account";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "loginPage",
|
name: "loginPage",
|
||||||
data() {
|
data()
|
||||||
|
{
|
||||||
return {
|
return {
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "",
|
username: "",
|
||||||
password: "",
|
password: "",
|
||||||
confirm_password: "",
|
confirm_password: "",
|
||||||
|
validateCode: "",
|
||||||
},
|
},
|
||||||
tab_menu: [
|
tab_menu: [
|
||||||
{ type: "login", label: "登录" },
|
{ type: "login", label: "登录" },
|
||||||
{ type: "regiester", label: "注册" },
|
{ type: "regiester", label: "注册" },
|
||||||
],
|
],
|
||||||
current_menu: "",
|
current_menu: "",
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onToggleMenu(type) {
|
onToggleMenu(type)
|
||||||
|
{
|
||||||
this.current_menu = type;
|
this.current_menu = type;
|
||||||
|
console.log(process.env.VUE_APP_API_URL_LOGIN);
|
||||||
},
|
},
|
||||||
getValidateCode() {
|
getValidateCode()
|
||||||
console.log(this.$axios);
|
{
|
||||||
|
ElMessage({
|
||||||
|
message: "测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字",
|
||||||
|
center: true,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
login()
|
||||||
|
{
|
||||||
|
const userInfo = {
|
||||||
|
p13account: "588",
|
||||||
|
password: "Kane@19831",
|
||||||
|
};
|
||||||
|
|
||||||
|
Login(userInfo)
|
||||||
|
.then((response) =>
|
||||||
|
{
|
||||||
|
const data = response.data;
|
||||||
|
|
||||||
|
//判断是否成功,显示提示信息
|
||||||
|
if (data.success === true)
|
||||||
|
{
|
||||||
|
ElMessage({
|
||||||
|
message: data.message,
|
||||||
|
type: "success",
|
||||||
|
center: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ElMessage({
|
||||||
|
message: data.message,
|
||||||
|
type: "error",
|
||||||
|
center: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) =>
|
||||||
|
{
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created()
|
||||||
|
{
|
||||||
//初始化菜单选项
|
//初始化菜单选项
|
||||||
this.current_menu = this.tab_menu[0].type;
|
this.current_menu = this.tab_menu[0].type;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user