<?php /*a:2:{s:77:"D:\phpstudy_pro\WWW\www.ceshi.com\application\index\view\rot_order\index.html";i:1642338776;s:74:"D:\phpstudy_pro\WWW\www.ceshi.com\application\index\view\public\floor.html";i:1642338776;}*/ ?>
<!DOCTYPE html><html lang="en" class="deeppurple-theme"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport"
          content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover, user-scalable=no"><meta name="description" content=""><title><?php echo htmlentities(app('lang')->get('qd_title')); ?></title><!-- Material design icons CSS --><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"><!-- Roboto fonts CSS --><link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&amp;display=swap" rel="stylesheet"><!-- Bootstrap core CSS --><link href="/red/bootstrap/css/bootstrap.min.css" rel="stylesheet"><!-- Swiper CSS --><link href="/red/swiper/swiper-bundle.min.css" rel="stylesheet"><!-- Custom styles for this template --><link href="/red/style.css?v=V1.24" rel="stylesheet"><link rel="stylesheet" href="/static_new/css/public.css?v=V1.24"><link href="/public/js/layer_mobile/need/layer.css?2.0" type="text/css" rel="styleSheet" id="layermcss"><style>
        .vip_bg_0 {
            background: linear-gradient(240deg, rgb(12, 36, 66), rgb(79, 116, 146)) !important;
        }

        .vip_bg_1 {
            background: url(../../static/images/vip-bg.png?) center center / 160px 64px no-repeat, linear-gradient(240deg, rgb(89, 112, 149), rgb(118, 138, 170)) !important;
        }

        .vip_bg_2 {
            background: url(../../static/images/vip-bg.png?) center center / 160px 64px no-repeat, linear-gradient(240deg, rgba(219, 111, 33, 0.99), rgb(249, 153, 5)) !important;
        }

        .vip_bg_3 {
            background: url(../../static/images/vip-bg.png?) center center / 160px 64px no-repeat, linear-gradient(240deg, rgba(39, 53, 131, 0.99), rgb(47, 67, 177)) !important;
        }

        .vip_bg_4 {
            background: url(../../static/images/vip-bg.png?) center center / 160px 64px no-repeat, linear-gradient(240deg, rgba(61, 147, 181, 0.99), rgb(49, 179, 139)) !important;
        }

        .vip_bg_5 {
            background: url(../../static/images/vip-bg.png?) center center / 160px 64px no-repeat, linear-gradient(240deg, rgba(33, 35, 39, 0.99), rgb(67, 69, 73)) !important;
        }

        .vip_bg_6 {
            background: url(../../static/images/vip-bg.png?) center center / 160px 64px no-repeat, linear-gradient(240deg, rgba(72, 0, 154, 0.99), rgb(97, 0, 160)) !important;
        }

        .vip_bg_7 {
            background: url(../../static/images/vip-bg.png?) center center / 160px 64px no-repeat, linear-gradient(to right, rgb(186, 139, 2), rgb(209, 145, 60)) !important;
        }
    </style></head><body class=""><div class="wrapper homepage"><!-- header --><div class="header" style="backdrop-filter:none"><div class="row no-gutters"><div class="col-auto"><!--<button class="btn  btn-link text-dark"><i class="material-icons">menu</i><span class="new-notification"></span></button>--></div><div class="col text-center"><!--<img src="/red/logo-header.png" alt="" class="header-logo">--></div><div class="col-auto"><a href="/index/my/msg" class="btn  btn-link text-dark position-relative"><i class="material-icons">notifications_none</i></a></div></div></div><!-- header ends --><div class="container"><div class="row"><div class="col"><h3 class="mb-0 font-weight-normal"><?php echo config("currency"); ?><?php echo htmlentities(sprintf('%.2f',$price)); ?></h3><p class="text-mute text-secondary"><?php echo htmlentities(app('lang')->get('qd_money')); ?></p></div><div class="col-auto"><button class="btn btn-default btn-rounded-54 shadow"
                        onclick="window.location.href=`/index/ctrl/recharge`"><i class="material-icons">add</i></button></div></div></div><div class="swiper-container card-slide swiper-container-horizontal swiper-container-ios"><div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px);"><div class="swiper-slide pb-4 swiper-slide-active"><div class="container z-1 position-relative"><div class="card bg-template shadow mt-4 h-200"><div class="card-body"><div class="row"><div class="col-10"><h3><?php echo htmlentities($level_name); ?></h3></div><div class="col-2 text-right"><a data-toggle="modal" data-target="#vip_modal"><i class="material-icons">help</i></a></div></div><div class="row"><div class="col-12 mt-2"><!--<h5 class="font-weight-normal"><?php echo htmlentities(app('lang')->get('qd_qzje')); ?>&nbsp;<?php echo config("currency"); ?><?php echo htmlentities($level_nums); ?></h5>--></div><div class="col-12"><p><?php echo htmlentities(app('lang')->get('commission')); ?>&nbsp;<?php echo htmlentities($level_bili*100); ?>% | <?php echo htmlentities($order_num); ?>&nbsp;<?php echo htmlentities(app('lang')->get('qd_order_num')); ?></p></div><!--<div class="col-12 mt-5"><h3 class="text-center"><span style="background: limegreen; padding: 0 5px"><?php echo htmlentities($day_d_count); ?></span>/<?php echo htmlentities($order_num); ?></h3></div>--></div><div class="row text-center mt-4"><div class="col-4"><h3><?php echo htmlentities($day_d_count); ?></h3><p><?php echo htmlentities(app('lang')->get('task_tab3')); ?></p></div><div class="col-4"><h3><?php echo htmlentities($order_num); ?></h3><p><?php echo htmlentities(app('lang')->get('task_tab1')); ?></p></div><div class="col-4"><h3><?php echo htmlentities($order_incomplete_num); ?></h3><p><?php echo htmlentities(app('lang')->get('task_tab5')); ?></p></div></div></div></div></div><div class="container top-50 z-0"><div class="card shadow pt-5"><div class="card-body border-bottom"><div class="row"><div class="col"><p><?php echo config("currency"); ?><?php echo htmlentities($day_deal); ?><br><small class="text-mute text-secondary"><?php echo htmlentities(app('lang')->get('qd_hdyj')); ?></small></p></div><div class="col text-right"><p><?php echo config("currency"); ?><?php echo htmlentities($lock_deal); ?><br><small class="text-mute text-secondary"><?php echo htmlentities(app('lang')->get('qd_djje')); ?></small></p></div></div></div><div class="card-body border-bottom"><div class="row"><div class="col"><p><?php echo htmlentities($day_d_count); ?><br><small class="text-mute text-secondary" style="width: 100px;display: block"><?php echo htmlentities(app('lang')->get('qd_ddnum')); ?></small></p></div><div class="col text-right"><p><?php echo config("currency"); ?><?php echo htmlentities($price); ?><br><small class="text-mute text-secondary"><?php echo htmlentities(app('lang')->get('qd_kyye')); ?></small></p></div></div></div><div class="card-footer bg-none"><button class="btn btn-default shadow  btn-rounded btn-block btn-lg btn-important"
                                    id="autoStart"><?php echo app('lang')->get('qd_go'); ?></button></div></div></div></div></div></div><!--<div class="container"><h6 class="subtitle mt-1"><?php echo htmlentities(app('lang')->get('qd_desc_text')); ?></h6><div class="card shadow border-0 mb-3"><div class="card-body"><p style="white-space: normal;"><?php echo htmlentities(app('lang')->get('qd_desc_info_1')); ?></p><p style="white-space: normal;"><?php echo htmlentities(app('lang')->get('qd_desc_info_2')); ?></p><p style="white-space: normal;"><?php echo htmlentities(app('lang')->get('qd_desc_info_3')); ?></p><p style="white-space: normal;"><?php echo htmlentities(app('lang')->get('qd_desc_info_4')); ?></p></div><p></p></div></div></div>--><!-- footer--><div class="footer"><div class="no-gutters"><div class="col-auto mx-auto"><div class="row no-gutters justify-content-center"><div class="col-auto"><a href="/index/index/home.html" class="btn btn-link-default  <?php if($request->controller()=='Index'){ ?>active<?php }else{ } ?>"><i class="material-icons">home</i><!--<p><?php echo htmlentities(app('lang')->get('home')); ?></p>--></a></div><div class="col-auto"><a href="/index/order/index.html" class="btn btn-link-default <?php if($request->controller()=='Order'){ ?>active<?php }else{ } ?>"><i class="material-icons">playlist_add_check</i><!--<p><?php echo htmlentities(app('lang')->get('Record')); ?></p>--></a></div><div class="col-auto"><a href="/index/rot_order/index.html" class="btn btn-link-default <?php if($request->controller()=='RotOrder'){ ?>active<?php }else{ } ?>"><i class="material-icons">swipe</i><!--<p><?php echo htmlentities(app('lang')->get('grab')); ?></p>--></a></div><div class="col-auto"><a href="/index/support/index.html" class="btn btn-link-default <?php if($request->controller()=='Support'){ ?>active<?php }else{ } ?>"><i class="material-icons">chat</i><!--<p><?php echo htmlentities(app('lang')->get('Service')); ?></p></a>--></div><div class="col-auto"><a href="/index/my/index.html" class="btn btn-link-default <?php if($request->controller()=='My'){ ?>active<?php }else{ } ?>"><i class="material-icons">person</i><!--<p><?php echo htmlentities(app('lang')->get('Account')); ?></p>--></a></div></div></div></div></div><!-- footer ends--><style>.van-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%
    }

    .grabSuccess {
        border-radius: .32rem;
        margin: 1.373333rem auto 0;
        position: relative
    }

    .grabSuccess .title {
        height: 2.586667rem;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-pack: center;
        justify-content: center;
        -ms-flex-align: center;
        align-items: center;
        position: relative
    }

    .grabSuccess .title:after, .grabSuccess .title:before {
        content: "";
        width: .893333rem;
        height: .386667rem;
        background-size: 100%;
        position: absolute;
        top: 1.093333rem
    }

    .grabSuccess .records_tabs_box .records_tabs_box_top {
        font-size: .32rem;
        color: #9e9e9e;
        font-weight: 400;
        text-align: left;
        font-family: PingFangSC-Regular, PingFang SC
    }

    .grabSuccess .records_tabs_box .records_tabs_box_img {
        width: 1.733333rem;
        height: auto;
        position: absolute;
        top: .266667rem;
        right: .133333rem
    }

    .grabSuccess .records_tabs_box .records_tabs_box_des {
        background: #f2f2f2;
        border-radius: .133333rem;
        margin: .266667rem 0;
        display: -ms-flexbox;
        display: flex;
        overflow: hidden
    }

    .grabSuccess .records_tabs_box .records_tabs_box_des .tabs_box_des_img {
        width: 4.8rem;
        height: 2.4rem
    }

    .grabSuccess .records_tabs_box .records_tabs_box_des .tabs_box_des_img > img {
        width: 4.8rem;
        height: 2.4rem;
        -o-object-fit: cover;
        object-fit: cover
    }

    .grabSuccess .records_tabs_box .records_tabs_box_des .tabs_box_des_r {
        text-align: left;
        padding: .266667rem;
        font-size: .266667rem
    }

    .grabSuccess .records_tabs_box .records_tabs_box_des .tabs_box_des_r .tabs_box_des_r_tit {
        overflow: hidden;
        font-size: .373333rem;
        color: #424242;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        font-family: PingFangSC-Regular, PingFang SC
    }

    .grabSuccess .records_tabs_box .tabs_box_des_r_pic {
        display: -ms-flexbox;
        display: flex;
        -ms-flex-pack: justify;
        justify-content: space-between;
        margin-top: .4rem;
        font-size: .373333rem;
        color: #424242
    }

    .grabSuccess .records_tabs_box .gray {
        color: #969696;
        font-size: .373333rem
    }

    .grabSuccess .records_tabs_box .txt1 {
        color: #ff9a2c;
        font-size: .64rem !important
    }

    .grabSuccess .tabs_btn {
        display: -ms-flexbox;
        display: flex;
        -ms-flex-pack: center;
        justify-content: center
    }</style><input name="" id="webcopyinput" type="text" style="top: -100px; position: absolute;" value=""><textarea id="share_text" style="display: none">Participei da tarefa de ganhar 20 reais por dia no app mercadolivre. Espero que todos possam me incentivar a participar dessa atividade lucrativa. O aplicativo para ganhar dinheiro mais popular do Brasil: FelizGo A retirada está disponível 7 * 24 horas As retiradas estão disponíveis de segunda a domingo Clique aqui para se cadastrar ✅✅✅grátis 10 pedidos por dia 1 reais por pedido 10 reais por dia 300 reais por mês ?VIP1: 200 reais 26 pedidos por dia 0,3% de reembolso para cada pedido 35 reais por dia 1050 reais por mês ?VIP2: 500 reais 28 pedidos por dia 0,32% de reembolso por pedido 45 reais por dia 1350 reais por mês Para mais informações sobre os níveis VIP, clique no link do nosso produto para ver informações detalhadas. Esta é uma carta de recomendação para VIP. Convide seus amigos e receba uma recompensa de comissão de 16-4%. Apresse-se e inscreva-se! * _WHATSAPP REGISTER_ * {link} * _WHATSAPP GROUP WA_ * {grupo}</textarea><!-- jquery, popper and bootstrap js --><script src="/red/jquery-3.3.1.min.js"></script><script src="/red/popper.min.js"></script><script src="/red/bootstrap/js/bootstrap.min.js"></script><!-- swiper js --><script src="/red/swiper/swiper-bundle.min.js"></script><!-- cookie js --><script src="/red/jquery.cookie.js"></script><script charset="utf-8" src="/static_new/js/dialog.min.js"></script><link rel="stylesheet" href="/public/js/layer_mobile/need/layer.css"><script src="/public/js/layer_mobile/layer.js"></script><script charset="utf-8" src="/static_new/js/common.js"></script><!-- template custom js --><script src="/red/main.js?v=V1.24"></script><script src="https://www.recaptcha.net/recaptcha/1api.js?render=6LdC99EZAAAAABfzI41Q48ZSd2Pe2aHA_vJ61go4"></script><span style="display: none;"><audio id="audio" src="/static_new/img/hongbao.mp3" controls="controls"></audio></span></div><!-- Modal --><div class="modal fade" id="vip_modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-sm modal-dialog-centered" role="document"><div class="modal-content"><button type="button" class="close close-rounded" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button><div class="modal-body text-center pt-0" style="max-height: 500px; overflow: scroll"><style>.rule_msg img {
                    max-width: 100%;
                }</style><p class="rule_msg" style="margin-top: 1rem;"><?php echo $rule_msg; ?></p><p></p><div class="swiper-container vip-slide" style="width: 1px;"><div class="swiper-wrapper"><?php if(is_array($level_list) || $level_list instanceof \think\Collection || $level_list instanceof \think\Paginator): if( count($level_list)==0 ) : echo "" ;else: foreach($level_list as $k=>$vo): ?><div class="swiper-slide pb-5"><div class="container z-1 position-relative"><div class="card shadow mt-4 h-150 vip_bg_<?php echo htmlentities($k); ?>"><div class="card-body"><div class="row"><div class="col-6 text-left"><h3 class="text-white"><?php echo htmlentities($vo['name']); ?></h3></div><?php if($vo['level']<=$uinfo['level']){ ?><div class="col-6 text-right text-white"><?php echo htmlentities(app('lang')->get('cur_level')); ?></div><?php }else{ ?><div class="col-6 text-right text-white"><a href="/index/ctrl/recharge.html?vip_id=<?php echo htmlentities($vo['id']); ?>" style=""><?php echo htmlentities(app('lang')->get('join')); ?>&gt;&gt;</a></div><?php } ?></div><div class="row text-white"><div class="col-12 mt-2"><span class="font-weight-normal"><?php echo htmlentities(app('lang')->get('sxtz')); ?>&nbsp;<?php echo config("currency"); ?><?php echo htmlentities($vo['num']); ?></span></div></div><div class="row text-white"><div class="col-12 mt-1"><p><?php echo htmlentities(app('lang')->get('commission')); ?>&nbsp;<?php echo htmlentities($vo['bili']*100); ?>% | <?php echo htmlentities($vo['order_num']); ?>&nbsp;<?php echo htmlentities(app('lang')->get('Record')); ?></p></div></div></div></div></div></div><?php endforeach; endif; else: echo "" ;endif; ?></div><div class="swiper-pagination"></div></div></div></div></div></div><!-- Modal --><div class="modal fade" id="orderDetail" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-sm modal-dialog-centered" role="document"><div class="modal-content grabSuccess"><div class="modal-header border-0"><h5><?php echo htmlentities(app('lang')->get('taks_ddtjz')); ?></h5><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body text-center pt-0" id="orderListInfo"></div><div class="modal-footer border-0 tabs_btn"><div class="tabs_btn1 btn btn-cancel btn-rounded mr-2 shadow"><?php echo htmlentities(app('lang')->get('task_qx')); ?></div><div class="tabs_btn2 btn btn-default btn-rounded ml-2 shadow"><?php echo htmlentities(app('lang')->get('task_tj')); ?></div></div></div></div></div><div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" id="add_link_popup"><div class="modal-dialog modal-sm modal-dialog-centered" role="document"><div class="modal-content border-top border-bottom"
             style="width:90%; margin: 0 auto; box-shadow:4px 4px 5px 3px #999;"><div class="modal-header border-0 bg-template"><h5>Informações do Grupo WhatsApp / Telegram</h5></div><div class="modal-body text-center" style="max-height: 300px; overflow: scroll;"><div class="container"><div class="row"><div class="col-12 col-md-6"><div class="form-group float-label active"><input type="text" class="form-control" required="" name="to_name" autocomplete="off"
                                       value=""><label class="form-control-label">Nome do grupo</label></div></div><div class="col-12 col-md-6"><div class="form-group float-label active"><input type="text" class="form-control" required="" name="add_id" autocomplete="off"
                                       value=""><label class="form-control-label">Link do grupo</label></div></div></div></div></div><div class="modal-footer border-0 text-center"><button class="btn btn-cancel btn-sm btn-rounded shadow mr-2 add_link_cancel"><?php echo htmlentities(app('lang')->get('quxiao')); ?></button><button class="btn btn-default btn-sm btn-rounded shadow ml-2 add_link_save"><?php echo htmlentities(app('lang')->get('queding')); ?></button></div></div></div></div><style>
    .no-padding-alert .dialog-content-bd{
        margin: 0;
    }
</style><script>
    $(function () {
        $('.footer').find('.btn-link-default').eq(2).addClass("active");
    });
    var cid = 1;
    var oid = '';
    var add_id = '';
    var countdown = 0;
    var audio = document.getElementById("audio");
    var loading;
    var isShare = ("0" == '0');
    var isLoading = false;
    $(function () {
        $('.footer li').eq(2).addClass("on");
        $('#autoStart').click(function () {
            if (isLoading) return;
            isLoading = true;
            countdown = 3;
            var order_submit_gif = "/red/make.gif";
            $('#autoStart').text("<?php echo app('lang')->get('qd_loding'); ?>");
            loading = $(document).dialog({
                type: 'notice',
                infoIcon: '',
                infoText: "<img src='" + order_submit_gif + "' style='width:128px;height:128px; margin: 10px'>",
                autoClose: 0
            });
            isLoading = false;
            start('', 3);
        });
    });

    function palySong(wi) {
        audio.load();
        stopSong();
        audio.play();
        if (wi == 0) {
            audio.pause();
        }
    }

    function stopSong() {
        audio.pause();
    }

    function qdSuccess(oid) {
        $('#orderDetail').modal('show');
        $.ajax({
            url: "/index/order/order_info_list",
            type: "POST",
            dataType: "JSON",
            data: {id: oid},
            success: function (res) {
                var data = res.data;
                if (res.code == 0) {
                    var html = '';
                    for (var i = 0; i < data.length; i++) {
                        html += '<div class="records_tabs_box">\n' +
                            '<div class="records_tabs_box_top"><?php echo htmlentities(app('lang')->get('task_time')); ?>&nbsp;\n' +
                            '    <span>' + data[i].addtime + '</span>\n' +
                            '    <br><?php echo htmlentities(app('lang')->get('task_ordero_num')); ?>&nbsp;<span>' + data[i].oid + '</span>\n' +
                            '</div>\n' +
                            '<div class="records_tabs_box_des">\n' +
                            '    <div class="tabs_box_des_img">\n' +
                            '        <img src="' + data[i].goods_pic + '"></div>\n' +
                            '    <div class="tabs_box_des_r">\n' +
                            '        <p class="tabs_box_des_r_tit" style="max-height: 95px;">' +
                            data[i].goods_name + '</p>\n' +
                            '        <div class="tabs_box_des_r_pic" style="display: none"><p>' +
                            data[i].goods_price + '</p><p> x ' + data[i].goods_count + '</p></div>\n' +
                            '    </div>\n' +
                            '</div>\n' +
                            '<div class="row mt-3">\n' +
                            '    <div class="col text-left"><?php echo htmlentities(app('lang')->get('task_all_money')); ?></div>\n' +
                            '    <div class="col-auto text-right text-mute">' + data[i].num + '</div>\n' +
                            '</div>\n' +
                            '<div class="row mt-3">\n' +
                            '    <div class="col text-left"><?php echo htmlentities(app('lang')->get('commission')); ?></div>\n' +
                            '    <div class="col-auto text-right txt1"><span id="yongjin">' +
                            data[i].commission + '</span></div>\n' +
                            '</div>\n' +
                            '</div>'
                    }
                    $('#orderListInfo').html(html);

                    /*$('#ad_link').html(data.ad_link);
                    $('#copy_link').parent().attr('link', data.ad_link);*/
                }
            },
            error: function (err) {
                console.log(err)
            }
        })
    }

    function start(token, v, real) {
        real = real || 0;
        if (countdown <= 0) {
            $.ajax({
                url: "/index/rot_order/submit_order.html" + '?cid=' + cid + '&reCAPTCHA=' + token + '&v=' + v + '&m=' + Math.random() + "&real=" + real,
                type: 'POST',
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    loading.close();
                    $('#autoStart').text("<?php echo app('lang')->get('qd_go'); ?>");
                    $(document).dialog({
                        infoText: "<?php echo htmlentities(app('lang')->get('qd_error')); ?>",
                        autoClose: 2000
                    });
                },
                success: function (data) {
                    loading.close();
                    $('#autoStart').text("<?php echo app('lang')->get('qd_go'); ?>");
                    if (data.code == 1) {
                        loading.close();
                        if (data.image) {
                            $(document).dialog({
                                type: 'alert',
                                titleShow: false,
                                dialogClass:"no-padding-alert",
                                content: "<img style='max-width: 100%' src='" + data.image + "'>",
                                buttonTextConfirm: "<?php echo htmlentities(app('lang')->get('queding')); ?>",
                                autoClose: 0,
                                onClosed: function () {
                                    start(token, 1, 1);
                                }
                            });
                        } else {
                            $(document).dialog({
                                type: 'alert',
                                titleText: data.info,
                                buttonTextConfirm: "<?php echo htmlentities(app('lang')->get('queding')); ?>",
                                autoClose: 0,
                                onClosed: function () {
                                    if (data.url) window.location.href = data.url;
                                }
                            });
                        }
                    } else if (data.code == 0 && data.oid) {
                        loading.close();
                        palySong(1);
                        sessionStorage.setItem('oid', data.oid);
                        $(document).dialog({
                            infoText: data.info
                        });
                        qdSuccess(data.oid);
                        oid = data.oid;
                        add_id = data.add_id;
                    } else {
                        loading.close();
                        if (data.info) {
                            $(document).dialog({
                                infoText: data.info,
                            });
                        } else {
                            $(document).dialog({
                                infoText: "A rede não é estável, por favor, tente novamente em um bom sinal!"
                            });
                        }
                    }
                }
            });
        } else {
            countdown--;
            setTimeout(function () {
                start(token, v)
            }, 1000);
        }
    }

    function sum(m, n) {
        var num = Math.floor(Math.random() * (m - n) + n);
        return num;
    }

    $('.tabs_btn1').click(function () {
        if ("0" == 1) {
            $(document).dialog({
                type: 'confirm',
                titleText: "Confirme cancelamento?",
                buttonTextConfirm: "confirme",
                buttonTextCancel: "cancelar",
                autoClose: 0,
                onClickConfirmBtn: function () {
                    $.ajax({
                        url: "/index/order/do_order",
                        type: "POST",
                        dataType: "JSON",
                        data: {
                            oid: oid,
                            status: 2
                        },
                        success: function (res) {
                            layer.closeAll();
                            if (res.code == 0) {
                                $(document).dialog({
                                    infoText: "Ordem Cancela o sucesso!",
                                    autoClose: 2000
                                });
                                $('#orderDetail').modal('hide');
                            } else {
                                $(document).dialog({
                                    type: 'alert',
                                    titleText: res.info,
                                    buttonTextConfirm: "<?php echo htmlentities(app('lang')->get('queding')); ?>",
                                    autoClose: 0,
                                    onClosed: function (e) {
                                        if (res.url) window.location.href = res.url;
                                    }
                                });
                            }
                            sumbit = true;
                        },
                        error: function (err) {
                            console.log(err);
                            sumbit = true;
                        }
                    });
                },
                onClickCancelBtn: function () {

                }
            });
        } else {
            $('#orderDetail').modal('hide');
        }
    });

    $('.close').click(function () {
        $('#orderDetail').modal('hide');
    });

    $(function () {
        $('.add_link').click(function () {
            $('#add_link_popup').modal('show');
            $('#publish_to').hide();
        });
        $('.add_link_save').click(function () {
            var to_name = $('input[name=to_name]').val();
            var add_id = $('input[name=add_id]').val();
            if (to_name == '' || add_id == '') {
                $(document).dialog({
                    infoText: 'Não pode estar vazio!'
                });
                return;
            }
            var option = '<option value="' + add_id + '" to_name="' + to_name + '" selected>[' + to_name + ']' + add_id + '</option>';
            $('#publish_to').prepend(option);
            $('#publish_to').show();
            $('#add_link_popup').modal('hide');
        });
        $('.add_link_cancel').click(function () {
            $('#publish_to').show();
            $('#add_link_popup').modal('hide');
        });

        /*$('.copy_link').hide();
        $('.copy_link').click(function () {
            isShare = true;
            var link = $(this).parent().parent().siblings('span').text();
            copy_txt(link);
        });*/
        $('.send_with_whatsapp').click(function () {
            isShare = true;
            var link = $(this).parent().parent().siblings('span').text();
            var group = $('select[name=publish_to]').val();
            var text = $('#share_text').val().replace("{link}", link).replace("{group}", group);
            window.open('https://api.whatsapp.com/send?text=' + encodeURIComponent(text));
        });

        $('.send_with_telegram').click(function () {
            isShare = true;
            var link = $(this).parent().parent().siblings('span').text();
            var group = $('select[name=publish_to]').val();
            var text = $('#share_text').val().replace("{link}", link).replace("{group}", group);
            window.open('https://telegram.me/share/url?url=' + encodeURI(link) + '&text=' + encodeURIComponent(text));
        });

        $('.send_with_tweet').click(function () {
            isShare = true;
            var link = $(this).parent().parent().siblings('span').text();
            var group = $('select[name=publish_to]').val();
            var text = $('#share_text').val().replace("{link}", link).replace("{group}", group);
            window.open('https://twitter.com/intent/tweet?via=&text=' + encodeURIComponent(text) + "&url=" + encodeURI(link) + "&related=" + encodeURIComponent('<?php echo sysconf("site_name"); ?>: ' + text));
        });

        $('#vip_modal').on('shown.bs.modal',
            function () {
                $('.vip-slide').width('100%');
                var swiper = new Swiper('.vip-slide', {
                    slidesPerView: 'auto',
                    spaceBetween: 0,
                    pagination: {
                        el: '.swiper-pagination',
                    },
                });
            })
    })
    var zhujiTime = "1";
    var shopTime = "2";

    zhujiTime = zhujiTime * 1000;
    shopTime = shopTime * 1000;
    //提交
    $('.tabs_btn2').click(function () {
        //--------------------------------
        if (!isShare) {
            $(document).dialog({
                infoText: "<?php echo htmlentities(app('lang')->get('taks_ddtjz')); ?>",
                autoClose: 2000
            });
            return;
        }
        var publish_to = $(this).parent().siblings().find('select[name=publish_to]');
        var to_name = publish_to.find('option:selected').attr('to_name');
        var aid = publish_to.find('option:selected').attr('aid');
        var add_id = publish_to.val();
        var i = 0;
        layer.open({
            type: 2,
            content: "<?php echo htmlentities(app('lang')->get('task_ppshxx')); ?>",
            time: zhujiTime,
            shadeClose: false,
        });

        var timer = setInterval(function () {
            i++;
            if (i == 1) {
                layer.open({
                    type: 2,
                    content: "<?php echo htmlentities(app('lang')->get('task_sccpdd')); ?>",
                    time: zhujiTime,
                    shadeClose: false,
                })
            } else if (i == 2) {
                layer.open({
                    type: 2,
                    content: "<?php echo htmlentities(app('lang')->get('task_ddtjwc')); ?>",
                    time: shopTime,
                    shadeClose: false,
                })
                var ajaxT = setTimeout(function () {
                    $.ajax({
                        url: "/index/order/do_order",
                        type: "POST",
                        dataType: "JSON",
                        data: {
                            oid: oid,
                            add_id: add_id,
                            to_name: to_name,
                            aid: aid
                        },
                        success: function (res) {
                            layer.closeAll();
                            console.log(res)
                            if (res.code == 0) {
                                $(document).dialog({
                                    infoText: "<?php echo htmlentities(app('lang')->get('task_qd_wc')); ?>",
                                    autoClose: 2000
                                });
                                clearInterval(timer);
                                var linkTime = setTimeout(function () {
                                        location.reload()
                                    },
                                    1800);
                            } else {
                                $(document).dialog({
                                    type: 'alert',
                                    titleText: res.info,
                                    buttonTextConfirm: "<?php echo htmlentities(app('lang')->get('queding')); ?>",
                                    autoClose: 0,
                                    onClosed: function (e) {
                                        if (res.url) window.location.href = res.url;
                                    }
                                });
                            }
                            sumbit = true;
                        },
                        error: function (err) {
                            layer.closeAll();
                            console.log(err);
                            sumbit = true;
                        }
                    })
                }, shopTime)
            }
        }, zhujiTime)
    });

    function copy_txt(xx) {
        //var text = document.createElement('input');
        var text = document.getElementById("webcopyinput");
        text.id = 'webcopyinput';
        text.value = '' + xx + '';
        //text.style.position = 'fixed';
        // text.style.top = '- 10000px';
        // document.body.appendChild(text);
        text.focus(); //给input输入框聚焦
        text.setSelectionRange(0, text.value.length); //设置input框选中的范围
        copied = document.execCommand('Copy'); //执行复制操作
        text.blur();
        copied = false;
        document.body.scrollTop = 0;
        $(document).dialog({
            infoText: 'Copie o sucesso'
        });
    }
</script></body></html>