system-phone 3.1.95 → 3.1.98

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,1030 +1,1032 @@
1
- <template>
2
- <div class="loginbg" id="outheight">
3
- <!--输入框-->
4
- <div class="htmleaf-container">
5
- <div class="wrapper" :class="{'form-success': login}">
6
- <div class="container">
7
- <h3 style="color:white; margin-top: 15px">欢迎使用</h3>
8
- <p class="form" :style="{'margin-top': margintop + 'px'}">
9
- <input type="text" v-model="ename" class="usericon"/>
10
- <input :type="showpass==true?'text':'password'" v-model="password" class="psicon"/>
11
- <img :src="imageurl"
12
- style="width: 20px;margin-bottom: 5px;position: absolute;left: 62%;bottom: 43%;"
13
- alt=""
14
- @click="changepass()"/>
15
- <button type="button" id="login-button" @click.prevent="confirm()"><strong>登录</strong></button>
16
- </p>
17
- <div class="row">
18
- <img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showsave"
19
- @click="showoff()">
20
- <img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="!showsave"
21
- @click="showon()">
22
- <span class="text-left font">记住密码</span>
23
- <img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '1'"
24
- @click="showoff1()">
25
- <img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '2'"
26
- @click="showon1()">
27
- <span class="text-left font">自动登录</span>
28
- <p></p>
29
- <span class="versiontext" style="margin-top: 10px" v-if="version">当前版本:{{ version }}</span>
30
- <span class="devicetext">设备码:{{ deviceIemi }}</span>
31
- </div>
32
- </div>
33
- </div>
34
- </div>
35
- <!--<load-appdata @ready="onReady"></load-appdata>-->
36
- <div style="width: 100%;height: 100%;position: fixed;top: 0px;" v-show="loaderShow">
37
- <div id="loading" class="loading">登陆中...</div>
38
- </div>
39
- <modal :show.sync="modifyPassword" backdrop="false">
40
- <header slot="modal-header" class="modal-header">
41
- </header>
42
- <article slot="modal-body" class="modal-body">
43
- <modify-pass-word :sourse="login" :weak-password="weakPassword" v-if="modifyPassword"
44
- v-on:success="success"></modify-pass-word>
45
- </article>
46
- <footer slot="modal-footer" class="modal-footer">
47
- </footer>
48
- </modal>
49
- <!-- 短信验证码弹窗 -->
50
- <modal :show.sync="smsModalShow" backdrop="true">
51
- <div slot="modal-header"></div>
52
- <article slot="modal-body" class="sms-modal-body">
53
- <div class="sms-wrap">
54
- <div class="sms-top">
55
- <div class="sms-top-icon">
56
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
57
- <rect x="2" y="4" width="20" height="16" rx="3"/>
58
- <path d="M7 8h4M13 8h4M7 12h10M7 16h2M13 16h4"/>
59
- </svg>
60
- </div>
61
- </div>
62
- <div class="sms-ct">
63
- <div class="sms-ct-label">短信验证码</div>
64
- <div class="sms-ct-tip">{{ smsModalMessage }}</div>
65
- </div>
66
- <div class="sms-field">
67
- <div class="sms-field-hint">请输入6位验证码</div>
68
- <div class="sms-code-box">
69
- <input
70
- class="sms-code-ipt"
71
- v-model="smsCode"
72
- maxlength="6"
73
- @keyup.enter="smsModalConfirm"
74
- autocomplete="off"
75
- type="tel"
76
- />
77
- </div>
78
- <div class="sms-extra" :class="{ 'expiry-warn': smsCountdown <= 30 }">
79
- <template v-if="smsCountdown > 0">剩余 {{ smsCountdown }}s</template>
80
- <template v-else>已过期</template>
81
- </div>
82
- </div>
83
- <div class="sms-actions">
84
- <button class="sms-act-ok" @click="smsModalConfirm">确定</button>
85
- <button class="sms-act-no" @click="smsModalCancel">取消</button>
86
- </div>
87
- </div>
88
- </article>
89
- <div slot="modal-footer"></div>
90
- </modal>
91
- </div>
92
- </template>
93
-
94
- <script>
95
-
96
- /**
97
- * 说明:
98
- * /rs/vue 请求获取到的配置文件有关配置项目
99
- * telephone.LoginApp.weakPassword:为true 是判断是否弱密码校验
100
- *
101
- * globle 校验参数 Device_IEMI 是否需要校验设备iemi编码
102
- *
103
- */
104
-
105
-
106
- import Vue from 'vue'
107
- import * as Util from '../Util'
108
- import cryptJS from './EncryptUtil'
109
- import { validateStrongPasswordPhone } from '../plugins/validateStrongPasswordPhone.js'
110
- //获取json配置文件
111
- let asyncReady = async function (self, url) {
112
- // 获取配置信息
113
- try {
114
- console.log("获取营收配置文件和参数【开始】")
115
- await self.$appdata.load()
116
- console.log("获取营收配置文件和参数【结束】,开始获取vue配置文件【开始】")
117
- let that = self
118
- let res = await Vue.resetget(`${url}/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
119
- that.$set('config', res.data)
120
- Vue.config2 = res.data
121
- // 判断是否需要弱密码校验
122
- if (self.config && self.config.telephone && self.config.telephone.LoginApp && "undefined" != typeof self.config.telephone.LoginApp.weakPassword) {
123
- self.weakPassword = self.config.telephone.LoginApp.weakPassword
124
- }
125
- console.log("手机端获取.json文件")
126
- console.log(JSON.stringify(self.config))
127
- return true
128
- } catch (error) {
129
- // 此处业务数据装载异常不做任何处理,理论上不会有任何异常
130
- self.$showMessage('登录系统: 获取配置文件失败,请检查网络后重新登陆!')
131
- return false
132
- }
133
- }
134
-
135
- //装载业务数据
136
- let asyncLoadData = async function (self, url) {
137
- try {
138
- // 读取报建本地配置文件
139
- var result = HostApp.readLocalFile('workflow_apply.json')
140
- if (result.code == 500) {
141
- console.log('不存在流程配置文件,即不使用报建app')
142
- return
143
- }
144
- var data = JSON.parse(result.data)
145
- console.log('读取报建配置文件成功,存入缓存中的data=>' + JSON.stringify(data))
146
- Vue.workflow_vue = Vue.prototype.$workflow_vue = data
147
- } catch (error) {
148
- // 此处业务数据装载异常不做任何处理,理论上不会有任何异常,只有当app版本端版本较低无readlocalfile时会异常
149
- console.log(error)
150
- }
151
- }
152
-
153
- export default {
154
- title: '登录系统',
155
- data() {
156
- return {
157
- loaderShow: false,
158
- config: {},
159
- weakPassword: false,
160
- modifyPassword: false,
161
- version: '',
162
- ename: '',
163
- login: 'login',
164
- password: '',
165
- showsave: true,
166
- showauto: '2', // 1 自动登陆 2取消自动登陆
167
- showpass: false,
168
- imageurl: require('../assets/miwen.png'),
169
- deviceIemi: '无法获取该设备码,请联系管理员',
170
- loginSafe: false,
171
- margintop: document.documentElement.clientHeight * 0.1,
172
- // 短信验证码相关
173
- smsCode: '',
174
- smsCountdown: 0,
175
- smsCountdownTimer: null,
176
- smsModalShow: false,
177
- smsModalMessage: '',
178
- // 标记是否处于短信验证流程
179
- smsLoginFlag: false
180
- }
181
- },
182
-
183
- ready() {
184
- this.version = Vue.app_version || ''
185
- if (Vue.android) {
186
- const userCache = this.$androidUtil.getPreference('login_user_cache')
187
- this.showauto = this.$androidUtil.getPreference('auto_login')
188
- this.showauto = this.showauto ? this.showauto : '2'
189
- console.log(`自动登陆标识ready:${this.showauto}`)
190
- if (userCache) {
191
- const userCacheJSON = JSON.parse(userCache.replace(/\'/g, '\"'))
192
- this.password = userCacheJSON.password
193
- this.ename = userCacheJSON.username
194
- }
195
- this.deviceIemi = this.$androidUtil.getDeviceIEMI()
196
- console.log(`手机设备码:${this.deviceIemi}`)
197
- if (this.showauto == '1' && this.password) {
198
- this.confirm()
199
- }
200
- }
201
- },
202
- methods: {
203
- success(val) {
204
- // 修改密码成功
205
- this.modifyPassword = false
206
- this.password = val
207
- },
208
- startSmsCountdown () {
209
- if (this.smsCountdownTimer) {
210
- clearInterval(this.smsCountdownTimer)
211
- }
212
- this.smsCountdownTimer = setInterval(() => {
213
- if (this.smsCountdown > 0) {
214
- this.smsCountdown--
215
- } else {
216
- clearInterval(this.smsCountdownTimer)
217
- }
218
- }, 1000)
219
- },
220
- stopSmsCountdown () {
221
- if (this.smsCountdownTimer) {
222
- clearInterval(this.smsCountdownTimer)
223
- this.smsCountdownTimer = null
224
- }
225
- },
226
- smsModalConfirm () {
227
- if (this.smsCode === '') {
228
- this.$showMessage('请输入短信验证码')
229
- return
230
- }
231
- this.smsLoginFlag = true
232
- // 调用 confirm 方法完成 Step2
233
- this.confirm()
234
- },
235
- smsModalCancel () {
236
- this.smsModalShow = false
237
- this.smsLoginFlag = false
238
- this.stopSmsCountdown()
239
- this.smsCode = ''
240
- this.loaderShow = false
241
- },
242
- // 对资源菜单进行排序
243
- sortFunctions (val) {
244
- this.sortArr(val)
245
- val.forEach((item)=>{
246
- if(item.children && Array.isArray(item.children)){
247
- this.sortArr(item.children)
248
- }
249
- })
250
- return val
251
- },
252
- sortArr(val){
253
- val.sort((itemA, itemB)=>{
254
- if(itemA.position !== itemB.position){
255
- return itemA.position - itemB.position
256
- }else{
257
- return itemA.id - itemB.id
258
- }
259
- })
260
- },
261
- // 记住密码选中/未选中
262
- showoff() {
263
- this.showsave = false
264
- },
265
- showon() {
266
- this.showsave = true
267
- },
268
- showoff1() {
269
- this.showauto = '2'
270
- },
271
- showon1() {
272
- this.showauto = '1'
273
- },
274
- changepass() {
275
- this.showpass = this.showpass ? false : true
276
- if (this.showpass) {
277
- this.imageurl = require("../assets/mingwen.png")
278
- } else {
279
- this.imageurl = require("../assets/miwen.png")
280
- }
281
- },
282
- async confirm() {
283
- this.loaderShow = true
284
- console.log('Vue.android:' + Vue.android)
285
- const userData = {username: this.ename, password: this.password}
286
- console.log('获取登陆信息:' + userData)
287
- Vue.dataUrl = this.$androidUtil.getProxyUrl() + "/"
288
- let loginData = {
289
- username: this.ename,
290
- password: this.password,
291
- resourceName: '手机服务'
292
- }
293
- let ret = {}
294
- if(Vue.isafsystem){
295
- try {
296
- ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-auth/login`, loginData, {
297
- resolveMsg: null,
298
- rejectMsg: null,
299
- headerConfig: {'Content-type': 'application/json'}
300
- })
301
- if (ret.data) {
302
- if (ret.data.resources.data && ret.data.resources.data.id) {
303
- loginData = ret.data.resources.data
304
- } else {
305
- loginData = ret.data.resources
306
- }
307
- this.$androidUtil.setPreference('siteId', loginData.f_extend1 || '')
308
- this.$androidUtil.setPreference('flatId', loginData.f_extend2 || '')
309
- this.$androidUtil.setPreference('name', loginData.name || '')
310
- this.$androidUtil.setPreference('ename', loginData.ename || '')
311
- } else {
312
- throw {status: ret.data.code, message: ret.data.msg}
313
- }
314
- // 设置登录人
315
- Vue.user = Util.f = loginData
316
- // 功能排序
317
- Vue.functions = this.sortFunctions(loginData.functions)
318
- }catch (e) {
319
- if (Vue.android) {
320
- this.loaderShow = false
321
- this.$showMessage(e.message ? e.message : '登录失败!用户名或密码错误!')
322
- }
323
- return
324
- }
325
- }else{
326
- try {
327
- let data = {name: this.ename, password: this.password}
328
- // Step2: 如果有 smsLoginFlag 且有待提交的验证码,则一起发送
329
- if (this.smsLoginFlag && this.smsCode) {
330
- data.smsCode = this.smsCode
331
- }
332
- data = '$' + cryptJS.RSAEncrypt(JSON.stringify(data))
333
- const getLogin = await Vue.resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/getLogin`, data, {resolveMsg: null, rejectMsg: null})
334
- // 检查是否需要短信验证码(Step1 返回时,smsLoginFlag 为 false)
335
- if (getLogin.data.needsSmsCode && !this.smsLoginFlag) {
336
- this.loaderShow = false
337
- this.smsCountdown = getLogin.data.expireSeconds || 300
338
- this.smsModalMessage = getLogin.data.states || ('短信验证码已发送至' + getLogin.data.maskedPhone + ',请输入')
339
- this.startSmsCountdown()
340
- this.smsLoginFlag = true
341
- this.smsModalShow = true
342
- return
343
- }
344
- if (getLogin.data.states === '登录成功'){
345
- // Step2 成功后清理状态
346
- if (this.smsLoginFlag) {
347
- this.smsCode = ''
348
- this.smsLoginFlag = false
349
- this.smsModalShow = false
350
- }
351
- // 初始化 Vue.$login
352
- Vue.$login = Vue.prototype.$login = {
353
- jwt: getLogin.data.jwt,
354
- jwtNew: getLogin.data.jwtNew,
355
- 'v3-session-key': getLogin.data.s ? cryptJS.RSADecrypt(getLogin.data.s) : '',
356
- toStandardDateString() {
357
- const dt = new Date()
358
- const month = dt.getMonth() + 1
359
- const date = dt.getDate()
360
- return `${dt.getFullYear()}-${month < 10 ? '0' + month : month}-${date < 10 ? '0' + date : date}`
361
- },
362
- toStandardTimeString() {
363
- const dt = new Date()
364
- const month = dt.getMonth() + 1
365
- const date = dt.getDate()
366
- const hour = dt.getHours()
367
- const min = dt.getMinutes()
368
- const sec = dt.getSeconds()
369
- return `${dt.getFullYear()}-${month < 10 ? '0' + month : month}-${date < 10 ? '0' + date : date} ${hour < 10 ? '0' + hour : hour}:${min < 10 ? '0' + min : min}:${sec < 10 ? '0' + sec : sec}`
370
- }
371
- }
372
- // 调用远程登录服务,获取所有有权访问的功能
373
- data = {username: this.ename, password: this.password}
374
- data = cryptJS.RSAEncrypt(JSON.stringify(data))
375
- ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/user/userLogin/手机服务`, data, {
376
- resolveMsg: null,
377
- rejectMsg: null
378
- })
379
- this.$androidUtil.setPreference('siteId', ret.data.f_extend1 || '')
380
- this.$androidUtil.setPreference('flatId', ret.data.f_extend2 || '')
381
- this.$androidUtil.setPreference('name', ret.data.name || '')
382
- this.$androidUtil.setPreference('ename', ret.data.ename || '')
383
- if ((JSON.stringify(ret.data).startsWith("{") || JSON.stringify(ret.data).data.startsWith("[")) && ret.data.code && ret.data.msg && ret.data.code !== 200) {
384
- throw {status: ret.data.code, message: ret.data.msg}
385
- }
386
- // 设置登录人
387
- if ((JSON.stringify(ret.data).startsWith("{") || JSON.stringify(ret.data).data.startsWith("[")) && ret.data.code && ret.data.msg && ret.data.code === 200) {
388
- Vue.user = Vue.$login.f = Util.f = ret.data.data
389
- } else {
390
- Vue.user = Vue.$login.f = Util.f = ret.data
391
- }
392
- // 功能排序
393
- if ((JSON.stringify(ret.data).startsWith("{") || JSON.stringify(ret.data).data.startsWith("[")) && ret.data.code && ret.data.msg && ret.data.code === 200) {
394
- Vue.functions = this.sortFunctions(ret.data.data.functions)
395
- } else {
396
- Vue.functions = this.sortFunctions(ret.data.functions)
397
- }
398
- }else {
399
- if(Vue.$login && Vue.$login.s){
400
- Vue.$login.s = null
401
- Vue.$login['v3-session-key'] = null
402
- }
403
- this.loaderShow = false
404
- this.$showMessage(getLogin.data.states)
405
- return
406
- }
407
- }catch (e) {
408
- if(Vue.$login && Vue.$login.s){
409
- Vue.$login.s = null
410
- Vue.$login['v3-session-key'] = null
411
- }
412
- if (Vue.android) {
413
- this.loaderShow = false
414
- this.$showMessage(e.message ? e.message : '登录失败!用户名或密码错误!')
415
- }
416
- return
417
- }
418
- }
419
- // 更新 jwt(Vue.$login 已在 getLogin 成功后初始化)
420
- if(Vue.isafsystem){
421
- Vue.$login.jwt = loginData.id
422
- Vue.$login.jwtNew = ret.data.access_token
423
- }else{
424
- console.log("ret", ret)
425
- if ((JSON.stringify(ret.data).startsWith("{") || JSON.stringify(ret.data).startsWith("[")) && ret.data.code && ret.data.msg && ret.data.code === 200) {
426
- Vue.$login.jwt = ret.data.data.id
427
- }else{
428
- Vue.$login.jwt = ret.data.id
429
- }
430
- }
431
- // 对资源菜单进行排序
432
- let viewDetails = await Vue.resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, {
433
- source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
434
- userid: Vue.user.id
435
- }, {resolveMsg: null, rejectMsg: null})
436
- const rithtList = viewDetails.data
437
- Vue.user.r = []
438
- rithtList.forEach(x => Vue.user.r.push(x.name))
439
- console.log('登陆人信息', JSON.stringify(Vue.user))
440
- let userStr
441
- if (Vue.android) {
442
- console.log(`Device_IEMI:${this.$androidUtil.getPreference('Device_IEMI')}`)
443
- // 判断是否需要验证 设备码
444
- if (this.$androidUtil.getPreference('Device_IEMI')) {
445
- console.log(`手机设备码:${this.deviceIemi}`)
446
- let result = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
447
- data: {
448
- items: '*',
449
- tablename: 't_equipment',
450
- orderitem: 'id desc',
451
- condition: `f_terminal_number = '${this.deviceIemi}' and f_state = '正常'`
452
- }
453
- }, {resolveMsg: null, rejectMsg: null})
454
- console.log(`检测设备码存在是否:${result.data.length}`)
455
- if (result.data.length == 0) {
456
- HostApp.alert('设备码未绑定,请联系管理员!')
457
- return
458
- }
459
- }
460
- if (this.showsave) {
461
- userStr = `{'username':'${this.ename}','password':'${this.password}'}`
462
- } else {
463
- userStr = `{'username':'${this.ename}','password':''}`
464
- }
465
- console.log(this.showauto)
466
- this.$androidUtil.setPreference('login_user_cache', userStr)
467
- this.$androidUtil.setPreference('f_repairman_id', Util.f.id)
468
- this.$androidUtil.setPreference('f_repairman_name', Util.f.name)
469
- this.$androidUtil.setPreference('f_orgid', Util.f.orgid)
470
- this.$androidUtil.setPreference('f_role_name', Util.f.f_role_name || '')
471
- console.log("自动登陆标识" + Util.f.f_role_name)
472
- this.$androidUtil.setPreference('auto_login', this.showauto)
473
- }
474
- // 获取参数
475
- console.log('获取参数system以及安检参数')
476
- const flag = await asyncReady(this, this.$androidUtil.getProxyUrl())
477
- if (!flag) {
478
- this.loaderShow = false
479
- console.log('获取参数异常')
480
- return
481
- }
482
- console.log('获取参数结束')
483
- this.loaderShow = false
484
- // 弱口令验证
485
- if (this.weakPassword) {
486
- const pwdResult = validateStrongPasswordPhone(this.password)
487
- if (!pwdResult.isValid) {
488
- await this.$showMessage('登录系统: 此账户的密码过于简单,' + (pwdResult.errors[0] || '请修改密码后重新登陆!!!'), ['confirm'])
489
- this.modifyPassword = true
490
- return
491
- }
492
- }
493
- this.$goto('nav-bottom')
494
- },
495
- },
496
- beforeDestroy () {
497
- this.stopSmsCountdown()
498
- },
499
- watch: {
500
- 'config'(val) {
501
- Vue.config = val
502
- }
503
- }
504
- }
505
- </script>
506
- <style scoped="">
507
- .versiontext, .devicetext {
508
- font: 13px PingFang-SC-Medium;
509
- position: fixed;
510
- width: 100%;
511
- left: 50%;
512
- transform: translateX(-50%);
513
- text-align: center;
514
- }
515
- .versiontext {
516
- bottom: 33px;
517
- }
518
- .devicetext {
519
- bottom: 13px;
520
- }
521
-
522
- /*输入框样式*/
523
- /*@import url(http://fonts.useso.com/css?family=Source+Sans+Pro:200,300);*/
524
- * {
525
- box-sizing: border-box;
526
- margin: 0;
527
- padding: 0;
528
- font-weight: 300;
529
- }
530
-
531
- .loginbg {
532
- font-family: 'Source Sans Pro', sans-serif;
533
- color: white;
534
- font-weight: 300;
535
- }
536
-
537
- .loginbg ::-webkit-input-placeholder {
538
- /* WebKit browsers */
539
- font-family: 'Source Sans Pro', sans-serif;
540
- color: white;
541
- font-weight: 300;
542
- }
543
-
544
- .loginbg :-moz-placeholder {
545
- /* Mozilla Firefox 4 to 18 */
546
- font-family: 'Source Sans Pro', sans-serif;
547
- color: white;
548
- opacity: 1;
549
- font-weight: 300;
550
- }
551
-
552
- .loginbg ::-moz-placeholder {
553
- /* Mozilla Firefox 19+ */
554
- font-family: 'Source Sans Pro', sans-serif;
555
- color: white;
556
- opacity: 1;
557
- font-weight: 300;
558
- }
559
-
560
- .loginbg :-ms-input-placeholder {
561
- /* Internet Explorer 10+ */
562
- font-family: 'Source Sans Pro', sans-serif;
563
- color: white;
564
- font-weight: 300;
565
- }
566
-
567
- .wrapper {
568
- /*background: #2D83BA;
569
- background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
570
- background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
571
- opacity: 0.8;*/
572
- /*position: absolute;*/
573
- /*top: 50%;
574
- right: 10%;
575
- width: 40%;
576
- height: 350px;
577
- margin-top: -150px;*/
578
- overflow: hidden;
579
- }
580
-
581
- .wrapper.form-success .container h3 {
582
- -webkit-transform: translateY(85px);
583
- -ms-transform: translateY(85px);
584
- transform: translateY(85px);
585
- }
586
-
587
- .container {
588
- /*max-width: 350px;*/
589
- margin: 0 auto;
590
- /*padding: 30px 100px 50px 100px;
591
- height: 350px;*/
592
- text-align: center;
593
- /*以下增加*/
594
- /*background: #2D83BA;
595
- background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
596
- background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);*/
597
- opacity: 0.8;
598
- }
599
-
600
- .container h3 {
601
- font-size: 40px;
602
- -webkit-transition-duration: 1s;
603
- transition-duration: 1s;
604
- -webkit-transition-timing-function: ease-in-out;
605
- transition-timing-function: ease-in-out;
606
- font-weight: 200;
607
- }
608
-
609
- .form {
610
- padding: 20px 0;
611
- /*margin-top: 15%;*/
612
- position: relative;
613
- z-index: 2;
614
- }
615
-
616
- .form input {
617
- -webkit-appearance: none;
618
- -moz-appearance: none;
619
- appearance: none;
620
- outline: 0;
621
- border: 1px solid #50ABE6;
622
- background-color: #50ABE6;
623
- width: 250px;
624
- border-radius: 3px;
625
- padding: 10px 15px;
626
- margin: 0 auto 10px auto;
627
- display: block;
628
- text-align: center;
629
- font-size: 18px;
630
- color: white;
631
- -webkit-transition-duration: 0.25s;
632
- transition-duration: 0.25s;
633
- font-weight: 300;
634
- }
635
-
636
- .form input:hover {
637
- background-color: rgba(255, 255, 255, 0.4);
638
- }
639
-
640
- .form input:focus {
641
- background-color: white;
642
- width: 300px;
643
- color: #53e3a6;
644
- }
645
-
646
- .usericon {
647
- background-image: url(../assets/usericon.png);
648
- background-repeat: no-repeat;
649
- background-size: 30px;
650
- background-position-x: 8px;
651
- background-position-y: 8px;
652
- }
653
-
654
- .psicon {
655
- background-image: url(../assets/psicon.png);
656
- background-repeat: no-repeat;
657
- background-size: 30px;
658
- background-position-x: 8px;
659
- background-position-y: 8px;
660
- }
661
-
662
- .form button {
663
- -webkit-appearance: none;
664
- -moz-appearance: none;
665
- appearance: none;
666
- outline: 0;
667
- background-color: white;
668
- border: 0;
669
- padding: 10px 15px;
670
- color: #253830;
671
- border-radius: 3px;
672
- width: 250px;
673
- cursor: pointer;
674
- font-size: 18px;
675
- -webkit-transition-duration: 0.25s;
676
- transition-duration: 0.25s;
677
- }
678
-
679
- .form button:hover {
680
- background-color: #f5f7f9;
681
- }
682
-
683
- /*注册字体样式*/
684
- .form span {
685
- color: #fff;
686
- display: table-footer-group;
687
- position: absolute;
688
- right: 10px;
689
- margin-top: 10px;
690
- cursor: pointer;
691
- }
692
-
693
- .logotitle {
694
- color: #fff;
695
- position: absolute;
696
- top: 50px;
697
- left: 50px;
698
- font-size: 50px;
699
- }
700
-
701
- /*注册模态框界面样式*/
702
- .modifystyle {
703
- background: #FCFEEE;
704
- }
705
-
706
- .modifystyle div {
707
- height: auto;
708
- margin-bottom: 15px;
709
- /*text-align: center;*/
710
- /*margin-left: 20%;*/
711
- }
712
-
713
- /*bootstrap字体图标要手动调整,所以使用字体图标的span必须紧跟在input后面,负责会错位*/
714
- .modifystyle div input + span {
715
- top: 0 !important;
716
- right: 32%;
717
- }
718
-
719
- .modifystyle span {
720
- color: red;
721
- }
722
-
723
- /* 通告区内容 */
724
- .notice-board {
725
- height: auto;
726
- position: absolute;
727
- top: 50%;
728
- margin-top: -150px;
729
- margin-left: 100px;
730
- color: #fff;
731
- }
732
-
733
- /*修改密码底部按钮部分样式*/
734
- .footerbtn {
735
- text-align: center;
736
- padding: 15px;
737
- }
738
-
739
- .footerbtn button {
740
- width: 100px;
741
- margin-left: 20px;
742
- }
743
-
744
- .bg-bubbles {
745
- position: absolute;
746
- top: 0;
747
- left: 0;
748
- width: 100%;
749
- height: 100%;
750
- z-index: 1;
751
- }
752
-
753
- .bg-bubbles li {
754
- position: absolute;
755
- list-style: none;
756
- display: block;
757
- width: 40px;
758
- height: 40px;
759
- background-color: rgba(255, 255, 255, 0.15);
760
- bottom: -160px;
761
- -webkit-animation: square 25s infinite;
762
- animation: square 25s infinite;
763
- -webkit-transition-timing-function: linear;
764
- transition-timing-function: linear;
765
- }
766
-
767
- .bg-bubbles li:nth-child(1) {
768
- left: 10%;
769
- }
770
-
771
- .bg-bubbles li:nth-child(2) {
772
- left: 20%;
773
- width: 80px;
774
- height: 80px;
775
- -webkit-animation-delay: 2s;
776
- animation-delay: 2s;
777
- -webkit-animation-duration: 17s;
778
- animation-duration: 17s;
779
- }
780
-
781
- .bg-bubbles li:nth-child(3) {
782
- left: 25%;
783
- -webkit-animation-delay: 4s;
784
- animation-delay: 4s;
785
- }
786
-
787
- .bg-bubbles li:nth-child(4) {
788
- left: 40%;
789
- width: 60px;
790
- height: 60px;
791
- -webkit-animation-duration: 22s;
792
- animation-duration: 22s;
793
- background-color: rgba(255, 255, 255, 0.25);
794
- }
795
-
796
- .bg-bubbles li:nth-child(5) {
797
- left: 70%;
798
- }
799
-
800
- .bg-bubbles li:nth-child(6) {
801
- left: 80%;
802
- width: 120px;
803
- height: 120px;
804
- -webkit-animation-delay: 3s;
805
- animation-delay: 3s;
806
- background-color: rgba(255, 255, 255, 0.2);
807
- }
808
-
809
- .bg-bubbles li:nth-child(7) {
810
- left: 32%;
811
- width: 160px;
812
- height: 160px;
813
- -webkit-animation-delay: 7s;
814
- animation-delay: 7s;
815
- }
816
-
817
- .bg-bubbles li:nth-child(8) {
818
- left: 55%;
819
- width: 20px;
820
- height: 20px;
821
- -webkit-animation-delay: 15s;
822
- animation-delay: 15s;
823
- -webkit-animation-duration: 40s;
824
- animation-duration: 40s;
825
- }
826
-
827
- .bg-bubbles li:nth-child(9) {
828
- left: 25%;
829
- width: 10px;
830
- height: 10px;
831
- -webkit-animation-delay: 2s;
832
- animation-delay: 2s;
833
- -webkit-animation-duration: 40s;
834
- animation-duration: 40s;
835
- background-color: rgba(255, 255, 255, 0.3);
836
- }
837
-
838
- .bg-bubbles li:nth-child(10) {
839
- left: 90%;
840
- width: 160px;
841
- height: 160px;
842
- -webkit-animation-delay: 11s;
843
- animation-delay: 11s;
844
- }
845
-
846
- @-webkit-keyframes square {
847
- 0% {
848
- -webkit-transform: translateY(0);
849
- transform: translateY(0);
850
- }
851
- 100% {
852
- -webkit-transform: translateY(-700px) rotate(600deg);
853
- transform: translateY(-700px) rotate(600deg);
854
- }
855
- }
856
-
857
- @keyframes square {
858
- 0% {
859
- -webkit-transform: translateY(0);
860
- transform: translateY(0);
861
- }
862
- 100% {
863
- -webkit-transform: translateY(-700px) rotate(600deg);
864
- transform: translateY(-700px) rotate(600deg);
865
- }
866
- }
867
-
868
- .loading {
869
- width: 36%;
870
- height: 7%;
871
- position: absolute;
872
- top: 30%;
873
- left: 32%;
874
- line-height: 56px;
875
- color: #fff;
876
- padding-left: 60px;
877
- font-size: 15px;
878
- background: #000 url(../assets/loging.gif) no-repeat 10px 50%;
879
- opacity: 0.7;
880
- z-index: 9999;
881
- -moz-border-radius: 20px;
882
- -webkit-border-radius: 20px;
883
- border-radius: 20px;
884
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
885
- }
886
- </style>
887
- <style>
888
- /* 短信验证码弹窗样式 */
889
- .sms-modal-body {
890
- padding: 0 !important;
891
- }
892
-
893
- .sms-wrap {
894
- background: #fff;
895
- padding: 32px 28px 28px;
896
- text-align: center;
897
- min-width: 280px;
898
- }
899
-
900
- .sms-top {
901
- margin-bottom: 16px;
902
- }
903
-
904
- .sms-top-icon {
905
- width: 44px;
906
- height: 44px;
907
- margin: 0 auto;
908
- background: #EFF6FF;
909
- border-radius: 12px;
910
- display: flex;
911
- align-items: center;
912
- justify-content: center;
913
- }
914
-
915
- .sms-top-icon svg {
916
- width: 22px;
917
- height: 22px;
918
- color: #3B82F6;
919
- }
920
-
921
- .sms-ct {
922
- margin-bottom: 20px;
923
- }
924
-
925
- .sms-ct-label {
926
- font-size: 18px;
927
- font-weight: 600;
928
- color: #111;
929
- margin-bottom: 6px;
930
- }
931
-
932
- .sms-ct-tip {
933
- font-size: 13px;
934
- color: #888;
935
- line-height: 1.5;
936
- }
937
-
938
- .sms-field {
939
- margin-bottom: 20px;
940
- }
941
-
942
- .sms-field-hint {
943
- font-size: 12px;
944
- color: #aaa;
945
- margin-bottom: 8px;
946
- text-align: left;
947
- }
948
-
949
- .sms-code-box {
950
- position: relative;
951
- margin-bottom: 6px;
952
- }
953
-
954
- .sms-code-ipt {
955
- width: 100%;
956
- height: 46px;
957
- border: 1px solid #E5E7EB;
958
- border-radius: 10px;
959
- padding: 0 14px;
960
- font-size: 18px;
961
- color: #111;
962
- background: #FAFAFA;
963
- text-align: center;
964
- letter-spacing: 6px;
965
- outline: none;
966
- box-sizing: border-box;
967
- transition: border-color 0.2s;
968
- }
969
-
970
- .sms-code-ipt:focus {
971
- border-color: #3B82F6;
972
- background: #fff;
973
- }
974
-
975
- .sms-code-ipt::placeholder {
976
- color: #CCC;
977
- letter-spacing: 1px;
978
- font-size: 14px;
979
- }
980
-
981
- .sms-extra {
982
- font-size: 12px;
983
- color: #AAA;
984
- text-align: right;
985
- }
986
-
987
- .expiry-warn {
988
- color: #EF4444;
989
- }
990
-
991
- .sms-actions {
992
- display: flex;
993
- gap: 12px;
994
- }
995
-
996
- .sms-act-ok {
997
- flex: 1;
998
- height: 44px;
999
- border: none;
1000
- border-radius: 10px;
1001
- background: #3B82F6;
1002
- color: #fff;
1003
- font-size: 16px;
1004
- font-weight: 500;
1005
- cursor: pointer;
1006
- transition: background 0.2s;
1007
- }
1008
-
1009
- .sms-act-ok:active {
1010
- background: #2563EB;
1011
- }
1012
-
1013
- .sms-act-no {
1014
- flex: 1;
1015
- height: 44px;
1016
- border: 1px solid #E5E7EB;
1017
- border-radius: 10px;
1018
- background: #FAFAFA;
1019
- color: #666;
1020
- font-size: 16px;
1021
- font-weight: 500;
1022
- cursor: pointer;
1023
- transition: background 0.2s;
1024
- }
1025
-
1026
- .sms-act-no:active {
1027
- background: #F3F4F6;
1028
- }
1029
- </style>
1030
-
1
+ <template>
2
+ <div class="loginbg" id="outheight">
3
+ <!--输入框-->
4
+ <div class="htmleaf-container">
5
+ <div class="wrapper" :class="{'form-success': login}">
6
+ <div class="container">
7
+ <h3 style="color:white; margin-top: 15px">欢迎使用</h3>
8
+ <p class="form" :style="{'margin-top': margintop + 'px'}">
9
+ <input type="text" v-model="ename" class="usericon"/>
10
+ <input :type="showpass==true?'text':'password'" v-model="password" class="psicon"/>
11
+ <img :src="imageurl"
12
+ style="width: 20px;margin-bottom: 5px;position: absolute;left: 62%;bottom: 43%;"
13
+ alt=""
14
+ @click="changepass()"/>
15
+ <button type="button" id="login-button" @click.prevent="confirm()"><strong>登录</strong></button>
16
+ </p>
17
+ <div class="row">
18
+ <img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showsave"
19
+ @click="showoff()">
20
+ <img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="!showsave"
21
+ @click="showon()">
22
+ <span class="text-left font">记住密码</span>
23
+ <img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '1'"
24
+ @click="showoff1()">
25
+ <img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '2'"
26
+ @click="showon1()">
27
+ <span class="text-left font">自动登录</span>
28
+ <p></p>
29
+ <span class="versiontext" style="margin-top: 10px" v-if="version">当前版本:{{ version }}</span>
30
+ <!-- <span class="devicetext">设备码:{{ deviceIemi }}</span>-->
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ <!--<load-appdata @ready="onReady"></load-appdata>-->
36
+ <div style="width: 100%;height: 100%;position: fixed;top: 0px;" v-show="loaderShow">
37
+ <div id="loading" class="loading">登陆中...</div>
38
+ </div>
39
+ <modal :show.sync="modifyPassword" backdrop="false">
40
+ <header slot="modal-header" class="modal-header">
41
+ </header>
42
+ <article slot="modal-body" class="modal-body">
43
+ <modify-pass-word :sourse="login" :weak-password="weakPassword" v-if="modifyPassword"
44
+ v-on:success="success"></modify-pass-word>
45
+ </article>
46
+ <footer slot="modal-footer" class="modal-footer">
47
+ </footer>
48
+ </modal>
49
+ <!-- 短信验证码弹窗 -->
50
+ <modal :show.sync="smsModalShow" backdrop="true">
51
+ <div slot="modal-header"></div>
52
+ <article slot="modal-body" class="sms-modal-body">
53
+ <div class="sms-wrap">
54
+ <div class="sms-top">
55
+ <div class="sms-top-icon">
56
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
57
+ <rect x="2" y="4" width="20" height="16" rx="3"/>
58
+ <path d="M7 8h4M13 8h4M7 12h10M7 16h2M13 16h4"/>
59
+ </svg>
60
+ </div>
61
+ </div>
62
+ <div class="sms-ct">
63
+ <div class="sms-ct-label">短信验证码</div>
64
+ <div class="sms-ct-tip">{{ smsModalMessage }}</div>
65
+ </div>
66
+ <div class="sms-field">
67
+ <div class="sms-field-hint">请输入6位验证码</div>
68
+ <div class="sms-code-box">
69
+ <input
70
+ class="sms-code-ipt"
71
+ v-model="smsCode"
72
+ maxlength="6"
73
+ @keyup.enter="smsModalConfirm"
74
+ autocomplete="off"
75
+ type="tel"
76
+ />
77
+ </div>
78
+ <div class="sms-extra" :class="{ 'expiry-warn': smsCountdown <= 30 }">
79
+ <template v-if="smsCountdown > 0">剩余 {{ smsCountdown }}s</template>
80
+ <template v-else>已过期</template>
81
+ </div>
82
+ </div>
83
+ <div class="sms-actions">
84
+ <button class="sms-act-ok" @click="smsModalConfirm">确定</button>
85
+ <button class="sms-act-no" @click="smsModalCancel">取消</button>
86
+ </div>
87
+ </div>
88
+ </article>
89
+ <div slot="modal-footer"></div>
90
+ </modal>
91
+ </div>
92
+ </template>
93
+
94
+ <script>
95
+
96
+ /**
97
+ * 说明:
98
+ * /rs/vue 请求获取到的配置文件有关配置项目
99
+ * telephone.LoginApp.weakPassword:为true 是判断是否弱密码校验
100
+ *
101
+ * globle 校验参数 Device_IEMI 是否需要校验设备iemi编码
102
+ *
103
+ */
104
+
105
+
106
+ import Vue from 'vue'
107
+ import * as Util from '../Util'
108
+ import cryptJS from './EncryptUtil'
109
+ import { validateStrongPasswordPhone } from '../plugins/validateStrongPasswordPhone.js'
110
+ //获取json配置文件
111
+ let asyncReady = async function (self, url) {
112
+ // 获取配置信息
113
+ try {
114
+ console.log("获取营收配置文件和参数【开始】")
115
+ await self.$appdata.load()
116
+ console.log("获取营收配置文件和参数【结束】,开始获取vue配置文件【开始】")
117
+ let that = self
118
+ let res = await Vue.resetget(`${url}/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
119
+ that.$set('config', res.data)
120
+ Vue.config2 = res.data
121
+ // 判断是否需要弱密码校验
122
+ if (self.config && self.config.telephone && self.config.telephone.LoginApp && "undefined" != typeof self.config.telephone.LoginApp.weakPassword) {
123
+ self.weakPassword = self.config.telephone.LoginApp.weakPassword
124
+ }
125
+ console.log("手机端获取.json文件")
126
+ console.log(JSON.stringify(self.config))
127
+ return true
128
+ } catch (error) {
129
+ // 此处业务数据装载异常不做任何处理,理论上不会有任何异常
130
+ self.$showMessage('登录系统: 获取配置文件失败,请检查网络后重新登陆!')
131
+ return false
132
+ }
133
+ }
134
+
135
+ //装载业务数据
136
+ let asyncLoadData = async function (self, url) {
137
+ try {
138
+ // 读取报建本地配置文件
139
+ var result = HostApp.readLocalFile('workflow_apply.json')
140
+ if (result.code == 500) {
141
+ console.log('不存在流程配置文件,即不使用报建app')
142
+ return
143
+ }
144
+ var data = JSON.parse(result.data)
145
+ console.log('读取报建配置文件成功,存入缓存中的data=>' + JSON.stringify(data))
146
+ Vue.workflow_vue = Vue.prototype.$workflow_vue = data
147
+ } catch (error) {
148
+ // 此处业务数据装载异常不做任何处理,理论上不会有任何异常,只有当app版本端版本较低无readlocalfile时会异常
149
+ console.log(error)
150
+ }
151
+ }
152
+
153
+ export default {
154
+ title: '登录系统',
155
+ data() {
156
+ return {
157
+ loaderShow: false,
158
+ config: {},
159
+ weakPassword: false,
160
+ modifyPassword: false,
161
+ version: '',
162
+ ename: '',
163
+ login: 'login',
164
+ password: '',
165
+ showsave: true,
166
+ showauto: '2', // 1 自动登陆 2取消自动登陆
167
+ showpass: false,
168
+ imageurl: require('../assets/miwen.png'),
169
+ deviceIemi: '无法获取该设备码,请联系管理员',
170
+ loginSafe: false,
171
+ margintop: document.documentElement.clientHeight * 0.1,
172
+ // 短信验证码相关
173
+ smsCode: '',
174
+ smsCountdown: 0,
175
+ smsCountdownTimer: null,
176
+ smsModalShow: false,
177
+ smsModalMessage: '',
178
+ // 标记是否处于短信验证流程
179
+ smsLoginFlag: false
180
+ }
181
+ },
182
+
183
+ ready() {
184
+ this.version = Vue.app_version || ''
185
+ if (Vue.android) {
186
+ const userCache = this.$androidUtil.getPreference('login_user_cache')
187
+ this.showauto = this.$androidUtil.getPreference('auto_login')
188
+ this.showauto = this.showauto ? this.showauto : '2'
189
+ console.log(`自动登陆标识ready:${this.showauto}`)
190
+ if (userCache) {
191
+ const userCacheJSON = JSON.parse(userCache.replace(/\'/g, '\"'))
192
+ this.password = userCacheJSON.password
193
+ this.ename = userCacheJSON.username
194
+ }
195
+ // this.deviceIemi = this.$androidUtil.getDeviceIEMI()
196
+ // console.log(`手机设备码:${this.deviceIemi}`)
197
+ if (this.showauto == '1' && this.password) {
198
+ this.confirm()
199
+ }
200
+ }
201
+ },
202
+ methods: {
203
+ success(val) {
204
+ // 修改密码成功
205
+ this.modifyPassword = false
206
+ this.password = val
207
+ },
208
+ startSmsCountdown () {
209
+ if (this.smsCountdownTimer) {
210
+ clearInterval(this.smsCountdownTimer)
211
+ }
212
+ this.smsCountdownTimer = setInterval(() => {
213
+ if (this.smsCountdown > 0) {
214
+ this.smsCountdown--
215
+ } else {
216
+ clearInterval(this.smsCountdownTimer)
217
+ }
218
+ }, 1000)
219
+ },
220
+ stopSmsCountdown () {
221
+ if (this.smsCountdownTimer) {
222
+ clearInterval(this.smsCountdownTimer)
223
+ this.smsCountdownTimer = null
224
+ }
225
+ },
226
+ smsModalConfirm () {
227
+ if (this.smsCode === '') {
228
+ this.$showMessage('请输入短信验证码')
229
+ return
230
+ }
231
+ this.smsLoginFlag = true
232
+ // 调用 confirm 方法完成 Step2
233
+ this.confirm()
234
+ },
235
+ smsModalCancel () {
236
+ this.smsModalShow = false
237
+ this.smsLoginFlag = false
238
+ this.stopSmsCountdown()
239
+ this.smsCode = ''
240
+ this.loaderShow = false
241
+ },
242
+ // 对资源菜单进行排序
243
+ sortFunctions (val) {
244
+ this.sortArr(val)
245
+ val.forEach((item)=>{
246
+ if(item.children && Array.isArray(item.children)){
247
+ this.sortArr(item.children)
248
+ }
249
+ })
250
+ return val
251
+ },
252
+ sortArr(val){
253
+ val.sort((itemA, itemB)=>{
254
+ if(itemA.position !== itemB.position){
255
+ return itemA.position - itemB.position
256
+ }else{
257
+ return itemA.id - itemB.id
258
+ }
259
+ })
260
+ },
261
+ // 记住密码选中/未选中
262
+ showoff() {
263
+ this.showsave = false
264
+ },
265
+ showon() {
266
+ this.showsave = true
267
+ },
268
+ showoff1() {
269
+ this.showauto = '2'
270
+ },
271
+ showon1() {
272
+ this.showauto = '1'
273
+ },
274
+ changepass() {
275
+ this.showpass = this.showpass ? false : true
276
+ if (this.showpass) {
277
+ this.imageurl = require("../assets/mingwen.png")
278
+ } else {
279
+ this.imageurl = require("../assets/miwen.png")
280
+ }
281
+ },
282
+ async confirm() {
283
+ this.loaderShow = true
284
+ console.log('Vue.android:' + Vue.android)
285
+ const userData = {username: this.ename, password: this.password}
286
+ console.log('获取登陆信息:' + userData)
287
+ Vue.dataUrl = this.$androidUtil.getProxyUrl() + "/"
288
+ let loginData = {
289
+ username: this.ename,
290
+ password: this.password,
291
+ resourceName: '手机服务'
292
+ }
293
+ let ret = {}
294
+ if(Vue.isafsystem){
295
+ try {
296
+ ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-auth/login`, loginData, {
297
+ resolveMsg: null,
298
+ rejectMsg: null,
299
+ headerConfig: {'Content-type': 'application/json'}
300
+ })
301
+ if (ret.data) {
302
+ if (ret.data.resources.data && ret.data.resources.data.id) {
303
+ loginData = ret.data.resources.data
304
+ } else {
305
+ loginData = ret.data.resources
306
+ }
307
+ this.$androidUtil.setPreference('siteId', loginData.f_extend1 || '')
308
+ this.$androidUtil.setPreference('flatId', loginData.f_extend2 || '')
309
+ this.$androidUtil.setPreference('name', loginData.name || '')
310
+ this.$androidUtil.setPreference('ename', loginData.ename || '')
311
+ } else {
312
+ throw {status: ret.data.code, message: ret.data.msg}
313
+ }
314
+ // 设置登录人
315
+ Vue.user = Util.f = loginData
316
+ // 功能排序
317
+ Vue.functions = this.sortFunctions(loginData.functions)
318
+ }catch (e) {
319
+ if (Vue.android) {
320
+ this.loaderShow = false
321
+ this.$showMessage(e.message ? e.message : '登录失败!用户名或密码错误!')
322
+ }
323
+ return
324
+ }
325
+ }else{
326
+ try {
327
+ let data = {name: this.ename, password: this.password}
328
+ // Step2: 如果有 smsLoginFlag 且有待提交的验证码,则一起发送
329
+ if (this.smsLoginFlag && this.smsCode) {
330
+ data.smsCode = this.smsCode
331
+ }
332
+ data = '$' + cryptJS.RSAEncrypt(JSON.stringify(data))
333
+ const getLogin = await Vue.resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/getLogin`, data, {resolveMsg: null, rejectMsg: null})
334
+ // 检查是否需要短信验证码(Step1 返回时,smsLoginFlag 为 false)
335
+ if (getLogin.data.needsSmsCode && !this.smsLoginFlag) {
336
+ this.loaderShow = false
337
+ this.smsCountdown = getLogin.data.expireSeconds || 300
338
+ this.smsModalMessage = getLogin.data.states || ('短信验证码已发送至' + getLogin.data.maskedPhone + ',请输入')
339
+ this.startSmsCountdown()
340
+ this.smsLoginFlag = true
341
+ this.smsModalShow = true
342
+ return
343
+ }
344
+ if (getLogin.data.states === '登录成功'){
345
+ // Step2 成功后清理状态
346
+ if (this.smsLoginFlag) {
347
+ this.smsCode = ''
348
+ this.smsLoginFlag = false
349
+ this.smsModalShow = false
350
+ }
351
+ // 初始化 Vue.$login
352
+ Vue.$login = Vue.prototype.$login = {
353
+ jwt: getLogin.data.jwt,
354
+ jwtNew: getLogin.data.jwtNew,
355
+ 'v3-session-key': getLogin.data.s ? cryptJS.RSADecrypt(getLogin.data.s) : '',
356
+ toStandardDateString() {
357
+ const dt = new Date()
358
+ const month = dt.getMonth() + 1
359
+ const date = dt.getDate()
360
+ return `${dt.getFullYear()}-${month < 10 ? '0' + month : month}-${date < 10 ? '0' + date : date}`
361
+ },
362
+ toStandardTimeString() {
363
+ const dt = new Date()
364
+ const month = dt.getMonth() + 1
365
+ const date = dt.getDate()
366
+ const hour = dt.getHours()
367
+ const min = dt.getMinutes()
368
+ const sec = dt.getSeconds()
369
+ return `${dt.getFullYear()}-${month < 10 ? '0' + month : month}-${date < 10 ? '0' + date : date} ${hour < 10 ? '0' + hour : hour}:${min < 10 ? '0' + min : min}:${sec < 10 ? '0' + sec : sec}`
370
+ }
371
+ }
372
+ // 调用远程登录服务,获取所有有权访问的功能
373
+ data = {username: this.ename, password: this.password}
374
+ data = cryptJS.RSAEncrypt(JSON.stringify(data))
375
+ ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/user/userLogin/手机服务`, data, {
376
+ resolveMsg: null,
377
+ rejectMsg: null
378
+ })
379
+ this.$androidUtil.setPreference('siteId', ret.data.f_extend1 || '')
380
+ this.$androidUtil.setPreference('flatId', ret.data.f_extend2 || '')
381
+ this.$androidUtil.setPreference('name', ret.data.name || '')
382
+ this.$androidUtil.setPreference('ename', ret.data.ename || '')
383
+ if ((JSON.stringify(ret.data).startsWith("{") || JSON.stringify(ret.data).data.startsWith("[")) && ret.data.code && ret.data.msg && ret.data.code !== 200) {
384
+ throw {status: ret.data.code, message: ret.data.msg}
385
+ }
386
+ // 设置登录人
387
+ if ((JSON.stringify(ret.data).startsWith("{") || JSON.stringify(ret.data).data.startsWith("[")) && ret.data.code && ret.data.msg && ret.data.code === 200) {
388
+ Vue.user = Vue.$login.f = Util.f = ret.data.data
389
+ } else {
390
+ Vue.user = Vue.$login.f = Util.f = ret.data
391
+ }
392
+ // 功能排序
393
+ if ((JSON.stringify(ret.data).startsWith("{") || JSON.stringify(ret.data).data.startsWith("[")) && ret.data.code && ret.data.msg && ret.data.code === 200) {
394
+ Vue.functions = this.sortFunctions(ret.data.data.functions)
395
+ } else {
396
+ Vue.functions = this.sortFunctions(ret.data.functions)
397
+ }
398
+ }else {
399
+ if(Vue.$login && Vue.$login['v3-session-key']){
400
+ Vue.$login.s = null
401
+ Vue.$login.jwt = null
402
+ Vue.$login.jwtNew = null
403
+ Vue.$login['v3-session-key'] = null
404
+ }
405
+ this.loaderShow = false
406
+ this.$showMessage(getLogin.data.states)
407
+ return
408
+ }
409
+ }catch (e) {
410
+ if(Vue.$login && Vue.$login.s){
411
+ Vue.$login.s = null
412
+ Vue.$login['v3-session-key'] = null
413
+ }
414
+ if (Vue.android) {
415
+ this.loaderShow = false
416
+ this.$showMessage(e.message ? e.message : '登录失败!用户名或密码错误!')
417
+ }
418
+ return
419
+ }
420
+ }
421
+ // 更新 jwt(Vue.$login 已在 getLogin 成功后初始化)
422
+ if(Vue.isafsystem){
423
+ Vue.$login.jwt = loginData.id
424
+ Vue.$login.jwtNew = ret.data.access_token
425
+ }else{
426
+ console.log("ret", ret)
427
+ if ((JSON.stringify(ret.data).startsWith("{") || JSON.stringify(ret.data).startsWith("[")) && ret.data.code && ret.data.msg && ret.data.code === 200) {
428
+ Vue.$login.jwt = ret.data.data.id
429
+ }else{
430
+ Vue.$login.jwt = ret.data.id
431
+ }
432
+ }
433
+ // 对资源菜单进行排序
434
+ let viewDetails = await Vue.resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, {
435
+ source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
436
+ userid: Vue.user.id
437
+ }, {resolveMsg: null, rejectMsg: null})
438
+ const rithtList = viewDetails.data
439
+ Vue.user.r = []
440
+ rithtList.forEach(x => Vue.user.r.push(x.name))
441
+ console.log('登陆人信息', JSON.stringify(Vue.user))
442
+ let userStr
443
+ if (Vue.android) {
444
+ console.log(`Device_IEMI:${this.$androidUtil.getPreference('Device_IEMI')}`)
445
+ // 判断是否需要验证 设备码
446
+ if (this.$androidUtil.getPreference('Device_IEMI')) {
447
+ console.log(`手机设备码:${this.deviceIemi}`)
448
+ let result = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
449
+ data: {
450
+ items: '*',
451
+ tablename: 't_equipment',
452
+ orderitem: 'id desc',
453
+ condition: `f_terminal_number = '${this.deviceIemi}' and f_state = '正常'`
454
+ }
455
+ }, {resolveMsg: null, rejectMsg: null})
456
+ console.log(`检测设备码存在是否:${result.data.length}`)
457
+ if (result.data.length == 0) {
458
+ HostApp.alert('设备码未绑定,请联系管理员!')
459
+ return
460
+ }
461
+ }
462
+ if (this.showsave) {
463
+ userStr = `{'username':'${this.ename}','password':'${this.password}'}`
464
+ } else {
465
+ userStr = `{'username':'${this.ename}','password':''}`
466
+ }
467
+ console.log(this.showauto)
468
+ this.$androidUtil.setPreference('login_user_cache', userStr)
469
+ this.$androidUtil.setPreference('f_repairman_id', Util.f.id)
470
+ this.$androidUtil.setPreference('f_repairman_name', Util.f.name)
471
+ this.$androidUtil.setPreference('f_orgid', Util.f.orgid)
472
+ this.$androidUtil.setPreference('f_role_name', Util.f.f_role_name || '')
473
+ console.log("自动登陆标识" + Util.f.f_role_name)
474
+ this.$androidUtil.setPreference('auto_login', this.showauto)
475
+ }
476
+ // 获取参数
477
+ console.log('获取参数system以及安检参数')
478
+ const flag = await asyncReady(this, this.$androidUtil.getProxyUrl())
479
+ if (!flag) {
480
+ this.loaderShow = false
481
+ console.log('获取参数异常')
482
+ return
483
+ }
484
+ console.log('获取参数结束')
485
+ this.loaderShow = false
486
+ // 弱口令验证
487
+ if (this.weakPassword) {
488
+ const pwdResult = validateStrongPasswordPhone(this.password)
489
+ if (!pwdResult.isValid) {
490
+ await this.$showMessage('登录系统: 此账户的密码过于简单,' + (pwdResult.errors[0] || '请修改密码后重新登陆!!!'), ['confirm'])
491
+ this.modifyPassword = true
492
+ return
493
+ }
494
+ }
495
+ this.$goto('nav-bottom')
496
+ },
497
+ },
498
+ beforeDestroy () {
499
+ this.stopSmsCountdown()
500
+ },
501
+ watch: {
502
+ 'config'(val) {
503
+ Vue.config = val
504
+ }
505
+ }
506
+ }
507
+ </script>
508
+ <style scoped="">
509
+ .versiontext, .devicetext {
510
+ font: 13px PingFang-SC-Medium;
511
+ position: fixed;
512
+ width: 100%;
513
+ left: 50%;
514
+ transform: translateX(-50%);
515
+ text-align: center;
516
+ }
517
+ .versiontext {
518
+ bottom: 33px;
519
+ }
520
+ .devicetext {
521
+ bottom: 13px;
522
+ }
523
+
524
+ /*输入框样式*/
525
+ /*@import url(http://fonts.useso.com/css?family=Source+Sans+Pro:200,300);*/
526
+ * {
527
+ box-sizing: border-box;
528
+ margin: 0;
529
+ padding: 0;
530
+ font-weight: 300;
531
+ }
532
+
533
+ .loginbg {
534
+ font-family: 'Source Sans Pro', sans-serif;
535
+ color: white;
536
+ font-weight: 300;
537
+ }
538
+
539
+ .loginbg ::-webkit-input-placeholder {
540
+ /* WebKit browsers */
541
+ font-family: 'Source Sans Pro', sans-serif;
542
+ color: white;
543
+ font-weight: 300;
544
+ }
545
+
546
+ .loginbg :-moz-placeholder {
547
+ /* Mozilla Firefox 4 to 18 */
548
+ font-family: 'Source Sans Pro', sans-serif;
549
+ color: white;
550
+ opacity: 1;
551
+ font-weight: 300;
552
+ }
553
+
554
+ .loginbg ::-moz-placeholder {
555
+ /* Mozilla Firefox 19+ */
556
+ font-family: 'Source Sans Pro', sans-serif;
557
+ color: white;
558
+ opacity: 1;
559
+ font-weight: 300;
560
+ }
561
+
562
+ .loginbg :-ms-input-placeholder {
563
+ /* Internet Explorer 10+ */
564
+ font-family: 'Source Sans Pro', sans-serif;
565
+ color: white;
566
+ font-weight: 300;
567
+ }
568
+
569
+ .wrapper {
570
+ /*background: #2D83BA;
571
+ background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
572
+ background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
573
+ opacity: 0.8;*/
574
+ /*position: absolute;*/
575
+ /*top: 50%;
576
+ right: 10%;
577
+ width: 40%;
578
+ height: 350px;
579
+ margin-top: -150px;*/
580
+ overflow: hidden;
581
+ }
582
+
583
+ .wrapper.form-success .container h3 {
584
+ -webkit-transform: translateY(85px);
585
+ -ms-transform: translateY(85px);
586
+ transform: translateY(85px);
587
+ }
588
+
589
+ .container {
590
+ /*max-width: 350px;*/
591
+ margin: 0 auto;
592
+ /*padding: 30px 100px 50px 100px;
593
+ height: 350px;*/
594
+ text-align: center;
595
+ /*以下增加*/
596
+ /*background: #2D83BA;
597
+ background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
598
+ background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);*/
599
+ opacity: 0.8;
600
+ }
601
+
602
+ .container h3 {
603
+ font-size: 40px;
604
+ -webkit-transition-duration: 1s;
605
+ transition-duration: 1s;
606
+ -webkit-transition-timing-function: ease-in-out;
607
+ transition-timing-function: ease-in-out;
608
+ font-weight: 200;
609
+ }
610
+
611
+ .form {
612
+ padding: 20px 0;
613
+ /*margin-top: 15%;*/
614
+ position: relative;
615
+ z-index: 2;
616
+ }
617
+
618
+ .form input {
619
+ -webkit-appearance: none;
620
+ -moz-appearance: none;
621
+ appearance: none;
622
+ outline: 0;
623
+ border: 1px solid #50ABE6;
624
+ background-color: #50ABE6;
625
+ width: 250px;
626
+ border-radius: 3px;
627
+ padding: 10px 15px;
628
+ margin: 0 auto 10px auto;
629
+ display: block;
630
+ text-align: center;
631
+ font-size: 18px;
632
+ color: white;
633
+ -webkit-transition-duration: 0.25s;
634
+ transition-duration: 0.25s;
635
+ font-weight: 300;
636
+ }
637
+
638
+ .form input:hover {
639
+ background-color: rgba(255, 255, 255, 0.4);
640
+ }
641
+
642
+ .form input:focus {
643
+ background-color: white;
644
+ width: 300px;
645
+ color: #53e3a6;
646
+ }
647
+
648
+ .usericon {
649
+ background-image: url(../assets/usericon.png);
650
+ background-repeat: no-repeat;
651
+ background-size: 30px;
652
+ background-position-x: 8px;
653
+ background-position-y: 8px;
654
+ }
655
+
656
+ .psicon {
657
+ background-image: url(../assets/psicon.png);
658
+ background-repeat: no-repeat;
659
+ background-size: 30px;
660
+ background-position-x: 8px;
661
+ background-position-y: 8px;
662
+ }
663
+
664
+ .form button {
665
+ -webkit-appearance: none;
666
+ -moz-appearance: none;
667
+ appearance: none;
668
+ outline: 0;
669
+ background-color: white;
670
+ border: 0;
671
+ padding: 10px 15px;
672
+ color: #253830;
673
+ border-radius: 3px;
674
+ width: 250px;
675
+ cursor: pointer;
676
+ font-size: 18px;
677
+ -webkit-transition-duration: 0.25s;
678
+ transition-duration: 0.25s;
679
+ }
680
+
681
+ .form button:hover {
682
+ background-color: #f5f7f9;
683
+ }
684
+
685
+ /*注册字体样式*/
686
+ .form span {
687
+ color: #fff;
688
+ display: table-footer-group;
689
+ position: absolute;
690
+ right: 10px;
691
+ margin-top: 10px;
692
+ cursor: pointer;
693
+ }
694
+
695
+ .logotitle {
696
+ color: #fff;
697
+ position: absolute;
698
+ top: 50px;
699
+ left: 50px;
700
+ font-size: 50px;
701
+ }
702
+
703
+ /*注册模态框界面样式*/
704
+ .modifystyle {
705
+ background: #FCFEEE;
706
+ }
707
+
708
+ .modifystyle div {
709
+ height: auto;
710
+ margin-bottom: 15px;
711
+ /*text-align: center;*/
712
+ /*margin-left: 20%;*/
713
+ }
714
+
715
+ /*bootstrap字体图标要手动调整,所以使用字体图标的span必须紧跟在input后面,负责会错位*/
716
+ .modifystyle div input + span {
717
+ top: 0 !important;
718
+ right: 32%;
719
+ }
720
+
721
+ .modifystyle span {
722
+ color: red;
723
+ }
724
+
725
+ /* 通告区内容 */
726
+ .notice-board {
727
+ height: auto;
728
+ position: absolute;
729
+ top: 50%;
730
+ margin-top: -150px;
731
+ margin-left: 100px;
732
+ color: #fff;
733
+ }
734
+
735
+ /*修改密码底部按钮部分样式*/
736
+ .footerbtn {
737
+ text-align: center;
738
+ padding: 15px;
739
+ }
740
+
741
+ .footerbtn button {
742
+ width: 100px;
743
+ margin-left: 20px;
744
+ }
745
+
746
+ .bg-bubbles {
747
+ position: absolute;
748
+ top: 0;
749
+ left: 0;
750
+ width: 100%;
751
+ height: 100%;
752
+ z-index: 1;
753
+ }
754
+
755
+ .bg-bubbles li {
756
+ position: absolute;
757
+ list-style: none;
758
+ display: block;
759
+ width: 40px;
760
+ height: 40px;
761
+ background-color: rgba(255, 255, 255, 0.15);
762
+ bottom: -160px;
763
+ -webkit-animation: square 25s infinite;
764
+ animation: square 25s infinite;
765
+ -webkit-transition-timing-function: linear;
766
+ transition-timing-function: linear;
767
+ }
768
+
769
+ .bg-bubbles li:nth-child(1) {
770
+ left: 10%;
771
+ }
772
+
773
+ .bg-bubbles li:nth-child(2) {
774
+ left: 20%;
775
+ width: 80px;
776
+ height: 80px;
777
+ -webkit-animation-delay: 2s;
778
+ animation-delay: 2s;
779
+ -webkit-animation-duration: 17s;
780
+ animation-duration: 17s;
781
+ }
782
+
783
+ .bg-bubbles li:nth-child(3) {
784
+ left: 25%;
785
+ -webkit-animation-delay: 4s;
786
+ animation-delay: 4s;
787
+ }
788
+
789
+ .bg-bubbles li:nth-child(4) {
790
+ left: 40%;
791
+ width: 60px;
792
+ height: 60px;
793
+ -webkit-animation-duration: 22s;
794
+ animation-duration: 22s;
795
+ background-color: rgba(255, 255, 255, 0.25);
796
+ }
797
+
798
+ .bg-bubbles li:nth-child(5) {
799
+ left: 70%;
800
+ }
801
+
802
+ .bg-bubbles li:nth-child(6) {
803
+ left: 80%;
804
+ width: 120px;
805
+ height: 120px;
806
+ -webkit-animation-delay: 3s;
807
+ animation-delay: 3s;
808
+ background-color: rgba(255, 255, 255, 0.2);
809
+ }
810
+
811
+ .bg-bubbles li:nth-child(7) {
812
+ left: 32%;
813
+ width: 160px;
814
+ height: 160px;
815
+ -webkit-animation-delay: 7s;
816
+ animation-delay: 7s;
817
+ }
818
+
819
+ .bg-bubbles li:nth-child(8) {
820
+ left: 55%;
821
+ width: 20px;
822
+ height: 20px;
823
+ -webkit-animation-delay: 15s;
824
+ animation-delay: 15s;
825
+ -webkit-animation-duration: 40s;
826
+ animation-duration: 40s;
827
+ }
828
+
829
+ .bg-bubbles li:nth-child(9) {
830
+ left: 25%;
831
+ width: 10px;
832
+ height: 10px;
833
+ -webkit-animation-delay: 2s;
834
+ animation-delay: 2s;
835
+ -webkit-animation-duration: 40s;
836
+ animation-duration: 40s;
837
+ background-color: rgba(255, 255, 255, 0.3);
838
+ }
839
+
840
+ .bg-bubbles li:nth-child(10) {
841
+ left: 90%;
842
+ width: 160px;
843
+ height: 160px;
844
+ -webkit-animation-delay: 11s;
845
+ animation-delay: 11s;
846
+ }
847
+
848
+ @-webkit-keyframes square {
849
+ 0% {
850
+ -webkit-transform: translateY(0);
851
+ transform: translateY(0);
852
+ }
853
+ 100% {
854
+ -webkit-transform: translateY(-700px) rotate(600deg);
855
+ transform: translateY(-700px) rotate(600deg);
856
+ }
857
+ }
858
+
859
+ @keyframes square {
860
+ 0% {
861
+ -webkit-transform: translateY(0);
862
+ transform: translateY(0);
863
+ }
864
+ 100% {
865
+ -webkit-transform: translateY(-700px) rotate(600deg);
866
+ transform: translateY(-700px) rotate(600deg);
867
+ }
868
+ }
869
+
870
+ .loading {
871
+ width: 36%;
872
+ height: 7%;
873
+ position: absolute;
874
+ top: 30%;
875
+ left: 32%;
876
+ line-height: 56px;
877
+ color: #fff;
878
+ padding-left: 60px;
879
+ font-size: 15px;
880
+ background: #000 url(../assets/loging.gif) no-repeat 10px 50%;
881
+ opacity: 0.7;
882
+ z-index: 9999;
883
+ -moz-border-radius: 20px;
884
+ -webkit-border-radius: 20px;
885
+ border-radius: 20px;
886
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
887
+ }
888
+ </style>
889
+ <style>
890
+ /* 短信验证码弹窗样式 */
891
+ .sms-modal-body {
892
+ padding: 0 !important;
893
+ }
894
+
895
+ .sms-wrap {
896
+ background: #fff;
897
+ padding: 32px 28px 28px;
898
+ text-align: center;
899
+ min-width: 280px;
900
+ }
901
+
902
+ .sms-top {
903
+ margin-bottom: 16px;
904
+ }
905
+
906
+ .sms-top-icon {
907
+ width: 44px;
908
+ height: 44px;
909
+ margin: 0 auto;
910
+ background: #EFF6FF;
911
+ border-radius: 12px;
912
+ display: flex;
913
+ align-items: center;
914
+ justify-content: center;
915
+ }
916
+
917
+ .sms-top-icon svg {
918
+ width: 22px;
919
+ height: 22px;
920
+ color: #3B82F6;
921
+ }
922
+
923
+ .sms-ct {
924
+ margin-bottom: 20px;
925
+ }
926
+
927
+ .sms-ct-label {
928
+ font-size: 18px;
929
+ font-weight: 600;
930
+ color: #111;
931
+ margin-bottom: 6px;
932
+ }
933
+
934
+ .sms-ct-tip {
935
+ font-size: 13px;
936
+ color: #888;
937
+ line-height: 1.5;
938
+ }
939
+
940
+ .sms-field {
941
+ margin-bottom: 20px;
942
+ }
943
+
944
+ .sms-field-hint {
945
+ font-size: 12px;
946
+ color: #aaa;
947
+ margin-bottom: 8px;
948
+ text-align: left;
949
+ }
950
+
951
+ .sms-code-box {
952
+ position: relative;
953
+ margin-bottom: 6px;
954
+ }
955
+
956
+ .sms-code-ipt {
957
+ width: 100%;
958
+ height: 46px;
959
+ border: 1px solid #E5E7EB;
960
+ border-radius: 10px;
961
+ padding: 0 14px;
962
+ font-size: 18px;
963
+ color: #111;
964
+ background: #FAFAFA;
965
+ text-align: center;
966
+ letter-spacing: 6px;
967
+ outline: none;
968
+ box-sizing: border-box;
969
+ transition: border-color 0.2s;
970
+ }
971
+
972
+ .sms-code-ipt:focus {
973
+ border-color: #3B82F6;
974
+ background: #fff;
975
+ }
976
+
977
+ .sms-code-ipt::placeholder {
978
+ color: #CCC;
979
+ letter-spacing: 1px;
980
+ font-size: 14px;
981
+ }
982
+
983
+ .sms-extra {
984
+ font-size: 12px;
985
+ color: #AAA;
986
+ text-align: right;
987
+ }
988
+
989
+ .expiry-warn {
990
+ color: #EF4444;
991
+ }
992
+
993
+ .sms-actions {
994
+ display: flex;
995
+ gap: 12px;
996
+ }
997
+
998
+ .sms-act-ok {
999
+ flex: 1;
1000
+ height: 44px;
1001
+ border: none;
1002
+ border-radius: 10px;
1003
+ background: #3B82F6;
1004
+ color: #fff;
1005
+ font-size: 16px;
1006
+ font-weight: 500;
1007
+ cursor: pointer;
1008
+ transition: background 0.2s;
1009
+ }
1010
+
1011
+ .sms-act-ok:active {
1012
+ background: #2563EB;
1013
+ }
1014
+
1015
+ .sms-act-no {
1016
+ flex: 1;
1017
+ height: 44px;
1018
+ border: 1px solid #E5E7EB;
1019
+ border-radius: 10px;
1020
+ background: #FAFAFA;
1021
+ color: #666;
1022
+ font-size: 16px;
1023
+ font-weight: 500;
1024
+ cursor: pointer;
1025
+ transition: background 0.2s;
1026
+ }
1027
+
1028
+ .sms-act-no:active {
1029
+ background: #F3F4F6;
1030
+ }
1031
+ </style>
1032
+