1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<template>
<div class="page">
<h3 class="page-title">欧畅云支付</h3>
<div class="content">
<h3 class="left">请登录</h3>
<p class="title left">请登录欧畅云账号</p>
<a-form
:model="formState"
name="basic"
:label-col="{ span: 8 }"
:wrapper-col="{ span: 16 }"
autocomplete="off"
@finish="onFinish"
@finishFailed="onFinishFailed"
>
<div class="left">登录账号</div>
<a-form-item
labelAlign="left"
name="username"
class="input"
:rules="[{ required: true, message: '请输入邮箱号' }]"
>
<a-input
v-model:value="formState.username"
placeholder="请输入邮箱号"
/>
</a-form-item>
<div class="left">登录密码</div>
<a-form-item
labelAlign="left"
name="password"
class="input"
:rules="[{ required: true, message: '请输入登录密码' }]"
>
<a-input-password
v-model:value="formState.password"
placeholder="请输入登录密码"
:bordered="false"
/>
</a-form-item>
<div class="left mb10">
<a-radio v-model:checked="checked"></a-radio>点击同意《<span
style="color: blueviolet"
>服务条款</span
>》
</div>
<a-form-item>
<a-button
type="primary"
html-type="submit"
@click="onSubmit"
style="
margin-left: 20px;
width: 350px;
height: 50px;
background-color: blueviolet;
border: blueviolet;
"
>确认</a-button
>
</a-form-item>
</a-form>
<div class="resg">
<div class="left">还没有账号?</div>
<div style="color: blueviolet">去注册</div>
</div>
</div>
<footer class="bottom">欧畅云提供技术支持</footer>
</div>
</template>
<script lang="ts">
interface FormState {
username: string;
password: string;
}
import { useRouter } from 'vue-router'
import { defineComponent, reactive, ref ,toRaw } from "vue";
export default defineComponent({
name:'Login',
setup() {
const checked = ref<boolean>(false);
const router = useRouter()
const formState = reactive<FormState>({
username: "",
password: "",
});
const onFinish = (values: object) => {
console.log("Success:", values);
};
const onFinishFailed = (errorInfo: object) => {
console.log("Failed:", errorInfo);
};
const onSubmit = () => {
console.log('submit!', toRaw(formState));
router.push({
path:'/home'
})
};
return {
formState,
checked,
onFinish,
onFinishFailed,
onSubmit
};
},
});
</script>
<style scoped lang="less">
.page {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
.page-title {
position: fixed;
top: 10%;
left: 30%;
font-family: SourceHanSansSC;
font-weight: 700;
font-size: 28px;
font-style: normal;
letter-spacing: 0px;
line-height: 41px;
text-decoration: none;
color: blueviolet;
}
.content {
width: 400px;
height: 450px;
background-color: white;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
h3 {
line-height: 60px;
height: 50px;
font-weight: 900;
}
p {
opacity: 0.8;
}
.title {
height: 30px;
line-height: 30px;
font-size: 12px;
opacity: 0.67;
}
.input {
width: 530px;
margin-left: 20px;
height: 40px;
text-align: center;
margin-bottom: 20px;
.ant-input {
height: 40px;
background: rgb(245, 247, 250);
}
#basic_password {
height: 40px;
background: rgb(245, 247, 250);
}
.ant-input-password {
height: 40px;
background: rgb(245, 247, 250);
}
}
::placeholder {
text-align: center;
font-size: 14px;
}
}
.left {
text-indent: 20px;
text-align: left;
}
.resg {
display: flex;
}
.bottom {
position: fixed;
font-family: SourceHanSansSC;
font-weight: 400;
font-size: 14px;
color: rgba(153, 153, 153, 1);
font-style: normal;
letter-spacing: 0px;
line-height: 20px;
text-decoration: none;
bottom: 5%;
}
}
</style>
<style lang="less">
.page {
.ant-input-affix-wrapper > input.ant-input {
background: rgb(245, 247, 250);
}
span.ant-radio + * {
text-align: left;
margin-left: 0px;
}
.mb10 {
margin-bottom: 10px;
}
}
</style>