zhaojs
2023-08-22 c5855f5eb22d2dd1d30d32d1d4f06a566b532a98
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
<template>
    <view>
        {{txt}}
    </view>
</template>
 
<script>
    import comUtils from '../../utils/ComUtils.js'
    export default {
        data() {
            return {
                txt: ''
            }
        },
        onLoad(option) {
            this.wxAuth(option.code);
        },
        methods: {
            fuzhi() {
                var that = this;
                uni.setClipboardData({
                    data: that.code
                });
            },
            wxAuth(code) {
                uni.showLoading({
                    title: '授权中',
                    mask: true
                });
                var that = this;
                that.$http.post('/wxback/KfWx/GetAuthCode', {
                    code: code
                }).then(e => {
                    console.log(e);
                    uni.hideLoading();
                    if (e == true)
                    {
                        this.txt = "授权成功,请关闭此页面"
                    }
                    else{
                        this.txt =e;
                    }
 
                }).catch(function(err) {
                    console.log(err);
                })
 
            }
        },
    }
</script>
 
<style>
    .item-head {
        text-align: center;
        padding: 1rem;
        font-weight: 600;
        color: linear-gradient(-90deg, #fe3a3f, #faa450);
        color: #fe3a3f;
        background: linear-gradient(-90deg, #fe3a3f, #faa450);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
 
    .bottom-show {
        text-align: center;
        width: 100%;
        padding-bottom: 1rem;
        color: #fe3a3f;
        background: linear-gradient(-90deg, #fe3a3f, #faa450);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-weight: 600;
    }
 
    .txt-sty {
        text-align: center;
    }
 
    .main-cont {}
 
    .head-txt {
        margin: 0.4rem 0 2rem 0;
    }
 
    .head-img {
        width: 5rem;
        height: 5rem;
        margin-top: 4rem;
    }
 
    .ercode-img {
        width: 16rem;
        height: 16rem;
    }
</style>