<!--{assign var="menu_id" value="signin"}-->
<!--{include file="<!--{$oetplpath}-->widget/block_header.tpl"}-->
<body class="bg_f">
<div class="oe_top bo_bf7">
  <h1>活动签到</h1>
  <a href="<!--{$oefile}-->"><span class="back"><i class="iconfont icon-fanhui"></i></span></a>
</div>
<div class="h60"></div>

<div class="bg_f plr40 pt10">
  <h1 class="fn fz24 lh40">活动签到</h1>
  <div class="color_3 fz16 pb30">
    <!--{$party.title}-->
  </div>
  <div>
    <div class="pb20 pr">
      <i class="iconfont icon-shouji pa lt color_m fz18" style="top:0.38rem"></i>
      <input class="bn bo_bf7 w100 bsb lh50 fz15 pl25" type="text" name="mobile" id="mobile" placeholder="请输入报名填写的手机号" maxlength="11" />
    </div>
    <div class="pt20 cursor">
      <span class="block br color_f bg_main t_center fz16 lh45" f="but_confirm_signin" id="but_confirm_signin">确定签到</span>
    </div>
  </div>
</div>
<div class="plr40 pt30">
  <div class="fb fz14 bo_bf7 pb10 color_red">
    <i class="iconfont icon-tips "></i> 温馨提示
  </div>
  <div class="pt10 fz14 color_9">
    签到遇到问题？请联系客服帮忙<br>
    联系电话：<!--{$config.sitetel}-->
  </div>
</div>
<!--{include file="<!--{$oetplpath}-->widget/block_footjs.tpl"}-->
<script type="text/javascript">
$(function(){
    //签到
    $(document).on("click", "[f='but_confirm_signin']", function(){
        var $mobile = $("#mobile").val();
        if ($mobile == '') {
            OEUI.toast({
                text: '请输入报名填写的手机号'
            });
            return;
        }
        var $obj_id = $(this).attr("id");
        if (!$("#"+$obj_id).hasClass("forbid_submit")) {
            $.ajax({
                type: "POST",
                url: "<!--{$oefile}-->&c=<!--{$c}-->",
                cache: false,
                data: {
                    a:"signmobile", mobile:$mobile, partyid:"<!--{$partyid}-->"
                },
                dataType: "json",
                success: function($data) {
                    var $json = eval($data);
                    var $response = $json.response;
                    var $result = $json.result;
                    if ($response == "1") {
                        //签到成功...
                        window.location.href = "<!--{$oefile}-->&c=<!--{$c}-->&a=success&partyid=<!--{$partyid}-->";
                    }
                    else {
                        if ($result == '' || $result == null) {
                            $result = "签到失败，请检查该手机是否报名";
                        }
                        OEUI.toast({
                            text: $result
                        }); 
                    }
                    $("#"+$obj_id).removeClass("forbid_submit");
                },
                error: function() {
                    $("#"+$obj_id).removeClass("forbid_submit");
                    OEUI.toast({
                        text: '网络繁忙，请稍后再试！'
                    });
                }
            });
        
        }

    });
});
</script>
</body>
</html>