zhaojs
2023-07-31 34db7035c9c7880e00b9328d022be65a29c62cb2
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
<template style="background:#1088FE">
    <view class="bodycont">
    <!--     <view class="toptxt">
            美团外卖
        </view> -->
        <view class="tabcont">
            <view class="tabcont tabcontsp">
                <span class="tabconttxt getBtn-containe-uncheck" @click="toMt()">
                    美团
                </span>
                <span class="tabconttxt tabconttxt-check">
                    饿了么
                </span>
            </view>
            
        </view>
        <view>
            <image class="pageBac" src="https://hxshapp.oss-cn-beijing.aliyuncs.com/weapp/elm.png"></image>
        </view>
        <view class="code-cont">
            <view class="code-flow">
                <image class="code-flow-img" src="https://hxshapp.oss-cn-beijing.aliyuncs.com/weapp/elmstep.png"></image>
            </view>
            <view class="code-img">
                <image class="code-img-code" :src="qrcode"></image>
            </view>
            <view v-if="qrcode" class="code-btn" @click="shareClick()">
                领红包点外卖
            </view>
        </view>
        
        <view class="rulesContent">
            <view class="txt-title">
                规则说明:
            </view>
            <view class="richtext-content">
                1.红包需先领取才能在下单页面使用;</br>
                2.加餐红包和外卖红包不冲突,可以同时领取,哪个红包大用哪个;</br>
                3.无论饿了么新老用户,外卖红包和加餐红包每个手机号每天均可领一次,红包金额随机发放;</br>
            </view>
        </view>
    </view>
</template>
<script>
    import './elm.css'
    import comUtils from '../../utils/ComUtils.js'
    export default {
        data() {
            return {
                optionsCurrent:3,
                qrcode:'',
                mtInfo:{},
                optionsList: [{
                        label: "美团",
                        type: 1
                    },
                    {
                        label: "饿了么",
                        type: 3
                    }
                ]
            }
        },
        onLoad() {
            this.IntiData()
        },
        methods: {
            IntiData() {
                uni.showLoading({
                    title: '加载中',
                    mask:true
                });
                var that = this;
                this.$http.post('/api/taoke/ele_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);
                })
            },
            toMt()
            {
                uni.redirectTo({
                    url:'./mt?dfgtoken='+comUtils.getUrlPar('dfgtoken')
                })
            },
            shareClick() {
                window.location.href=this.mtInfo.h5;
            },
            
        }
    }
</script>