Przeglądaj źródła

免费领取充电器

wangxiaoming 7 lat temu
rodzic
commit
7335ebe00c
2 zmienionych plików z 28 dodań i 2 usunięć
  1. 27 1
      tooth/free-receive-charger.html
  2. 1 1
      tooth/receive-charger.html

+ 27 - 1
tooth/free-receive-charger.html

@@ -94,6 +94,32 @@
 				}
 			});
 			mui.ready(function() {
+				/* 查询价格,一年内的购买次数 */
+				$.ajax(base_path + '/wechat/receive/select_charg_price?dates=' + new Date().getTime(), {
+						data: {},
+						dataType: 'json',
+						xhrFields: {
+							withCredentials: true
+						},
+						crossDomain: true,
+						type: 'post',
+						timeout: 15000,
+						success: function(dt) {
+							if(dt.isRedirect) {
+								location.href = dt.redirectURL;
+							} else {
+								console.log(dt)
+								
+							}
+						},
+						error: function(xhr, type, errorThrown) {
+							console.log(xhr);
+						}
+					});
+				
+				
+				
+				
 				$.ajax(base_path + '/wechat/receive/select_color?dates=' + new Date().getTime(), {
 						data: {},
 						dataType: 'json',
@@ -181,7 +207,7 @@
 					}
 					if(isPay) {
 						isPay = false; // 锁定请求按钮
-				$.ajax(base_path + '/wechat/cart/addProductToCart?dates=' + new Date().getTime(), {
+				$.ajax(base_path + '/wechat/receive/charger_receive?dates=' + new Date().getTime(), {
 							data: {
 								colorId:$("#my-pull>.active").attr("name"),
 								colorName:$("#my-pull>.active").text(),

+ 1 - 1
tooth/receive-charger.html

@@ -103,7 +103,7 @@
 									if(list.length>0){
 										$(".my-list").show();
 									}else{
-										$(".receive-null"),show();
+										$(".receive-null").show();
 									}
 									mui.each(list, function(index) {
 										var li = document.createElement("li");