|
@@ -21,10 +21,11 @@
|
|
|
|
|
|
<body>
|
|
|
<div class="back" style="width: 100%; height: 100%;">
|
|
|
- <div style="height: 355px;"></div>
|
|
|
- <div class="product_to"><img src="images/ia_air_purifier_product.jpg" alt="" style="width: 66%;display: block;margin-left: 18%;"></div>
|
|
|
- <div><img src="images/ia_air_purifier.jpg" alt="" style="width: 20%;display: block;margin-left: 40%;margin-top: 9px;"></div>
|
|
|
- <div style="height: 20px; text-align: center; font-size: 13px; color: #ffffff; margin-bottom: 0px;">扫码领券购买</div>
|
|
|
+ <div style="height: 107px;"></div>
|
|
|
+ <div class="receive"><img src="images/ia_air_receive.png" alt="" style="width: 66%;display: block;margin-left: 19%;margin-top: 20px;margin-bottom: 35px;"></div>
|
|
|
+ <div class="product_to"><img src="images/ia_air_purifier_product.jpg" alt="" style="width: 66%;display: block;margin-left: 18%; margin-bottom: 85px;"></div>
|
|
|
+ <!-- <div><img src="images/ia_air_purifier.jpg" alt="" style="width: 20%;display: block;margin-left: 40%;margin-top: 9px;"></div> -->
|
|
|
+ <!-- <div style="height: 20px; text-align: center; font-size: 13px; color: #ffffff; margin-bottom: 0px;">扫码领券购买</div> -->
|
|
|
</div>
|
|
|
|
|
|
<script src="js/mui.min.js"></script>
|
|
@@ -34,6 +35,29 @@
|
|
|
</body>
|
|
|
<script>
|
|
|
mui.ready(function() {
|
|
|
+ $.ajax(base_path + '/wechat/getUserInfo?dates=' + new Date().getTime(), {
|
|
|
+ dataType: 'json',
|
|
|
+ type: 'post',
|
|
|
+ timeout: 15000,
|
|
|
+ xhrFields: {
|
|
|
+ withCredentials: true
|
|
|
+ },
|
|
|
+ crossDomain: true,
|
|
|
+ success: function(dt) {
|
|
|
+ if(dt.isRedirect) {
|
|
|
+ location.href = dt.redirectURL;
|
|
|
+ } else {
|
|
|
+ console.log("用户信息刷新成功或今日已经刷新");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ console.log(xhr)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ $(document).on('tap', '.receive', function() {
|
|
|
$.ajax(base_path + '/wechat/coupon/receive_coupon_end?dates=' + new Date().getTime(), {
|
|
|
data: {
|
|
|
"couponId": 50000
|
|
@@ -49,13 +73,15 @@
|
|
|
if(dt.isRedirect) {
|
|
|
location.href = dt.redirectURL;
|
|
|
} else {
|
|
|
- if(dt.status) {
|
|
|
- mui.toast(dt.message);
|
|
|
- } else {
|
|
|
- mui.toast(dt.message);
|
|
|
- }
|
|
|
- mui.openWindow({
|
|
|
- url: 'pro-details.html?productId=53'
|
|
|
+ // if(dt.status) {
|
|
|
+ // mui.toast(dt.message);
|
|
|
+ // } else {
|
|
|
+ // mui.toast(dt.message);
|
|
|
+ // }
|
|
|
+ mui.alert(dt.message, function() {
|
|
|
+ mui.openWindow({
|
|
|
+ url: 'pro-details.html?productId=53'
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -67,7 +93,6 @@
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-
|
|
|
$(document).on('tap', '.product_to', function() {
|
|
|
mui.openWindow({
|
|
|
url: 'pro-details.html?productId=53'
|