影嘉会员中心表单验证


DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="/Public/static/jquery-weui/weui.min.css?v=20211112172924" media="all">
    <link rel="stylesheet" type="text/css" href="/Public/static/jquery-weui/jquery-weui.min.css?v=20211112172924" media="all">
    <link rel="stylesheet" type="text/css" href="/Public/Home/css/personalCenter.css?v=20211112172924" media="all">
        <title>测试影城title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
    <meta content="no-cache" http-equiv="pragma">
    <meta content="0" http-equiv="expires">
    <meta content="telephone=no, address=no" name="format-detection">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link rel="shortcut icon" href="favicon.ico">
head>
<body class="VC VC_blue">
<style type="text/css">
.cardImg, .cardImg:after{height:180px}
style>
<div id="container" class="container body">

    <div class="weui-cells weui-cells_form" style="margin-top:0;padding-bottom:20px">
      <div id="cardDesc" class="cardDesc">
    
            <div class="bgWhite cardpanel">                
                <div class="cardImg cardImgcov white psr" style="margin-bottom:10px">
                    <div id="cinamelogo" class="cinamelogo psa"><img src="./Addons/Wemall/View/default/Wemall/Public/Static/images/pic/uface.jpg" />div>
                    <p class="cinameTit ft14 white psa">满天星测试影城p>
                    <div id="qrcode" class="bgWhite tc psa qrcode icon">div>
                    <div class="white tc ft16 psa cardNo">
                        <div class="ft22 tc"><strong id="c_member_name">strong>div>
                        <div class=""><span id="card_name">VIP卡span><span style="padding-left:10px">XXXXXXXXspan>div>
                    div>
                div>
                <div class="ft10 lightGray" style="letter-spacing:1px"><strong>会员卡权益:strong><br/>会员卡可享受充值活动优惠,会员票价更优惠。div>
            div>
            
            
            
        <div class="bgWhite rcgAward">
            <h2 class="ft16 rcgTit">请选择开卡充值额h2>
            <div id="rcgAward">
            div>
        div>
        
        <div class="bgWhite CustomRcgWrap" style="padding:0 15px">
            <div class="CustomRcg">
                <h2 class="ft16 rcgTit">自定义充值额h2>
                <ol class="ft12 gray rcgRule">
                    <h3 class="ft14 lightGray">充值规则h3>
                    <li>最低充值金额<i id="min_rcg_val">i>元;li>
                    
                                    ol>
                <label><input id="rcgMoney" class="ft16 rcgipt" type="number" placeholder="输入充值金额" value="" />label>
            div>
        div>
      
      div>
      
      
      <h2 class="ft16 rcgTit" style="margin:15px">填写办卡表单h2>
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">姓名label>div>
        <div class="weui-cell__bd">
          <input class="weui-input" type="text" pattern="\S*" maxlength="30" placeholder="请输入姓名" name="username" id="username" value="">
        div>
      div>
      <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">身份证label>div>
            <div class="weui-cell__bd">
              <input class="weui-input" type="text" pattern="[0-9a-zA-Z]*" maxlength="30" placeholder="请输入身份证" name="idnum" id="idnum" value="">
            div>
          div>      <div class="weui-cell weui-cell_select weui-cell_select-after">
        <div class="weui-cell__hd">
          <label for="" class="weui-label">选择卡类label>
        div>
        <div class="weui-cell__bd">
          <select class="weui-select" style="line-height:initial;height:initial;" name="cardtype" id ="cardtype">
              <option value="1" title="50" >白金卡(最低充值50元)option><option value="2" title="500" >VIP卡(最低充值500元)option><option value="3" title="200" >钻石卡(最低充值200元)option>          select>
        div>
      div>
      <div class="weui-cell weui-cell_select weui-cell_select-after">
            <div class="weui-cell__hd">
              <label for="" class="weui-label">办卡方式label>
            div>
            <div class="weui-cell__bd">
              <select class="weui-select" style="line-height:initial;height:initial;"  name="applytype" id ="applytype">
                              select>
            div>
          div>      <div class="weui-cell" id="promptBox" style="display:none">
        <div class="weui-cell__hd"><label class="weui-label">办卡奖励label>div>
        <div class="weui-cell__bd" id="prompt">div>
      div>
      <input style="display:none" class="weui-input" type="number" maxlength="30" pattern="[0-9]*" placeholder="办卡充值额" name="credit" id="credit" value="">
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">会员密码label>div>
        <div class="weui-cell__bd">
          <input class="weui-input" type="password"  maxlength="6" pattern="[0-9]{6,}" placeholder="请输入6位数字密码" name="pwd" id="pwd">
        div>
      div>
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">密码确认label>div>
        <div class="weui-cell__bd">
          <input class="weui-input" type="password" maxlength="6" pattern="[0-9]{6,}" placeholder="请您再输入一次密码" name="tpwd" id="tpwd" >
        div>
      div>
      <div class="weui-cell weui-cell_vcode">
        <div class="weui-cell__hd">
          <label class="weui-label">手机号label>
        div>
        <div class="weui-cell__bd">
          <input class="weui-input" type="tel" placeholder="请输入手机号" name="phone" id="phone" value="">
        div>
        <div class="weui-cell__ft">
        div>
      div>
      <div class="weui-cell weui-cell_vcode">
        <div class="weui-cell__hd"><label class="weui-label">验证码label>div>
        <div class="weui-cell__bd">
          <input class="weui-input" type="tel" placeholder="请输入验证码" name="vcode" id="vcode">
        div>
        <div class="weui-cell__ft">
          <button class="weui-vcode-btn" id="get_vcode" style="line-height:initial;height:initial;">获取验证码button>
        div>
      div>
      <div class="weui-btn-area">
            <a class="weui-btn weui-btn_primary" href="javascript:" id="submit">提交办卡订单a>
      div>
    div>

    <style type="text/css">
    /*公用底部菜单*/
    .fixedfooter .icon{font-size:22px;line-height:24px;}
    .fixedfooter{z-index:3;border-top:1px solid #E1E1E1;background:#fff;position:fixed;bottom:0;left:0;right:0;height:42px;display:none}
    .fixedfooter ul{display:flex;margin:0;padding:0;height:100%;overflow:hidden}
    .fixedfooter ul li{flex:1;list-style:none;width:33.3333%;height:32px;line-height:1;text-align:center;overflow:hidden;padding:5px 0}
    .fixedfooter ul li a,.fixedfooter ul li span{font-weight:normal;border:none;outline:none;width:100%;color:#b3b3b3;display:block}
    .fixedfooter ul li a:active{border:none}
    .fixedfooter ul li span {display:block;width:100%;font-size:10px}
    /* .fixedfooter ul .active,.fixedfooter ul li:active{background:#f1f1f1} */
    .fixedfooter ul .active a,.fixedfooter ul .active span{color:#ff8800;/*color:#5F8301*/}
    /*带选择影院菜单项的fixedfooter*/
    .withSelCinemaBtn ul li{width:25%;}

        /*新版底部*/
        .hasADhasNav #wrapper, .hasADhasNav #scrollNav{top:174px}
        .newCountBox{bottom:49px}
        .fixedfooter{height:48px}
        .fixedfooter ul li{height:38px;padding:4px 0 5px}
        .fixedfooter .icon{line-height:28px;width:28px;height:28px;background-blend-mode:overlay;display:block;margin:0 auto 3px;}

.fixedfooter ul li:nth-child(1) .icon{background:url(/Application/Home/View/default/Public/public/images/films.jpg) 0 0 no-repeat,linear-gradient(#ddd, #ddd);background-size:cover}
        .fixedfooter ul li:nth-child(2) .icon{background:url(/Application/Home/View/default/Public/public/images/goods.jpg) 0 0 no-repeat,linear-gradient(#ddd, #ddd);background-size:cover}
        .fixedfooter ul li:nth-child(3) .icon{background:url(/Application/Home/View/default/Public/public/images/position.jpg) 0 0 no-repeat,linear-gradient(#ddd, #ddd);background-size:cover}
        .fixedfooter ul li:nth-child(4) .icon{background:url(/Application/Home/View/default/Public/public/images/userCenter.jpg) 0 0 no-repeat,linear-gradient(#ddd, #ddd);background-size:cover}
        
style>

<div id="blk" style="height:43px;display:none">div>
    <div id="fixedfooter" class="fixedfooter" style="display:none;">
    <ul>
                
            <li class="active"><a href="index.php?s=/home/addons/execute/_addons/mem_buy_tic/_controller/mem_buy_tic/_action/indexmov/token/557404495b14e/flag/1/group_id/103.html"><i class="icon icon2">i><span>电影span>a>li>
            <li ><a href="index.php?s=/home/addons/execute/_addons/wemall/_controller/wemall/_action/indexvc/token/557404495b14e/flag/2/group_id/103.html"><i class="icon icon2 psr">i><span>卖品span>a>li>
            <li id="toolbar_change_cinema" style="display:none"><a href="/index.php?s=/home/cinema_group/changecinema/flag/2/group_id/103.html"><i class="icon icon2">i><span>影院span>a>li>
            <li><a href="index.php?s=/home/addons/execute/_addons/kgrzx/_controller/kgrzx/_action/index/token/557404495b14e/flag/3/group_id/103.html"><i class="icon icon2">i><span>我的span>a>li>
            ul>
div>

<script type="text/javascript" src="/Public/static/jquery-2.0.3.min.js">script>
<script type="text/javascript" src="/Public/static/jquery.cookies.2.2.0.min.js">script>
<script type="text/javascript" src="/Public/static/jquery.qrcode.min.js">script>
<script type="text/javascript" src="/Public/static/msgbox/jquery.alerts.js?v=20211112172924">script>
<script type="text/javascript" src="/Public/static/jweixin-1.3.2.js">script>
<script type="text/javascript" src="/Public/static/jquery-weui/jquery-weui.min.js">script>
<script type="text/javascript">
    document.title = document.title == "" ? '满天星测试影城' : document.title;
    
    //JS操作cookies方法!
    
    //写cookies
    function setCookie(name,value,expiresHours){
        var cookieString=name+"="+escape(value);
        //判断是否设置过期时间,0代表关闭浏览器时失效
        if(expiresHours>0){
        var date=new Date();
        date.setTime(date.getTime+expiresHours*3600*1000);
        cookieString=cookieString+"; expires="+date.toGMTString(); 
        } 
        document.cookie=cookieString; 
    }
    
    //读取cookies
    function getCookie(name){
        var strCookie=document.cookie; 
        var arrCookie=strCookie.split("; "); 
        for(var i=0;i<arrCookie.length;i++){ 
            var arr=arrCookie[i].split("="); 
            if(arr[0]==name){
                  return unescape(arr[1]);
            }else{
                continue;
             } 
          }
        return "";
    }
    
    //删除cookies
    function delCookie(name){ 
        var date=new Date(); 
        date.setTime(date.getTime()-10000); //设定一个过去的时间即可
        document.cookie=name+"=v; expires="+date.toGMTString(); 
    }
    
    //读取URL中指定参数的值,如果该参数没有值,则返回false
    function I(name){
        var arr = window.location.search.split("/"),val="",realVal="";
        val = arr.indexOf(name) == -1 ? "" : arr[arr.indexOf(name)+1].toLowerCase();
        
        if(val == false){return val}
        if(val.indexOf("&") >= 0){
            if(val.split("&")[0].indexOf(".") >= 0){
                realVal = val.split("&")[0].split(".")[0];
            }else{
                realVal = val.split("&")[0];
            }
        }else{
            if(val.indexOf(".") >= 0){
                realVal = val.split(".")[0];
            }else{
                realVal = val;
            }
        }
        return realVal;
    }
    
    //根据参数创建底部菜单,createBtmMenu(参数名,底部菜单的ID)
    //如果参数menubar存在且值为true,并且token也存在,那就存储cookie,否则删除cookie
    //存下的cookie名为:"menubar-"+token,值为:true
    //然后调用底部导航的创建函数
    function btmMenuCookie(arg){
        var argstr = I(arg);
        var argVal = argstr.toString().split(".")[0] == "true" ? true : false;
        var token = I("token");
        var tokenVal = token ? $.trim(token.split(".")[0]) : false;
        if(argVal && tokenVal){
            setCookie(arg+"-"+tokenVal,argVal);
        }else{
            delCookie(arg+"-"+tokenVal,argVal);
        }
        createBtmMenu(arg,"#fixedfooter");
    }
    
    //高亮显示菜单,
    //属于A数组中的页面,要高亮底部菜单的第0项,
    //属于B数组中的页面,要高亮底部菜单的第1项,
    //属于C数组中的页面,要高亮底部菜单的第2项
    //默认高亮底部菜单的第3项,但第三项不存在,所以就是默认不高亮
    function showActive(dom,cssName){
        var A = ["daymovlist","selectseat","movdetails","indexmov"], //亮底部菜单的第0项
            B = ["wemall"],                //亮底部菜单的第1项
            C = ["kgrzx"];                                //亮底部菜单的第2项
        
        var idx = C.indexOf(I("_controller")) >= 0 ? 3 : A.indexOf(I("_action")) >= 0 ? 0 : B.indexOf(I("_controller")) >= 0 ? 1 : 4;
        $(dom).removeClass(cssName).eq(idx).addClass(cssName);
    }
    
    //是否显示底部菜单
    function isShowFootMenu(){
        var A = ["daymovlist","indexmov"],
            B = ["kgrzx","wemall"];
            C = ["index.html","index","indexvc.html","indexvc","indexold.html","indexold"];
        
        return A.indexOf(I("_action")) >= 0 ? true : B.indexOf(I("_controller")) >= 0 ? (C.indexOf(I("_action")) >= 0 ? true : false) : false; 
    }
    
    //根据cookie决定是否显示该影院的底部菜单
    //如果document.cookie字符串中有一个名字等于"menubar-"+token的cookie
    //那么就显示底部菜单
    function createBtmMenu(arg,id){
        var token = I("token");
        var tokenVal = token ? token.split(".")[0] : false;
            
        var cookiekey = arg + "-" + tokenVal;
        var flag = isShowFootMenu();
        
        if(flag){
            var panel = $("#select_set_result_panel");
            
            if(panel.length > 0){
                panel.css("bottom","50px");
            }
            
            $("#footer").css("display","none");
            $(id).css("display","block");
            $("#blk").css("display","block");
            showActive(id+" ul li","active");
          }
    }            
    
    btmMenuCookie("menubar");
 
    $(function(){        
        //判断是否显示[切换影院]
        showChangeCinemaToolbar();
    });

    //判断是否显示[切换影院]
    //如果cookie里有个名为"movhome_home_cinema_entry"的cookie,那就说明要显示[切换影院]
    //而这个名为"movhome_home_cinema_entry"的cookie,是顾客打开影院选择页,选择了影院后,页面跳转到影院电影列表页时,后端通过php设置的
    function showChangeCinemaToolbar()
    {    
        var ck = unescape(document.cookie);
        if (ck.indexOf('cinema_entry=557404495b14e@group') < 0)
            return;
                
        var fixedfooter = $("#fixedfooter");
        if (fixedfooter.length > 0 && !fixedfooter.is(':hidden'))
        {
            fixedfooter.addClass("withSelCinemaBtn");
            $("#toolbar_change_cinema").show();
        }
    };
    
    wx.config({
        debug: false,
        appId: 'wx7805e02873cc2c32',
        timestamp: 1641217067,
        nonceStr: 'lE0fMQ1uOhkuFKIf',
        signature: '795facc5f48a5cb4d77487005ef23733147a0ce5',
        jsApiList: [
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'previewImage',
            'getNetworkType',
            'hideOptionMenu',
            'showOptionMenu',
            'hideMenuItems',
            'showMenuItems',
            'hideAllNonBaseMenuItem',
            'showAllNonBaseMenuItem',
            'closeWindow',
            'scanQRCode',
            'chooseWXPay',
            'chooseImage',
            'uploadImage',
            'openAddress'
        ]
      });
    
    wx.ready(function(){
        /*
        wx.hideAllNonBaseMenuItem();
        wx.hideMenuItems({ 
            menuList:[
                'menuItem:share:email',
                'menuItem:share:qq',
                'menuItem:openWithQQBrowser',
                'menuItem:openWithSafari',
                'menuItem:readMode',
            ] 
        });
        wx.showMenuItems({
            menuList:[
                'menuItem:profile',
                'menuItem:addContact',
                'menuItem:refresh',
            ]
        });
        */
    });
    
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?ee112c033b862c3aef1252392b61f52f";
      var s = document.getElementsByTagName("script")[0]; 
      s.parentNode.insertBefore(hm, s);
    })();
    
    var _ismini=false;
    try {
        wx.miniProgram.getEnv(function (res) {                 
            if(res.miniprogram){
                _ismini=true;                        
            }
        });

    } catch (e) {            
    }
script>
div>            

<script type="text/javascript" src="./Addons/Kgrzx/View/default/Kgrzx/personalCenter.js?v=20211112172924">script>
<script type="text/javascript">

    document.title="会员办卡";
    var _cardimglist = [{"code":"1","open_card_type":"1","card_front_img":"http:\/\/img.movhome.cn\/Uploads\/Picture\/2021-10-27\/6179688892a94.jpg"},{"code":"2","open_card_type":"1","card_front_img":"http:\/\/img.movhome.cn\/Uploads\/Picture\/2019-03-02\/5c7a477d5bc9b.jpg"},{"code":"3","open_card_type":"2","card_front_img":""}];
    var _applytypelist=[{"code":"2","name":"\u6211\u8981\u5b9e\u4f53\u5361(\u53ef\u5728\u524d\u53f0\u9886\u53d6)"},{"code":"3","name":"\u6211\u4e0d\u8981\u5b9e\u4f53\u5361"}];
    var _cardtype = '[{"code":"1","money_apply_min":"50","name":"\u767d\u91d1\u5361","main_card_start":"10001000","main_card_end":"10005000","standby_card_start":"20002000","standby_card_end":"20005000","current_card_id":"2","card_no_prefix":"88","card_no_length":"10"},{"code":"2","money_apply_min":"500","name":"VIP\u5361","main_card_start":"","main_card_end":"","standby_card_start":"","standby_card_end":"","current_card_id":"1","card_no_prefix":"2050","card_no_length":"3"},{"code":"3","money_apply_min":"200","name":"\u94bb\u77f3\u5361","main_card_start":"1001000","main_card_end":"2222222","standby_card_start":"","standby_card_end":"","current_card_id":"1","card_no_prefix":"","card_no_length":null}]';
    var WriteIDNum = 1;
    
    //充值页面值
    var _token = '557404495b14e';     //token
    
    var _rwd = [{"card_type":"1","rwd":[{"money":50,"card_type":"1"},{"card_type":"1","id":"373","no":"12","reward_type":"1","money":"300","reward":"20","reward_credit":"0","coupons_data":"<\/br>1\u3001\u900120\u5143,\u5b9e\u9645\u5230\u8d26320\u5143; ","reward_other":"","coupons_d":null}],"cfg":{"code":"1","money_add_type":"2","money_add_max":0,"can_self_apply":"1","fee_self_apply":"0.000000","money_apply_min":50,"can_self_recharge":"1","fee_self_recharge":"0.000000","money_recharge_min":"100","main_card_start":"10001000","main_card_end":"10005000","standby_card_start":"20002000","standby_card_end":"20005000","current_card_id":"2","card_no_prefix":"88","card_no_length":"10","card_front_img":"9583","card_back_img":"9584","open_card_type":"1","money_add_type_name":"10\u7684\u6574\u500d\u6570"}},{"card_type":"2","rwd":[{"money":500,"card_type":"2"},{"money":1000,"card_type":"2"}],"cfg":{"code":"2","money_add_type":"0","money_add_max":1000,"can_self_apply":"1","fee_self_apply":"0.000000","money_apply_min":500,"can_self_recharge":"1","fee_self_recharge":"0.000000","money_recharge_min":"300","main_card_start":"","main_card_end":"","standby_card_start":"","standby_card_end":"","current_card_id":"1","card_no_prefix":"2050","card_no_length":"3","card_front_img":"4289","card_back_img":"4165","open_card_type":"1","money_add_type_name":"\u4e0d\u9650\u5236"}},{"card_type":"3","rwd":[{"money":200,"card_type":"3"},{"money":500,"card_type":"3"}],"cfg":{"code":"3","money_add_type":"1","money_add_max":800,"can_self_apply":"1","fee_self_apply":"0.000000","money_apply_min":200,"can_self_recharge":"1","fee_self_recharge":"0.000000","money_recharge_min":"100","main_card_start":"1001000","main_card_end":"2222222","standby_card_start":"","standby_card_end":"","current_card_id":"1","card_no_prefix":"","card_no_length":null,"card_front_img":"","card_back_img":"","open_card_type":"2","money_add_type_name":"\u6574\u6570"}}];
    var _rechargeRules = {   //办卡或充值金额规定
           maxVal:0,        //允许的最大充值金额
           minVal:0,         //办卡允许的最小充值金额
           money_add_type:0   //['money_add_type']办卡或充值额取整要求,0--不限制,1--整数,2--10的整数倍,3--100的整数倍
    };
    var _rcgValArr = [];
    
$(document).ready(function () 
{
    //渲染充值奖励界面 STA
    function renderRcgPanel(card_type){
        

        var htmlstr   = '';
        
        /*从全部卡类的充值活动奖励数据和卡类的办卡和充值规则数据中,选择当前卡类的充值活动奖励数据和卡类的办卡和充值规则数据*/
        var crd = _rwd.filter(v=>{return v.card_type.includes(card_type)})[0];
        console.log(crd);
        var card_conf = crd.cfg        
        var card_rwd  = crd.rwd;
        var hasco     = card_rwd[0].coupons_d != null && card_rwd[0].coupons_d != false;
        var hasreward = card_rwd[0].reward != null && card_rwd[0].reward != false;
        
        _rechargeRules = {
            maxVal:parseFloat(card_conf.money_add_max),
            minVal:parseFloat(card_conf.money_apply_min),
            money_add_type:parseInt(card_conf.money_add_type)
        };
        
        htmlstr += '
    '; for(var i=0,len=card_rwd.length;i<len;i++){ let reward = card_rwd[i]; if(reward.reward){ htmlstr += '
  • '+ (i==0?'sel':'') + '">'+reward.money+'有奖励
  • '; }else{ htmlstr += '
  • '+ (i==0?'sel':'') + ' noprizeRCG">'+reward.money+'
  • '; } } htmlstr += '
  • 其他金额
'; htmlstr += '
' + (hasreward ? 'style="display:block"' : 'style="display:none"') +'>'; htmlstr += '开卡充值奖励:'; htmlstr += '
'; for(var j=0,jlen=card_rwd.length;j<jlen;j++){ let rw = card_rwd[j]; htmlstr += '

' + (j == 0 ? 'style="display:block"':'')+'>' + (rw['coupons_data'] ? rw.coupons_data : '') +'

'; } htmlstr += '
'; htmlstr += '
'; htmlstr += '
' + (hasco ? 'style="display:block"' : 'style="display:none"') + '>'; htmlstr += '奖券有效期'; htmlstr += '
'; for(var k=0,klen=card_rwd.length;k<klen;k++){ let crw = card_rwd[k]; htmlstr += '

' + (k==0 ? 'style="display:block"':'') + '>'+ (crw.coupons_d ? crw.coupons_d : '') + '

'; } htmlstr += '
'; htmlstr += '
注:优惠券仅限购买有效期内的电影放映场次,有效期外的电影场次不可使用,详情查看观影券使用说明。
'; htmlstr += '
'; $(".CustomRcg").hide(); $("#rcgAward").html(htmlstr); _rcgValArr=[]; $("#rcgAward li i").each(function(idx,elm){ _rcgValArr.push($(this).text()); }); $("#rcgMoney").blur(function(){ _rcgValArr.indexOf($(this).val()) > -1 ? $("#rcgAward li").eq(_rcgValArr.indexOf($(this).val())).click() : $("#credit").val($(this).val()); }); } //渲染充值奖励界面END $("#username").keyup(function(){ $("#c_member_name").html($(this).val()); }); //选中效果 $("#rcgAward").on("click","li",function(){ var that = $(this), len = $(".rcgAward li").length, money = $("i",this).text(), flag = !(that.index() == len - 1), isDefaultRcg = !that.hasClass("noprizeRCG"); that.addClass("sel").siblings().removeClass("sel"); $("#rcgMoney").val(money); $("#credit").val(money); //如果有奖励 if(flag && isDefaultRcg){ $(".CustomRcg").hide(); $("#TipList").show(); $("#TipList .awardTips").eq(that.index()).show().siblings().hide(); $("#CopList").show(); $("#CopList .awardTips").eq(that.index()).show().siblings().hide(); if($.trim($("#CopList .awardTips").eq(that.index()).text())=='') { $("#CopList").hide(); } $("#rechargePay").css("margin-top","0"); }else{ $("#TipList").hide(); $("#CopList").hide(); if(flag == false){ //点“其他金额”聚焦到充值金额文本框 $(".CustomRcg").show(); $("#min_rcg_val").html(_rechargeRules.minVal); $("#rcgMoney").focus(); $("#rechargePay").css("margin-top","0"); } if(isDefaultRcg == false){ //点“默认充值面值”要把充值金额文本框和充值规则关闭 $(".CustomRcg").hide(); $("#rechargePay").css("margin-top","20px"); } } }); /* 切换办卡卡类时: 1、切换办卡最低充值额在“办卡充值”文本框里显示的金额数字 2、如果人家选择不要实体卡,就隐藏实体会员卡图片。 */ $('#cardtype').bind("change", function() { var obj=document.getElementById("cardtype"); if(typeof _cardtype === "string"){ if(_cardtype === ''){ return false; } _cardtype = JSON.parse(_cardtype); } $("#credit").val(obj.options[obj.selectedIndex].title); var yy = _cardtype[obj.selectedIndex].note; if(yy!=undefined && yy!=""){ $("#promptBox").css("display","flex"); $("#prompt").html('' + _cardtype[obj.selectedIndex].note + '
'); }else{ $("#promptBox").css("display","none"); $("#prompt").html(""); } var seldCardOption = obj.options[obj.selectedIndex]; var card_type = seldCardOption.value.toString(); renderRcgPanel(card_type); var card_name = seldCardOption.innerHTML ? seldCardOption.innerHTML : seldCardOption.text; $("#card_name").html(card_name.split("(")[0]); var $applyType = $("#applytype"); var objOption = document.createElement("OPTION"); var selapplytype = $applyType.get(0); if($applyType.size() > 0) { for(var i in _cardimglist) { if(_cardimglist[i].code == obj.options[obj.selectedIndex].value) //查找当前选中卡类的实体卡图片 { selapplytype.options.length = 0; //删掉所有办卡方式选项 if(_cardimglist[i].open_card_type == 1) //如果开卡方式等于1(只开放虚拟卡) { objOption.value = _applytypelist[1].code; objOption.text = _applytypelist[1].name; //我不要实体卡 selapplytype.options.add(objOption); } else if (_cardimglist[i].open_card_type == 2)//如果开卡方式等于2(只开放实体卡) { objOption.value = _applytypelist[0].code; objOption.text = _applytypelist[0].name; //我要实体卡 selapplytype.options.add(objOption); } else if (_cardimglist[i].open_card_type == 3)//如果开卡方式等于3(虚拟卡和实体卡都开放) { objOption.value = _applytypelist[1].code; objOption.text = _applytypelist[1].name; //我不要实体卡 selapplytype.options.add(objOption); var objOption1 = document.createElement("OPTION"); objOption1.value = _applytypelist[0].code; objOption1.text = _applytypelist[0].name; //我要实体卡 selapplytype.options.add(objOption1); } else { objOption.value = _applytypelist[1].code; objOption.text = _applytypelist[1].name; //我不要实体卡 selapplytype.options.add(objOption); } break; } } } }); $("#cardtype").change(); $("#rcgAward li").eq(0).click(); }); function CheckRechargePay(){ var rechargeRules = _rechargeRules; var val = $("#credit").val(); if(val > rechargeRules.maxVal && rechargeRules.maxVal != 0){ $.alert("充值金额不能大于" + rechargeRules.maxVal + "", "错误"); return false; } if(val < rechargeRules.minVal){ $.alert("充值金额不能小于" + rechargeRules.minVal + "", "错误"); return false; } switch(rechargeRules.money_add_type){ case 1: //如果不是整数(整数四舍五入后还是等于自己) if(!(Math.floor(val) == val)){ $.alert("充值金额必须是整数!", "错误"); return false; } break; case 2: if(Math.abs(val) % 10 > 0){ $.alert("充值金额必须是10的倍数!", "错误"); return false; } break; case 3: if(Math.abs(val) % 100 > 0){ $.alert("充值金额必须是100的倍数!", "错误"); return false; } break; default: return true; break; } /* //提交订单,转到充值订单详情页 $.ajax({ type: "post", url: "", data: { "amount": val,"pay_method":2 ,"ismini":_ismini}, dataType: "json", beforeSend: function(){ $.showLoading(); setButtonDisable($("#rechargePay"), "正在处理中...","weui-btn_disabled"); }, success:function(data) { $.hideLoading(); setButtonEnable($("#rechargePay"),"提交充值订单","weui-btn_disabled",rechargePay); if(data.rv != '1') $.alert(data.promessage,"提示"); else { window.location.assign(data.promessage); //location.href = data.promessage; } } }); */ return true; } var color =$("#submit").css("background-color"); $("#submit").click(sendApplayCard); $("#get_vcode").click(getVcode); var wait = 60;//时间 var color = ""; var vcode_flag = false; //是否获取了验证码 var urlUpdateFilms = "https://test.movhome.cn/index.php?s=/home/addons/execute/_addons/kgrzx/_controller/kgrzx/_action/anysendvalicode/token/557404495b14e.html"; var queryurl = ""; function time(o,p) { //o为按钮的对象,p为可选,这里是60秒过后,提示文字的改变 if(wait == 0) { o.css("background-color",color); color =""; o.removeAttr("disabled"); o.css("color","#3cc51f"); o.html("获取验证码");//改变按钮中value的值 $("#get_vcode").click(getVcode); wait = 60; } else { if(color=="") color = o.css("background-color"); o.off();//倒计时过程中禁止点击按钮 o.css("color","#D0D0D0"); o.html("重新获取("+ wait +"S)");//改变按钮中value的值 wait--; setTimeout(function() { time(o,p);//循环调用 }, 1000) } } //检查是否为简单密码 //简单密码是指此类密码:'000000','111111','222222','333333','444444','555555','666666','777777','888888','999999','123456','654321' //或者数字组合为电话号码或者身份证号码里存在的子串 //如果是公差为1的降序或升序等差数列组合,不论为几位,都返回false function isSimplePwd(pwdnum){ var arr = pwdnum.split(""); var len = arr.length-1; var regstr = "(" + pwdnum + ")+?"; var reg2 = new RegExp(regstr); var flag = false; var phone = $('#phone').val(); var selfId = $('#idnum').val(); //如果是单纯的重复6位数字 if(arr.every((v,k,ar)=>v===ar[0])){ $.alert("密码不能设为6个同样的数字!"); return true; } //如果是单纯的重复6位数字 if(phone != "" && selfId != ""){ if(reg2.test(phone) || reg2.test(selfId)){ $.alert("密码不能是您填写的手机号或身份证号码里的一段连续数字!"); return true; } }else{ $.alert("请先填写身份证号和手机号,再填写密码!"); return true; } //如果是公差为1的降序等差数列组合,不论为几位,都返回false if(isDCSL(pwdnum)){ $.alert("密码不能是简单的等差数列!"); return true; } return false; }; //是否等差数列,true 是等差数列,false 不是等差数列 function isDCSL(pwd){ pwd = pwd.toString(); for(let i = 0;i<pwd.length-1; ++i){ if(pwd[i+1] - pwd[i] != pwd[1] - pwd[0]){ return false; } } return true; } function isCardID(sId){ var aCity={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"}; var iSum=0 ; var info="" ; if(!/^\d{17}(\d|x)$/i.test(sId)) return [false,"你输入的身份证长度或格式错误"]; sId=sId.replace(/x$/i,"a"); if(aCity[parseInt(sId.substr(0,2))]==null) return [false,"你的身份证地区非法"]; sBirthday=sId.substr(6,4)+"-"+Number(sId.substr(10,2))+"-"+Number(sId.substr(12,2)); var d=new Date(sBirthday.replace(/-/g,"/")) ; if(sBirthday!=(d.getFullYear()+"-"+ (d.getMonth()+1) + "-" + d.getDate()))return [false,"身份证上的出生日期非法"]; for(var i = 17;i>=0;i --) iSum += (Math.pow(2,i) % 11) * parseInt(sId.charAt(17 - i),11) ; if(iSum%11!=1) return [false,"你输入的身份证号非法"]; //aCity[parseInt(sId.substr(0,2))]+","+sBirthday+","+(sId.substr(16,1)%2?"男":"女");//此次还可以判断出输入的身份证号的人性别 return [true]; } function checkInput(){ if($('#username').val()!=undefined && $('#username').val()==""){ $.alert("请填写姓名"); return false; } if(WriteIDNum == 1){ if($('#idnum').val()!=undefined && $('#idnum').val()==""){ $.alert("请填写身份证号"); return false; }else{ var flagArr = isCardID($('#idnum').val()); if(!flagArr[0]){ $.alert(flagArr[1]); return false; } } } if($('#phone').val()!=undefined && $('#phone').val()==""){ $.alert("请填写手机号"); return false; } if($('#credit').val()!=undefined && $('#credit').val()==""){ $.alert("请填写充值金额"); return false; } if(!CheckRechargePay()){ return false; }; if($('#pwd').val()!=undefined && $('#pwd').val()==""){ $.alert("请填写新密码"); return false; } if(isSimplePwd($('#pwd').val())){ return false; } if($('#tpwd').val()!=undefined && $('#tpwd').val()==""){ $.alert("请再次输入新密码"); return false; } if($('#pwd').val() !== $('#tpwd').val()) { $.alert("您两次输入的密码不一致"); return false; } return true; } //组装参数,请求验证码 function getVcode(){ var ckflag = checkInput(); console.log("检查结果:"+ckflag); if(!ckflag){ return false; } var urlUpdateFilms = "https://test.movhome.cn/index.php?s=/home/addons/execute/_addons/kgrzx/_controller/kgrzx/_action/anysendvalicode/token/557404495b14e.html"; var _turl = urlUpdateFilms + "&mobile=" + $("#phone").val(); $.ajax({ url:_turl, type:"post", dataType:"json", success:function(data){ if(data.rv != '1'){ $.alert(data.promessage); }else{ $.alert(data.promessage); } } }); time($("#get_vcode"),$("#promessage")); } function sendApplayCard(){ if(!checkInput()){ return false; } if($('#vcode').val()!=undefined && $('#vcode').val()==""){ $.alert("请填写验证码"); return false; } var cardtype = $("#cardtype").val(); var applytype = $("#applytype").val(); var paymethod = $("#pay_method").val(); var phone = $("#phone").val(); var credit = $("#credit").val(); var pwd = $("#pwd").val(); var username = $("#username").val(); var idnum = $("#idnum").val(); var vcode = $("#vcode").val(); setButtonDisable($("#submit"), "正在处理中...","weui-btn_disabled"); $.ajax({ type: "post", url: "", data: { "username":username, "idnum":idnum, "applytype":applytype,"cardtype":cardtype,"paymethod":paymethod,"phone":phone,"credit":credit,"pwd":pwd,"vcode":vcode,"ismini":_ismini}, dataType: "json", beforeSend: function(){ $.showLoading(); }, success:function(data) { setButtonEnable($("#submit"),"提 交 办 卡 订 单","weui-btn_disabled",sendApplayCard); $.hideLoading(); if(data.rv != '1') $.alert(data.promessage); else{ window.location.assign(data.promessage); } } }) } script> body>
 
 
 
  charset="utf-8">
  rel="stylesheet" type="text/css" href="/Public/static/jquery-weui/weui.min.css?v=20211112172924" media="all">
  rel="stylesheet" type="text/css" href="/Public/static/jquery-weui/jquery-weui.min.css?v=20211112172924" media="all">
  rel="stylesheet" type="text/css" href="/Public/Home/css/personalCenter.css?v=20211112172924" media="all">
  </span>满天星测试影城<span class="html-tag">
  content="text/html; charset=utf-8" http-equiv="Content-Type">
  content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
  name="Keywords" content="MovHome 影嘉信息科技">
  name="Description" content="MovHome 影嘉信息科技">
  content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
  content="no-cache,must-revalidate" http-equiv="Cache-Control">
  content="no-cache" http-equiv="pragma">
  content="0" http-equiv="expires">
  content="telephone=no, address=no" name="format-detection">
  name="apple-mobile-web-app-capable" content="yes">
  name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  rel="shortcut icon" href="https://test.movhome.cn/favicon.ico">
 
  class="VC VC_blue">
 
 
id="container" class="container body">
   
 
class="weui-cells weui-cells_form" style="margin-top:0;padding-bottom:20px">
 
id="cardDesc" class="cardDesc">
   
 
class="bgWhite cardpanel">
 
class="cardImg cardImgcov white psr" style="margin-bottom:10px">
 
id="cinamelogo" class="cinamelogo psa">src="./Addons/Wemall/View/default/Wemall/Public/Static/images/pic/uface.jpg" />
 

class="cinameTit ft14 white psa">满天星测试影城

 
id="qrcode" class="bgWhite tc psa qrcode icon">
 
class="white tc ft16 psa cardNo">
 
class="ft22 tc">id="c_member_name">
 
class="">id="card_name">VIP卡style="padding-left:10px">XXXXXXXX
 
 
 
class="ft10 lightGray" style="letter-spacing:1px">会员卡权益:
会员卡可享受充值活动优惠,会员票价更优惠。
 
   
   
   
 
class="bgWhite rcgAward">
 

class="ft16 rcgTit">请选择开卡充值额

 
id="rcgAward">
 
 
   
 
class="bgWhite CustomRcgWrap" style="padding:0 15px">
 
class="CustomRcg">
 

class="ft16 rcgTit">自定义充值额

 
    class="ft12 gray rcgRule">
 

class="ft14 lightGray">充值规则

 
  • 最低充值金额id="min_rcg_val">元;
  •    
     
      id="rcgMoney" class="ft16 rcgipt" type="number" placeholder="输入充值金额" value="" />
     
     
       
     
       
       
     

    class="ft16 rcgTit" style="margin:15px">填写办卡表单

     
    class="weui-cell">
     
    class="weui-cell__hd">="weui-label">姓名
     
    class="weui-cell__bd">
      class="weui-input" type="text" pattern="\S*" maxlength="30" placeholder="请输入姓名" name="username" id="username" value="">
     
     
     
    class="weui-cell">
     
    class="weui-cell__hd">="weui-label">身份证
     
    class="weui-cell__bd">
      class="weui-input" type="text" pattern="[0-9a-zA-Z]*" maxlength="30" placeholder="请输入身份证" name="idnum" id="idnum" value="">
     
     
    class="weui-cell weui-cell_select weui-cell_select-after">
     
    class="weui-cell__hd">
      ="" class="weui-label">选择卡类
     
     
    class="weui-cell__bd">
     
      ="1" title="50" >白金卡(最低充值50元)="2" title="500" >VIP卡(最低充值500元)="3" title="200" >钻石卡(最低充值200元)
     
     
     
    class="weui-cell weui-cell_select weui-cell_select-after">
     
    class="weui-cell__hd">
      ="" class="weui-label">办卡方式
     
     
    class="weui-cell__bd">
     
     
     
     
    class="weui-cell" id="promptBox" style="display:none">
     
    class="weui-cell__hd">="weui-label">办卡奖励
     
    class="weui-cell__bd" id="prompt">
     
      style="display:none" class="weui-input" type="number" maxlength="30" pattern="[0-9]*" placeholder="办卡充值额" name="credit" id="credit" value="">
     
    class="weui-cell">
     
    class="weui-cell__hd">="weui-label">会员密码
     
    class="weui-cell__bd">
      class="weui-input" type="password" maxlength="6" pattern="[0-9]{6,}" placeholder="请输入6位数字密码" name="pwd" id="pwd">
     
     
     
    class="weui-cell">
     
    class="weui-cell__hd">="weui-label">密码确认
     
    class="weui-cell__bd">
      class="weui-input" type="password" maxlength="6" pattern="[0-9]{6,}" placeholder="请您再输入一次密码" name="tpwd" id="tpwd" >
     
     
     
    class="weui-cell weui-cell_vcode">
     
    class="weui-cell__hd">
      ="weui-label">手机号
     
     
    class="weui-cell__bd">
      class="weui-input" type="tel" placeholder="请输入手机号" name="phone" id="phone" value="">
     
     
    class="weui-cell__ft">
     
     
     
    class="weui-cell weui-cell_vcode">
     
    class="weui-cell__hd">="weui-label">验证码
     
    class="weui-cell__bd">
      class="weui-input" type="tel" placeholder="请输入验证码" name="vcode" id="vcode">
     
     
    class="weui-cell__ft">
     
     
     
     
    class="weui-btn-area">
      class="weui-btn weui-btn_primary" href="https://test.movhome.cn/index.php?s=/home/addons/execute/_addons/mem_buy_tic/_controller/mem_buy_tic/_action/indexmov/token/557404495b14e/flag/1/group_id/103.html">class="icon icon2">电影
     
  • href="https://test.movhome.cn/index.php?s=/home/addons/execute/_addons/wemall/_controller/wemall/_action/indexvc/token/557404495b14e/flag/2/group_id/103.html">class="icon icon2 psr">卖品
  •  
  • id="toolbar_change_cinema" style="display:none">href="/index.php?s=/home/cinema_group/changecinema/flag/2/group_id/103.html">class="icon icon2">影院
  •  
  • href="https://test.movhome.cn/index.php?s=/home/addons/execute/_addons/kgrzx/_controller/kgrzx/_action/index/token/557404495b14e/flag/3/group_id/103.html">class="icon icon2">我的
  •