审计记录

WebContent/WEB-INF/jsp/pc/report/prize.jsp 4.7 KB
zxt@theyeasy.com committed
1 2 3 4 5 6 7 8
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
9
		<title>粉丝列表</title>
zxt@theyeasy.com committed
10 11 12
		<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
		<link rel="stylesheet" href="/zzhnc/res/css/basic.css">
	</head>
13

zxt@theyeasy.com committed
14
	<body class="wrap">
15
		<form class="layui-form">
zxt@theyeasy.com committed
16
			<div class="layui-form-item searchbox" style="margin-bottom: 0px;">
17 18
				<div class="layui-input-inline" style="width: 150px;">
					<input class="layui-input" name="keyword" placeholder="关键字" />
zxt@theyeasy.com committed
19 20
				</div>
				<button class="layui-btn" lay-submit lay-filter="querybtn">查询</button>
21 22 23
				<button class="layui-btn layui-btn-primary" lay-submit lay-filter="resetbtn">重置</button>
			</div>		
		</form>
zxt@theyeasy.com committed
24 25 26 27
		<table class="layui-table">
			<thead>
				<tr>
					<th style="width:30px;">No</th>
28 29 30 31 32 33 34
					<th style="min-width:120px;">头像昵称</th>
					<th style="width:160px;">地区</th>
					<th style="min-width:80px;">上级粉丝</th>
					<th style="min-width:60px;">销售人员</th>
					<th style="min-width:60px;">小程序 openid</th>
					<th style="min-width:80px;">创建时间</th>
					<th style="min-width:80px;">上次登录时间</th>
zxt@theyeasy.com committed
35 36
				</tr>
			</thead>
37
			<tbody id="fanslist">
zxt@theyeasy.com committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
				
			</tbody>
		</table>
		<div class="nulldata">暂无数据</div>
		<div id="page"></div>
		
	</body>
	<script src='/zzhnc/res/js/jquery.min.js'></script>
	<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
	<script>
		layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
			var form = layui.form(),
				element = layui.element(),
				laydate = layui.laydate,
				layer = layui.layer,
				laypage = layui.laypage;
55 56 57
				
			var page = 1,keyword = ""
			
zxt@theyeasy.com committed
58
			//初始化数据
59 60 61 62
			initData(page, keyword)
			
			function initData(page, keyword){
				$.post("/zzhnc/report/getFansList",{page:page,keyword:keyword},function(data){
zxt@theyeasy.com committed
63
					console.log(data)
64 65 66
					data=data.data;
					
					laypage({
zxt@theyeasy.com committed
67
						cont: 'page',
68 69
						pages: data.totalPages, 
						curr: page,
zxt@theyeasy.com committed
70 71 72
						skip: true,
						jump: function(obj, first) {
							if(!first) {
73 74
								page = obj.curr
								initData(page, keyword)
zxt@theyeasy.com committed
75 76
							}
						}
77 78 79 80 81
					});
					
					$("#fanslist").html("")
					
					if(data.rows.length>0){
zxt@theyeasy.com committed
82
						$(".nulldata").hide();
83
						var str="";
zxt@theyeasy.com committed
84 85 86 87 88 89 90 91 92 93 94
						for(var i=0;i<data.rows.length;i++){
							var nick="";
							if((data.rows[i].nickname==null||data.rows[i].nickname=="")&&(data.rows[i].logo==null||data.rows[i].logo=="")){
								nick='<div style="text-align:left;">未授权(id:'+ data.rows[i].id +')</div>';
							}else{
								if(data.rows[i].logo==null||data.rows[i].logo==""){
									nick='<div class="nickbox"><div id="wlogo" style="background:url(/zzhnc/res/images/default_user.png) no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> '+ data.rows[i].nickname +'</span></div>';
								}else{
									nick='<div class="nickbox"><div id="wlogo" style="background:url('+data.rows[i].logo+') no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> '+ data.rows[i].nickname +'</span></div>';
								}
							}
95
							
zxt@theyeasy.com committed
96 97
							str+='<tr data-id='+ data.rows[i].id +'>'
								+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>'
98 99 100 101 102 103 104 105
								+'<td style="text-align:left;">'+ nick +'</td>'
								+'<td>'+ ToAddress(data.rows[i]) +'</td>'
								+'<td>'+ data.rows[i].parentfans+'</td>'
								+'<td>'+ data.rows[i].salesname+'</td>'
								+'<td>'+ data.rows[i].miniopenid+'</td>'
								+'<td>'+ toTime_G(data.rows[i].createdtime) +'</td>'
								+'<td>'+ toTime_G(data.rows[i].lastlogintime) +'</td>'
								+'</tr>'
zxt@theyeasy.com committed
106
						}
107 108 109 110 111 112 113
						$("#fanslist").html(str)
						toNull_G();
					}else{
						$(".nulldata").show()
						return false;
					}
					
zxt@theyeasy.com committed
114 115 116
					
				})
			}
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
			
			form.on("submit(querybtn)", function(e){
				initData(1, e.field.keyword)
				return false
			})
			
			form.on("submit(resetbtn)", function(e){
				$("[name=keyword]").val("")
				initData(1, "");
				return false
			})
			
			
			function fanstype(t){
				if(t == 1){
					return "销售助手粉丝"
				}else if(t == 2){
					return "万小二粉丝"	
				}else{
					return ""
				}
			}
zxt@theyeasy.com committed
139

140 141 142 143 144 145 146
			function ToAddress(data){
				var p = data.province || ""
				var c = data.city || ""
				var d = data.district || ""
				return !!(p + c + d) ? (p+c+d) : "未知城市"
			}
			
zxt@theyeasy.com committed
147 148 149 150
		})
	</script>

</html>