fei.wang
2025-03-17 afedb522ac910d1e5265ad93b9bacb1da41cfefb
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<template>
    <div class="body">
        <!-- <div class="bg"> -->
        <div class="loginav">
            <div class="video" style="position: relative;">
                <video src="../../assets/images/video.mp4" muted autoplay loop></video>
 
            </div>
            <div class=""></div>
            <div class="loginbox boxall" style="width: 450px;">
                <div class="logo">
                    <h1 id="title">北斗监测平台系统</h1>
                    <!-- <img src="images/logo.png"> -->
                </div>
                <a href="javascript:;" class="yonghulog" @click="yonghu()"
                    v-if="loginmethod == '2' || loginmethod == '0'">
                    <div class="logintit yh" :style="{ 'display': 'inline-block', 'text-decoration': texthu }">用户登录
                    </div>
                </a><a class="duanxinlog" href="javascript:;" @click="duanxin()"
                    v-if="loginmethod == '2' || loginmethod == '1'">
                    <div class="logintit dx"
                        :style="{ 'display': 'inline-block', 'margin-left': mleft, 'text-decoration': textdu }">短信登录
                    </div>
                </a>
                <ul class="logininput" v-if="loginway == 'yonghu'">
                    <li>
                        <i><img src="../../assets/images/user.png"></i>
                        <input class="forminput" value="" v-model="loginForm.username" required type="text"
                            placeholder="用户名">
                    </li>
                    <li>
                        <i><img src="../../assets/images/password.png"></i>
 
                        <input class="forminput" :type="passwordType" v-model="loginForm.password" required value=""
                            placeholder="密码">
                        <i style="margin-left: 85%;"><img :src="paSrc" alt="" @click="changePassward"></i>
                    </li>
                    <div id="captcha-box"></div>
 
 
                    <li>
                        <el-button :loading="loading" type="primary" class="btn btnblock btn-lg btn-block"
                            style="width:100%;" @click.native.prevent="handleLogin">登录</el-button>
                        <!-- <a href="javascript:;" onclick="login()"
                            class="btn btnblock btn-lg btn-block btn-primary">登录</a> -->
                    </li>
                    <!-- <li style="color: white;text-align: center;position: relative;left: 5%" id="title2">
                        推荐您使用谷歌chorme浏览器<a class="genggai" href="./NotPassWord.jsp"
                            style="color: #ccc;font-size: 13px;position: relative;left: 10%">更改密码</a></li> -->
                </ul>
                <ul class="logininput" v-if="loginway == 'duanxin'">
                    <li>
                        <i><img src="../../assets/images/user.png"></i>
                        <input class="forminput" value="" v-model="phone" type="text" placeholder="请输入手机号">
                    </li>
                    <li>
                        <i><img src="../../assets/images/password.png"></i>
                        <input class="forminput" type="text" v-model="yzms" value="" placeholder="请输入验证码">
                    </li>
                    <li>
                        <el-button v-show="denglu" :loading="loading" type="primary"
                            class="btn btnblock btn-lg btn-block" style="width:100%;"
                            @click.native.prevent="handleLogin">登录</el-button>
                    </li>
                    <li>
                        <a href="javascript:;" id="yzm"
                            style="width: 100px;height: 40px;font-size: 12px;line-height: 40px;float: right;position: relative;top: -154px;margin-right: 5px"
                            class="btn btnblock btn-lg btn-block btn-primary" @click="hqyzm()">获取验证码</a>
                    </li>
                    <li style="color: white;text-align: center;position: relative;left: 5%">推荐您使用谷歌chorme浏览器</li>
                </ul>
                <el-card class="cover" v-show="tianaishow">
                    <slide-verify :l="42" :r="10" :w="310" :h="155" :imgs="imgs" slider-text="向右滑动" @success="onSuccess"
                        @fail="onFail" @refresh="onRefresh">
                    </slide-verify>
                </el-card>
                <div class="boxfoot"></div>
 
                <div v-if="lock"
                    style="width: 100%;position:absolute;z-index: 9999;color: #da271a;top: 440px;left: 0;text-align: center;">
                    <h4> 提示信息:软件授权注册码过期或者错误请联系管理员</h4>
                </div>
            </div>
 
        </div>
 
        <div style="width: 100%;position: fixed;top: 32%;left: 40%">
        </div>
 
        <canvas ref="canvas"
            style="position:fixed; width:100%; height:100%; left: 0; top: 0; opacity: .3; pointer-events: none;"></canvas>
    </div>
</template>
 
<!-- <script src="../../view/JS/layui.js"></script>
<script src="../../view/JS/layer.js"></script> -->
<!-- <script src="../../HouTai/Js/jquery-3.5.1.js"></script> -->
<script src="../../view/JS/huakuai.js"></script>
<script src="../../view/JS/tac.min.js"></script>
<script src="../../view/tac/js/notify_stand.js"></script>
<script src="../../view/tac/js/notify.js"></script>
<script>
  import img0 from '../../assets/img.jpg';
    import img1 from '../../assets/img1.jpg';
    import img2 from '../../assets/img2.jpg';
    import img3 from '../../assets/img3.jpg';
    import img4 from '../../assets/img4.jpg';
    import img5 from '../../assets/img5.jpg';
class Dot {
    constructor(w, h, maxScale, minScale) {
        this.radius = Math.floor(Math.random() * 3 + 2);//在选一个随机数为圆点半径
        this.d = Math.random() * 2 * Math.PI;//在0-2π之间随机一个弧度值
        this.rx = Math.random() * w * (Math.random() > 0.6 ? 2 / 3 : 1 / 4);// 选一个随机数,作为椭圆长轴顶点a的数值,也就是椭圆中心的x轴坐标,此处的x,y,是相对于椭圆圆心为中心点建立的直角坐标系。
        this.ry = Math.random() * h - h / 2;//选一个随机数作为椭圆短轴顶点b的数值,也就是椭圆中心的y轴坐标,此处的x,y,是相对于椭圆圆心为中心点建立的直角坐标系。这两个值可以根据自已需求来定。
        this.x = Math.cos(this.d) * this.rx + w / 2;
        this.y = Math.sin(this.d) * this.ry + h / 2;//根据椭圆x,y求值公式,x=a*cosα,y=a*sinα.求出圆点在椭圆上的x,y轴坐标.后面加w/2,h/2只是为了居中显示。此处的x,y是相对于canvas建立的直角坐标系的,按canvas约定,其中心点(0,0)点在左上角
        this.z = (Math.pow(Math.pow(this.rx, 2) + Math.pow(this.ry, 2), 0.5) / Math.pow(Math.pow(w / 2, 2) + Math.pow(h / 2, 2), 0.5))//求白色圆点离椭圆中心点的距离,可视为一个点到圆心的距离,用x平方+y平方=c平方求得。此处的x,y,是相对于椭圆圆心为中心点建立的直角坐标系。此处Z值只是一个比值
        this.scale = (Math.cos(this.d) + 1) * (maxScale - minScale) / 2 + minScale;//圆点的缩放大小,根据余弦函数公式y=cosα.标准的余弦函数最大值和最小值分别为1,-1.这里要自行设置最大值和最小值,所以要进行改写
        // this.speed = Math.random() * 0.0005 + 0.0005;
        this.speed = Math.random() * 0.0004 + 0.0004;//圆点运动的速度
        this.alpha = this.scale / maxScale * 0.3 + 0.1;//圆点运动的透明度
        this.count = 0;
    }
    paint(ctx) {
        ctx.fillStyle = 'rgba(0,130,255,' + this.alpha + ')';
        ctx.beginPath();
        ctx.arc(this.x, this.y, this.radius * this.scale * this.z, 0, Math.PI * 2);
        ctx.fill();
    }
    update(w, h, maxScale, minScale) {
        this.count += 0.01;
        if (Math.floor(this.count) % 12 === 0 && Math.floor(this.count) != 0) {
            this.d += 0.008;
            if (this.count > Math.floor(this.count) + 0.5) {
                this.d -= 0.008;
            }
        }
 
 
        this.x = Math.sin(this.d) * this.rx + w / 2;
        this.y = Math.cos(this.d) * this.ry + h / 2;
        this.d -= this.speed;//通过改变它的弧度值来改变圆点在椭圆中运动
        this.scale = (Math.cos(this.d) + 1) * (maxScale - minScale) / 2 + minScale;
        this.alpha = this.scale / maxScale * 0.3 + 0.1;
    }
}
var LoginId = "";
import { login, findPhoneUser, sms, addLoginLog, getSystemOne } from '@/api/user'
export default {
    data() {
        return {
            passwordType: 'password',
            paSrc: require("@/assets/images/login_pass_active.png"),
            imgs: [
                  img0,
                  img1,
                  img2,
                  img3,
                  img4,
                  img5,
                ],
            src:"../../assets/img.png",
            loginAdmin:{},
            tianaishow:false,
            denglu:true,
            // LoginId: '',
            lock: false,
            mleft: '30px',
            loginmethod: '',
            texthu: 'underline',
            textdu: 'none',
            yzms: '',
            yzm: '',
            phone: '',
            loginway: 'yonghu',
            otherQuery: {},
            loginForm: {
                username: '',
                password: ''
            },
            loading: false,
            pass: '',
            yhm: '',
            w: '',
            h: '',
            minScale: 1,
            maxScale: 3,
            snowflakes: [],
        }
    },
    watch: {
        $route: {
            handler: function (route) {
                const query = route.query
                if (query) {
                    this.redirect = query.redirect
                    this.otherQuery = this.getOtherQuery(query)
                }
            },
            immediate: true
        }
    },
    mounted() {
        console.log(2333333333);
        console.log();
        
        console.log(typeof window.initTAC === 'function');
        
        getSystemOne().then(response => {
            console.log(response);
            this.loginmethod = response.data[0].loginmethod
            if (response.data[0].loginmethod == '2' || response.data[0].loginmethod == '1') {
                this.loginway = 'duanxin'
                this.textdu = 'underline'
                this.texthu = 'none'
                this.mleft = "0"
            }
            if (response.data[0].loginmethod == '2' || response.data[0].loginmethod == '0') {
                this.loginway = 'yonghu'
                this.textdu = 'none'
                this.texthu = 'underline'
                this.mleft = "30px"
 
            }
        })
        this.canvas = this.$refs.canvas
        this.ctx = this.canvas.getContext('2d');
        this.w = window.innerWidth;//获取屏幕宽高
        this.h = window.innerHeight * 2 / 2;
 
        this.canvas.width = this.w;//将屏幕宽高赋值给canvas
        this.canvas.height = this.h;
        var dots = [];
        // this.minScale = 1;//设置圆点的最小缩放
        // this.maxScale = 3;//设置圆点的最大缩放
        var bei = 1;
        for (var i = 0; i < 300; i += 1) {  //设置白圆点的个数
            this.snowflakes.push(new Dot(this.w, this.h, this.minScale, this.maxScale))
        }
        this.fetchData();
 
    },
    methods: {
        // 切换密码显示隐藏
changePassward() {
  this.passwordType = this.passwordType==='password'?'text':'password';
  this.paSrc = this.paSrc == require("@/assets/images/login_pass_active.png")?require('@/assets/images/login_pass.png'):require("@/assets/images/login_pass_active.png");
},
        onSuccess() {   //滑块验证通过之后触发的
      this.$notify.success("登录成功")
      LoginId="true"
      if (LoginId=="") {
        
      }
      this.tianaishow=false
                    this.denglu=true
    //   this.$router.push('/')
    },
    onFail() {
 
    },
    onRefresh() {
    },
 
        fetchData() {
            this.ctx.clearRect(0, 0, window.innerWidth, window.innerHeight);
            this.ctx.fillStyle = 'rgba(26,94,199,.6)';
            this.ctx.fillRect(0, 0, this.w, this.h);//描绘底层蓝色背景
            for (var i = 0; i < this.snowflakes.length; i += 1) {
                var dot = this.snowflakes[i];
                dot.update(this.w, this.h, this.minScale, this.maxScale);
                dot.paint(this.ctx);
            }
            requestAnimationFrame(this.fetchData)
        },
        handleLogin() {
            if (this.loginway == 'yonghu') {
                if (this.loginForm.username == '') {
                    this.$message.error('请先输入用户名后在登录');
                    return false;
                }
                if (this.loginForm.password == '') {
                    this.$message.error('请先输入密码后在登录');
                    return false;
                }
 
    //             if (LoginId == "") {
    //                 //没有验证过
    //                 this.denglu=false
    //                 // $("#denglu").hide()
    //                 // config 对象为TAC验证码的一些配置和验证的回调
    //                 const config = {
    //                     requestCaptchaDataUrl: "/code", 
    //                     validCaptchaUrl: "/checkCode",
    //                     bindEl: "#captcha-box",
    //                     validSuccess: (res, c, tac) => {
    //                         console.log(res);
                            
    //                         // 销毁验证码服务
    //                         tac.destroyWindow();
    //                         console.log("验证成功,后端返回的数据为", res);
    //                         // LoginId = res.data.id
    //                         // this.denglu=true
    //                         // // $("#denglu").show()
    //                         // // 启动1分钟的计时器
    //                         // loginTimer = setTimeout(() => {
    //                         //     notify.error("1分钟内未登录,重新验证");
    //                         //     LoginId = "";
    //                         //     login(); // 重新调用login函数进行验证
    //                         // }, 60000); // 60000毫秒 = 1分钟
    //                     },
    //                     // 验证失败的回调函数(可忽略,如果不自定义 validFail 方法时,会使用默认的)
    //                     validFail: (res, c, tac) => {
    //                         console.log("验证码验证失败回调...")
    //                         // LoginId = ""
    //                         // 验证失败后重新拉取验证码
    //                         tac.reloadCaptcha();
    //                     },
    //                     // 刷新按钮回调事件
    //                     btnRefreshFun: (el, tac) => {
    //                         console.log("刷新按钮触发事件...")
    //                         // LoginId = ""
    //                         tac.reloadCaptcha();
    //                     },
    //                     // 关闭按钮回调事件
    //                     btnCloseFun: (el, tac) => {
    //                         console.log("关闭按钮触发事件...")
    //                         // LoginId = ""
    //                         tac.destroyWindow();
    //                         // this.denglu=true
    //                         // $("#denglu").show()
    //                     }
    //                 }
    //                 // 一些样式配置, 可不传
    //                 let style = {
    //                     logoUrl: null// 去除logo
    //                     // logoUrl: "/xx/xx/xxx.png" // 替换成自定义的logo
    //                 }
    //                 console.log(config);
                    
    //                 // 参数1 为 tac文件是目录地址, 目录里包含 tac的js和css等文件
    //                 // 参数2 为 tac验证码相关配置
    //                 // 参数3 为 tac窗口一些样式配置
    //                 console.log(window);
                    
    //                 // window.initTAC("@/views/view/tac", config, style).then(tac => {
    //                 //     console.log(222);
                        
    //                 //     tac.init(); // 调用init则显示验证码
    //                 // }).catch(e => {
    //                 //     console.log("初始化tac失败", e);
    //                 // })
 
    //                 // 检查 initTAC 是否存在
    // if (typeof window.initTAC === 'function') {
    //   window.initTAC("../view/tac", config, style).then(tac => {
    //     tac.init();
    //   }).catch(e => {
    //     console.log("初始化tac失败", e);
    //   });
    // } else {
    //   console.error("initTAC is not defined");
    // }
    //             } else {
    if (LoginId=="") {
        this.tianaishow=true
        this.denglu=false
    }else{
        this.loading = true
                    this.$store.dispatch('user/login', this.loginForm)
                        .then((res) => {
                            console.log(11111111111);
                            
                            console.log(res);
 
                            if (res.usermsg == "false") {
                                this.lock = true
                                this.$message.error('软件授权注册码过期或者错误请联系管理员');
                                this.loading = false
                            } else {
                                console.log(this.otherQuery);
                                const params = { name: res.username, loginfs: '账号密码登录' };
                                addLoginLog(params).then(response => {
 
                                })
                                this.$router.push({ path: '/#/dpdv' || '/', query: this.otherQuery })
                                this.loading = false
                                LoginId=""
                            }
                        })
 
                        .catch(() => {
                            this.loading = false
                        })
    }
                   
                 
                // }
            } else {
                if (this.phone == '') {
                    this.$message.error('请先输入手机号后在登录');
                    return false;
                }
                if (this.yzms == '') {
                    this.$message.error('请先输入验证码后在登录');
                    return false;
                }
                if (this.yzms != this.yzm) {
                    this.$message.error('验证码有误,请重新获取验证码后重试');
                    return false;
                }
                if (LoginId=="") {
        this.tianaishow=true
        this.denglu=false
    }else{
                const params = { adminphone: this.phone };
                this.loading = true
                // this.loginForm=params
                this.$store.dispatch('user/login', params)
                    .then((res) => {
                        console.log(11111111111);
                    console.log(res);
                    
                        if (res.usermsg == "false") {
                            this.lock = true
                            this.$message.error('软件授权注册码过期或者错误请联系管理员');
                            this.loading = false
                            // return false;
                            // return false
                            // this.lock=true
                        } else {
                            console.log(this.otherQuery);
                            
                            const params = { name: res.username, loginfs: '验证码登录' };
                            addLoginLog(params).then(response => {
 
                            })
                            this.$router.push({ path: '/#/dpdv' || '/', query: this.otherQuery })
                            this.loading = false
                             LoginId=""
                        }
                    })
 
                    .catch(() => {
                        this.loading = false
                    })
                }
            }
 
        },
        yonghu() {
            this.loginway = 'yonghu',
                this.texthu = 'underline',
                this.textdu = 'none'
        },
        duanxin() {
            this.loginway = 'duanxin',
                this.texthu = 'none',
                this.textdu = 'underline'
        },
        hqyzm() {
            const params = { phone: this.phone };
            findPhoneUser(params).then(response => {
                if (response.data != null) {
                    var yzm = this.generateRandomCode();
                    const params1 = { phone: this.phone, randomNumber: yzm };
                    sms(params1).then(response => {
                        this.yzm = response.data
                    })
                    this.startCountdown(60)
                } else {
                    this.$message({
                        message: '当前手机号不存在,请重新输入后在获取',
                        type: 'none'
                    })
                }
 
                // this.fetchData()
            })
        },
        startCountdown(seconds) {
            var btn = document.getElementById('yzm');
            btn.disabled = true;
            var count = seconds;
            btn.textContent = count + ' 秒后重新获取';
            var timer = setInterval(function () {
                count--;
                if (count <= 0) {
                    clearInterval(timer);
                    btn.textContent = '获取验证码';
                    btn.disabled = false;
                } else {
                    btn.textContent = count + ' 秒后重新获取';
                }
            }, 1000);
        },
        generateRandomCode() {
            var code = "";
            var possible = "0123456789"; // 可选的字符集合
 
            for (var i = 0; i < 4; i++) {
                // 从字符集合中随机选择一个字符,并添加到验证码中
                code += possible.charAt(Math.floor(Math.random() * possible.length));
            }
 
            return code;
        },
        getOtherQuery(query) {
            return Object.keys(query).reduce((acc, cur) => {
                if (cur !== 'redirect') {
                    acc[cur] = query[cur]
                }
                return acc
            }, {})
        }
    }
}
</script>
<style lang="scss" scoped>
@import "../../styles/style.css";
@import "../view/JS/css/tac.css";
 
// <link href="/hxzkuwb/view/JS/css/tac.css" rel="stylesheet">
.cover {
    width: fit-content;
    background-color: white;
    // position: absolute;
    // top: 50%;
    // left: 50%;
    // transform: translate(-50%, -50%);
    z-index: 1000;
}
 
 
.genggai:hover {
    color: red;
}
 
.el-button--medium {
    padding: 10px 20px;
    font-size: 24px;
    border-radius: 1px;
}
 
.canvas {
    position: fixed;
    top: 0;
    left: 0;
    // background-color: #16222a;
    z-index: 9999;
}
 
.bg {
    position: absolute;
    width: 100%;
    background: url(../../assets/images/image.png) no-repeat left center;
    content: "";
    left: 0;
    top: 0;
    z-index: 100;
    pointer-events: none;
 
}
 
.form {
    width: 290px;
    height: 380px;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: .4s ease-in-out;
}
 
.form:hover {
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    scale: 0.99;
}
 
.heading {
    position: relative;
    text-align: center;
    color: black;
    top: 3em;
    font-weight: bold;
}
 
.check {
    position: relative;
    align-self: center;
    top: 4em;
}
 
.input {
    position: relative;
    width: 2.5em;
    height: 2.5em;
    margin: 1em;
    border-radius: 5px;
    border: none;
    outline: none;
    background-color: rgb(235, 235, 235);
    box-shadow: inset 3px 3px 6px #d1d1d1,
        inset -3px -3px 6px #ffffff;
    top: 6.5em;
    left: 1.5em;
    padding-left: 15px;
    transition: .4s ease-in-out;
}
 
.input:hover {
    box-shadow: inset 0px 0px 0px #d1d1d1,
        inset 0px 0px 0px #ffffff;
    background-color: lightgrey;
}
 
.input:focus {
    box-shadow: inset 0px 0px 0px #d1d1d1,
        inset 0px 0px 0px #ffffff;
    background-color: lightgrey;
}
 
.btn1 {
    position: relative;
    top: 8.5em;
    left: 2.4em;
    width: 17em;
    height: 3em;
    border-radius: 5px;
    border: none;
    outline: none;
    transition: .4s ease-in-out;
    box-shadow: 1px 1px 3px #b5b5b5,
        -1px -1px 3px #ffffff;
}
 
.btn1:active {
    box-shadow: inset 3px 3px 6px #b5b5b5,
        inset -3px -3px 6px #ffffff;
}
 
.btn2 {
    position: relative;
    top: 9.5em;
    left: 2.4em;
    width: 17em;
    height: 3em;
    border-radius: 5px;
    border: none;
    outline: none;
    transition: .4s ease-in-out;
    box-shadow: 1px 1px 3px #b5b5b5,
        -1px -1px 3px #ffffff;
}
 
.btn2:active {
    box-shadow: inset 3px 3px 6px #b5b5b5,
        inset -3px -3px 6px #ffffff;
}
</style>