修改菜单管理页面,角色管理页面,修改后台返回的路由数据适配项目

This commit is contained in:
2025-02-17 18:31:33 +08:00
parent 96290b97da
commit 964aab217d
9 changed files with 382 additions and 209 deletions

View File

@@ -1,7 +1,13 @@
<template>
<div class="login" :style="'background-image:url(' + Background + ');'">
<el-form ref="loginForm" :model="state.loginForm" :rules="state.loginRules" label-position="left" label-width="0px"
class="login-form">
<el-form
ref="loginForm"
:model="state.loginForm"
:rules="state.loginRules"
label-position="left"
label-width="0px"
class="login-form"
>
<h3 class="title">银收客后台管理</h3>
<el-form-item>
<el-radio-group v-model="state.loginForm.loginType">
@@ -10,19 +16,39 @@
</el-radio-group>
</el-form-item>
<el-form-item prop="merchantName" v-if="state.loginForm.loginType == 'staff'">
<el-input v-model="state.loginForm.merchantName" type="text" auto-complete="off" placeholder="商户号"></el-input>
<el-input
v-model="state.loginForm.merchantName"
type="text"
auto-complete="off"
placeholder="商户号"
></el-input>
</el-form-item>
<el-form-item prop="username">
<el-input v-model="state.loginForm.username" type="text" auto-complete="off" placeholder="账号"></el-input>
<el-input
v-model="state.loginForm.username"
type="text"
auto-complete="off"
placeholder="账号"
></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="state.loginForm.password" type="password" auto-complete="off" placeholder="密码"
@keyup.enter="handleLogin"></el-input>
<el-input
v-model="state.loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter="handleLogin"
></el-input>
</el-form-item>
<el-form-item prop="code">
<div class="code_wrap">
<el-input v-model="state.loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
@keyup.enter="handleLogin"></el-input>
<el-input
v-model="state.loginForm.code"
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter="handleLogin"
></el-input>
<div class="login-code">
<img :src="state.codeUrl" @click="getCode" />
</div>
@@ -30,8 +56,13 @@
</el-form-item>
<el-form-item style="width: 100%">
<el-button :loading="state.loading" size="default" type="primary" style="width: 100%"
@click.prevent="handleLogin">
<el-button
:loading="state.loading"
size="default"
type="primary"
style="width: 100%"
@click.prevent="handleLogin"
>
<span v-if="!state.loading"> </span>
<span v-else> 中...</span>
</el-button>
@@ -61,8 +92,8 @@ const state = reactive({
codeUrl: "",
cookiePass: "",
loginForm: {
username: "",
password: "",
username: "admin",
password: "12345",
// rememberMe: false,
code: "",
uuid: "",
@@ -152,7 +183,7 @@ function handleLogin() {
.then(async (res) => {
// await userStore.getUserInfo();
const { path, queryParams } = parseRedirect();
console.log(res, 'Denglv返回');
console.log(res, "Denglv返回");
router.push({ path: path, query: queryParams });
})
.catch(() => {