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