Browse Source

验证码

qihanjiao 7 years ago
parent
commit
03eb4c2241
3 changed files with 31 additions and 6 deletions
  1. 0 2
      aiberle/index.html
  2. 2 1
      tooth/index.html
  3. 29 3
      tooth/register-vip.html

+ 0 - 2
aiberle/index.html

@@ -272,8 +272,6 @@
 												"childTypeId": this.childTypeId,
 												"url":"1"
 											});
-										
-										
 									});
 									//遍历产品配件
 									if(this.typeId == 5) {

+ 2 - 1
tooth/index.html

@@ -227,7 +227,7 @@
 				<ul class="mui-table-view mui-grid-view mui-grid-9" id="menu-grid-9">
 		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><a>
 		                    <span class="iconfont icon-fenbi"></span>
-		                    <div class="mui-media-body">朵粉币 1200</div></a></li>
+		                    <div class="mui-media-body">朵粉币 <span id="integral">0</span></div></a></li>
 		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><a href="cash-coupon-log.html">
 		                    <span class="iconfont icon-jilu"></span>
 		                    <div class="mui-media-body">兑换记录</div></a></li>
@@ -343,6 +343,7 @@
 						} else {
 							if(dt.status) {
 								//console.log(dt)
+								$("#integral").text(dt.data.integral);
 								var table=document.body.querySelector("#grid-view");
 						mui.each(dt.data.integralProductList, function(index) {
 							var li = document.createElement('li');//创建li标签

+ 29 - 3
tooth/register-vip.html

@@ -39,7 +39,7 @@
 			<form class="mui-input-group">
 				<div class="mui-input-row line-bottom">
 					<label>您的姓名</label>
-					<input type="text" id="ipt-name" placeholder="填写您的姓名">
+					<input type="text" maxlength="10" id="ipt-name" placeholder="填写您的姓名">
 				</div>
 				<div class="mui-input-row line-bottom">
 					<label>出生日期</label>
@@ -47,7 +47,7 @@
 				</div>
 				<div class="mui-input-row line-bottom">
 					<label>手机号码</label>
-					<input type="text" id="ipt-phone" placeholder="填写您的手机号码">
+					<input type="text" id="ipt-phone" maxlength="11" placeholder="填写您的手机号码">
 				</div>
 				<div class="mui-input-row line-bottom">
 						<label>验&nbsp;&nbsp;证&nbsp;&nbsp;码</label>
@@ -222,7 +222,33 @@
 					sessionStorage.setItem('code_data', JSON.stringify(obj));
 				}
 					//ajax
-					//$("#btn-submit").removeAttr("disabled").addClass("active");
+					$.ajax(base_path + '/wechat/apparatus/send_phone?dates=' + new Date().getTime(), {
+						data: {
+							"phone": phone
+						},
+						dataType: 'json',
+						xhrFields: {
+							withCredentials: true
+						},
+						crossDomain: true,
+						type: 'get',
+						timeout: 15000,
+						success: function(dt) {
+							//console.log(dt);
+							if(dt.isRedirect) {
+								location.href = dt.redirectURL;
+							} else {
+								if(dt.stauts) {
+									console.log("获取短信成功!");
+								} else {
+									mui.alert("获取短信失败!请稍后重试");
+								}
+							}
+						},
+						error: function(xhr, type, errorThrown) {
+							console.log(xhr);
+						}
+					});
 				} else {
 					if(phone != '') {
 						show_msg = '手机号码格式不正确';