<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,minimum-scale=1" />
<title>我的分销管理</title>
<link rel="stylesheet" type="text/css" href="../../css/base.css">
<link rel="stylesheet" type="text/css" href="../../css/nctouch_member.css">
</head>
<body>
<header id="header" class="fixed">
  <div class="header-wrap">
    <div class="header-l"><a href="member.html"><i class="back"></i></a></div>
    <div class="header-title">
      <h1>分销管理</h1>
    </div>
    <div class="header-r"> <a id="header-nav" href="javascript:void(0);"><i class="more"></i><sup></sup></a> </div>
  </div>
  <div class="nctouch-nav-layout">
    <div class="nctouch-nav-menu"> <span class="arrow"></span>
      <ul>
        <li><a href="../../index.html"><i class="home"></i>首页</a></li>
        <li><a href="../search.html"><i class="search"></i>搜索</a></li>
        <li><a href="member.html"><i class="member"></i>我的商城</a><sup></sup></li>
        <li><a href="javascript:void(0);"><i class="message"></i>消息<sup></sup></a></li>
      </ul>
    </div>
  </div>
</header>
<div class="nctouch-main-layout">
<div class="nctouch-order-search" id="pd_count" >
<form>
      <span class=""><input type="text" style="width:90%" autocomplete="on" maxlength="100" value="" id="invite_key" oninput="writeClear($(this));">
      <span class="input-del"></span></span>
    </form></div>
  <div id="fixed_nav" class="nctouch-single-nav">
    <ul id="filtrate_ul" class="w33h">
      <li class="selected"><a href="javascript:void(0);">一级下线</a></li>
      <li><a href="member_invite2.html">二级下线</a></li>
      <li><a href="member_invite3.html">三级下线</a></li>
    </ul>
  </div>
  <ul id="pointsloglist" class="nctouch-log-list">
  </ul>
</div>
<div class="fix-block-r">
    <a href="javascript:void(0);" class="gotop-btn gotop hide" id="goTopBtn"><i></i></a>
</div>
<footer id="footer" class="bottom"></footer>
<script type="text/html" id="list_model">
        <% if(list.length >0){%>
        <% for (var k in list) { var v = list[k]; %>
            <li>
				<div class="detail">会员：<%=v.member_name;%>,购买的订单数量：<%=v.invite_num;%></div>             
                <div class="money add"><%=v.invite_amount;%></div>
               
                <time class="date">返利</time>
            </li>
        <%}%>
        <li class="loading"><div class="spinner"><i></i></div>数据读取中</li>
        <%}else {%>
        <div class="nctouch-norecord pdre">
            <div class="norecord-ico"><i></i></div>
            <dl>
                <dt>您尚为推荐</dt>
				<dd>赶紧复制上面地址邀请拿返利吧</dd>
            </dl>
        </div>
        <%}%>
</script> 
<script type="text/javascript" src="../../js/config.js"></script> 
<script type="text/javascript" src="../../js/zepto.min.js"></script> 
<script type="text/javascript" src="../../js/template.js"></script> 
<script type="text/javascript" src="../../js/common.js"></script>
<script type="text/javascript" src="../../js/zepto.waypoints.js"></script>
<script type="text/javascript" src="../../js/ncscroll-load.js"></script> 
<script>
    $(function(){
        var key = getCookie('key');
        if (!key) {
            window.location.href = WapSiteUrl+'/tmpl/member/login.html';
            return;
        }
        //渲染list
        var load_class = new ncScrollLoad();
        load_class.loadInit({
            'url':ApiUrl + '/index.php?app=member_invite&feiwa=inviteone',
            'getparam':{'key':key},
            'tmplid':'list_model',
            'containerobj':$("#pointsloglist"),
            'iIntervalId':true
        });
        $.ajax({
            type: "post",
            url: ApiUrl + "/index.php?app=member_index",
            data: {
                key: key
            },
            dataType: "json",
            success: function(key) {
         var invite_url = '推广链接：'+WapSiteUrl+'/tmpl/member/register_invite.html?rec='+ key.datas.member_info.id;
        $('#invite_key').attr("value",invite_url);
            }
  
});
    });
</script>
</body>
</html>