Compare commits

..

No commits in common. "c96aad3b0dba37b9f9df76a77e7b8a4823c938ff" and "e16afd16967446677b262506373d26681418111d" have entirely different histories.

6 changed files with 24 additions and 94 deletions

View File

@ -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-23 19:47:33 * @LastEditTime: 2022-12-16 22:02:03
* @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;

View File

@ -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-23 17:42:47 * @LastEditTime: 2022-12-16 21:53:30
* @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,15 +80,12 @@ 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;
} }

View File

@ -1 +0,0 @@
VUE_APP_API_URL_LOGIN = "http://localhost:8080/admin-system/account/p13_account_check.do"

View File

@ -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,
};

View File

@ -2,25 +2,23 @@
* @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-23 17:26:37 * @LastEditTime: 2022-12-22 20:54:10
* @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: API_URL.URL_LOGIN, url: URL_LOGIN,
data: userInfo, userInfo,
} }
); );
} }

View File

@ -1,9 +1,8 @@
<!-- 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-23 18:18:09 * @LastEditTime: 2022-12-21 11:14:57
* @FilePath: \admin_system\src\views\account\Login.vue * @FilePath: \admin_system\src\views\account\Login.vue
* @Description: * @Description:
* *
@ -14,11 +13,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>
@ -43,9 +42,7 @@
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" class="el-button-block" @click="login">{{ current_menu === "login" ? "登录" : <el-button type="primary" class="el-button-block">立即创建</el-button>
"注册"
}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -53,79 +50,32 @@
</template> </template>
<script> <script>
import { Login } from "@/utils/api/info/account"; // import { ref } from "vue";
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;
} }