quanwei
2025-10-31 7a27a1d4d0038abe2115adb1753f897f56d66323
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
<template>
    <view class="user-index" :data-theme='theme()' :class="theme() || ''">
        <view class="user-header">
        <!-- #ifdef MP-WEIXIN || APP-PLUS -->
        <view class="ww100" :style="'height:'+topBarTop()+'px;'"></view>
        <view class="tc  head_top" :style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;'">
            <view class="reg180" @click="goback"><text class="icon iconfont icon-jiantou"></text></view>
            <view class="fb">会员码</view>
        </view>
        <!-- #endif -->
 
        <view v-if="!loadding">
            <view class="qrcode-body bg-white p30">
                <view class="user-box pt20">
                    <view class="user-info">
                        <view class="photo">
                            <image :src="detail.avatarUrl" mode="aspectFill"></image>
                        </view>
                        <view class="info">
                            <view class="name">{{ detail.nickName }}</view>
                        </view>
                    </view>
                </view>
                <view class="qrcode-box mt30 pb100">
                    <view class="codeimg pt30 d-c-c">
                        <image :src="codeImg" mode="aspectFit"></image>
                    </view>
                </view>
            </view>
        </view>
        </view>
        <request-loading :loadding='isloadding'></request-loading>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                isloadding: true,
                /*签到数据*/
                sign: {},
                /*是否加载完成*/
                loadding: true,
                detail: {},
                codeImg: ''
            };
        },
        onPullDownRefresh() {
            
        },
        onShow() {
            /*获取数据*/
            this.getData();
        },
        onLoad(){
            let self = this;
            //#ifdef MP-WEIXIN
            wx.login({
                success(res) {
                    // 发送用户信息
                    self._post('user.user/getSession', {
                        code: res.code
                    }, result => {
                        self.sessionKey = result.data.session_key;
                    });
                }
            });
            //#endif
        },
        methods: {
            /*获取数据*/
            getData() {
                let self = this;
                self.isloadding = true;
                self._get('user.Qrcode/qrcode', {
                    source: self.getPlatform()
                }, function(res) {
                    self.detail = res.data.userInfo;
                    self.codeImg = res.data.qrcode;
                    self.loadding = false;
                    uni.stopPullDownRefresh();
                    self.isloadding = false;
                });
            },
            goback() {
                uni.navigateBack();
            },
        }
    };
</script>
 
<style lang="scss">
    page {
        background-color: #EBEBEB;
        height: 100%;
    }
    
    .iconfont {
        font-size: 14px;
    }
    
    .reg180 {
        padding-right: 20rpx;
        text-align: right;
        transform: rotateY(180deg);
        position: absolute;
        bottom: 0;
    }
    
    .head_top .icon-jiantou {
        color: #FFFFFF;
        font-size: 30rpx;
    }
    
    .head_top {
        width: 100%;
        position: relative;
        /* padding-top: var(--status-bar-height); */
        height: 30px;
        line-height: 30px;
        color: #FFFFFF;
        font-size: 36rpx;
    }
    
    .user-index {
        height: 100%;
    }
    
    .w100 {
        width: 100%;
    }
    
    .user-header {
        position: relative;
        height: 100%;
        @include background_color('background_color');
    }
    
    .user-header .user-info {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .user-header .photo,
    .user-header .photo image {
        width: 50rpx;
        height: 50rpx;
        border-radius: 50%;
    }
    
    .user-header .photo {
        border: 2rpx solid #ffffff;
    }
    
    .user-header .info {
        padding-left: 20rpx;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .user-header .info .name {
        font-size: 26rpx;
    }
    
    .qrcode-body {
        margin: 80rpx 30rpx 30rpx;
        border-radius: 20rpx;
    }
    .qrcode-box .codeimg image {
        width: 400rpx;
        height: 400rpx;
    }
    
    
 
</style>