vue2-client 1.3.24 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,361 +1,360 @@
1
- <template>
2
- <common-layout>
3
- <div class="loginContent">
4
- <div class="illustration"/>
5
- <div class="business">
6
- <div class="top">
7
- <div class="header">
8
- <span class="title">{{ systemName }}</span>
9
- </div>
10
- </div>
11
- <div class="login" id="loginForm">
12
- <a-form :form="form" @submit="onSubmit">
13
- <a-tabs :tabBarStyle="{textAlign: 'center'}" size="large" style="padding: 0 2px;">
14
- <a-tab-pane key="1" tab="账户密码登录">
15
- <a-alert
16
- v-show="error"
17
- :closable="false"
18
- :message="error"
19
- showIcon
20
- style="margin-bottom: 2.8vh;"
21
- type="error" />
22
- <a-form-item>
23
- <a-input
24
- v-decorator="['name', {rules: [{ required: true, message: '请输入账户名', whitespace: true}]}]"
25
- autocomplete="autocomplete"
26
- placeholder="请输入账户名"
27
- size="large"
28
- >
29
- <a-icon slot="prefix" type="user" />
30
- </a-input>
31
- </a-form-item>
32
- <a-form-item>
33
- <a-input
34
- v-decorator="['password', {rules: [{ required: true, message: '请输入密码', whitespace: true}]}]"
35
- autocomplete="autocomplete"
36
- placeholder="请输入密码"
37
- size="large"
38
- type="password"
39
- >
40
- <a-icon slot="prefix" type="lock" />
41
- </a-input>
42
- </a-form-item>
43
- <a-form-item>
44
- <a-button :loading="logging" htmlType="submit" size="large" class="btn" type="primary">登录</a-button>
45
- </a-form-item>
46
- </a-tab-pane>
47
- </a-tabs>
48
- </a-form>
49
- </div>
50
- </div>
51
- </div>
52
- </common-layout>
53
- </template>
54
-
55
- <script>
56
- import CommonLayout from '@vue2-client/layouts/CommonLayout'
57
- import { getRoutesConfig, login, V4Login } from '@vue2-client/services/user'
58
- import { setAuthorization } from '@vue2-client/utils/request'
59
- import { loadRoutes, funcToRouter } from '@vue2-client/utils/routerUtil'
60
- import { mapMutations, mapState } from 'vuex'
61
- import JSEncrypt from 'jsencrypt'
62
- import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
63
- import { positions } from '@vue2-client/mock/common'
64
- import { timeFix } from '@vue2-client/utils/util'
65
- import { loginStart } from '@vue2-client/base-client/plugins/compatible/LoginServiceOA'
66
-
67
- export default {
68
- name: 'Login',
69
- components: { CommonLayout },
70
- data () {
71
- return {
72
- logging: false,
73
- error: '',
74
- form: this.$form.createForm(this)
75
- }
76
- },
77
- computed: {
78
- ...mapState('setting', ['systemName', 'systemDesc', 'homePage', 'ticketPage', 'compatible'])
79
- },
80
- methods: {
81
- ...mapMutations('account', ['setUser', 'setPermissions', 'setRoles']),
82
- onSubmit (e) {
83
- e.preventDefault()
84
- this.form.validateFields((err) => {
85
- if (!err) {
86
- this.logging = true
87
- const name = this.form.getFieldValue('name')
88
- const password = this.form.getFieldValue('password')
89
- switch (this.compatible) {
90
- case 'V3': {
91
- login(name, password).then(this.afterLogin)
92
- break
93
- }
94
- case 'OA' : {
95
- loginStart(name, password).then(this.afterLoginOA).finally(() => { this.logging = false })
96
- break
97
- }
98
- case 'V4' : {
99
- V4Login(name, password).then(this.afterLoginV4)
100
- break
101
- }
102
- }
103
- }
104
- })
105
- },
106
- afterLoginOA (result) {
107
- // 默认第一个是旧OA地址
108
- result.functions[0].navigate = result.functions[0].link
109
- result.functions[0].link = null
110
- this.afterGeneral(result)
111
- this.setAccessToken(result.password)
112
- this.$router.push(this.homePage).catch(() => {})
113
- },
114
- afterLoginV4 (res) {
115
- const name = this.form.getFieldValue('name')
116
- const password = this.form.getFieldValue('password')
117
- this.logging = false
118
- const loginRes = res
119
- // 如果这是用户首次打开本系统,localStorage无法初始化,改用code判断
120
- let pass = false
121
- let V4Token = {}
122
- // 判断是否是第一次使用本系统
123
- if (res.code) {
124
- if (res.code === 200) {
125
- pass = true
126
- // 如果返回值有code,证明是第一次使用系统,localStorage判断compatible失效
127
- // token需要从.data中获取
128
- V4Token = { token: res.data.access_token, expire: res.data.expires_in }
129
- }
130
- } else {
131
- V4Token = { token: res.access_token, expire: res.expires_in }
132
- }
133
- this.setV4AccessToken(V4Token)
134
- // 向本地缓存中临时存储compatible
135
- if (loginRes.access_token || pass) {
136
- const encrypt = new JSEncrypt()
137
- encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
138
- const data = encrypt.encrypt(JSON.stringify({ username: name, password: password }))
139
- // 获取路由配置
140
- getRoutesConfig(data).then(result => {
141
- this.$login.login(result).then(() => {
142
- this.afterGeneral(result)
143
- if (result.deps === '用户工单登记') {
144
- this.$router.push(this.ticketPage).catch(() => {})
145
- } else {
146
- this.$router.push(this.homePage).catch(() => {})
147
- }
148
- })
149
- })
150
- } else {
151
- this.error = loginRes.msg
152
- }
153
- },
154
- afterLogin (res) {
155
- const name = this.form.getFieldValue('name')
156
- const password = this.form.getFieldValue('password')
157
- this.logging = false
158
- const loginRes = res.states
159
- if (loginRes === '登录成功') {
160
- const encrypt = new JSEncrypt()
161
- encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
162
- const data = encrypt.encrypt(JSON.stringify({ username: name, password: password }))
163
- // 获取路由配置
164
- getRoutesConfig(data).then(result => {
165
- this.$login.login(result).then(() => {
166
- // V3任何情况首位加入资源管理
167
- const resourceManageMain = {
168
- name: '资源管理',
169
- icon: 'api',
170
- position: 1,
171
- link: 'resourceManageMain'
172
- }
173
- result.functions.unshift(resourceManageMain)
174
- this.afterGeneral(result)
175
- this.setAccessToken(data)
176
- if (result.deps === '用户工单登记') {
177
- this.$router.push(this.ticketPage).catch(() => {})
178
- } else {
179
- this.$router.push(this.homePage).catch(() => {})
180
- }
181
- })
182
- })
183
- } else {
184
- this.error = loginRes
185
- }
186
- },
187
- afterGeneral (result) {
188
- const user = Object.assign({
189
- username: result.ename,
190
- name: result.name,
191
- avatar: 'https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png',
192
- address: '西安市',
193
- position: positions[0]
194
- }, result)
195
- this.setUser(user)
196
- this.setPermissions([{ id: 'queryForm', operation: ['add', 'edit'] }])
197
- this.setRoles([{ id: 'admin', operation: ['add', 'edit', 'delete'] }])
198
- loadRoutes(funcToRouter(user.functions))
199
- this.$message.success(timeFix().CN + `,${result.name} 欢迎回来`, 3)
200
- },
201
- setAccessToken (data) {
202
- if (data) {
203
- localStorage.setItem(ACCESS_TOKEN, data)
204
- let timestamp = new Date().getTime()// 当前的时间戳
205
- timestamp = timestamp + 12 * 60 * 60 * 1000
206
- // 格式化时间获取年月日, 登陆过期时间
207
- const dateAfter = new Date(timestamp)
208
- setAuthorization({ token: data, expireAt: dateAfter })
209
- }
210
- },
211
- setV4AccessToken (data) {
212
- if (data.token) {
213
- localStorage.setItem(ACCESS_TOKEN, data.token)
214
- setAuthorization({ token: data.token, expire: data.expire })
215
- }
216
- }
217
- }
218
- }
219
- </script>
220
-
221
- <style lang="less" scoped>
222
- .common-layout {
223
- background-image: url('/img/login/background.webp');
224
- background-size: cover;
225
- background-position: center;
226
- .content {
227
- .loginContent {
228
- position: absolute;
229
- top: 50%;
230
- left: 50%;
231
- width: 63vw;
232
- height: 64vh;
233
- padding: 12.4vh 4.8vw 13.4vh 3.5vw;
234
- //min-height: 582px;
235
- //padding: 115px 90px 124px 66px;
236
- transform: translate(-50%, -50%);
237
- background: #fff;
238
- border-radius: 30px;
239
- display: flex;
240
- .illustration {
241
- flex: 1;
242
- background-image: url("/img/login/illustration.webp");
243
- background-size: contain;
244
- background-position: center;
245
- background-repeat: no-repeat;
246
- @media screen and (max-width: 959px) {
247
- flex: 0;
248
- }
249
- }
250
- .business {
251
- flex: 1;
252
- .top {
253
- text-align: center;
254
- .header {
255
- height: 2vh;
256
- line-height: 2.7vh;
257
- padding-bottom: 5.4vh;
258
- .title {
259
- font-size: 1.5rem;
260
- @media screen and (max-width: 479px) {
261
- font-size: 1rem;
262
- }
263
- @media screen and (min-width: 480px) and (max-width: 767px) {
264
- font-size: 1.3rem;
265
- }
266
- @media screen and (min-width: 768px) and (max-width: 959px) {
267
- font-size: 1.5rem;
268
- }
269
- @media screen and (min-width: 960px) {
270
- font-size: 1.3rem;
271
- }
272
- @media screen and (min-width: 1200px) {
273
- font-size: 1.5rem;
274
- }
275
- color: #333333;
276
- font-weight: bold;
277
- font-family: 'Microsoft YaHei UI Light',serif;
278
- letter-spacing: 0.13rem;
279
- }
280
- }
281
- }
282
- .login{
283
- width: 20vw;
284
- margin: 0 auto;
285
- @media screen and (max-width: 479px) {
286
- width: 50vw;
287
- }
288
- @media screen and (min-width: 480px) and (max-width: 767px) {
289
- width: 50vw;
290
- }
291
- @media screen and (min-width: 768px) and (max-width: 959px) {
292
- width: 40vw;
293
- }
294
- @media screen and (min-width: 960px) {
295
- width: 20vw;
296
- }
297
- @media screen and (min-width: 1200px) {
298
- width: 20vw;
299
- }
300
- .btn {
301
- width: 100%;
302
- height: 5.4vh;
303
- border-radius: 30px;
304
- background-color: #4F93FE;
305
- }
306
- }
307
- }
308
- }
309
- }
310
- }
311
- </style>
312
- <style lang="less">
313
- .common-layout {
314
- .footer {
315
- .copyright {
316
- color: #fff !important;
317
- }
318
- }
319
- }
320
- #loginForm {
321
- .ant-input {
322
- border-radius: 30px;
323
- }
324
- .ant-input-lg {
325
- height: 5.4vh;
326
- }
327
- .ant-tabs-bar {
328
- margin-bottom: 3.2vh;
329
- }
330
- .ant-input-affix-wrapper {
331
- font-size: 1.15rem;
332
- }
333
- .ant-input-affix-wrapper .ant-input:not(:first-child) {
334
- padding-left: 2.4vw;
335
- @media screen and (max-width: 479px) {
336
- padding-left: 10vw;
337
- }
338
- @media screen and (min-width: 480px) and (max-width: 767px) {
339
- padding-left: 8vw;
340
- }
341
- @media screen and (min-width: 768px) and (max-width: 959px) {
342
- padding-left: 5vw;
343
- }
344
- @media screen and (min-width: 960px) {
345
- padding-left: 4vw;
346
- }
347
- @media screen and (min-width: 1200px) {
348
- padding-left: 2.4vw;
349
- }
350
- }
351
- .ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix {
352
- color: #4F93FE;
353
- }
354
- .ant-alert {
355
- border-radius: 12px;
356
- }
357
- .ant-form-item {
358
- margin-bottom: 2.6vh
359
- }
360
- }
361
- </style>
1
+ <template>
2
+ <common-layout>
3
+ <div class="loginContent">
4
+ <div class="illustration"/>
5
+ <div class="business">
6
+ <div class="top">
7
+ <div class="header">
8
+ <span class="title">{{ systemName }}</span>
9
+ </div>
10
+ </div>
11
+ <div class="login" id="loginForm">
12
+ <a-form :form="form" @submit="onSubmit">
13
+ <a-tabs :tabBarStyle="{textAlign: 'center'}" size="large" style="padding: 0 2px;">
14
+ <a-tab-pane key="1" tab="账户密码登录">
15
+ <a-alert
16
+ v-show="error"
17
+ :closable="false"
18
+ :message="error"
19
+ showIcon
20
+ style="margin-bottom: 2.8vh;"
21
+ type="error" />
22
+ <a-form-item>
23
+ <a-input
24
+ v-decorator="['name', {rules: [{ required: true, message: '请输入账户名', whitespace: true}]}]"
25
+ autocomplete="autocomplete"
26
+ placeholder="请输入账户名"
27
+ size="large"
28
+ >
29
+ <a-icon slot="prefix" type="user" />
30
+ </a-input>
31
+ </a-form-item>
32
+ <a-form-item>
33
+ <a-input
34
+ v-decorator="['password', {rules: [{ required: true, message: '请输入密码', whitespace: true}]}]"
35
+ autocomplete="autocomplete"
36
+ placeholder="请输入密码"
37
+ size="large"
38
+ type="password"
39
+ >
40
+ <a-icon slot="prefix" type="lock" />
41
+ </a-input>
42
+ </a-form-item>
43
+ <a-form-item>
44
+ <a-button :loading="logging" htmlType="submit" size="large" class="btn" type="primary">登录</a-button>
45
+ </a-form-item>
46
+ </a-tab-pane>
47
+ </a-tabs>
48
+ </a-form>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </common-layout>
53
+ </template>
54
+
55
+ <script>
56
+ import CommonLayout from '@vue2-client/layouts/CommonLayout'
57
+ import { getRoutesConfig, login, V4Login } from '@vue2-client/services/user'
58
+ import { setAuthorization } from '@vue2-client/utils/request'
59
+ import { loadRoutes, funcToRouter } from '@vue2-client/utils/routerUtil'
60
+ import { mapMutations, mapState } from 'vuex'
61
+ import JSEncrypt from 'jsencrypt'
62
+ import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
63
+ import { positions } from '@vue2-client/mock/common'
64
+ import { timeFix } from '@vue2-client/utils/util'
65
+ import { loginStart } from '@vue2-client/base-client/plugins/compatible/LoginServiceOA'
66
+
67
+ export default {
68
+ name: 'Login',
69
+ components: { CommonLayout },
70
+ data () {
71
+ return {
72
+ logging: false,
73
+ error: '',
74
+ form: this.$form.createForm(this)
75
+ }
76
+ },
77
+ computed: {
78
+ ...mapState('setting', ['systemName', 'systemDesc', 'homePage', 'ticketPage', 'compatible'])
79
+ },
80
+ methods: {
81
+ ...mapMutations('account', ['setUser', 'setPermissions', 'setRoles']),
82
+ onSubmit (e) {
83
+ e.preventDefault()
84
+ this.form.validateFields((err) => {
85
+ if (!err) {
86
+ this.logging = true
87
+ const name = this.form.getFieldValue('name')
88
+ const password = this.form.getFieldValue('password')
89
+ switch (this.compatible) {
90
+ case 'V3': {
91
+ login(name, password).then(this.afterLogin)
92
+ break
93
+ }
94
+ case 'OA' : {
95
+ loginStart(name, password).then(this.afterLoginOA).finally(() => { this.logging = false })
96
+ break
97
+ }
98
+ case 'V4' : {
99
+ V4Login(name, password).then(this.afterLoginV4)
100
+ break
101
+ }
102
+ }
103
+ }
104
+ })
105
+ },
106
+ afterLoginOA (result) {
107
+ // 默认第一个是旧OA地址
108
+ result.functions[0].navigate = result.functions[0].link
109
+ result.functions[0].link = null
110
+ this.afterGeneral(result)
111
+ this.setAccessToken(result.password)
112
+ this.$router.push(this.homePage).catch(() => {})
113
+ },
114
+ afterLoginV4 (res) {
115
+ const name = this.form.getFieldValue('name')
116
+ const password = this.form.getFieldValue('password')
117
+ this.logging = false
118
+ const loginRes = res
119
+ // 如果这是用户首次打开本系统,localStorage无法初始化,改用code判断
120
+ let pass = false
121
+ let V4Token = {}
122
+ // 判断是否是第一次使用本系统
123
+ if (res.code) {
124
+ if (res.code === 200) {
125
+ pass = true
126
+ // 如果返回值有code,证明是第一次使用系统,localStorage判断compatible失效
127
+ // token需要从.data中获取
128
+ V4Token = { token: res.data.access_token, expire: res.data.expires_in }
129
+ }
130
+ } else {
131
+ V4Token = { token: res.access_token, expire: res.expires_in }
132
+ }
133
+ this.setV4AccessToken(V4Token)
134
+ // 向本地缓存中临时存储compatible
135
+ if (loginRes.access_token || pass) {
136
+ const encrypt = new JSEncrypt()
137
+ encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
138
+ const data = encrypt.encrypt(JSON.stringify({ username: name, password: password }))
139
+ // 获取路由配置
140
+ getRoutesConfig(data).then(result => {
141
+ this.$login.login(result).then(() => {
142
+ this.afterGeneral(result)
143
+ if (result.deps === '用户工单登记') {
144
+ this.$router.push(this.ticketPage).catch(() => {})
145
+ } else {
146
+ this.$router.push(this.homePage).catch(() => {})
147
+ }
148
+ })
149
+ })
150
+ } else {
151
+ this.error = loginRes.msg
152
+ }
153
+ },
154
+ afterLogin (res) {
155
+ const name = this.form.getFieldValue('name')
156
+ const password = this.form.getFieldValue('password')
157
+ this.logging = false
158
+ const loginRes = res.states
159
+ if (loginRes === '登录成功') {
160
+ const encrypt = new JSEncrypt()
161
+ encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
162
+ const data = encrypt.encrypt(JSON.stringify({ username: name, password: password }))
163
+ // 获取路由配置
164
+ getRoutesConfig(data).then(result => {
165
+ this.$login.login(result).then(() => {
166
+ // V3任何情况首位加入资源管理
167
+ const resourceManageMain = {
168
+ name: '资源管理',
169
+ icon: 'api',
170
+ position: 1,
171
+ link: 'resourceManageMain'
172
+ }
173
+ result.functions.unshift(resourceManageMain)
174
+ this.afterGeneral(result)
175
+ this.setAccessToken(data)
176
+ if (result.deps === '用户工单登记') {
177
+ this.$router.push(this.ticketPage).catch(() => {})
178
+ } else {
179
+ this.$router.push(this.homePage).catch(() => {})
180
+ }
181
+ })
182
+ })
183
+ } else {
184
+ this.error = loginRes
185
+ }
186
+ },
187
+ afterGeneral (result) {
188
+ const user = Object.assign({
189
+ username: result.ename,
190
+ name: result.name,
191
+ avatar: 'https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png',
192
+ address: '西安市',
193
+ position: positions[0]
194
+ }, result)
195
+ this.setUser(user)
196
+ this.setPermissions([{ id: 'queryForm', operation: ['add', 'edit'] }])
197
+ this.setRoles([{ id: 'admin', operation: ['add', 'edit', 'delete'] }])
198
+ loadRoutes(funcToRouter(user.functions))
199
+ this.$message.success(timeFix().CN + `,${result.name} 欢迎回来`, 3)
200
+ },
201
+ setAccessToken (data) {
202
+ if (data) {
203
+ localStorage.setItem(ACCESS_TOKEN, data)
204
+ let timestamp = new Date().getTime()// 当前的时间戳
205
+ timestamp = timestamp + 12 * 60 * 60 * 1000
206
+ // 格式化时间获取年月日, 登陆过期时间
207
+ const dateAfter = new Date(timestamp)
208
+ setAuthorization({ token: data, expireAt: dateAfter })
209
+ }
210
+ },
211
+ setV4AccessToken (data) {
212
+ if (data.token) {
213
+ localStorage.setItem(ACCESS_TOKEN, data.token)
214
+ setAuthorization({ token: data.token, expire: data.expire })
215
+ }
216
+ }
217
+ }
218
+ }
219
+ </script>
220
+
221
+ <style lang="less" scoped>
222
+ .common-layout {
223
+ background-image: url('/img/login/background.webp');
224
+ background-size: cover;
225
+ background-position: center;
226
+ .content {
227
+ .loginContent {
228
+ position: absolute;
229
+ top: 50%;
230
+ left: 50%;
231
+ width: 63vw;
232
+ padding: 12.4vh 4.8vw 13.4vh 3.5vw;
233
+ @media screen and (max-width: 479px) {
234
+ padding: 6.4vh 4.8vw 4.4vh 3.5vw;
235
+ }
236
+ transform: translate(-50%, -50%);
237
+ background: #fff;
238
+ border-radius: 30px;
239
+ display: flex;
240
+ .illustration {
241
+ flex: 1;
242
+ background-image: url("/img/login/illustration.webp");
243
+ background-size: contain;
244
+ background-position: center;
245
+ background-repeat: no-repeat;
246
+ @media screen and (max-width: 959px) {
247
+ flex: 0;
248
+ }
249
+ }
250
+ .business {
251
+ flex: 1;
252
+ .top {
253
+ text-align: center;
254
+ .header {
255
+ height: 2vh;
256
+ line-height: 2.7vh;
257
+ padding-bottom: 5.4vh;
258
+ .title {
259
+ font-size: 1.5rem;
260
+ @media screen and (max-width: 479px) {
261
+ font-size: 1rem;
262
+ }
263
+ @media screen and (min-width: 480px) and (max-width: 767px) {
264
+ font-size: 1.3rem;
265
+ }
266
+ @media screen and (min-width: 768px) and (max-width: 959px) {
267
+ font-size: 1.5rem;
268
+ }
269
+ @media screen and (min-width: 960px) {
270
+ font-size: 1.3rem;
271
+ }
272
+ @media screen and (min-width: 1200px) {
273
+ font-size: 1.5rem;
274
+ }
275
+ color: #333333;
276
+ font-weight: bold;
277
+ font-family: 'Microsoft YaHei UI Light', 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
278
+ letter-spacing: 0.13rem;
279
+ }
280
+ }
281
+ }
282
+ .login{
283
+ width: 20vw;
284
+ margin: 0 auto;
285
+ @media screen and (max-width: 479px) {
286
+ width: 50vw;
287
+ }
288
+ @media screen and (min-width: 480px) and (max-width: 767px) {
289
+ width: 50vw;
290
+ }
291
+ @media screen and (min-width: 768px) and (max-width: 959px) {
292
+ width: 40vw;
293
+ }
294
+ @media screen and (min-width: 960px) {
295
+ width: 20vw;
296
+ }
297
+ @media screen and (min-width: 1200px) {
298
+ width: 20vw;
299
+ }
300
+ .btn {
301
+ width: 100%;
302
+ min-height: 43px;
303
+ height: 5.4vh;
304
+ border-radius: 30px;
305
+ background-color: #4F93FE;
306
+ }
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ </style>
313
+ <style lang="less">
314
+ .common-layout {
315
+ .footer {
316
+ .copyright {
317
+ color: #fff !important;
318
+ }
319
+ }
320
+ }
321
+ #loginForm {
322
+ .ant-input {
323
+ border-radius: 30px;
324
+ }
325
+ .ant-input-lg {
326
+ min-height: 43px;
327
+ height: 5.4vh;
328
+ }
329
+ .ant-tabs-bar {
330
+ margin-bottom: 24px;
331
+ }
332
+ .ant-input-affix-wrapper {
333
+ font-size: 1.15rem;
334
+ }
335
+ .ant-input-affix-wrapper .ant-input:not(:first-child) {
336
+ padding-left: 2.4vw;
337
+ @media screen and (max-width: 479px) {
338
+ padding-left: 10vw;
339
+ }
340
+ @media screen and (min-width: 480px) and (max-width: 767px) {
341
+ padding-left: 8vw;
342
+ }
343
+ @media screen and (min-width: 768px) and (max-width: 959px) {
344
+ padding-left: 5vw;
345
+ }
346
+ @media screen and (min-width: 960px) {
347
+ padding-left: 4vw;
348
+ }
349
+ @media screen and (min-width: 1200px) {
350
+ padding-left: 2.4vw;
351
+ }
352
+ }
353
+ .ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix {
354
+ color: #4F93FE;
355
+ }
356
+ .ant-alert {
357
+ border-radius: 12px;
358
+ }
359
+ }
360
+ </style>