|
@@ -1,409 +1,523 @@
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
-<head>
|
|
|
- <meta charset="UTF-8">
|
|
|
- <title></title>
|
|
|
- <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">
|
|
|
- <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
|
|
|
- <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
|
|
|
- <link rel="stylesheet" type="text/css" href="css/style.css" />
|
|
|
- <link rel="stylesheet" type="text/css" href="css/vip_center.css" />
|
|
|
- <script>
|
|
|
- // 屏蔽分享
|
|
|
- window.hiddenAllWechatMenu = true;
|
|
|
- </script>
|
|
|
-</head>
|
|
|
-<body style="background: #fff;">
|
|
|
-<div class="loading-bg">
|
|
|
- <div class="mui-loading">
|
|
|
- <div class="mui-spinner">
|
|
|
- </div>
|
|
|
- 加载中...
|
|
|
- </div>
|
|
|
-</div>
|
|
|
-<nav class="mui-bar mui-bar-tab" id="footer-bar">
|
|
|
- <a class="mui-tab-item" >
|
|
|
- <div class="iconfont icon-shouye"></div>
|
|
|
- <span class="mui-tab-label">首页</span>
|
|
|
- </a>
|
|
|
- <a class="mui-tab-item">
|
|
|
- <div class="iconfont icon-gouwuche"><span class="mui-badge">0</span></div>
|
|
|
- <span class="mui-tab-label">购物车</span>
|
|
|
- </a>
|
|
|
- <a class="mui-tab-item">
|
|
|
- <div class="iconfont icon-dingdan"></div>
|
|
|
- <span class="mui-tab-label">订单</span>
|
|
|
- </a>
|
|
|
- <a class="mui-tab-item mui-active">
|
|
|
- <div class="iconfont icon-wode"></div>
|
|
|
- <span class="mui-tab-label">我的</span>
|
|
|
- </a>
|
|
|
-</nav>
|
|
|
-<div class="mui-content" style="background: #fff;">
|
|
|
- <div class="vip-tt">
|
|
|
- <!-- <img src="/iamberry/common/shop/images/member_photo-bg_2.png"> -->
|
|
|
- <div class="tx bg-orange" id="headDiv">
|
|
|
- <img src="images/logo_head.png" id="userHead">
|
|
|
- </div>
|
|
|
- <div class="nikname">
|
|
|
- <div>
|
|
|
- <span id="userNickname">水时代</span>
|
|
|
- </div>
|
|
|
- <div >
|
|
|
- <span id="vipName">普通用户</span>
|
|
|
- <!--<span class="go_daili_2wm" id="2WM" style="display:none">立即分享二维码 ></span>-->
|
|
|
- <span class="see-rights">查看权益<span class="mui-icon mui-icon-arrowright" style="font-size: 18px;"></span></span>
|
|
|
+
|
|
|
+ <head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <title>我的</title>
|
|
|
+ <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">
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/iconfont.css" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/style.css" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/vip_center.css" />
|
|
|
+ <script>
|
|
|
+ // 屏蔽分享
|
|
|
+ window.hiddenAllWechatMenu = true;
|
|
|
+ </script>
|
|
|
+ </head>
|
|
|
+
|
|
|
+ <body>
|
|
|
+ <div class="loading-bg">
|
|
|
+ <div class="mui-loading">
|
|
|
+ <div class="mui-spinner">
|
|
|
+ </div>
|
|
|
+ 加载中...
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="vip-show">
|
|
|
- 凡购买滤芯套装,立减100元/套,结算时系统自动减免
|
|
|
- </div>
|
|
|
- <br />
|
|
|
- <ul class="mui-table-view my-view-order">
|
|
|
- <li class="mui-table-view-cell">
|
|
|
- <a class="mui-navigate-right">
|
|
|
- <span class="mui-badge">查看全部</span>
|
|
|
- 我的订单
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <div style="padding:0 0 20px 0;background: #fff;">
|
|
|
- <div id="menu-order" class="mui-segmented-control">
|
|
|
- <a class="mui-control-item go_pay_count">
|
|
|
- <div class="iconfont icon-daifukuan"></div>
|
|
|
- 待付款
|
|
|
+ <nav class="mui-bar mui-bar-tab" id="footer-bar">
|
|
|
+ <a class="mui-tab-item">
|
|
|
+ <div class="iconfont icon-shouye"></div>
|
|
|
+ <span class="mui-tab-label">首页</span>
|
|
|
</a>
|
|
|
- <a class="mui-control-item go_pay_ping">
|
|
|
- <div class="iconfont icon-pindan"></div>
|
|
|
- 拼单中
|
|
|
+ <a class="mui-tab-item">
|
|
|
+ <div class="iconfont icon-gouwuche"><span class="mui-badge">0</span></div>
|
|
|
+ <span class="mui-tab-label">购物车</span>
|
|
|
</a>
|
|
|
- <a class="mui-control-item go_deliver_count">
|
|
|
- <div class="iconfont icon-daifahuo"></div>
|
|
|
- 待发货
|
|
|
+ <a class="mui-tab-item">
|
|
|
+ <div class="iconfont icon-dingdan"></div>
|
|
|
+ <span class="mui-tab-label">订单</span>
|
|
|
</a>
|
|
|
- <a class="mui-control-item go_delivered_count">
|
|
|
- <div class="iconfont icon-yifahuo"></div>
|
|
|
- 已发货
|
|
|
+ <a class="mui-tab-item mui-active">
|
|
|
+ <div class="iconfont icon-wode"></div>
|
|
|
+ <span class="mui-tab-label">我的</span>
|
|
|
</a>
|
|
|
- <!--<a class="mui-control-item go_all_count">
|
|
|
- <div class="iconfont icon-alldingdan"></div>
|
|
|
- 全部订单
|
|
|
- </a>-->
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <ul class="mui-table-view mui-table-view-striped mui-table-view-condensed my-center-no" id="center-menu" >
|
|
|
- <li class="mui-table-view-cell" href="coupon_bag.html?tabindex=10">
|
|
|
- <div class="mui-table">
|
|
|
- <div class="mui-table-cell mui-col-xs-5 table-middle">
|
|
|
- 我的券包
|
|
|
- </div>
|
|
|
- <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
- <span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+ </nav>
|
|
|
+ <div class="mui-content">
|
|
|
+ <div class="center-header">
|
|
|
+ <div class="wecat-head">
|
|
|
+ <img style="display: block;width: 100%; " src="images/vip-center-bg.jpg" />
|
|
|
+ <div class="user-head">
|
|
|
+ <img id="headDiv" class="img_head" src="images/tx-1.jpg" />
|
|
|
+ </div>
|
|
|
+ <div id="userNickname">微信用户</div>
|
|
|
+ <!--<div class="mui-table" style="padding-top: 15px;">
|
|
|
+ <div class="mui-table-cell amount-div">
|
|
|
+ <h5 style="font-size: 14px;padding-bottom: 10px;">待入帐</h5>
|
|
|
+ <div class="cl-red" style="font-size: 20px;">¥<span id="await-amount">0</span></div>
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell amount-div">
|
|
|
+ <h5 style="font-size: 14px;padding-bottom: 10px;">可提现</h5>
|
|
|
+ <div class="cl-red" style="font-size: 20px;">¥<span id="uables-amount">0</span></div>
|
|
|
+ <div style="width: 1px;height: 30px;background: #ccc;-webkit-transform: scaleX(.3);position: absolute;right: 0;bottom: 5px;"></div>
|
|
|
+ </div>
|
|
|
+ </div>-->
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell" href="faq.html">
|
|
|
- <div class="mui-table">
|
|
|
- <div class="mui-table-cell mui-col-xs-5">
|
|
|
- 常见问答
|
|
|
- </div>
|
|
|
- <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
- <span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+ <div class="bottom-vip">
|
|
|
+ <div class="mui-table">
|
|
|
+ <div class="mui-table-cell">
|
|
|
+ <span class="vip-title">WaterO</span> 会员
|
|
|
+ <div class="vip-line"></div>
|
|
|
+ <img class="vip-arrow" src="images/v.png" />
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell join-vip mui-text-right">
|
|
|
+ <span class="vip-l">
|
|
|
+ <span class="vip-note" type="1">成为会员</span>
|
|
|
+ <i class="mui-icon mui-icon-arrowright" style="font-size: 17px;margin-left: 5px;"></i>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell" href="after_service_watero.html">
|
|
|
- <div class="mui-table">
|
|
|
- <div class="mui-table-cell mui-col-xs-5">
|
|
|
- 售后服务
|
|
|
+ <div class="center-content">
|
|
|
+ <div class="mui-table mui-text-center my-count">
|
|
|
+ <div class="mui-table-cell go-integral-center">
|
|
|
+ <strong class="user-integeal">0</strong>
|
|
|
+ <p>积分</p>
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell go-coupon-bag" >
|
|
|
+ <strong class="user-count">0</strong>
|
|
|
+ <p>券包</p>
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell go-coupon-bag-2">
|
|
|
+ <strong class="user-vip-count">0</strong>
|
|
|
+ <p>会员专享</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
- <span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+
|
|
|
+ <div class="order-box">
|
|
|
+ <ul class="mui-table-view">
|
|
|
+ <li class="mui-table-view-cell" style="padding: 11px 15px 5px 15px;">
|
|
|
+ 我的订单
|
|
|
+ <!--<a class="mui-navigate-right">
|
|
|
+ <span class="mui-badge">查看全部</span> 我的订单
|
|
|
+ </a>-->
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div>
|
|
|
+ <div id="menu-order" class="mui-segmented-control">
|
|
|
+ <a class="mui-control-item go_pay_count">
|
|
|
+ <div class="iconfont icon-daifukuan"></div>
|
|
|
+ 待付款
|
|
|
+ </a>
|
|
|
+ <!--<a class="mui-control-item go_pay_ping">
|
|
|
+ <div class="iconfont icon-pindan"></div>
|
|
|
+ 拼单中
|
|
|
+ </a>-->
|
|
|
+ <a class="mui-control-item go_deliver_count">
|
|
|
+ <div class="iconfont icon-daifahuo"></div>
|
|
|
+ 待发货
|
|
|
+ </a>
|
|
|
+ <a class="mui-control-item go_delivered_count">
|
|
|
+ <div class="iconfont icon-yifahuo"></div>
|
|
|
+ 已发货
|
|
|
+ </a>
|
|
|
+ <a class="mui-control-item go_all_count">
|
|
|
+ <div class="iconfont icon-dingdan1"></div>
|
|
|
+ 全部
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <ul class="mui-table-view mui-table-view-striped mui-table-view-condensed my-center-no" id="center-menu">
|
|
|
+ <li class="mui-table-view-cell" href="vip-info.html">
|
|
|
+ <div class="mui-table">
|
|
|
+ <div class="mui-table-cell mui-col-xs-5 table-middle">
|
|
|
+ 个人信息
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
+ <span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="mui-table-view-cell" href="faq.html">
|
|
|
+ <div class="mui-table">
|
|
|
+ <div class="mui-table-cell mui-col-xs-5">
|
|
|
+ 常见问答
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
+ <span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="mui-table-view-cell" href="after_service_watero.html">
|
|
|
+ <div class="mui-table">
|
|
|
+ <div class="mui-table-cell mui-col-xs-5">
|
|
|
+ 售后服务
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
+ <span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="mui-table-view-cell" href="tel:400-8006692">
|
|
|
+ <div class="mui-table">
|
|
|
+ <div class="mui-table-cell mui-col-xs-5">
|
|
|
+ 客服电话
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
+ <a class="tel" href="tel:400-8006692">400-8006692</a> <span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <!--<li class="mui-table-view-cell" href="coupon_dec.html" id="coupon-sys">
|
|
|
+ <div class="mui-table">
|
|
|
+ <div class="mui-table-cell mui-col-xs-5">
|
|
|
+ 滤芯兑换券
|
|
|
+ </div>
|
|
|
+ <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
+ <span class="mui-h5" style="position: absolute;width: 100px;right: 25px;top: 3px;">使用说明</span><span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>-->
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell" href="tel:400-8006692">
|
|
|
- <div class="mui-table">
|
|
|
- <div class="mui-table-cell mui-col-xs-5">
|
|
|
- 客服电话
|
|
|
- </div>
|
|
|
- <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
- <!--<span class="mui-h5" style="position: absolute;width: 100px;right: 25px;top: 2px;">400-8006692</span>-->
|
|
|
- <span class="mui-icon mui-icon-arrowright"></span>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="dalog">
|
|
|
+ <div>
|
|
|
+ <div class="tp-box">
|
|
|
+ <ul>
|
|
|
+ <li><strong>积分也能当钱花</strong></li>
|
|
|
+ <li>
|
|
|
+ <ol>
|
|
|
+ <li>·注册会员即可获得100积分</li>
|
|
|
+ <li>·会员专享折扣</li>
|
|
|
+ <li>·购买产品,享受积分抵扣现金优惠</li>
|
|
|
+ <li>·积分换购特惠商品权益</li>
|
|
|
+ <li>·会员专享生日大礼包</li>
|
|
|
+ </ol>
|
|
|
+ </li>
|
|
|
+ <li><button type="button" class="mui-btn btn-see-integral">成为会员</button></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+ <div class="mui-text-center">
|
|
|
+ <i class="iconfont icon-guanbi"></i>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell" href="coupon_dec.html" id="coupon-sys" style="display: none;">
|
|
|
- <div class="mui-table">
|
|
|
- <div class="mui-table-cell mui-col-xs-5">
|
|
|
- 滤芯兑换券
|
|
|
- </div>
|
|
|
- <div class="mui-table-cell mui-col-xs-5 mui-text-right">
|
|
|
- <span class="mui-h5" style="position: absolute;width: 100px;right: 25px;top: 3px;">使用说明</span><span class="mui-icon mui-icon-arrowright"></span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
-</div>
|
|
|
-<script src="js/mui.min.js"></script>
|
|
|
-<script src="js/jquery-2.1.1.min.js"></script>
|
|
|
-<script src="js/main.js"></script>
|
|
|
-<script src="js/page/wechat-utils-1.0.js"></script>
|
|
|
-<!--<script src="js/shop/vip_center.js?v=2017040701"></script>-->
|
|
|
-<script>
|
|
|
- mui.ready(function() {
|
|
|
- marquee_Show();
|
|
|
- getCartNum();
|
|
|
- $.ajax(base_path + '/agent/member?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 {
|
|
|
- var data = dt.data;
|
|
|
- if(dt.status) {
|
|
|
- if(data.userHead != null && typeof(data.userHead) != "undefined" && data.userHead != '') {
|
|
|
- var imgObj = $("<img src='" + data.userHead + "?" + new Date().getTime() + "'/>");
|
|
|
- $("#headDiv").empty().append(imgObj)
|
|
|
- }
|
|
|
- if(data.userNickname != null && typeof(data.userNickname) != "undefined" && data.userNickname != '') {
|
|
|
- $("#userNickname").html(decodeURI(data.userNickname))
|
|
|
- }
|
|
|
- var userNickname = $("#userNickname").html();
|
|
|
- if(data.userIsVip == 2) {
|
|
|
- //$("#2WM").show();
|
|
|
- if(userNickname != "") {
|
|
|
- $("#userNickname").html(userNickname )
|
|
|
- $("#vipName").html('<img style="width: 12px;" src="images/s-vip.png" /><span class="mui-h6">VIP用户</span>');
|
|
|
- }
|
|
|
- $(".vip-show,#coupon-sys").show();
|
|
|
- } else {
|
|
|
- if(userNickname != "") {
|
|
|
- $("#userNickname").html(userNickname)
|
|
|
- $("#vipName").html('<span class="mui-h6">普通用户</span>');
|
|
|
- $(".see-rights").hide();
|
|
|
- }
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- type: 'post',
|
|
|
- url: base_path + '/probationOrder/membersProbationOrder',
|
|
|
- data: {},
|
|
|
- dataType: 'json',
|
|
|
- timeout: 15000,
|
|
|
- xhrFields: {
|
|
|
- withCredentials: true
|
|
|
- },
|
|
|
- crossDomain: true,
|
|
|
- success: function(dts) {
|
|
|
- if (dt.isRedirect) {
|
|
|
- location.href = dt.redirectURL;
|
|
|
- } else {
|
|
|
- if(dts.status) {
|
|
|
- var str = '';
|
|
|
- if(dts.data.probationOrderDtoList.length == 0) {
|
|
|
- $("#try_order_list").hide()
|
|
|
- }
|
|
|
- mui(dts.data.probationOrderDtoList).each(function(index) {
|
|
|
- switch(this.probationStatus) {
|
|
|
- case 1:
|
|
|
- str = "待派送";
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- str = "派送中";
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- str = "待支付";
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- str = "暂停试用";
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- str = "支付完成";
|
|
|
- break;
|
|
|
- default:
|
|
|
- str = "订单关闭";
|
|
|
- break
|
|
|
- }
|
|
|
- var str1 = '',
|
|
|
- str2 = '';
|
|
|
- if(str == "待支付") {
|
|
|
- str1 = '<a data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="正在支付" class="mui-btn try-btn-pay mui-pull-right" style="margin-right: 12px;" proid="' + this.probationOrderid + '">立即支付</a>';
|
|
|
- str2 = '<div>试用剩余时间:<span id="time_out' + (index + 1) + '"></span></div>'
|
|
|
- }
|
|
|
- $("#try_order_list").append('<li class="mui-table-view-cell mui-media"><a class="go_try_order" proid="' + this.probationOrderid + '" style="margin-left: -20px;"><span class="mui-media-object mui-pull-left wh-80"><img src="' + this.productIntroduceImg + '"></span><div class="mui-media-body center-middle"><div>' + str + '</div><div>订单号:' + this.probationOrderid + '</div>' + str2 + '</div></a><div class="btn-box">' + str1 + '</div></li>');
|
|
|
- if(str == "待支付") {
|
|
|
- addTimer('time_out' + (index + 1), this.probationRemainingTime / 1000)
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- mui.alert(dts.data.message)
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(xhr, type, errorThrown) {
|
|
|
- console.log(xhr);
|
|
|
- mui.alert("请检查网络或刷新页面重试!")
|
|
|
- }
|
|
|
- });
|
|
|
- document.querySelector('.loading-bg').style.display = 'none'
|
|
|
- } else {
|
|
|
- var btnArray = ['否', '是'];
|
|
|
- mui.confirm(dt.message, '提示', btnArray, function(e) {
|
|
|
- if(e.index == 1) {
|
|
|
- location.reload(true)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(xhr, type, errorThrown) {
|
|
|
- console.log(xhr)
|
|
|
- }
|
|
|
- });
|
|
|
- if(marquee != '') {
|
|
|
- $('body').append('<div class="marquee-show"><div></div></div>')
|
|
|
- }
|
|
|
- });
|
|
|
+ <script src="js/mui.min.js"></script>
|
|
|
+ <script src="js/jquery-2.1.1.min.js"></script>
|
|
|
+ <script src="js/main.js"></script>
|
|
|
+ <script src="js/page/wechat-utils-1.0.js"></script>
|
|
|
+ <script>
|
|
|
+ mui.ready(function() {
|
|
|
+ marquee_Show();
|
|
|
+ getCartNum();
|
|
|
+ $.ajax(base_path + '/agent/member?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 {
|
|
|
+ var data = dt.data;
|
|
|
+ if(dt.status) {
|
|
|
+ if(data.userHead != null && typeof(data.userHead) != "undefined" && data.userHead != '') {
|
|
|
+ // var imgObj = $("<img src='" + data.userHead + "?" + new Date().getTime() + "'/>");
|
|
|
+ // $("#headDiv").empty().append(imgObj)
|
|
|
+ $(".img_head").attr("src",data.userHead)
|
|
|
+ }
|
|
|
+ if(data.userNickname != null && typeof(data.userNickname) != "undefined" && data.userNickname != '') {
|
|
|
+ $("#userNickname").html(decodeURI(data.userNickname))
|
|
|
+ }
|
|
|
+
|
|
|
+ $(".user-integeal").text(data.userSurplusIntegral);
|
|
|
+ $(".user-count").text(data.couponCount);
|
|
|
+ if(data.couponVipCount == null || data.couponVipCount == ""){
|
|
|
+ $(".user-vip-count").text(1);
|
|
|
+ }else{
|
|
|
+ $(".user-vip-count").text(data.couponVipCount+1);
|
|
|
+ }
|
|
|
+
|
|
|
+ // var userNickname = $("#userNickname").html();
|
|
|
+ // if(data.userIsVip == 2) {
|
|
|
+ // //$("#2WM").show();
|
|
|
+ // if(userNickname != "") {
|
|
|
+ // $("#userNickname").html(userNickname)
|
|
|
+ // $("#vipName").html('<img style="width: 12px;" src="images/s-vip.png" /><span class="mui-h6">VIP用户</span>');
|
|
|
+ // }
|
|
|
+ // $(".vip-show,#coupon-sys").show();
|
|
|
+ // } else {
|
|
|
+ // if(userNickname != "") {
|
|
|
+ // $("#userNickname").html(userNickname)
|
|
|
+ // $("#vipName").html('<span class="mui-h6">普通用户</span>');
|
|
|
+ // $(".see-rights").hide();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if(data.userIsVip == 1){ //是否为vip :1:非vip 2:vip
|
|
|
+ $('.vip-note').text('注册会员')
|
|
|
+ $(".vip-note").attr('type',1); //1:成为会员 2:完善信息 3:会员权益
|
|
|
+ }else{
|
|
|
+ if(data.userArrange == 1){//是否已完善信息 1:已完善 2:未完善
|
|
|
+ $('.vip-note').text('会员权益')
|
|
|
+ $(".vip-note").attr('type',3);
|
|
|
+ }else{
|
|
|
+ $('.vip-note').text('完善信息')
|
|
|
+ $(".vip-note").attr('type',2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: base_path + '/probationOrder/membersProbationOrder',
|
|
|
+ data: {},
|
|
|
+ dataType: 'json',
|
|
|
+ timeout: 15000,
|
|
|
+ xhrFields: {
|
|
|
+ withCredentials: true
|
|
|
+ },
|
|
|
+ crossDomain: true,
|
|
|
+ success: function(dts) {
|
|
|
+ if(dt.isRedirect) {
|
|
|
+ location.href = dt.redirectURL;
|
|
|
+ } else {
|
|
|
+ if(dts.status) {
|
|
|
+ var str = '';
|
|
|
+ if(dts.data.probationOrderDtoList.length == 0) {
|
|
|
+ $("#try_order_list").hide()
|
|
|
+ }
|
|
|
+ mui(dts.data.probationOrderDtoList).each(function(index) {
|
|
|
+ switch(this.probationStatus) {
|
|
|
+ case 1:
|
|
|
+ str = "待派送";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ str = "派送中";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ str = "待支付";
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ str = "暂停试用";
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ str = "支付完成";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ str = "订单关闭";
|
|
|
+ break
|
|
|
+ }
|
|
|
+ var str1 = '',
|
|
|
+ str2 = '';
|
|
|
+ if(str == "待支付") {
|
|
|
+ str1 = '<a data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="正在支付" class="mui-btn try-btn-pay mui-pull-right" style="margin-right: 12px;" proid="' + this.probationOrderid + '">立即支付</a>';
|
|
|
+ str2 = '<div>试用剩余时间:<span id="time_out' + (index + 1) + '"></span></div>'
|
|
|
+ }
|
|
|
+ $("#try_order_list").append('<li class="mui-table-view-cell mui-media"><a class="go_try_order" proid="' + this.probationOrderid + '" style="margin-left: -20px;"><span class="mui-media-object mui-pull-left wh-80"><img src="' + this.productIntroduceImg + '"></span><div class="mui-media-body center-middle"><div>' + str + '</div><div>订单号:' + this.probationOrderid + '</div>' + str2 + '</div></a><div class="btn-box">' + str1 + '</div></li>');
|
|
|
+ if(str == "待支付") {
|
|
|
+ addTimer('time_out' + (index + 1), this.probationRemainingTime / 1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ mui.alert(dts.data.message)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ console.log(xhr);
|
|
|
+ mui.alert("请检查网络或刷新页面重试!")
|
|
|
+ }
|
|
|
+ });
|
|
|
+ document.querySelector('.loading-bg').style.display = 'none'
|
|
|
+ } else {
|
|
|
+ var btnArray = ['否', '是'];
|
|
|
+ mui.confirm(dt.message, '提示', btnArray, function(e) {
|
|
|
+ if(e.index == 1) {
|
|
|
+ location.reload(true)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ console.log(xhr)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(marquee != '') {
|
|
|
+ $('body').append('<div class="marquee-show"><div></div></div>')
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- var isPay = true;
|
|
|
- mui('body').on('tap', '.try-btn-pay', function() {
|
|
|
- var th = this;
|
|
|
- if(isPay) {
|
|
|
- mui(this).button('loading');
|
|
|
- isPay = false;
|
|
|
- $.ajax({
|
|
|
- type: 'post',
|
|
|
- url: base_path + '/probation/pay',
|
|
|
- data: {
|
|
|
- "orderId": th.getAttribute("proid")
|
|
|
- },
|
|
|
- dataType: 'json',
|
|
|
- timeout: 15000,
|
|
|
- xhrFields: {
|
|
|
- withCredentials: true
|
|
|
- },
|
|
|
- crossDomain: true,
|
|
|
- success: function(dt) {
|
|
|
- if (dt.isRedirect) {
|
|
|
- location.href = dt.redirectURL;
|
|
|
- } else {
|
|
|
- if(dt.status) {
|
|
|
- var obj = JSON.parse("{" + dt.data.info + "}");
|
|
|
- WeixinJSBridge.invoke('getBrandWCPayRequest', obj, function(res) {
|
|
|
- if(res.err_msg == 'get_brand_wcpay_request:ok') {
|
|
|
- $.ajax({
|
|
|
- type: 'post',
|
|
|
- url: base_path + '/probation/check_probation_pay_success',
|
|
|
- data: {
|
|
|
- "orderId": th.getAttribute("proid")
|
|
|
- },
|
|
|
- dataType: 'json',
|
|
|
- timeout: 15000,
|
|
|
- xhrFields: {
|
|
|
- withCredentials: true
|
|
|
- },
|
|
|
- crossDomain: true,
|
|
|
- success: function(data) {
|
|
|
- if (dt.isRedirect) {
|
|
|
- location.href = dt.redirectURL;
|
|
|
- } else {
|
|
|
- if(data.status) {
|
|
|
- if(data.data == 5) {
|
|
|
- mui.alert("支付成功", '', function() {
|
|
|
- mui.openWindow({
|
|
|
- url: base_path + '/probation/try_order?orderId=' + th.getAttribute("proid")
|
|
|
- })
|
|
|
- })
|
|
|
- } else {
|
|
|
- mui.alert(data.message, '', function() {
|
|
|
- mui(th).button('reset')
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- mui(th).button('reset');
|
|
|
- mui.alert(data.message)
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(xhr, type, errorThrown) {
|
|
|
- isPay = true;
|
|
|
- console.log(xhr);
|
|
|
- mui(th).button('reset');
|
|
|
- mui.alert("请检查网络或刷新页面重试!")
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- isPay = true;
|
|
|
- mui(th).button('reset');
|
|
|
- mui.alert("对不起,支付失败!请稍后重试!")
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- mui(th).button('reset');
|
|
|
- mui.alert(dt.message)
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(xhr, type, errorThrown) {
|
|
|
- isPay = true;
|
|
|
- console.log(xhr);
|
|
|
- mui(th).button('reset');
|
|
|
- mui.alert("请检查网络或刷新页面重试!")
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- mui.alert("正在请求支付中~~请稍后!");
|
|
|
- return
|
|
|
- }
|
|
|
- });
|
|
|
- var addTimer = function() {
|
|
|
- var list = [],
|
|
|
- interval;
|
|
|
- return function(id, time) {
|
|
|
- if(!interval) {
|
|
|
- interval = setInterval(go, 1000)
|
|
|
- }
|
|
|
- list.push({
|
|
|
- ele: document.getElementById(id),
|
|
|
- time: time
|
|
|
- })
|
|
|
- };
|
|
|
+ var isPay = true;
|
|
|
+ mui('body').on('tap', '.try-btn-pay', function() {
|
|
|
+ var th = this;
|
|
|
+ if(isPay) {
|
|
|
+ mui(this).button('loading');
|
|
|
+ isPay = false;
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: base_path + '/probation/pay',
|
|
|
+ data: {
|
|
|
+ "orderId": th.getAttribute("proid")
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ timeout: 15000,
|
|
|
+ xhrFields: {
|
|
|
+ withCredentials: true
|
|
|
+ },
|
|
|
+ crossDomain: true,
|
|
|
+ success: function(dt) {
|
|
|
+ if(dt.isRedirect) {
|
|
|
+ location.href = dt.redirectURL;
|
|
|
+ } else {
|
|
|
+ if(dt.status) {
|
|
|
+ var obj = JSON.parse("{" + dt.data.info + "}");
|
|
|
+ WeixinJSBridge.invoke('getBrandWCPayRequest', obj, function(res) {
|
|
|
+ if(res.err_msg == 'get_brand_wcpay_request:ok') {
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: base_path + '/probation/check_probation_pay_success',
|
|
|
+ data: {
|
|
|
+ "orderId": th.getAttribute("proid")
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ timeout: 15000,
|
|
|
+ xhrFields: {
|
|
|
+ withCredentials: true
|
|
|
+ },
|
|
|
+ crossDomain: true,
|
|
|
+ success: function(data) {
|
|
|
+ if(dt.isRedirect) {
|
|
|
+ location.href = dt.redirectURL;
|
|
|
+ } else {
|
|
|
+ if(data.status) {
|
|
|
+ if(data.data == 5) {
|
|
|
+ mui.alert("支付成功", '', function() {
|
|
|
+ mui.openWindow({
|
|
|
+ url: base_path + '/probation/try_order?orderId=' + th.getAttribute("proid")
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ mui.alert(data.message, '', function() {
|
|
|
+ mui(th).button('reset')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ mui(th).button('reset');
|
|
|
+ mui.alert(data.message)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ isPay = true;
|
|
|
+ console.log(xhr);
|
|
|
+ mui(th).button('reset');
|
|
|
+ mui.alert("请检查网络或刷新页面重试!")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ isPay = true;
|
|
|
+ mui(th).button('reset');
|
|
|
+ mui.alert("对不起,支付失败!请稍后重试!")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ mui(th).button('reset');
|
|
|
+ mui.alert(dt.message)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(xhr, type, errorThrown) {
|
|
|
+ isPay = true;
|
|
|
+ console.log(xhr);
|
|
|
+ mui(th).button('reset');
|
|
|
+ mui.alert("请检查网络或刷新页面重试!")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ mui.alert("正在请求支付中~~请稍后!");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ });
|
|
|
+ var addTimer = function() {
|
|
|
+ var list = [],
|
|
|
+ interval;
|
|
|
+ return function(id, time) {
|
|
|
+ if(!interval) {
|
|
|
+ interval = setInterval(go, 1000)
|
|
|
+ }
|
|
|
+ list.push({
|
|
|
+ ele: document.getElementById(id),
|
|
|
+ time: time
|
|
|
+ })
|
|
|
+ };
|
|
|
|
|
|
- function go() {
|
|
|
- for(var i = 0; i < list.length; i += 1) {
|
|
|
- list[i].ele.innerHTML = getTimerString(list[i].time ? list[i].time -= 1 : 0);
|
|
|
- if(!list[i].time) {
|
|
|
- list.splice(i--, 1)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ function go() {
|
|
|
+ for(var i = 0; i < list.length; i += 1) {
|
|
|
+ list[i].ele.innerHTML = getTimerString(list[i].time ? list[i].time -= 1 : 0);
|
|
|
+ if(!list[i].time) {
|
|
|
+ list.splice(i--, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- function getTimerString(time) {
|
|
|
- d = Math.floor(time / 86400), h = Math.floor((time % 86400) / 3600), m = Math.floor(((time % 86400) % 3600) / 60), s = Math.floor(((time % 86400) % 3600) % 60);
|
|
|
- if(time > 0) {
|
|
|
- return d + "天" + h + "时" + m + "分" + s + "秒"
|
|
|
- } else {
|
|
|
- return "试用已结束"
|
|
|
- }
|
|
|
- }
|
|
|
- }();
|
|
|
- $(document).on('tap', '#center-menu>li', function() {
|
|
|
- var href = $(this).attr("href");
|
|
|
- location.href =href;
|
|
|
- });
|
|
|
- $(document).on('tap', '.see-rights', function() {
|
|
|
- location.href ='member_benefits.html';
|
|
|
- });
|
|
|
+ function getTimerString(time) {
|
|
|
+ d = Math.floor(time / 86400), h = Math.floor((time % 86400) / 3600), m = Math.floor(((time % 86400) % 3600) / 60), s = Math.floor(((time % 86400) % 3600) % 60);
|
|
|
+ if(time > 0) {
|
|
|
+ return d + "天" + h + "时" + m + "分" + s + "秒"
|
|
|
+ } else {
|
|
|
+ return "试用已结束"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }();
|
|
|
+ $(document).on('tap', '#center-menu>li', function() {
|
|
|
+ var href = $(this).attr("href");
|
|
|
+ location.href = href;
|
|
|
+ });
|
|
|
+ $(document).on('tap', '.see-rights', function() {
|
|
|
+ location.href = 'member_benefits.html';
|
|
|
+ });
|
|
|
+ // 弹窗
|
|
|
+ $(document).on('tap', '.join-vip', function() {
|
|
|
+ var type = $(".vip-note").attr('type');//1:成为会员 2:完善信息 3:会员权益
|
|
|
+ if(type == 1 || type == 2){
|
|
|
+ $('.dalog').show();
|
|
|
+ }else{
|
|
|
+ location.href='vip-equity.html';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 关闭弹窗
|
|
|
+ $(document).on('tap', '.icon-guanbi', function() {
|
|
|
+ $('.dalog').hide();
|
|
|
+ });
|
|
|
+ // 成为会员
|
|
|
+ $(document).on('tap', '.btn-see-integral', function() {
|
|
|
+ var type = $(".vip-note").attr('type');
|
|
|
+ if(type == 1 || type == 2){
|
|
|
+ location.href='register-vip.html';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 积分
|
|
|
+ $(document).on('tap', '.go-integral-center', function() {
|
|
|
+ location.href='integral-center.html';
|
|
|
+ });
|
|
|
+ // 券包
|
|
|
+ $(document).on('tap', '.go-coupon-bag', function() {
|
|
|
+ location.href='coupon_bag1.html?type=1';
|
|
|
+ });
|
|
|
+ // 券包
|
|
|
+ $(document).on('tap', '.go-coupon-bag-2', function() {
|
|
|
+ location.href='coupon_bag1.html?type=2';
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+ </body>
|
|
|
|
|
|
-</script>
|
|
|
-</body>
|
|
|
-</html>
|
|
|
+</html>
|