zhaojs
2023-07-31 496213c75a59897c7b853a7bc515c42a140ce045
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
<template>
    <view class="main-cont">
        <view>
            <image src="https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/wx_kfbgimg.png"></image>
        </view>
        <view>
            <view class="head-contain">
                <view class="wx-txt">
                    微信号:{{wxtxt}}<span>复制</span>
                </view>
                <view class="qrcode-title">
                    长按二维码,添加好友
                </view>
                <view class="qrcode-container defIcon">
                    <image class="qrcode-container-image" :src="wxImg" mode="" :show-menu-by-longpress="true"></image>
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    import api from '@/common/tk_api.js'
    export default {
        data() {
            return {
                wxImg: 'https://img.ushopvip.com/dfg/wxcode.png',
                wxtxt: 'sedws22'
            }
        },
        onLoad() {
            //this.getWxInfo()
        },
        methods: {
            getWxInfo() {
                uni.showLoading({
                    title: '加载中',
                    mask: true
                });
                var that = this;
                this.api.post('/api/taoke/meituan_act', {
                    type: this.optionsCurrent
                }).then(e => {
                    uni.hideLoading();
                    if (e.code != 0) {
                        uni.showToast({
                            title: res.data.msg,
                            icon: 'none'
                        });
                        return;
                    }
 
                    that.mtInfo = e.data.info;
                    that.qrcode = that.mtInfo.we_app_info.miniCode;
                    console.log(that.qrcode);
                }).catch(function(err) {
                    console.log(err);
                })
            },
 
        },
    }
</script>
 
<style>
    .main-cont {
        background: rgba(255, 255, 255, 0.77);
        text-align: center;
    }
 
    .head-contain {
        position: absolute;
        top: 330rpx;
        width: 80%;
        left: 10%;
        background-color: rgba(255, 255, 255, 0.77);
        box-shadow: 0px 7rpx 16rpx 0px rgba(88, 91, 120, 0.38);
        border-radius: 10rpx;
    }
 
    .qrcode-container {
        margin-top: 35rpx;
        width: 375rpx;
        height: 375rpx;
        background: url(https://yanfeiobpub.obs.cn-east-3.myhuaweicloud.com/dfg/wx_kfcodekuang.png) no-repeat;
        background-size: 100% 100%;
        margin: 0 auto;
        display:flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 120rpx;
    }
 
    .qrcode-container-image {
        width: 345rpx;
        height: 345rpx;
    }
 
    .wx-txt {
        font-size: 1rem;
        font-weight: 400;
        color: #095AC1;
        margin-top: 30rpx;
    }
 
    .qrcode-title {
        font-size: 32rpx;
        font-weight: 400;
        color: #095AC1;
        margin-top: 60rpx;
        margin-bottom: 20rpx;
        font-weight: 700;
    }
</style>