浏览代码

爱贝源添加3折券

wangxiaoming 5 年之前
父节点
当前提交
923078eb1b
共有 4 个文件被更改,包括 101 次插入49 次删除
  1. 28 28
      aiberle/20191212.html
  2. 60 20
      aiberle/clearing.html
  3. 6 1
      aiberle/coupon_list.html
  4. 7 0
      aiberle/register-vip.html

+ 28 - 28
aiberle/20191212.html

@@ -589,35 +589,35 @@
 		
 		// $(document).on('tap', '.coupon_class>ul>li', function() {
 		// 	var couponId = this.getAttribute("couponId");
-		// 	$.ajax(base_path + '/wechat/coupon/receive_coupon_end?dates=' + new Date().getTime(), {
-		// 		data: {
-		// 			"couponId": couponId
-		// 		},
-		// 		dataType: 'json',
-		// 		xhrFields: {
-		// 			withCredentials: true
-		// 		},
-		// 		crossDomain: true,
-		// 		type: 'post',
-		// 		timeout: 15000,
-		// 		success: function(dt) {
-		// 			if(dt.isRedirect) {
-		// 				location.href = dt.redirectURL;
-		// 			} else {
-		// 				if(dt.status) {
-		// 					mui.toast(dt.message);
-		// 				} else {
-		// 					mui.toast(dt.message);
-		// 				}
-		// 			}
-		// 		},
-		// 		error: function(xhr, type, errorThrown) {
-		// 			console.log(xhr);
-		// 			mui.alert("领取失败!网络出小差了", function() {
+			// $.ajax(base_path + '/wechat/coupon/receive_coupon_end?dates=' + new Date().getTime(), {
+			// 	data: {
+			// 		"couponId": couponId
+			// 	},
+			// 	dataType: 'json',
+			// 	xhrFields: {
+			// 		withCredentials: true
+			// 	},
+			// 	crossDomain: true,
+			// 	type: 'post',
+			// 	timeout: 15000,
+			// 	success: function(dt) {
+			// 		if(dt.isRedirect) {
+			// 			location.href = dt.redirectURL;
+			// 		} else {
+			// 			if(dt.status) {
+			// 				mui.toast(dt.message);
+			// 			} else {
+			// 				mui.toast(dt.message);
+			// 			}
+			// 		}
+			// 	},
+			// 	error: function(xhr, type, errorThrown) {
+			// 		console.log(xhr);
+			// 		mui.alert("领取失败!网络出小差了", function() {
 						
-		// 			});
-		// 		}
-		// 	});
+			// 		});
+			// 	}
+			// });
 		// });
 		
 		/**

文件差异内容过多而无法显示
+ 60 - 20
aiberle/clearing.html


+ 6 - 1
aiberle/coupon_list.html

@@ -146,10 +146,15 @@
 
                         mui(data).each(function(index) {
                             var li = document.createElement('li');
-							var reduce = '<strong>¥</strong><span>' + (this.couponReduce/100) + '</span>'
+							var reduce = ''
 							if(this.couponId == 40001){
 								reduce = '滤芯'
 							}
+							if(this.couponType == 1){
+								reduce = '<strong>¥</strong><span>' + (this.couponReduce/100) + '</span>'
+							}else{
+								reduce = '<strong></strong><span>' +  accDiv(this.couponReduce,10) + '折</span>'
+							}
                             li.innerHTML = 
                             '<div class="mui-table">'+
 								'<div class="mui-table-cell mui-col-xs-10 mui-text-right">'+

+ 7 - 0
aiberle/register-vip.html

@@ -290,6 +290,7 @@
 		<script type="text/javascript" src="js/main.js"></script>
 		<script type="text/javascript">
 			var countdown = 60;
+			var register_status = 0;
 			mui.ready(function() {
 				console.log("页面加载完毕")
 				document.querySelector('.loading-bg').style.display = 'none';
@@ -336,6 +337,11 @@
 						var userBirthDate = $('#ipt-birthday').val();
 						var userName = $('#ipt-name').val();
 						var userSex = $('[name="radio1"]:checked').val();
+						
+						if(register_status != 0){
+							return false;
+						}
+						register_status = 1;
 						$.ajax(base_path + '/wechat/agent/updateMemberInfo?dates=' + new Date().getTime(), {
 							data: {
 								userName : userName,
@@ -352,6 +358,7 @@
 							type: 'get',
 							timeout: 15000,
 							success: function(dt) {
+								register_status = 0;
 								if(dt.isRedirect) {
 									location.href = dt.redirectURL;
 								} else {