Merge pull request !23 from 覃杰/auto-8533815-develop-1629448176303
This commit is contained in:
覃杰 2021-08-20 08:39:41 +00:00 committed by Gitee
commit 7c1b325b3f
3 changed files with 134 additions and 57 deletions

108
public/index.html vendored
View File

@ -1,28 +1,127 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-cmn-Hans"> <html lang="zh-cmn-Hans">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>logo.png"> <link rel="icon" href="<%= BASE_URL %>logo.png">
<title>Ant Design Pro</title> <title>Ant Design Pro</title>
<style>.first-loading-wrp{display:flex;justify-content:center;align-items:center;flex-direction:column;min-height:420px;height:100%}.first-loading-wrp>h1{font-size:128px}.first-loading-wrp .loading-wrp{padding:98px;display:flex;justify-content:center;align-items:center}.dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:32px;width:32px;height:32px;box-sizing:border-box}.dot i{width:14px;height:14px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.dot i:nth-child(1){top:0;left:0}.dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style> <style>
.first-loading-wrp {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
min-height: 420px;
height: 100%
}
.first-loading-wrp>h1 {
font-size: 128px
}
.first-loading-wrp .loading-wrp {
padding: 98px;
display: flex;
justify-content: center;
align-items: center
}
.dot {
animation: antRotate 1.2s infinite linear;
transform: rotate(45deg);
position: relative;
display: inline-block;
font-size: 32px;
width: 32px;
height: 32px;
box-sizing: border-box
}
.dot i {
width: 14px;
height: 14px;
position: absolute;
display: block;
background-color: #1890ff;
border-radius: 100%;
transform: scale(.75);
transform-origin: 50% 50%;
opacity: .3;
animation: antSpinMove 1s infinite linear alternate
}
.dot i:nth-child(1) {
top: 0;
left: 0
}
.dot i:nth-child(2) {
top: 0;
right: 0;
-webkit-animation-delay: .4s;
animation-delay: .4s
}
.dot i:nth-child(3) {
right: 0;
bottom: 0;
-webkit-animation-delay: .8s;
animation-delay: .8s
}
.dot i:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s
}
@keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg)
}
}
@-webkit-keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg)
}
}
@keyframes antSpinMove {
to {
opacity: 1
}
}
@-webkit-keyframes antSpinMove {
to {
opacity: 1
}
}
</style>
<!-- require cdn assets css --> <!-- require cdn assets css -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" /> <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
<% } %> <% } %>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript> </noscript>
<div id="app"> <div id="app">
<div class="first-loading-wrp"> <div class="first-loading-wrp">
<h1>Pro</h1> <!-- <h1>Pro</h1> -->
<div class="loading-wrp"> <div class="loading-wrp">
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span> <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
</div> </div>
<div style="display: flex; justify-content: center; align-items: center;">Ant Design</div> <!-- <div style="display: flex; justify-content: center; align-items: center;">Ant Design</div> -->
</div> </div>
</div> </div>
<!-- require cdn assets js --> <!-- require cdn assets js -->
@ -31,4 +130,5 @@
<% } %> <% } %>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html> </html>

View File

@ -1,57 +1,31 @@
<template> <template>
<div class="main"> <div class="main">
<a-form <a-form id="formLogin" class="user-layout-login" ref="formLogin" :form="form" @submit="handleSubmit">
id="formLogin"
class="user-layout-login"
ref="formLogin"
:form="form"
@submit="handleSubmit"
>
<a-alert v-if="isLoginError" type="error" showIcon style="margin-bottom: 24px;" message="账户或密码错误18729260811/a123456789 )" /> <a-alert v-if="isLoginError" type="error" showIcon style="margin-bottom: 24px;" message="账户或密码错误18729260811/a123456789 )" />
<a-form-item> <a-form-item>
<a-input <a-input size="large" type="text" placeholder="账户: 18729260811" v-decorator="[
size="large"
type="text"
placeholder="账户: 18729260811"
v-decorator="[
'mobile', 'mobile',
{rules: [{ required: true, message: '请输入帐户名或邮箱地址' }], validateTrigger: 'change'} {rules: [{ required: true, message: '请输入帐户名或邮箱地址' }], validateTrigger: 'change'}
]" ]">
>
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }" /> <a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-input-password <a-input-password size="large" placeholder="密码: a123456789" v-decorator="[
size="large"
placeholder="密码: a123456789"
v-decorator="[
'password', 'password',
{rules: [{ required: true, message: '请输入密码' }], validateTrigger: 'blur'} {rules: [{ required: true, message: '请输入密码' }], validateTrigger: 'blur'}
]" ]">
>
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }" /> <a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input-password> </a-input-password>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-checkbox v-decorator="['rememberMe', { valuePropName: 'checked' }]">自动登录</a-checkbox> <a-checkbox v-decorator="['rememberMe', { valuePropName: 'checked' }]">自动登录</a-checkbox>
<router-link <router-link :to="{ name: 'recover', params: { user: 'aaa'} }" class="forge-password" style="float: right;">忘记密码</router-link>
:to="{ name: 'recover', params: { user: 'aaa'} }"
class="forge-password"
style="float: right;"
>忘记密码</router-link>
</a-form-item> </a-form-item>
<a-form-item style="margin-top:24px"> <a-form-item style="margin-top:24px">
<a-button <a-button size="large" type="primary" htmlType="submit" class="login-button" :loading="state.loginBtn" :disabled="state.loginBtn">确定</a-button>
size="large"
type="primary"
htmlType="submit"
class="login-button"
:loading="state.loginBtn"
:disabled="state.loginBtn"
>确定</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>

View File

@ -80,7 +80,7 @@ const vueConfig = {
loaderOptions: { loaderOptions: {
less: { less: {
modifyVars: { modifyVars: {
// less vars锛宑ustomize ant design theme // less vars锛宑ustomize ant design theme
// 'primary-color': '#F5222D', // 'primary-color': '#F5222D',
// 'link-color': '#F5222D', // 'link-color': '#F5222D',
@ -93,14 +93,17 @@ const vueConfig = {
}, },
devServer: { devServer: {
disableHostCheck: true, // 解决vue项目中的“Invalid Host header”问题 disableHostCheck: true, // 解决vue项目中的“Invalid Host header”问题
port: 8001, // development server port 默认8001这个得看你的项目申请的端口号是多少而定 port: 8001, // development server port 默认8001这个得看你的项目申请的端口号是多少而定
// 如果需要开启代理请移除mockjs /src/main.jsL11 // 如果需要开启代理请移除mockjs /src/main.jsL11
proxy: { proxy: {
'/dawa': { // 捕获API的标志如果API中有这个字符串那么就开始匹配代理 '/dawa': { // 捕获API的标志如果API中有这个字符串那么就开始匹配代理
target: 'http://a.3a6.cn/', // 地址可以是域名也可以是IP地址。比如API请求/api/getList, 会被代理到请求http://www.baidu.com/api/getList 。 target: 'http://a.3a6.cn/', // 地址可以是域名也可以是IP地址。比如API请求/api/getList, 会被代理到请求http://www.baidu.com/api/getList 。
ws: false, ws: false,
changeOrigin: true // 如果target是域名需要额外添加一个参数changeOrigin: true否则会代理失败。 changeOrigin: true // 如果target是域名需要额外添加一个参数changeOrigin: true否则会代理失败。
// , pathRewrite: {
// '^/dawa': '/'
// }
} }
} }
}, },