绿满眶商城微信小程序-uniapp
xiangpei
6 天以前 70738d032bd80f5b13075f8a13045ff4de57c2c3
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
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
<template>
    <div class="wrapper">
        <div v-if="!wechatLogin">
            <u-navbar :is-back="showBack" :border-bottom="false"></u-navbar>
            <div>
                <div class="title">{{ loginTitleWay[current].title }}</div>
                <div :class="current == 1 ? 'desc-light' : 'desc'">
                    {{ loginTitleWay[current].desc
          }}<span v-if="current == 1">{{ mobile | secrecyMobile }}</span>
                </div>
            </div>
            <!-- 手机号 -->
            <div v-show="!enableUserPwdBox">
                <div v-show="current == 0">
                    <u-input :custom-style="inputStyle" :placeholder-style="placeholderStyle" placeholder="请输入手机号 (11位)"
                        class="mobile" focus v-model="mobile" type="number" maxlength="11" />
                    <div :class="!enableFetchCode ? 'disable' : 'fetch'" @click="fetchCode" class="btn">
                        获取验证码
                    </div>
                </div>
                <!-- 输入验证码 -->
                <div v-show="current == 1" class="box-code">
                    <verifyCode type="bottom" @confirm="submit" boxActiveColor="#D8D8D8" v-model="code" isFocus
                        boxNormalColor="#D8D8D8" cursorColor="#D8D8D8" />
 
                    <div class="fetch-btn">
                        <u-verification-code change-text="验证码已发送(x)" end-text="重新获取验证码" unique-key="page-login"
                            :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange">
                        </u-verification-code>
                        <span @tap="fetchCode" :style="{ color: codeColor }">
                            {{ tips }}</span>
                    </div>
                </div>
            </div>
 
            <!-- 帐号密码登录 -->
            <div v-show="enableUserPwdBox">
                <u-input :custom-style="inputStyle" :placeholder-style="placeholderStyle" placeholder="请输入用户名"
                    class="mobile" focus v-model="userData.username" />
                <u-input :custom-style="inputStyle" :placeholder-style="placeholderStyle" placeholder="请输入密码"
                    class="mobile" focus v-model="userData.password" type="password" />
 
                <div :class="!enableUserBtnColor ? 'disable' : 'fetch'" @click="passwordLogin" class="btn">
                    帐号密码登录
                </div>
            </div>
 
            <div class="flex" v-show="current != 1">
                <u-checkbox-group :icon-size="24" width="45rpx">
                    <u-checkbox shape="circle" v-model="enablePrivacy" active-color="#FF5E00"></u-checkbox>
                </u-checkbox-group>
                <div class="tips">
                    未注册的手机号验证后将自动创建用户账号,登录即代表您已同意<span @click="navigateToPrivacy('PRIVACY_POLICY')">《隐私协议》</span>
                    <span @click="navigateToPrivacy('USER_AGREEMENT')">
                        《用户协议》
                    </span>
                </div>
            </div>
 
            <div v-if="current != 1" class="user-password-tips" @click="enableUserPwdBox = !enableUserPwdBox">
                {{ !enableUserPwdBox ? "帐号密码" : "手机号" }}登录
            </div>
 
            <!-- 循环出当前可使用的第三方登录模式 -->
            <div class="flex login-list">
                <div v-if="item.code" :style="{ background: item.color }" class="login-item"
                    v-for="(item, index) in loginList" :key="index">
                    <u-icon v-if="item.title != 'APPLE'" color="#fff" size="42" :name="item.icon"
                        @click="navigateLogin(item)">
                    </u-icon>
                    <u-image v-else src="/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)"
                        width="80" height="80" />
                </div>
            </div>
            <myVerification v-if="codeFlag" @send="verification" class="verification" ref="verification"
                business="LOGIN" />
        </div>
        <view v-else>
            <wechatH5Login />
        </view>
    </div>
</template>
 
<script>
    import '@/components/uview-components/uview-ui'
    import {
        openIdLogin,
        loginCallback
    } from "@/api/connect.js";
    import api from "@/config/api.js";
    import {
        sendMobile,
        smsLogin,
        userLogin
    } from "@/api/login";
    import myVerification from "@/components/verification/verification.vue"; //验证码模块
    import uuid from "@/utils/uuid.modified.js"; // uuid
    import verifyCode from "@/components/verify-code/verify-code";
    import {
        getUserInfo
    } from "@/api/members";
    import {
        whetherNavigate
    } from "@/utils/Foundation"; //登录跳转
    import storage from "@/utils/storage.js"; //缓存
    import wechatH5Login from "./wechatH5Login.vue";
    import {
        webConnect
    } from "@/api/connect.js";
    import {
        md5
    } from "@/utils/md5.js";
 
    export default {
        components: {
            myVerification,
            verifyCode,
            wechatH5Login
        },
 
        data() {
            return {
                uuid,
                wechatLogin: false, //是否加载微信公众号登录
                flage: false, //是否验证码验证
                codeFlag: true, //验证开关,用于是否展示验证码
                tips: "",
                enableUserPwdBox: false, //帐号密码登录
                current: 0,
                codeColor: "#999", //按钮验证码颜色
                lightColor: this.$lightColor,
                seconds: 60, //默认验证码等待时间
                loginTitleWay: [{
                        title: "欢迎登录",
                        desc: "登录后更精彩,美好生活即将开始",
                    },
                    {
                        title: "请输入验证码",
                        desc: "已经发送验证码至",
                    },
                ],
                userData: {
                    username: "",
                    password: "",
                },
                showBack: false,
                enableFetchCode: false,
                enableUserBtnColor: false,
                enablePrivacy: false, //隐私政策
                mobile: "", //手机号
                code: "", //验证码
                inputStyle: {
                    height: "104rpx",
                    "border-bottom": "1rpx solid #D8D8D8",
                    "letter-spacing": "1rpx",
                    "font-size": "40rpx",
                    "line-height": "40rpx",
                    color: "#333",
                },
                placeholderStyle: "font-size: 32rpx;line-height: 32rpx;color: #999999;",
                loginList: [
                    //第三方登录集合
                    {
                        icon: "weixin-fill",
                        color: "#00a327",
                        title: "微信",
                        code: "WECHAT",
                    },
                    {
                        icon: "qq-fill",
                        color: "#38ace9",
                        title: "QQ",
                        code: "QQ",
                    },
                    {
                        icon: "apple-fill",
                        color: "#000000",
                        title: "Apple",
                        code: "APPLE",
                    },
                ],
            };
        },
        onShow() {
 
            // 只要是app登录的全部清除内容
            // #ifdef APP-PLUS
            storage.setAccessToken("");
            storage.setRefreshToken("");
            storage.setUserInfo({});
            // #endif
 
 
            //#ifdef H5
            let isWXBrowser = /micromessenger/i.test(navigator.userAgent);
            if (isWXBrowser) {
                webConnect("WECHAT").then((res) => {
                    let data = res.data;
                    if (data.success) {
                        window.location = data.result;
                    }
                });
            }
            //#endif
        },
 
        mounted() {
 
            // #ifndef APP-PLUS
            //判断是否微信浏览器
            var ua = window.navigator.userAgent.toLowerCase();
            if (ua.match(/MicroMessenger/i) == "micromessenger") {
                this.wechatLogin = true;
                return;
            }
            // #endif
            /**
             * 条件编译判断当前客户端类型
             */
            //#ifdef H5
            this.clientType = "H5";
            //#endif
 
            //#ifdef APP-PLUS
            this.clientType = "APP";
            /**如果是app 加载支持的登录方式*/
            let _this = this;
            uni.getProvider({
                service: "oauth",
                success: (result) => {
                    _this.loginList = result.provider.map((value) => {
                        //展示title
                        let title = "";
                        //系统code
                        let code = "";
                        //颜色
                        let color = "#8b8b8b";
                        //图标
                        let icon = "";
                        //uni 联合登录 code
                        let appcode = "";
                        switch (value) {
                            case "weixin":
                                icon = "weixin-circle-fill";
                                color = "#00a327";
                                title = "微信";
                                code = "WECHAT";
                                break;
                            case "qq":
                                icon = "qq-circle-fill";
                                color = "#38ace9";
                                title = "QQ";
                                code = "QQ";
                                break;
                            case "apple":
                                icon = "apple-fill";
                                color = "#000000";
                                title = "Apple";
                                code = "APPLE";
                                break;
                        }
                        return {
                            title: title,
                            code: code,
                            color: color,
                            icon: icon,
                            appcode: value,
                        };
                    });
                },
                fail: (error) => {
                    uni.showToast({
                        title: "获取登录通道失败" + error,
                        duration: 2000,
                        icon: "none",
                    });
                },
            });
            //#endif
 
            //特殊平台,登录方式需要过滤
            // #ifdef H5
            this.methodFilter(["QQ"]);
            // #endif
 
            //微信小程序,只支持微信登录
            // #ifdef MP-WEIXIN
            this.methodFilter(["WECHAT"]);
            // #endif
        },
        watch: {
            current(val) {
                val ? (this.showBack = true) : (this.showBack = false);
            },
            userData: {
                handler(val) {
                    if (this.userData.username && this.userData.password) {
                        this.enableUserBtnColor = true;
                    } else {
                        this.enableUserBtnColor = false;
                    }
                },
                deep: true,
 
            },
            mobile: {
                handler(val) {
                    if (val.length == 11) {
                        this.enableFetchCode = true;
                    }
                },
            },
 
            async flage(val) {
                if (val) {
                    if (this.$refs.uCode.canGetCode) {
                        if (this.enableUserPwdBox) {
                            this.submitUserLogin();
                            return;
                            // 执行登录
                        } else {
                            // 向后端请求验证码
                            uni.showLoading({});
                            let res = await sendMobile(this.mobile);
                             if (this.$store.state.isShowToast){ uni.hideLoading() };
                            // 这里此提示会被this.start()方法中的提示覆盖
                            if (res.data.success) {
                                this.current = 1;
                                this.$refs.uCode.start();
                            } else {
                                uni.showToast({
                                    title: res.data.message,
                                    duration: 2000,
                                    icon: "none",
                                });
                                this.flage = false;
                                this.$refs.verification.getCode();
                            }
                        }
                    } else {
                        !this.enableUserPwdBox ? this.$u.toast("请倒计时结束后再发送") : "";
                    }
                } else {
                    this.$refs.verification.hide();
                }
            },
        },
        onLoad(options) {
            if (options && options.state) {
                this.stateLogin(options.state);
            }
        },
        methods: {
            //联合信息返回登录
            stateLogin(state) {
                loginCallback(state).then((res) => {
                    let data = res.data;
                    if (data.success) {
                        storage.setAccessToken(data.result.accessToken);
                        storage.setRefreshToken(data.result.refreshToken);
                        // 登录成功
                        uni.showToast({
                            title: "登录成功!",
                            icon: "none",
                        });
                        getUserInfo().then((user) => {
                            storage.setUserInfo(user.data.result);
                            storage.setHasLogin(true);
                        });
                        getCurrentPages().length > 1 ?
                            uni.navigateBack({
                                delta: getCurrentPages().length - 2,
                            }) :
                            uni.switchTab({
                                url: "/pages/tabbar/home/index",
                            });
                    }
                });
            },
            /** 根据参数显示登录模块 */
            methodFilter(code) {
                let way = [];
                this.loginList.forEach((item) => {
                    if (code.length != 0) {
                        code.forEach((val) => {
                            if (item.code == val) {
                                way.push(item);
                            }
                        });
                    } else {
                        uni.showToast({
                            title: "配置有误请联系管理员",
                            duration: 2000,
                            icon: "none",
                        });
                    }
                });
                this.loginList = way;
            },
            //非h5 获取openid
            async nonH5OpenId(item) {
                let _this = this;
                //获取各个openid
                await uni.login({
                    provider: item.appcode,
                    // #ifdef MP-ALIPAY
                    scopes: "auth_user", //支付宝小程序需设置授权类型
                    // #endif
                    success: function(res) {
                        uni.setStorageSync("type", item.code);
                        //微信小程序意外的其它方式直接在storage中写入openid
                        // #ifndef MP-WEIXIN
                        uni.setStorageSync("openid", res.authResult.openid);
                        res.authResult.unionId && uni.setStorageSync("unionId", res.authResult.unionId);
                        // #endif
                    },
                    fail(e) {
                        uni.showToast({
                            title: "第三方登录暂不可用!",
                            icon: "none",
                            duration: 3000,
                        });
                    },
                    complete(e) {
                        //获取用户信息
                        uni.getUserInfo({
                            provider: item.appcode,
                            success: function(infoRes) {
                                //写入用户信息
                                uni.setStorageSync("nickname", infoRes.userInfo.nickName);
                                uni.setStorageSync("avatar", infoRes.userInfo.avatarUrl);
                                uni.setStorageSync("unionId", infoRes.userInfo.unionId || infoRes.userInfo.unionid);
 
                                // #ifdef MP-WEIXIN
                                //微信小程序获取openid 需要特殊处理 如需获取openid请参考uni-id: https://uniapp.dcloud.net.cn/uniCloud/uni-id
                                _this.weixinMPOpenID(res).then((res) => {
                                    //这里需要先行获得openid,再使用openid登录,小程序登录需要两步,所以这里特殊编译
                                    _this.goOpenidLogin("WECHAT_MP");
                                });
                                // #endif
 
                                // #ifndef MP-WEIXIN
                                _this.goOpenidLogin("APP");
                                //#endif
                            },
                        });
                    },
                });
            },
            //openid 登录
            goOpenidLogin(clientType) {
                // 获取准备好的参数,进行登录系统
                let params = {
                    uuid: uni.getStorageSync("openid"), //联合登陆id
                    source: uni.getStorageSync("type"), //联合登陆类型
                    nickname: uni.getStorageSync("nickname"), // 昵称
                    username: uni.getStorageSync("openid"), // 昵称
                    avatar: uni.getStorageSync("avatar"), // 头像
                    uniAccessToken: uni.getStorageSync("uni_access_token"), //第三方token
                    type:this.clientType,
                    token:{unionId:"",openId:uni.getStorageSync("openid")}
                };
                uni.getStorageSync("unionId") ? (params.token.unionId = uni.getStorageSync("unionId")) : delete params.token;
 
                openIdLogin(params, clientType).then((res) => {
                    if (!res.data.success) {
                        let errormessage = "第三方登录暂不可用";
                        uni.showToast({
                            // title: '未绑定第三方账号',
                            title: errormessage,
                            icon: "none",
                            duration: 3000,
                        });
                        return;
                    } else {
                        storage.setAccessToken(res.data.result.accessToken);
                        storage.setRefreshToken(res.data.result.refreshToken);
                        // 登录成功
                        uni.showToast({
                            title: "第三方登录成功!",
                            icon: "none",
                        });
                        // 执行登录
                        getUserInfo().then((user) => {
                            if (user.data.success) {
                                /**
                                 * 个人信息存储到缓存userInfo中
                                 */
                                storage.setUserInfo(user.data.result);
                                storage.setHasLogin(true);
                                uni.switchTab({
                                    url: "/pages/tabbar/home/index",
                                });
                                /**
                                 * 计算出当前router路径
                                 * 1.如果跳转的链接为登录页面或跳转的链接为空页面。则会重新跳转到首页
                                 * 2.都不满足返回跳转页面
                                 */
                                if (user.data.result.mobile) {
                                    whetherNavigate();
                                } else {
                                    uni.navigateTo({
                                        url: "/pages/passport/bindUserPhone",
                                    });
                                }
                            } else {
                                uni.switchTab({
                                    url: "/pages/tabbar/home/index",
                                });
                            }
                        });
                    }
                });
            },
            //微信小程序获取openid
            async weixinMPOpenID(res) {
                await miniProgramLogin(res.code).then((res) => {
                    uni.setStorageSync("openid", res.data);
                });
            },
            /**跳转到登录页面 */
            navigateLogin(connectLogin) {
                // #ifdef H5
                let code = connectLogin.code;
                let buyer = api.buyer;
                window.open(
                    buyer + `/passport/connect/connect/login/web/` + code,
                    "_self"
                );
                // #endif
                // #ifdef APP-PLUS
                this.nonH5OpenId(connectLogin);
                // #endif
            },
 
            // 提交
            submit() {
                /**
                 * 清空当前账号信息
                 */
                storage.setHasLogin(false);
                storage.setAccessToken("");
                storage.setRefreshToken("");
                storage.setUserInfo({});
                /**
                 * 执行登录
                 */
                smsLogin({
                    mobile: this.mobile,
                    code: this.code
                }, this.clientType).then(
                    (res) => {
                        this.getUserInfoMethods(res);
                    }
                );
            },
 
            // 登录成功之后获取用户信息
            getUserInfoMethods(res) {
                console.log(res);
                if (res.data.success) {
                    storage.setAccessToken(res.data.result.accessToken);
                    storage.setRefreshToken(res.data.result.refreshToken);
 
                    /**
                     * 登录成功后获取个人信息
                     */
                    getUserInfo().then((user) => {
                        if (user.data.success) {
                            /**
                             * 个人信息存储到缓存userInfo中
                             */
                            storage.setUserInfo(user.data.result);
                            storage.setHasLogin(true);
                            storage.setAutoCp(0)
                            // 登录成功
                            uni.showToast({
                                title: "登录成功!",
                                icon: "none",
                            });
 
 
                            whetherNavigate();
 
                        } else {
                            uni.switchTab({
                                url: "/pages/tabbar/home/index",
                            });
                        }
                    });
                }
            },
 
            // 验证码验证
            verification(val) {
                this.flage = val == this.$store.state.verificationKey ? true : false;
            },
            // 跳转
            navigateToPrivacy(val) {
                uni.navigateTo({
                    url: "/pages/mine/help/tips?type=" + val,
                });
 
            },
 
            // 点击获取验证码
            start() {
                this.codeColor = "#999";
                this.$u.toast("验证码已发送");
                this.flage = false;
                this.codeFlag = false;
 
                this.$refs.verification.hide();
            },
            /**点击验证码*/
            codeChange(text) {
                this.tips = text;
            },
            /** 结束验证码后执行 */
            end() {
                this.codeColor = this.lightColor;
                this.codeFlag = true;
                console.log(this.codeColor);
            },
 
            passwordLogin() {
                if (!this.enablePrivacy) {
                    uni.showToast({
                        title: "请同意用户隐私",
                        duration: 2000,
                        icon: "none",
                    });
                    return false;
                }
 
                if (!this.userData.username) {
                    uni.showToast({
                        title: "请填写用户名",
                        duration: 2000,
                        icon: "none",
                    });
                    return false;
                }
 
                if (!this.userData.password) {
                    uni.showToast({
                        title: "请填写密码",
                        duration: 2000,
                        icon: "none",
                    });
                    return false;
                }
 
                if (!this.flage) {
                    this.$refs.verification.error(); //发送
 
                    return false;
                }
            },
 
            // 提交用户登录
            async submitUserLogin() {
                const params = JSON.parse(JSON.stringify(this.userData));
                params.password = md5(params.password);
                try {
                    let res = await userLogin(params,this.clientType);
                    if (res.data.success) {
                        this.getUserInfoMethods(res);
                    } else {
                        this.$refs.verification.getCode();
                        this.flage = false;
                    }
                } catch (error) {
                    this.$refs.verification.getCode();
                }
            },
 
            // 发送验证码
            fetchCode() {
                if (!this.enablePrivacy) {
                    uni.showToast({
                        title: "请同意用户隐私",
                        duration: 2000,
                        icon: "none",
                    });
                    return false;
                }
 
                if (!this.$u.test.mobile(this.mobile)) {
                    uni.showToast({
                        title: "请填写正确手机号",
                        duration: 2000,
                        icon: "none",
                    });
                    return false;
                }
                if (this.tips == "重新获取验证码") {
                    uni.showLoading({
                        title: "加载中",
                    });
                    if (!this.codeFlag) {
                        let timer = setInterval(() => {
                            if (this.$refs.verification) {
                                this.$refs.verification.error(); //发送
                            }
                            clearInterval(timer);
                        }, 100);
                    }
                     if (this.$store.state.isShowToast){ uni.hideLoading() };
                }
                if (!this.flage) {
                    this.$refs.verification.error(); //发送
 
                    return false;
                }
            },
        },
    };
</script>
<style>
    page {
        background: #fff;
    }
</style>
<style lang="scss" scoped>
    .wrapper {
        padding: 0 80rpx;
    }
 
    .title {
        padding-top: calc(104rpx);
        font-style: normal;
        line-height: 1;
        font-weight: 500;
        font-size: 56rpx;
        color: #333;
    }
 
    .box-code {
        margin-top: 78rpx;
    }
 
    .desc,
    .desc-light {
        font-size: 32rpx;
        line-height: 32rpx;
        color: #333333;
        margin-top: 40rpx;
    }
 
    .desc {
        color: #333;
    }
 
    .desc-light {
        color: #999999;
 
        >span {
            color: #333;
            margin-left: 8rpx;
        }
    }
 
    .mobile {
        margin-top: 80rpx;
    }
 
    .disable {
        background: linear-gradient(90deg, #ffdcba 2.21%, #ffcfb2 99.86%);
    }
 
    .fetch {
        background: linear-gradient(57.72deg, #ff8a19 18.14%, #ff5e00 98.44%);
    }
 
    .btn {
        border-radius: 100px;
        width: 590rpx;
        margin-top: 97rpx;
        height: 80rpx;
        font-size: 30rpx;
        line-height: 80rpx;
        text-align: center;
        color: #ffffff;
    }
 
    .tips {
        font-size: 12px;
        line-height: 20px;
        margin-top: 32rpx;
        width: 546rpx;
 
        >span {
            color: $light-color;
        }
    }
 
    .fetch-btn {
        width: 370rpx;
        height: 80rpx;
        line-height: 80rpx;
        text-align: center;
        background: #f2f2f2;
        border-radius: 100rpx;
        font-size: 28rpx;
        color: #999;
 
        margin: 71rpx auto 0 auto;
    }
 
    .login-list {
        display: flex;
        width: 590rpx;
        position: absolute;
        top: 1200rpx;
        align-items: center;
        justify-content: center;
    }
 
    .login-item {
        width: 80rpx;
        border-radius: 10rpx;
        height: 80rpx;
        display: flex;
        justify-content: center;
        align-items: center;
 
        margin: 0 20rpx;
    }
 
    .user-password-tips {
        text-align: center;
        color: $main-color;
        margin: 20px 0;
    }
</style>