|
@@ -0,0 +1,224 @@
|
|
|
+<html>
|
|
|
+ <head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
+ <title>soodo上朵</title>
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/main.css" />
|
|
|
+ <style>
|
|
|
+ body{background-image: url(images/20191212/back.jpg);background-repeat:repeat-y;}
|
|
|
+ .mui-content{background-image: url(images/20191212/back.jpg);background-repeat:repeat-y;}
|
|
|
+ .color_a {color: #000000;}
|
|
|
+ .color_a:hover {color: #000000;}
|
|
|
+ .ul_class>ul>li{float: left;display: block;}
|
|
|
+ .ul_class>ul>li>img{display: block;width: 100%;}
|
|
|
+ .ul_class{display: block;width: 100%;}
|
|
|
+ .ul_li_coupon{width: 34%;}
|
|
|
+ .ul_li_st{width: 44%;}
|
|
|
+ .font_js{padding-top: 20px;padding-bottom: 25px;color: #FFFFFF;text-align: center;font-size: 12px;}
|
|
|
+ </style>
|
|
|
+ </head>
|
|
|
+ <script>
|
|
|
+ var start = new Date(2019,12-1,9,00,00,00);
|
|
|
+ var end = new Date(2019,12-1,20,23,59,59);
|
|
|
+ var d = new Date().getTime(); //当前时间戳
|
|
|
+ if (!(d > start && d <= end)) {
|
|
|
+ location.href = "index.html?dates="+new Date().getTime();
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <body>
|
|
|
+ <footer class="mui-bar mui-bar-tab" id="footer-bar-tab">
|
|
|
+ <a class="mui-tab-item mui-active">
|
|
|
+ <span class="iconfont icon-shouye"></span>
|
|
|
+ <span class="mui-tab-label">首页</span>
|
|
|
+ </a>
|
|
|
+ <a class="mui-tab-item">
|
|
|
+ <span class="iconfont icon-liebiao"></span>
|
|
|
+ <span class="mui-tab-label">列表</span>
|
|
|
+ </a>
|
|
|
+ <a class="mui-tab-item">
|
|
|
+ <span class="iconfont icon-gouwuche"></span>
|
|
|
+ <span class="mui-tab-label">购物车</span>
|
|
|
+ </a>
|
|
|
+ <a class="mui-tab-item">
|
|
|
+ <span class="iconfont icon-huiyuan"></span>
|
|
|
+ <span class="mui-tab-label">会员</span>
|
|
|
+ </a>
|
|
|
+ </footer>
|
|
|
+ <div class="mui-content" style="overflow:hidden;">
|
|
|
+ <div><img src="images/20191212/index-ban.jpg" style="width: 100%;"></div>
|
|
|
+ <div><img src="images/20191212/lingquan.png" style="width: 100%;"></div>
|
|
|
+
|
|
|
+ <div class="ul_class">
|
|
|
+ <ul>
|
|
|
+ <li class="ul_li_coupon get_coupon" couponId="90000" style="margin-left: 10%;"><img src="images/20191212/40_coupon.png" style=""></li>
|
|
|
+ <li class="ul_li_coupon get_coupon" couponId="90001" style="margin-left: 10%;"><img src="images/20191212/90_coupon.png" style=""></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div><img src="images/20191212/baokuan.png" style="width: 100%;"></div>
|
|
|
+
|
|
|
+ <div class="go_to_pro" colorId="42"><img src="images/20191212/qinshe.png" style="width: 100%;"></div>
|
|
|
+
|
|
|
+ <div class="go_to_pro" colorId="100"><img src="images/20191212/lips.png" style="width: 100%;"></div>
|
|
|
+
|
|
|
+ <div><img src="images/20191212/peijian.png" style="width: 100%;"></div>
|
|
|
+
|
|
|
+ <div class="ul_class" style="width: 100%;overflow:hidden;">
|
|
|
+ <ul>
|
|
|
+ <li class="ul_li_st go_to_pro" colorId="311" style="margin-left: 4%;"><img src="images/20191212/dubang.png" style=""></li>
|
|
|
+ <li class="ul_li_st go_to_pro" colorId="310" style="margin-left: 3%;"><img src="images/20191212/rouyu.png" style=""></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="font_js">*活动最终解释权归上朵所有</div>
|
|
|
+
|
|
|
+ <div id="item3" class="mui-control-content">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="loading covers">
|
|
|
+ <div class="loading-bj"></div>
|
|
|
+ <p>正在加载...</p>
|
|
|
+ </div>
|
|
|
+ <!--春节放假通知-->
|
|
|
+ <div class="year-dalog"></div>
|
|
|
+ <script src="js/mui.min.js"></script>
|
|
|
+ <script src="js/jquery-2.1.1.min.js"></script>
|
|
|
+ <script src="js/swiper.min.js"></script>
|
|
|
+ <script src="js/main.js"></script>
|
|
|
+ <!-- <script src="js/wechat-utils-1.0.js"></script> -->
|
|
|
+ <script>
|
|
|
+ //ready事件
|
|
|
+ mui.ready(function() {
|
|
|
+
|
|
|
+ //刷新用户信息
|
|
|
+ refreshUserInfo();
|
|
|
+ //设置分享
|
|
|
+ fenxiang();
|
|
|
+ $(".loading").hide().css("opacity", "0"); //隐藏(正在加载...)
|
|
|
+ });
|
|
|
+
|
|
|
+ mui('body').on('tap', '.go_to_pro', function() {
|
|
|
+ var colorId = $(this).attr("colorId");
|
|
|
+ if(isEmpty(colorId)){
|
|
|
+ mui.openWindow({
|
|
|
+ url: 'pro-details.html?colorId='+colorId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ mui('body').on('tap', '.get_coupon', function() {
|
|
|
+ var couponId = $(this).attr("couponId");
|
|
|
+ if(isEmpty(couponId)){
|
|
|
+ $.ajax(base_path + '/wechat/coupon/re_coupon?dates=' + new Date().getTime(), {
|
|
|
+ data: {
|
|
|
+ couponId : couponId //优惠券类型id
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ xhrFields: {
|
|
|
+ withCredentials: true
|
|
|
+ },
|
|
|
+ crossDomain: true,
|
|
|
+ type: 'get',
|
|
|
+ timeout: 15000,
|
|
|
+ success: function(dt) {
|
|
|
+ if(dt.isRedirect) {//先判断isRedirect,然后跳转redirectURL
|
|
|
+ location.href = dt.redirectURL;
|
|
|
+ } else {
|
|
|
+ if(dt.status) {//判断接口返回状态status
|
|
|
+ mui.toast('领取成功');
|
|
|
+ // mui.alert("领取成功!", function() {
|
|
|
+ // location.href = "index.html?dates=" + new Date().getTime(); // 前往首页
|
|
|
+ // });
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ if(dt.resultCode == "500" || dt.resultCode == "502" || dt.resultCode == "503"){
|
|
|
+ mui.toast(dt.message);
|
|
|
+ // mui.alert(dt.message, function() {
|
|
|
+ // //刷新
|
|
|
+ // WeixinJSBridge.call('closeWindow');
|
|
|
+ // wx.closeWindow();
|
|
|
+ // });
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ mui.toast("领取失败!");
|
|
|
+ // var myjson = JSON.stringify(dt);
|
|
|
+ // mui.alert("领取失败!" + myjson);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ console.log(xhr);
|
|
|
+ mui.alert("领取优惠券失败!网络错误");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //更新用户信息
|
|
|
+ function refreshUserInfo(){
|
|
|
+ var oldrefreshUserInfo = null;
|
|
|
+ if (!window.localStorage) {
|
|
|
+ console.log("您的浏览器不支持localStorage");
|
|
|
+ } else {
|
|
|
+ oldrefreshUserInfo = localStorage.getItem('refreshUserInfo');
|
|
|
+ }
|
|
|
+ var nowdate = new Date();
|
|
|
+ var nowrefreshUserDate = nowdate.format("yyyy-MM-dd");
|
|
|
+ if(nowrefreshUserDate != oldrefreshUserInfo){
|
|
|
+ $.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 {
|
|
|
+ if (!window.localStorage) {
|
|
|
+ console.log("您的浏览器不支持localStorage");
|
|
|
+ } else {
|
|
|
+ //自定义json数据
|
|
|
+ var date = new Date();
|
|
|
+ var refreshUserDate = date.Format("yyyy-MM-dd");
|
|
|
+ localStorage.setItem('refreshUserDate', refreshUserDate);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ console.log(xhr)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //分享
|
|
|
+ function fenxiang(){
|
|
|
+ var src = location.href;
|
|
|
+ src = "https://s.iamberry.com/soodo/wechat/index.html";
|
|
|
+ window.wxFriend = {
|
|
|
+ "appId": "",
|
|
|
+ "imgUrl": 'https://s.iamberry.com/soodo/wechat/images/product_fenxiang.jpg',
|
|
|
+ "link": src,
|
|
|
+ "desc": '让你的齿龄停留在18岁',
|
|
|
+ "title": 'soodo上朵',
|
|
|
+ "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
|
|
|
+ "shareTimeSuccess": "分享成功",
|
|
|
+ "shareTimeCancel": "已取消分享",
|
|
|
+ "shareAppSuccess": "分享成功!",
|
|
|
+ "shareAppCancel": "已取消分享"
|
|
|
+ };
|
|
|
+ getConfig();
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ </body>
|
|
|
+</html>
|