|
@@ -0,0 +1,495 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <title>继续代理</title>
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
+ <link rel="stylesheet" type="text/css" href="/css/mui.min.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="/css/iconfont.css" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="/css/style.css" />
|
|
|
+ <style>
|
|
|
+ .head {height: 60px;}
|
|
|
+ #head {line-height: 60px;}
|
|
|
+ h3{margin-top:5px;margin-bottom: 0;}
|
|
|
+ .icon-fuxuankuang a{color: #24cae9;text-decoration:underline;font-size: 12px;}
|
|
|
+ .icon-daifahuo,.icon-lease2,.icon-jiage,.icon-lipin,.icon-lease1,.icon-jiage{font-size: 15px;padding-left: 22px;}
|
|
|
+ .icon-fuxuankuang{font-size: 14px;padding:5px 5px 5px 22px;}
|
|
|
+ .icon-fuxuankuang:before{font-size: 15px;margin-top: 5px;margin-right: 3px;color:#e4004d;}
|
|
|
+ .icon-daifahuo:before,.icon-lease2:before,.icon-jiage:before,.icon-lipin:before,.icon-lease1:before,.icon-jiage:before{font-size: 19px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
|
|
|
+ .try_price{color: #f1436c;}
|
|
|
+ .ul_radio{width: 100%;text-align: left;}
|
|
|
+ .ul_radio li{width:21%;height: 55px;margin: 0 1%;border: 1px solid rgba(0,0,0,.1);border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
|
|
|
+ .ul_radio .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
|
|
|
+ .radio1{background: url(//s.iamberry.com/watero/images/cp-1.jpg) center center /auto 85% no-repeat;}
|
|
|
+ .radio2{background: url(//s.iamberry.com/watero/images/cp-2.jpg) center center /auto 85% no-repeat;}
|
|
|
+ .radio3{background: url(//s.iamberry.com/watero/images/cp-3.jpg) center center /auto 85% no-repeat;}
|
|
|
+ .radio4{background: url(//s.iamberry.com/watero/images/cp-4.jpg) center center /auto 85% no-repeat;}
|
|
|
+ .head-img {position: absolute;bottom: 15px;right: 13px;width: 60px;height: 60px;border-radius: 30px;border: 3px solid #E5E5E5;}
|
|
|
+ .mui-table-view .mui-media .mui-media-body{height: 41px;line-height: 41px;color: #333;}
|
|
|
+ .mui-table-view .mui-media .mui-media-body>span{color: #f1436c;}
|
|
|
+ .my-table-view-try{border-top: .6em solid #f0f0f0;border-bottom: .6em solid #f0f0f0;padding-bottom: 10px;}
|
|
|
+ .my-table-view-try .mui-table-view-cell{padding:10px 13px 10px 30px !important;font-size: 12px;}
|
|
|
+ .mui-table-view-cell:after,.mui-table-view:before,.mui-table-view:after,.mui-input-group .mui-input-row:after,.mui-input-group:before,.mui-input-group:after{display: none;}
|
|
|
+ #open-wechat-addres-a{margin: -15px -15px -15px -28px !important;}
|
|
|
+ .mui-table-view-cell>a .mui-pull-right{color: #999;font-size: 14px;}
|
|
|
+ #btn_submit{color: #fff;font-size: 18px;background: #24cae9;margin-bottom: 0;border: 0;}
|
|
|
+ .mui-btn-block.mui-active,.btn-pull-code.mui-active{background-color: #c8c8c8 !important;}
|
|
|
+ .icon-fuxuankuang.mui-active:before{color: #c8c8c8;}
|
|
|
+ .mui-content-padded{margin: 10px 13px;}
|
|
|
+ .mui-input-group .mui-input-row {height: 50px;padding: 5px 0;border: 1px solid rgba(0,0,0,.1); margin:10px 0;}
|
|
|
+ .mui-input-row label{color: #666;width:27%;font-size: 15px;}
|
|
|
+ .mui-input-row label~input{width:73%;}
|
|
|
+ .mui-input-row label~input::-webkit-input-placeholder{font-size: 15px;}
|
|
|
+ .triangle-down {width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;}
|
|
|
+ .my-arrowright{position: absolute;right: 18px;top: 28px;color: #666;pointer-events:none;}
|
|
|
+ .mui-btn-red{background-color: #e9004c;}
|
|
|
+ .tips{padding-bottom: 85px;}
|
|
|
+
|
|
|
+ .gift-card-title{padding-top:70px;background:url(//s.iamberry.com/watero/images/shop/gift-card-tit2-bg.jpg) top center /100% no-repeat #71d8ec;}
|
|
|
+ .gift-card-title .mui-table-view-cell.mui-active{background:transparent;}
|
|
|
+ .gift-card-title .mui-table-view-cell>a:not(.mui-btn){color: #fff;}
|
|
|
+ .gift-card-title .mui-table-view-cell>a:not(.mui-btn).mui-active{background:transparent;}
|
|
|
+ .gift-card-title .mui-navigate-right:after{color: #fff;font-size: 20px;right: 7px;}
|
|
|
+ .gift-card-title .mui-table-view-cell{color: #fff;}
|
|
|
+ .mui-table-view-cell.mui-collapse .mui-collapse-content{background: #71d8ec;}
|
|
|
+ .accordion{float: right;margin:2px 15px 0 0;font-size: 12px;color: #fff;}
|
|
|
+ .my-btn-hand{display:block;width: 100%;height: 55px;background-color: #c5c5c5;color: #fff;border: 0;border-radius: 0;}
|
|
|
+ .my-btn-hand.active{background-color: #1cc9f4;}
|
|
|
+ .my-div{padding: 5px 0;border-bottom: 1px solid rgba(0,0,0,.1);margin-bottom: 5px;}
|
|
|
+ .mui-h5, h5 {margin-left: 30px;font-size: 12px;}
|
|
|
+ .mui-h6, h6 {padding: 5px 0;}
|
|
|
+ .my-btn-exchange{background: #ddf2f8 !important;text-align: center;border: 0 !important;font-size: 14px;}
|
|
|
+ </style>
|
|
|
+ <script>
|
|
|
+ // 屏蔽分享
|
|
|
+ window.hiddenAllWechatMenu = true;
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body style="background: #fff;">
|
|
|
+<div class="loading-bg">
|
|
|
+ <div class="mui-loading">
|
|
|
+ <div class="mui-spinner">
|
|
|
+ </div>
|
|
|
+ 加载中...
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<div class="mui-content" style="background: #fff;">
|
|
|
+ <div class="tips">
|
|
|
+ <ul class="mui-table-view gift-card-title">
|
|
|
+ <li class="mui-table-view-cell mui-text-center">代理费用:10000元</li>
|
|
|
+ <li class="mui-table-view-cell mui-text-left mui-collapse">
|
|
|
+ <a class="mui-navigate-right" id="mui-navigate-right"><span class="iconfont icon-quanyizhanshi"></span> 尊享权益<span class="accordion">详情</span></a>
|
|
|
+ <div class="mui-collapse-content">
|
|
|
+ <ul class="ft-12">
|
|
|
+ <li>1.将获赠价值3680元的美国watero净水机一台。</li>
|
|
|
+ <li>2.将获得8张提货卡(每张可兑换一台美国watero净水机)</li>
|
|
|
+ <li>3.成功推荐其他人成为代理商,可获赠一台美国watero净水机</li>
|
|
|
+ <li>4.一年后,未使用的礼品卡每张可兑换成1250元现金。</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div class="mui-content-padded">
|
|
|
+ <div>
|
|
|
+ <span class="iconfont icon-lease1">代理商信息</span>
|
|
|
+ </div>
|
|
|
+ <form class="mui-input-group">
|
|
|
+ <div class="mui-input-row">
|
|
|
+ <label>您的姓名</label>
|
|
|
+ <input type="text" maxlength="10" class="mui-input-clear" placeholder="请输入您的姓名" id="ipt-name">
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row">
|
|
|
+ <label>手机号码</label>
|
|
|
+ <input type="tel" maxlength="11" class="mui-input-clear" placeholder="请输入您的手机号" id="ipt-phone">
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ <div class="my-div">
|
|
|
+ <span class="iconfont icon-lipin">选择赠品</span>
|
|
|
+ </div>
|
|
|
+ <div class="mui-h6">
|
|
|
+ 产品名称:美国watero净饮水一体机
|
|
|
+ </div>
|
|
|
+ <div class="mui-h6">
|
|
|
+ 产品数量:1台
|
|
|
+ </div>
|
|
|
+ <form class="mui-input-group">
|
|
|
+ <div style="display: table;width: 100%;padding: 10px 0;">
|
|
|
+ <div style="display: table-cell;width: 20%;vertical-align: middle;font-size: 12px;font-weight: 400;color: #8f8f94;">选择颜色:</span></div><div style="display:table-cell;width:70%;text-align: right;">
|
|
|
+ <ul class="ul_radio">
|
|
|
+ <!-- <li class="radio1 active"></li>
|
|
|
+ <li class="radio2"></li>
|
|
|
+ <li class="radio3"></li>
|
|
|
+ <li class="radio4"></li> -->
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="my-div">
|
|
|
+ <span class="iconfont icon-daifahuo">提货卡</span>
|
|
|
+ </div>
|
|
|
+ <div class="mui-h6">
|
|
|
+ 美国watero净饮水一体机提货卡<span class="mui-pull-right cl-red">X8张</span>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ <!-- <div class="my-div">
|
|
|
+ <span class="iconfont icon-lease2">收货信息</span>
|
|
|
+ </div> -->
|
|
|
+ <ul class="mui-table-view" style="padding-top: 15px;">
|
|
|
+ <li class="mui-table-view-cell">
|
|
|
+ <a class="mui-navigate-right" id="open-wechat-addres-a">
|
|
|
+ <span class="iconfont icon-lease2">收货信息</span><span class="mui-h5">请选择收货地址</span>
|
|
|
+ <!-- <ul class="ft-12" style="color: #333;">
|
|
|
+ <li>收 货 人:林林</li>
|
|
|
+ <li>手 机 号:15999999999</li>
|
|
|
+ <li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>
|
|
|
+ </ul> -->
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div style="padding:8px 0;margin-top:4px;border-top: 1px solid rgba(0,0,0,.1);">
|
|
|
+ <span class="iconfont icon-jiage">抵扣密码</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <input type="text" value="" placeholder="请输入抵扣密码" maxlength="12" class="mui-input-clear my-btn-exchange" id="ipt-exchange"/>
|
|
|
+ <br/>
|
|
|
+ <span class="mui-h5">说明:如你已经线下支付并已获得抵扣密码,输入即可!</span>
|
|
|
+ </div>
|
|
|
+ <ul class="mui-table-view">
|
|
|
+ <li style="padding:20px 10px 0px 10px;text-align: center;">
|
|
|
+ <span class="iconfont icon-fuxuankuang mui-active" id="btn-tongyi">我已经阅读并同意<a id="xieyi-dalog">《美国watero代理说明》</a></span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mui-text-center">
|
|
|
+ 支付金额:<span class="cl-red" id="pay_price">¥10000</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<div class="buy-footer">
|
|
|
+ <button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="支付中" class="mui-btn mui-btn-block mui-btn-outlined mui-active" id="btn_submit" disabled="disabled">立即支付</button>
|
|
|
+</div>
|
|
|
+<script src="/js/mui.min.js"></script>
|
|
|
+<script src="/js/jquery-2.1.1.min.js"></script>
|
|
|
+<script src="/js/shop/main.js"></script>
|
|
|
+<script src="/js/shop/wechat-utils-1.0.js"></script>
|
|
|
+<script type="text/javascript">
|
|
|
+ //wechatAddr.status=true;
|
|
|
+ var check = false,alert_msg='';
|
|
|
+ var uname = /^[A-Za-z\-\u4e00-\u9fa5]{1,10}$/;//简体中文英文
|
|
|
+ var mobile=/^(13|14|15|18|17)[0-9]{9}$/; //11位手机号码
|
|
|
+ var dcode=/^[A-Z]{1}[0-9]{11}$/; //12位抵扣密码
|
|
|
+ var isPay = true; // 是否在请求支付,false表示正在请求,true可以请求
|
|
|
+ mui.ready(function(){
|
|
|
+ mui.ajax(base_path + '/giftCard/card/product/details?dates=' + new Date().getTime(), {
|
|
|
+ data: {},
|
|
|
+ dataType: 'json',
|
|
|
+ type: 'post',
|
|
|
+ timeout: 15000,
|
|
|
+ success: function(dt) {
|
|
|
+ //console.log(dt);
|
|
|
+ if(dt.isRedirect) {
|
|
|
+ location.href = dt.redirectURL;
|
|
|
+ } else {
|
|
|
+ if(dt.returnCode=="200" && dt.resultCode=="200"){
|
|
|
+ if (dt.returnMsg.agentInfo == null){
|
|
|
+ mui.openWindow({url:'/watero/view/gift_card_to_agent.html'})
|
|
|
+ }
|
|
|
+ $("#ipt-name").val(decodeURI(dt.returnMsg.agentInfo.agentNickname));
|
|
|
+ $("#ipt-phone").val(dt.returnMsg.agentInfo.agentTel);
|
|
|
+ var table = document.body.querySelector('.ul_radio');
|
|
|
+ mui(dt.returnMsg.colors).each(function(index) {
|
|
|
+ var li = document.createElement('li');
|
|
|
+ if(index==0){
|
|
|
+ li.className ='radio'+this.colorId+' active';
|
|
|
+ }else{
|
|
|
+ li.className ='radio'+this.colorId;
|
|
|
+ }
|
|
|
+ li.setAttribute("id",this.colorId);
|
|
|
+ li.setAttribute("name",this.colorProductId);
|
|
|
+ table.appendChild(li);
|
|
|
+ });
|
|
|
+ $(".ul_radio li").each(function() {
|
|
|
+ $(this).on("tap", function() {
|
|
|
+ $(this).addClass("active");
|
|
|
+ $(this).siblings().removeClass("active");
|
|
|
+ });
|
|
|
+ });
|
|
|
+ document.querySelector('.loading-bg').style.display='none';
|
|
|
+ }else{
|
|
|
+ mui.alert(dt.resultMsg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ console.log(xhr)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ mui('body').on('tap', '#btn_submit', function() {
|
|
|
+ change_input();
|
|
|
+ var th=this;
|
|
|
+ if(check){
|
|
|
+ if(isPay) {
|
|
|
+ isPay = false; // 锁定请求按钮
|
|
|
+ mui(this).button('loading');
|
|
|
+ var param = {
|
|
|
+ "agentMachineColorId":$(".ul_radio .active").attr("id"),
|
|
|
+ "agentMachineProductId": $(".ul_radio .active").attr("name"),
|
|
|
+ "agentMachineAddressInfo": address,
|
|
|
+ "agentMachineAddressName": nickname,
|
|
|
+ "agentMachineAddressTel":ads_tel,
|
|
|
+ "agentNickname":encodeURI($("#ipt-name").val().trim()),
|
|
|
+ "agentTel":$("#ipt-phone").val().trim(),
|
|
|
+ "payPassword":$("#ipt-exchange").val().trim(),
|
|
|
+ };
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: '/watero/pay/pay_agent_renewal?dates=' + new Date().getTime(),
|
|
|
+ data: param,
|
|
|
+ dataType: 'json',
|
|
|
+ timeout: 15000,
|
|
|
+ success: function(dt) {
|
|
|
+ //console.log(dt);
|
|
|
+ if($("#ipt-exchange").val().trim()!=''){
|
|
|
+ if(dt.status && dt.data.success) {
|
|
|
+ mui.openWindow({url:base_path+ '/giftCard/card/agencyUI'});
|
|
|
+ }else{
|
|
|
+ mui(th).button('reset');
|
|
|
+ isPay = true;
|
|
|
+ mui.alert(dt.data.info);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(dt.status) {
|
|
|
+ var obj = JSON.parse("{" + dt.data.info + "}");
|
|
|
+ WeixinJSBridge.invoke('getBrandWCPayRequest', obj, function(res) {
|
|
|
+ if(res.err_msg == 'get_brand_wcpay_request:ok') {
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: base_path+'/agent_pay/check_agent_pay_success',
|
|
|
+ data: {"orderId":dt.data.orderId},
|
|
|
+ dataType: 'json',
|
|
|
+ timeout: 15000,
|
|
|
+ success: function(data) {
|
|
|
+ //console.log(data);
|
|
|
+ if(data.status) {
|
|
|
+ if(data.data==2){
|
|
|
+ mui.openWindow({url:base_path+ '/giftCard/card/agencyUI'});
|
|
|
+ }else{
|
|
|
+ mui.alert('如果已支付,请等待同步支付状态!', '', function() {
|
|
|
+ mui(th).button('reset');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ mui(th).button('reset');
|
|
|
+ mui.alert(data.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ //异常处理;
|
|
|
+ console.log(xhr);
|
|
|
+ mui(th).button('reset');
|
|
|
+ isPay = true;
|
|
|
+ mui.alert("请检查网络或刷新页面重试!");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ isPay = true;
|
|
|
+ mui(th).button('reset');
|
|
|
+ mui.alert("对不起,支付失败!请稍后重试!");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ mui(th).button('reset');
|
|
|
+ isPay = true;
|
|
|
+ mui.alert(dt.returnMsg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ //异常处理;
|
|
|
+ console.log(xhr);
|
|
|
+ mui.alert("请检查网络或刷新页面重试!");
|
|
|
+ mui(th).button('reset');
|
|
|
+ isPay = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ mui.alert("正在请求支付中~~请稍后!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ mui.alert(alert_msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ mui('body').on('tap', '#xieyi-dalog', function() {
|
|
|
+ mui.openWindow({
|
|
|
+ url: '/watero/view/gift_card_agent_explain.html'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ mui('body').on('tap', '#mui-navigate-right', function() {
|
|
|
+ if(this.parentNode.classList.contains('mui-active')){
|
|
|
+ this.lastChild.innerHTML='详情'
|
|
|
+ }else{
|
|
|
+ this.lastChild.innerHTML='收起'
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $(document).on('tap', '#btn-tongyi', function() {
|
|
|
+ var btn_submit=$("#btn_submit");
|
|
|
+ if($(this).hasClass("mui-active")){
|
|
|
+ $(this).removeClass("mui-active");
|
|
|
+ check=true;
|
|
|
+ if(wechatAddr.status){
|
|
|
+ btn_submit.removeClass("mui-active").removeAttr("disabled");
|
|
|
+ }else{
|
|
|
+ btn_submit.addClass("mui-active").prop("disabled","disabled");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ check=false;
|
|
|
+ $(this).addClass("mui-active");
|
|
|
+ btn_submit.addClass("mui-active").prop("disabled","disabled");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ var address='',nickname='',ads_tel='';
|
|
|
+ // 获取微信共享地址
|
|
|
+ mui('body').on('tap', '#open-wechat-addres-a', function() {
|
|
|
+ editAddrV1(
|
|
|
+ function(res) {
|
|
|
+ // 用户成功拉出地址
|
|
|
+ address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
|
|
|
+ nickname=res.userName;
|
|
|
+ ads_tel= res.telNumber;
|
|
|
+ wechatAddr.status = true;
|
|
|
+ wechatAddr.detailInfo = address;
|
|
|
+ wechatAddr.postalCode = res.postalCode;
|
|
|
+ wechatAddr.userName = res.userName;
|
|
|
+ wechatAddr.userTel = res.telNumber;
|
|
|
+ wechatAddr.nationalCode = res.nationalCode;
|
|
|
+ $("#open-wechat-addres-a").empty().append('<ul class="ft-12" style="color: #333;"><li>收 货 人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
|
|
|
+ if(check){
|
|
|
+ $(this).removeClass("mui-active");
|
|
|
+ $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ function() {
|
|
|
+ if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
|
|
|
+ wechatAddr.status = true;
|
|
|
+ } else {
|
|
|
+ wechatAddr.status = false;
|
|
|
+ // 用户取消拉出地址
|
|
|
+ $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ });
|
|
|
+ function change_input() {
|
|
|
+ if($("#btn-tongyi").hasClass("mui-active")){
|
|
|
+ alert_msg="请勾选同意《美国watero代理说明》";
|
|
|
+ check=false;
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ check=true;
|
|
|
+ }
|
|
|
+ if(dcode.test($("#ipt-exchange").val().trim()) || $("#ipt-exchange").val().trim()==''){
|
|
|
+ check=true;
|
|
|
+ $("#pay_price").text("¥0");
|
|
|
+ }else{
|
|
|
+ alert_msg="抵扣密码不正确,请重新填写";
|
|
|
+ check=false;
|
|
|
+ $("#pay_price").text("¥10000");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(wechatAddr.status){
|
|
|
+ check=true;
|
|
|
+ }else{
|
|
|
+ alert_msg="请选择收货地址";
|
|
|
+ check=false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $(".mui-input-group input").each(function(index) {
|
|
|
+ switch ($(this).attr("id")){
|
|
|
+ case "ipt-phone":
|
|
|
+ if($(this).val().trim()==""){
|
|
|
+ alert_msg="请填写手机号";
|
|
|
+ check=false;
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ if(mobile.test($(this).val().trim())) {
|
|
|
+ check=true;
|
|
|
+ }else{
|
|
|
+ alert_msg="手机号码不正确,请重新填写";
|
|
|
+ check=false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "ipt-name":
|
|
|
+ if($(this).val().trim()==""){
|
|
|
+ alert_msg="请填写姓名";
|
|
|
+ check=false;
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ if(uname.test($(this).val().trim())) {
|
|
|
+ check=true;
|
|
|
+ }else{
|
|
|
+ alert_msg="姓名格式不正确,请重新填写";
|
|
|
+ check=false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(check) {
|
|
|
+ $("#btn_submit").removeClass("mui-active").removeAttr("disabled");
|
|
|
+ }else{
|
|
|
+ $("#btn_submit").addClass("mui-active").prop("disabled","disabled");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mui.os.ios ? listener_ipt() : keyup_fn();
|
|
|
+
|
|
|
+ function keyup_fn() {
|
|
|
+ $(document).on('keyup', '#ipt-name', function(e) {
|
|
|
+ change_input();
|
|
|
+ if(check){
|
|
|
+ $("#btn_submit").removeClass("my-active").removeAttr("disabled");
|
|
|
+ }else{
|
|
|
+ $("#btn_submit").addClass("my-active").prop("disabled","disabled");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $(document).on('keyup', '#ipt-phone', function(e) {
|
|
|
+ change_input();
|
|
|
+ if(check){
|
|
|
+ $("#btn_submit").removeClass("my-active").removeAttr("disabled");
|
|
|
+ }else{
|
|
|
+ $("#btn_submit").addClass("my-active").prop("disabled","disabled");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function listener_ipt() {
|
|
|
+ document.getElementById('ipt-name').onblur = function() {
|
|
|
+ change_input();
|
|
|
+ if(check){
|
|
|
+ $("#btn_submit").removeClass("my-active").removeAttr("disabled");
|
|
|
+ }else{
|
|
|
+ $("#btn_submit").addClass("my-active").prop("disabled","disabled");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ document.getElementById('ipt-phone').onblur = function() {
|
|
|
+ change_input();
|
|
|
+ if(check){
|
|
|
+ $("#btn_submit").removeClass("my-active").removeAttr("disabled");
|
|
|
+ }else{
|
|
|
+ $("#btn_submit").addClass("my-active").prop("disabled","disabled");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|