|
@@ -1,559 +1,546 @@
|
|
-var domanUrl = "http://" + window.location.host,
|
|
|
|
- base_path = "http://test.iamberry.com/watero/wechat",
|
|
|
|
- url_path = "http://test.iamberry.com",
|
|
|
|
- marquee = '';
|
|
|
|
|
|
+var domanUrl = "//" + window.location.host,
|
|
|
|
+ base_path = "/watero/wechat",
|
|
|
|
+ marquee = '';
|
|
mui.each(document.querySelectorAll('#footer-bar .mui-tab-item'), function(index, el) {
|
|
mui.each(document.querySelectorAll('#footer-bar .mui-tab-item'), function(index, el) {
|
|
- el.addEventListener('tap', function() {
|
|
|
|
- switch(index) {
|
|
|
|
- case 0:
|
|
|
|
- mui.openWindow({
|
|
|
|
- url: base_path + '/index'
|
|
|
|
- });
|
|
|
|
- break;
|
|
|
|
- case 1:
|
|
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/shopping_cart.html'
|
|
|
|
- });
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/order_list.html'
|
|
|
|
- });
|
|
|
|
- break;
|
|
|
|
- case 3:
|
|
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/vip_center.html'
|
|
|
|
- });
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- break
|
|
|
|
- }
|
|
|
|
- }, false)
|
|
|
|
|
|
+ el.addEventListener('tap', function() {
|
|
|
|
+ switch(index) {
|
|
|
|
+ case 0:
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/index'
|
|
|
|
+ });
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/wxCart/goCart'
|
|
|
|
+ });
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '/watero/pay/goOrderList'
|
|
|
|
+ });
|
|
|
|
+ break;
|
|
|
|
+ case 3:
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/agentWechat/member'
|
|
|
|
+ });
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }, false)
|
|
});
|
|
});
|
|
|
|
|
|
function getCartNum() {
|
|
function getCartNum() {
|
|
- $.ajax(base_path + '/cart/getCartNumByCartOpenId', {
|
|
|
|
- data: {
|
|
|
|
- openid: '230'
|
|
|
|
- },
|
|
|
|
- xhrFields: {
|
|
|
|
- withCredentials: true
|
|
|
|
|
|
+ mui.ajax(base_path + '/cart/getCartNumByCartOpenId', {
|
|
|
|
+ data: {
|
|
|
|
+ openid: '230'
|
|
},
|
|
},
|
|
- dataType: 'json',
|
|
|
|
- type: 'post',
|
|
|
|
- timeout: 15000,
|
|
|
|
- success: function(dt) {
|
|
|
|
- if(dt.status) {
|
|
|
|
- if(dt.data == "0") {
|
|
|
|
- $('.icon-gouwuche span').hide()
|
|
|
|
- } else {
|
|
|
|
- $('.icon-gouwuche span').text(dt.data).show()
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- console.log(dt)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error: function(xhr, type, errorThrown) {
|
|
|
|
- errorfn(xhr)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ type: 'post',
|
|
|
|
+ timeout: 15000,
|
|
|
|
+ success: function(dt) {
|
|
|
|
+ if(dt.status) {
|
|
|
|
+ if(dt.data == "0") {
|
|
|
|
+ $('.icon-gouwuche span').hide()
|
|
|
|
+ } else {
|
|
|
|
+ $('.icon-gouwuche span').text(dt.data).show()
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ console.log(dt)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
|
+ errorfn(xhr)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
};
|
|
};
|
|
mui('body').on('tap', '.go_index', function() {
|
|
mui('body').on('tap', '.go_index', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: base_path + '/index'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/index'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_gwc', function() {
|
|
mui('body').on('tap', '.go_gwc', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/shopping_cart.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/wxCart/goCart'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_web_shop', function() {
|
|
mui('body').on('tap', '.go_web_shop', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/chanpin_list.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/wxCart/goProductList'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_chanpin_details', function() {
|
|
mui('body').on('tap', '.go_chanpin_details', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: base_path + '/product/desc?productId=' + this.getAttribute("proid")+'&colorId='+this.getAttribute("colorid")
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/product/desc?productId=' + this.getAttribute("proid")+'&colorId='+this.getAttribute("colorid")
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_couponList', function() {
|
|
mui('body').on('tap', '.go_couponList', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/coupon_list.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/couponWechat/couponList'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go-clearing', function() {
|
|
mui('body').on('tap', '.go-clearing', function() {
|
|
- var th=this;
|
|
|
|
- $.ajax(base_path + '/cart/addProductToCart', {
|
|
|
|
- data: {"productId":th.getAttribute("proid"),"colorId":th.getAttribute("colorid")},
|
|
|
|
- xhrFields: {
|
|
|
|
- withCredentials: true
|
|
|
|
|
|
+ var th=this;
|
|
|
|
+ mui.ajax(base_path + '/cart/addProductToCart', {
|
|
|
|
+ data: {"productId":th.getAttribute("proid"),"colorId":th.getAttribute("colorid")},
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ type: 'GET',
|
|
|
|
+ timeout: 15000,
|
|
|
|
+ success: function(dt) {
|
|
|
|
+ if(dt.status) {
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '/watero/pay/settlement?cartId=' + dt.data + "&tiemstamp=" + new Date().getTime()
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ mui.alert(dt.message)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- dataType: 'json',
|
|
|
|
- type: 'GET',
|
|
|
|
- timeout: 15000,
|
|
|
|
- success: function(dt) {
|
|
|
|
- if(dt.status) {
|
|
|
|
- mui.openWindow({
|
|
|
|
- url: url_path + '/watero/pay/settlement?cartId=' + dt.data + "&tiemstamp=" + new Date().getTime()
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- mui.alert(dt.message)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error: function(xhr, type, errorThrown) {
|
|
|
|
- console.log(xhr)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
|
+ console.log(xhr)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_gwc_pro', function() {
|
|
mui('body').on('tap', '.go_gwc_pro', function() {
|
|
- var th=this;
|
|
|
|
- $.ajax(base_path + '/cart/addProductToCart', {
|
|
|
|
- data: {"productId":th.getAttribute("proid"),"colorId":th.getAttribute("colorid")},
|
|
|
|
- xhrFields: {
|
|
|
|
- withCredentials: true
|
|
|
|
|
|
+ var th=this;
|
|
|
|
+ mui.ajax(base_path + '/cart/addProductToCart', {
|
|
|
|
+ data: {"productId":th.getAttribute("proid"),"colorId":th.getAttribute("colorid")},
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ type: 'GET',
|
|
|
|
+ timeout: 15000,
|
|
|
|
+ success: function(dt) {
|
|
|
|
+ if(dt.status) {
|
|
|
|
+ getCartNum()
|
|
|
|
+ } else {
|
|
|
|
+ mui.alert(dt.message)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- dataType: 'json',
|
|
|
|
- type: 'GET',
|
|
|
|
- timeout: 15000,
|
|
|
|
- success: function(dt) {
|
|
|
|
- if(dt.status) {
|
|
|
|
- getCartNum()
|
|
|
|
- } else {
|
|
|
|
- mui.alert(dt.message)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error: function(xhr, type, errorThrown) {
|
|
|
|
- errorfn(xhr)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
|
+ errorfn(xhr)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
});
|
|
});
|
|
|
|
|
|
function marquee_Show() {
|
|
function marquee_Show() {
|
|
- $.ajax(base_path + '/coupon/checkCurrentPreferential', {
|
|
|
|
- xhrFields: {
|
|
|
|
- withCredentials: true
|
|
|
|
|
|
+ mui.ajax(base_path + '/coupon/checkCurrentPreferential', {
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ type: 'POST',
|
|
|
|
+ async: false,
|
|
|
|
+ timeout: 15000,
|
|
|
|
+ success: function(dt) {
|
|
|
|
+ if(dt.status) {
|
|
|
|
+ marquee = '<span class="mui-h6">专属优惠:</span>'
|
|
|
|
+ } else {
|
|
|
|
+ marquee = ''
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- dataType: 'json',
|
|
|
|
- type: 'POST',
|
|
|
|
- async: false,
|
|
|
|
- timeout: 15000,
|
|
|
|
- success: function(dt) {
|
|
|
|
- if(dt.status) {
|
|
|
|
- marquee = '<span class="mui-h6">专属优惠:</span>'
|
|
|
|
- } else {
|
|
|
|
- marquee = ''
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error: function(xhr, type, errorThrown) {
|
|
|
|
- console.log(xhr)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
|
+ console.log(xhr)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
};
|
|
};
|
|
mui('body').on('tap', '.go_order_details', function() {
|
|
mui('body').on('tap', '.go_order_details', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/order_details.html?orderId=' + this.getAttribute("value")
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '/watero/pay/goOrderInfo?orderId=' + this.getAttribute("value")
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_pay_count', function() {
|
|
mui('body').on('tap', '.go_pay_count', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/order_list.html?salesStatus=1'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '/watero/pay/goOrderList?salesStatus=1'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_deliver_count', function() {
|
|
mui('body').on('tap', '.go_deliver_count', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/order_list.html?salesStatus=2'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '/watero/pay/goOrderList?salesStatus=2'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_delivered_count', function() {
|
|
mui('body').on('tap', '.go_delivered_count', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/order_list.html?salesStatus=5'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '/watero/pay/goOrderList?salesStatus=5'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_all_count', function() {
|
|
mui('body').on('tap', '.go_all_count', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/order_list.html?salesStatus=-1'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '/watero/pay/goOrderList?salesStatus=-1'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_tixian_guize', function() {
|
|
mui('body').on('tap', '.go_tixian_guize', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/tixian_guize.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/integralWechat/withdrawRule'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_agent_rule', function() {
|
|
mui('body').on('tap', '.go_agent_rule', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/daili_guize.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/agentWechat/agentRule'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_publicity', function() {
|
|
mui('body').on('tap', '.go_publicity', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: base_path + '/agentWechat/goPublicity?userType=' + this.getAttribute("userType") + "&isDrp=" + this.getAttribute("isDrp")
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/agentWechat/goPublicity?userType=' + this.getAttribute("userType") + "&isDrp=" + this.getAttribute("isDrp")
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_daili_order_list', function() {
|
|
mui('body').on('tap', '.go_daili_order_list', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/daili_order_list.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/agentWechat/order'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_daili_rebackOrder_list', function() {
|
|
mui('body').on('tap', '.go_daili_rebackOrder_list', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/daili_rebackOrder_list.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/agentWechat/reback'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_order_list', function() {
|
|
mui('body').on('tap', '.go_order_list', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/order_list.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '/watero/pay/goOrderList'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_xiaxian_list', function() {
|
|
mui('body').on('tap', '.go_xiaxian_list', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/xiaxian_list.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/agentWechat/agentNext'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_tixian_apply', function() {
|
|
mui('body').on('tap', '.go_tixian_apply', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/tixian_apply.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/withdraw/index'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_tixian_cash', function() {
|
|
mui('body').on('tap', '.go_tixian_cash', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/tixian_apply_cash.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/withdraw/cash'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_daili_2wm', function() {
|
|
mui('body').on('tap', '.go_daili_2wm', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/daili_2wm.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/member/showQrcode'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_cash_log', function() {
|
|
mui('body').on('tap', '.go_cash_log', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/cash_log.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/cashWechat/log'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_jifen_log', function() {
|
|
mui('body').on('tap', '.go_jifen_log', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/jifen_log.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/integralWechat/log'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_jifen_guize', function() {
|
|
mui('body').on('tap', '.go_jifen_guize', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/fenxiao_guize.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/integralWechat/integralRule'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_tixian_log', function() {
|
|
mui('body').on('tap', '.go_tixian_log', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/tixian_log.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/integralWechat/withdrawLog'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_tixian_cash_log', function() {
|
|
mui('body').on('tap', '.go_tixian_cash_log', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/tixian_log_cash.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/agentWechat/withdrawCashLog'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.show_post_info', function() {
|
|
mui('body').on('tap', '.show_post_info', function() {
|
|
- var urlStr = document.domain;
|
|
|
|
- var postfirm = $(this).prop('postfirm');
|
|
|
|
- if (postfirm == 'sto') {
|
|
|
|
- mui.openWindow({
|
|
|
|
- url: 'http://tuisong.wx.sto.cn/Track/Result163?billCode=' + this.getAttribute("postNum")
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- var href = window.location.href;
|
|
|
|
- mui.openWindow({
|
|
|
|
- url: 'https://m.kuaidi100.com/index_all.html?type=ems&postid=' + this.getAttribute("postNum") + '&callbackurl=' + href
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ var urlStr = document.domain;
|
|
|
|
+ var postfirm = $(this).prop('postfirm');
|
|
|
|
+ if (postfirm == 'sto') {
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: 'http://tuisong.wx.sto.cn/Track/Result163?billCode=' + this.getAttribute("postNum")
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ var href = window.location.href;
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: '//m.kuaidi100.com/index_all.html?type=ems&postid=' + this.getAttribute("postNum") + '&callbackurl=' + href
|
|
|
|
+ });
|
|
|
|
+ }
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_fenxiao_tixian_apply', function() {
|
|
mui('body').on('tap', '.go_fenxiao_tixian_apply', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/fenxiao_tixian_apply.html?openid='
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/drp/withdrawalsPage?openid='
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_fenxiao_tixian_log', function() {
|
|
mui('body').on('tap', '.go_fenxiao_tixian_log', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/fenxiao_tixian_log.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/drp/withdrawalsList'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.fenxiao_vip', function() {
|
|
mui('body').on('tap', '.fenxiao_vip', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/fenxiao_guize.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/drp/rulePage'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.to-up-img', function() {
|
|
mui('body').on('tap', '.to-up-img', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/up.html?userType=1'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/sharePage/upShare?userType=1'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.fenxiao_info', function() {
|
|
mui('body').on('tap', '.fenxiao_info', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/personal_information.html'
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/drp/placeInfo_detail'
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_luck_draw', function() {
|
|
mui('body').on('tap', '.go_luck_draw', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/share_zhuanpan.html?orderId=' + this.getAttribute("value")
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/activity/go_luck_draw?orderId=' + this.getAttribute("value")
|
|
|
|
+ })
|
|
});
|
|
});
|
|
mui('body').on('tap', '.go_prize_log', function() {
|
|
mui('body').on('tap', '.go_prize_log', function() {
|
|
- mui.openWindow({
|
|
|
|
- url: '/watero/html/wechat/wheel_log.html?gameId=' + this.getAttribute("value")
|
|
|
|
- })
|
|
|
|
|
|
+ mui.openWindow({
|
|
|
|
+ url: base_path + '/activity/go_prize_log?gameId=' + this.getAttribute("value")
|
|
|
|
+ })
|
|
});
|
|
});
|
|
|
|
|
|
function errorfn(xhr) {
|
|
function errorfn(xhr) {
|
|
- if(xhr.readyState == 4 && xhr.status == 200) {} else {
|
|
|
|
- var ref = location.href.split("#")[0],
|
|
|
|
- src = '';
|
|
|
|
- if(ref.indexOf('?') != -1) {
|
|
|
|
- src = ref + "&date=" + new Date().getTime()
|
|
|
|
- } else {
|
|
|
|
- src = ref + "?date=" + new Date().getTime()
|
|
|
|
- }
|
|
|
|
- location.href = src;
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ if(xhr.readyState == 4 && xhr.status == 200) {} else {
|
|
|
|
+ var ref = location.href.split("#")[0],
|
|
|
|
+ src = '';
|
|
|
|
+ if(ref.indexOf('?') != -1) {
|
|
|
|
+ src = ref + "&date=" + new Date().getTime()
|
|
|
|
+ } else {
|
|
|
|
+ src = ref + "?date=" + new Date().getTime()
|
|
|
|
+ }
|
|
|
|
+ location.href = src;
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
function CheckImgExists(imgurl) {
|
|
function CheckImgExists(imgurl) {
|
|
- var ImgObj = new Image();
|
|
|
|
- ImgObj.src = imgurl;
|
|
|
|
- if(ImgObj.fileSize > 0 || (ImgObj.width > 0 && ImgObj.height > 0)) {
|
|
|
|
- return ImgObj
|
|
|
|
- } else {
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
|
|
+ var ImgObj = new Image();
|
|
|
|
+ ImgObj.src = imgurl;
|
|
|
|
+ if(ImgObj.fileSize > 0 || (ImgObj.width > 0 && ImgObj.height > 0)) {
|
|
|
|
+ return ImgObj
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
function gotoTop(acceleration, stime) {
|
|
function gotoTop(acceleration, stime) {
|
|
- acceleration = acceleration || 0.1;
|
|
|
|
- stime = stime || 10;
|
|
|
|
- var x1 = 0,
|
|
|
|
- y1 = 0,
|
|
|
|
- x2 = 0,
|
|
|
|
- y2 = 0,
|
|
|
|
- x3 = 0,
|
|
|
|
- y3 = 0;
|
|
|
|
- if(document.documentElement) {
|
|
|
|
- x1 = document.documentElement.scrollLeft || 0;
|
|
|
|
- y1 = document.documentElement.scrollTop || 0
|
|
|
|
- }
|
|
|
|
- if(document.body) {
|
|
|
|
- x2 = document.body.scrollLeft || 0;
|
|
|
|
- y2 = document.body.scrollTop || 0
|
|
|
|
- }
|
|
|
|
- var x3 = window.scrollX || 0;
|
|
|
|
- var y3 = window.scrollY || 0;
|
|
|
|
- var x = Math.max(x1, Math.max(x2, x3));
|
|
|
|
- var y = Math.max(y1, Math.max(y2, y3));
|
|
|
|
- var speeding = 1 + acceleration;
|
|
|
|
- window.scrollTo(Math.floor(x / speeding), Math.floor(y / speeding));
|
|
|
|
- if(x > 0 || y > 0) {
|
|
|
|
- var run = "gotoTop(" + acceleration + ", " + stime + ")";
|
|
|
|
- window.setTimeout(run, stime)
|
|
|
|
- }
|
|
|
|
|
|
+ acceleration = acceleration || 0.1;
|
|
|
|
+ stime = stime || 10;
|
|
|
|
+ var x1 = 0,
|
|
|
|
+ y1 = 0,
|
|
|
|
+ x2 = 0,
|
|
|
|
+ y2 = 0,
|
|
|
|
+ x3 = 0,
|
|
|
|
+ y3 = 0;
|
|
|
|
+ if(document.documentElement) {
|
|
|
|
+ x1 = document.documentElement.scrollLeft || 0;
|
|
|
|
+ y1 = document.documentElement.scrollTop || 0
|
|
|
|
+ }
|
|
|
|
+ if(document.body) {
|
|
|
|
+ x2 = document.body.scrollLeft || 0;
|
|
|
|
+ y2 = document.body.scrollTop || 0
|
|
|
|
+ }
|
|
|
|
+ var x3 = window.scrollX || 0;
|
|
|
|
+ var y3 = window.scrollY || 0;
|
|
|
|
+ var x = Math.max(x1, Math.max(x2, x3));
|
|
|
|
+ var y = Math.max(y1, Math.max(y2, y3));
|
|
|
|
+ var speeding = 1 + acceleration;
|
|
|
|
+ window.scrollTo(Math.floor(x / speeding), Math.floor(y / speeding));
|
|
|
|
+ if(x > 0 || y > 0) {
|
|
|
|
+ var run = "gotoTop(" + acceleration + ", " + stime + ")";
|
|
|
|
+ window.setTimeout(run, stime)
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
function accDiv(arg1, arg2) {
|
|
function accDiv(arg1, arg2) {
|
|
- var t1 = 0,
|
|
|
|
- t2 = 0,
|
|
|
|
- r1, r2;
|
|
|
|
- try {
|
|
|
|
- t1 = arg1.toString().split(".")[1].length
|
|
|
|
- } catch(e) {}
|
|
|
|
- try {
|
|
|
|
- t2 = arg2.toString().split(".")[1].length
|
|
|
|
- } catch(e) {}
|
|
|
|
- with(Math) {
|
|
|
|
- r1 = Number(arg1.toString().replace(".", ""));
|
|
|
|
- r2 = Number(arg2.toString().replace(".", ""));
|
|
|
|
- return(r1 / r2) * pow(10, t2 - t1)
|
|
|
|
- }
|
|
|
|
|
|
+ var t1 = 0,
|
|
|
|
+ t2 = 0,
|
|
|
|
+ r1, r2;
|
|
|
|
+ try {
|
|
|
|
+ t1 = arg1.toString().split(".")[1].length
|
|
|
|
+ } catch(e) {}
|
|
|
|
+ try {
|
|
|
|
+ t2 = arg2.toString().split(".")[1].length
|
|
|
|
+ } catch(e) {}
|
|
|
|
+ with(Math) {
|
|
|
|
+ r1 = Number(arg1.toString().replace(".", ""));
|
|
|
|
+ r2 = Number(arg2.toString().replace(".", ""));
|
|
|
|
+ return(r1 / r2) * pow(10, t2 - t1)
|
|
|
|
+ }
|
|
};
|
|
};
|
|
Number.prototype.div = function(arg) {
|
|
Number.prototype.div = function(arg) {
|
|
- return accDiv(this, arg)
|
|
|
|
|
|
+ return accDiv(this, arg)
|
|
};
|
|
};
|
|
|
|
|
|
function accAdd(arg1, arg2) {
|
|
function accAdd(arg1, arg2) {
|
|
- var r1, r2, m, c;
|
|
|
|
- try {
|
|
|
|
- r1 = arg1.toString().split(".")[1].length
|
|
|
|
- } catch(e) {
|
|
|
|
- r1 = 0
|
|
|
|
- }
|
|
|
|
- try {
|
|
|
|
- r2 = arg2.toString().split(".")[1].length
|
|
|
|
- } catch(e) {
|
|
|
|
- r2 = 0
|
|
|
|
- }
|
|
|
|
- c = Math.abs(r1 - r2);
|
|
|
|
- m = Math.pow(10, Math.max(r1, r2));
|
|
|
|
- if(c > 0) {
|
|
|
|
- var cm = Math.pow(10, c);
|
|
|
|
- if(r1 > r2) {
|
|
|
|
- arg1 = Number(arg1.toString().replace(".", ""));
|
|
|
|
- arg2 = Number(arg2.toString().replace(".", "")) * cm
|
|
|
|
- } else {
|
|
|
|
- arg1 = Number(arg1.toString().replace(".", "")) * cm;
|
|
|
|
- arg2 = Number(arg2.toString().replace(".", ""))
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- arg1 = Number(arg1.toString().replace(".", ""));
|
|
|
|
- arg2 = Number(arg2.toString().replace(".", ""))
|
|
|
|
- }
|
|
|
|
- return(arg1 + arg2) / m
|
|
|
|
|
|
+ var r1, r2, m, c;
|
|
|
|
+ try {
|
|
|
|
+ r1 = arg1.toString().split(".")[1].length
|
|
|
|
+ } catch(e) {
|
|
|
|
+ r1 = 0
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ r2 = arg2.toString().split(".")[1].length
|
|
|
|
+ } catch(e) {
|
|
|
|
+ r2 = 0
|
|
|
|
+ }
|
|
|
|
+ c = Math.abs(r1 - r2);
|
|
|
|
+ m = Math.pow(10, Math.max(r1, r2));
|
|
|
|
+ if(c > 0) {
|
|
|
|
+ var cm = Math.pow(10, c);
|
|
|
|
+ if(r1 > r2) {
|
|
|
|
+ arg1 = Number(arg1.toString().replace(".", ""));
|
|
|
|
+ arg2 = Number(arg2.toString().replace(".", "")) * cm
|
|
|
|
+ } else {
|
|
|
|
+ arg1 = Number(arg1.toString().replace(".", "")) * cm;
|
|
|
|
+ arg2 = Number(arg2.toString().replace(".", ""))
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ arg1 = Number(arg1.toString().replace(".", ""));
|
|
|
|
+ arg2 = Number(arg2.toString().replace(".", ""))
|
|
|
|
+ }
|
|
|
|
+ return(arg1 + arg2) / m
|
|
};
|
|
};
|
|
Number.prototype.add = function(arg) {
|
|
Number.prototype.add = function(arg) {
|
|
- return accAdd(arg, this)
|
|
|
|
|
|
+ return accAdd(arg, this)
|
|
};
|
|
};
|
|
|
|
|
|
function accSub(arg1, arg2) {
|
|
function accSub(arg1, arg2) {
|
|
- var r1, r2, m, n;
|
|
|
|
- try {
|
|
|
|
- r1 = arg1.toString().split(".")[1].length
|
|
|
|
- } catch(e) {
|
|
|
|
- r1 = 0
|
|
|
|
- }
|
|
|
|
- try {
|
|
|
|
- r2 = arg2.toString().split(".")[1].length
|
|
|
|
- } catch(e) {
|
|
|
|
- r2 = 0
|
|
|
|
- }
|
|
|
|
- m = Math.pow(10, Math.max(r1, r2));
|
|
|
|
- n = (r1 >= r2) ? r1 : r2;
|
|
|
|
- return((arg1 * m - arg2 * m) / m).toFixed(n)
|
|
|
|
|
|
+ var r1, r2, m, n;
|
|
|
|
+ try {
|
|
|
|
+ r1 = arg1.toString().split(".")[1].length
|
|
|
|
+ } catch(e) {
|
|
|
|
+ r1 = 0
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ r2 = arg2.toString().split(".")[1].length
|
|
|
|
+ } catch(e) {
|
|
|
|
+ r2 = 0
|
|
|
|
+ }
|
|
|
|
+ m = Math.pow(10, Math.max(r1, r2));
|
|
|
|
+ n = (r1 >= r2) ? r1 : r2;
|
|
|
|
+ return((arg1 * m - arg2 * m) / m).toFixed(n)
|
|
};
|
|
};
|
|
Number.prototype.sub = function(arg) {
|
|
Number.prototype.sub = function(arg) {
|
|
- return accMul(arg, this)
|
|
|
|
|
|
+ return accMul(arg, this)
|
|
};
|
|
};
|
|
|
|
|
|
function accMul(arg1, arg2) {
|
|
function accMul(arg1, arg2) {
|
|
- var m = 0,
|
|
|
|
- s1 = arg1.toString(),
|
|
|
|
- s2 = arg2.toString();
|
|
|
|
- try {
|
|
|
|
- m += s1.split(".")[1].length
|
|
|
|
- } catch(e) {}
|
|
|
|
- try {
|
|
|
|
- m += s2.split(".")[1].length
|
|
|
|
- } catch(e) {}
|
|
|
|
- return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
|
|
|
|
|
|
+ var m = 0,
|
|
|
|
+ s1 = arg1.toString(),
|
|
|
|
+ s2 = arg2.toString();
|
|
|
|
+ try {
|
|
|
|
+ m += s1.split(".")[1].length
|
|
|
|
+ } catch(e) {}
|
|
|
|
+ try {
|
|
|
|
+ m += s2.split(".")[1].length
|
|
|
|
+ } catch(e) {}
|
|
|
|
+ return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
|
|
};
|
|
};
|
|
Number.prototype.mul = function(arg) {
|
|
Number.prototype.mul = function(arg) {
|
|
- return accMul(arg, this)
|
|
|
|
|
|
+ return accMul(arg, this)
|
|
};
|
|
};
|
|
|
|
|
|
function switchcolor(color) {
|
|
function switchcolor(color) {
|
|
- var pro_color = "";
|
|
|
|
- switch(color) {
|
|
|
|
- case 1:
|
|
|
|
- pro_color = "品蓝";
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- pro_color = "品黑";
|
|
|
|
- break;
|
|
|
|
- case 3:
|
|
|
|
- pro_color = "苹果绿";
|
|
|
|
- break;
|
|
|
|
- case 4:
|
|
|
|
- pro_color = "西瓜红";
|
|
|
|
- break;
|
|
|
|
- case 5:
|
|
|
|
- pro_color = "白色";
|
|
|
|
- break;
|
|
|
|
|
|
+ var pro_color = "";
|
|
|
|
+ switch(color) {
|
|
|
|
+ case 1:
|
|
|
|
+ pro_color = "品蓝";
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ pro_color = "品黑";
|
|
|
|
+ break;
|
|
|
|
+ case 3:
|
|
|
|
+ pro_color = "苹果绿";
|
|
|
|
+ break;
|
|
|
|
+ case 4:
|
|
|
|
+ pro_color = "西瓜红";
|
|
|
|
+ break;
|
|
|
|
+ case 5:
|
|
|
|
+ pro_color = "白色";
|
|
|
|
+ break;
|
|
case 36:
|
|
case 36:
|
|
pro_color = "银色";
|
|
pro_color = "银色";
|
|
break;
|
|
break;
|
|
case 37:
|
|
case 37:
|
|
pro_color = "磨砂";
|
|
pro_color = "磨砂";
|
|
break;
|
|
break;
|
|
- default:
|
|
|
|
- pro_color = "品蓝";
|
|
|
|
- break
|
|
|
|
- }
|
|
|
|
- return pro_color
|
|
|
|
|
|
+ default:
|
|
|
|
+ pro_color = "品蓝";
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ return pro_color
|
|
};
|
|
};
|
|
|
|
|
|
function switchColorImg(colorId){
|
|
function switchColorImg(colorId){
|
|
- var img='';
|
|
|
|
- switch (colorId){
|
|
|
|
- case 1:
|
|
|
|
- img='http://static.iamberry.com/watero/images/shop/cp-blue.png'
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- img='http://static.iamberry.com/watero/images/shop/cp-black.png'
|
|
|
|
- break;
|
|
|
|
- case 3:
|
|
|
|
- img='http://static.iamberry.com/watero/images/shop/cp-green.png'
|
|
|
|
- break;
|
|
|
|
- case 4:
|
|
|
|
- img='http://static.iamberry.com/watero/images/shop/cp-red.png'
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- img='http://static.iamberry.com/watero/images/shop/cp-blue.png'
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- return img;
|
|
|
|
|
|
+ var img='';
|
|
|
|
+ switch (colorId){
|
|
|
|
+ case 1:
|
|
|
|
+ img='//s.iamberry.com/watero/images/shop/cp-blue.png'
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ img='//s.iamberry.com/watero/images/shop/cp-black.png'
|
|
|
|
+ break;
|
|
|
|
+ case 3:
|
|
|
|
+ img='//s.iamberry.com/watero/images/shop/cp-green.png'
|
|
|
|
+ break;
|
|
|
|
+ case 4:
|
|
|
|
+ img='//s.iamberry.com/watero/images/shop/cp-red.png'
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ img='//s.iamberry.com/watero/images/shop/cp-blue.png'
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return img;
|
|
};
|
|
};
|
|
|
|
|
|
function getParam(paramName) {
|
|
function getParam(paramName) {
|
|
- paramValue = "", isFound = !1;
|
|
|
|
- if(this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
|
|
|
|
- arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
|
|
|
|
- while(i < arrSource.length && !isFound) {
|
|
|
|
- arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return paramValue == "" && (paramValue = null), paramValue
|
|
|
|
|
|
+ paramValue = "", isFound = !1;
|
|
|
|
+ if(this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
|
|
|
|
+ arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
|
|
|
|
+ while(i < arrSource.length && !isFound) {
|
|
|
|
+ arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return paramValue == "" && (paramValue = null), paramValue
|
|
};
|
|
};
|
|
|
|
|
|
function dc(objectid) {
|
|
function dc(objectid) {
|
|
- if(document.getElementById && document.getElementById(objectid)) {
|
|
|
|
- return document.getElementById(objectid)
|
|
|
|
- } else if(document.all && document.all(objectid)) {
|
|
|
|
- return document.all(objectid)
|
|
|
|
- } else if(document.layers && document.layers[objectid]) {
|
|
|
|
- return document.layers[objectid]
|
|
|
|
- } else {
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
|
|
+ if(document.getElementById && document.getElementById(objectid)) {
|
|
|
|
+ return document.getElementById(objectid)
|
|
|
|
+ } else if(document.all && document.all(objectid)) {
|
|
|
|
+ return document.all(objectid)
|
|
|
|
+ } else if(document.layers && document.layers[objectid]) {
|
|
|
|
+ return document.layers[objectid]
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
function formatDate(now) {
|
|
function formatDate(now) {
|
|
- now = new Date(now);
|
|
|
|
- var year = now.getFullYear();
|
|
|
|
- var month = now.getMonth() + 1;
|
|
|
|
- var date = now.getDate();
|
|
|
|
- var hour = now.getHours();
|
|
|
|
- var minute = now.getMinutes();
|
|
|
|
- var second = now.getSeconds();
|
|
|
|
- return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second
|
|
|
|
|
|
+ now = new Date(now);
|
|
|
|
+ var year = now.getFullYear();
|
|
|
|
+ var month = now.getMonth() + 1;
|
|
|
|
+ var date = now.getDate();
|
|
|
|
+ var hour = now.getHours();
|
|
|
|
+ var minute = now.getMinutes();
|
|
|
|
+ var second = now.getSeconds();
|
|
|
|
+ return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second
|
|
};
|
|
};
|
|
|
|
|
|
function springFestivalPop() {
|
|
function springFestivalPop() {
|
|
- if(getCookie("WATERO_WEB_") == null) {
|
|
|
|
- maskspringFestival.show();
|
|
|
|
- $(".mui-backdrop").append('<div style="position:relative;"><img src="http://static.iamberry.com/watero/images/shop/springFestival_2017.png" style="width:80%;margin:10% 10% auto 10%;"/><button type="button" id="close-springFestival" class="mui-btn my-btn-red" style="position: absolute;bottom: 5%;left: 50%;-webkit-transform: translateX(-50%)">我知道了</button></div>');
|
|
|
|
- mui('body').on('tap', '#close-springFestival', function(e) {
|
|
|
|
- setCookie();
|
|
|
|
- $(".mui-backdrop").hide();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ if(getCookie("WATERO_WEB_") == null) {
|
|
|
|
+ maskspringFestival.show();
|
|
|
|
+ $(".mui-backdrop").append('<div style="position:relative;"><img src="//s.iamberry.com/watero/images/shop/springFestival_2017.png" style="width:80%;margin:10% 10% auto 10%;"/><button type="button" id="close-springFestival" class="mui-btn my-btn-red" style="position: absolute;bottom: 5%;left: 50%;-webkit-transform: translateX(-50%)">我知道了</button></div>');
|
|
|
|
+ mui('body').on('tap', '#close-springFestival', function(e) {
|
|
|
|
+ setCookie();
|
|
|
|
+ $(".mui-backdrop").hide();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
function getCookie(name) {
|
|
function getCookie(name) {
|
|
- var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
|
|
|
- if(arr = document.cookie.match(reg))
|
|
|
|
- return unescape(arr[2]);
|
|
|
|
- else
|
|
|
|
- return null;
|
|
|
|
|
|
+ var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
|
|
|
+ if(arr = document.cookie.match(reg))
|
|
|
|
+ return unescape(arr[2]);
|
|
|
|
+ else
|
|
|
|
+ return null;
|
|
};
|
|
};
|
|
var maskspringFestival = mui.createMask(function() {
|
|
var maskspringFestival = mui.createMask(function() {
|
|
- return false;
|
|
|
|
|
|
+ return false;
|
|
}); //callback为用户点击蒙版时自动执行的回调;
|
|
}); //callback为用户点击蒙版时自动执行的回调;
|
|
function setCookie() {
|
|
function setCookie() {
|
|
- var Days = 30;
|
|
|
|
- var exp = new Date();
|
|
|
|
- exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
|
|
|
|
- document.cookie = "WATERO_WEB_=OK;Path=/;expires=" + exp.toGMTString();
|
|
|
|
|
|
+ var Days = 30;
|
|
|
|
+ var exp = new Date();
|
|
|
|
+ exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
|
|
|
|
+ document.cookie = "WATERO_WEB_=OK;Path=/;expires=" + exp.toGMTString();
|
|
};
|
|
};
|