瀏覽代碼

上朵添加优惠券

wangxiaoming 6 年之前
父節點
當前提交
311034a530
共有 2 個文件被更改,包括 4 次插入14 次删除
  1. 1 1
      tooth/coupon_list.html
  2. 3 13
      tooth/welfare-two-channel-coupon-.html

+ 1 - 1
tooth/coupon_list.html

@@ -107,7 +107,7 @@
 										couponConsumeEnoughHtml = '购买牙刷使用';
 									}
 									
-									li.innerHTML = '<img width="100%" src="' + src + '" /><div class="fixed-box"><div class="table"><div class="left-cell" style="width: 76%;"><span class="tit">' + this.couponName + '</span><p class="time" style="line-height: 15px;">使用条件:' + couponConsumeEnoughHtml + '</p><span class="condition">有效期至:' + this.couponUseEndDate + '</span></div><div class="right-cell"><div class="money">' + couponReduceHtml + '</div></div></div></div';
+									li.innerHTML = '<img width="100%" src="' + src + '" /><div class="fixed-box"><div class="table"><div class="left-cell" style="width: 76%;"><span class="tit">' + this.couponName + '</span><p class="time" style="line-height: 15px;">使用条件:' + couponConsumeEnoughHtml + '</p><span class="condition" style="bottom: 12%;">有效期至:' + this.couponUseEndDate + '</span></div><div class="right-cell"><div class="money">' + couponReduceHtml + '</div></div></div></div';
 									table.appendChild(li);
 								});
 							} else {

+ 3 - 13
tooth/welfare-two-channel-coupon-.html

@@ -47,17 +47,7 @@
 	
 	mui.ready(function(){
 		if(isFirst != 1 ){
-			location.href = "welfare-receive-coupon.html?couponId="+ couponId +"&isFirst="+ 1 +"&dates=" + new Date().getTime(); // 前往首页
-		}
-				
-		var newDate = new Date();
-		var limitedDate = new Date(2018, 6, 9, 0, 0, 0, 0);	
-		if(newDate > limitedDate){
-			mui.alert("活动已过期!", function() {
-				WeixinJSBridge.call('closeWindow');
-				wx.closeWindow();
-				return false;
-			});
+			location.href = "welfare-two-channel.html?couponId="+ couponId +"&isFirst="+ 1 +"&dates=" + new Date().getTime(); // 前往首页
 			return false;
 		}
 		
@@ -69,7 +59,7 @@
 	
 	//领取新人现金券
 	function receiceCoupon(){
-				$.ajax(base_path + '/wechat/coupon/re_coupon?dates=' + new Date().getTime(), {
+				$.ajax(base_path + '/wechat/coupon/re_two_coupon?dates=' + new Date().getTime(), {
 				data: {
 					couponId : couponId		//优惠券类型id
 				},// ajax参数 没有则不写
@@ -90,7 +80,7 @@
 							});
 							return false;
 						} else {
-							if(dt.resultCode == "500" || dt.resultCode == "502" || dt.resultCode == "503"){
+							if(dt.resultCode == "500" || dt.resultCode == "501" || dt.resultCode == "502" || dt.resultCode == "503"){
 								mui.alert(dt.message, function() {
 									//刷新
 									WeixinJSBridge.call('closeWindow');