index.html
3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/weui.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_970727_8ia65mkkncu.css">
<link rel="stylesheet" href="__TMPL__/public/assets/assets/css/style.css">
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/fontsize.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/assets/js/jquery-2.1.0.js"></script>
<title>我的保单</title>
</head>
<body>
<a class="agree_top" href="javascript:history.back(-1);">
<div class="iconfont icon-xiangzuo"></div>
<div>返回</div>
</a>
<div class="search_input">
<input type="text" id="keyword" placeholder="请输入姓名或者保单号">
<div class=" iconfont icon-sousuo">
</div>
</div>
<div class="search_titlebox">
<div>代理人:{$user.agent_name}</div>
<div class="search_subtitle">当前保单数:{$no_collocation_count}张</div>
</div>
<div class="dom">
<foreach name="$data" item="vo">
<a class="search_item" href="{:url('index/agent/more',array('application'=>$vo['application']))}">
<div class="search_itemcell">
<div>保险人:{$vo.application}</div>
</div>
</a>
</foreach>
</div>
<empty name="$data">
<div class="search_nodata">暂无您的客户,您可推荐公众号某个名称的公众号</div>
</empty>
<div class="search_nodata" style="display: none">暂无您的客户,您可推荐公众号某个名称的公众号</div>
</body>
<script>
$(function(){
$('.icon-sousuo').click(function(){
var keyword = $('#keyword').val();
$.ajax({
url:"{:url('agent/search')}",
type:"POST",
data:{'keyword':keyword},
success:function(data){
var data = eval("(" + data + ")");
console.log(data);
if(data.code == 20000){
var result = data.data;
if(result != null){
var mydata = '';
for(var i=0;i<result.length;i++){
mydata +='<a class="search_item" href="{:url('index/agent/more','','')}/application/'+result[i].application+'"><div class="search_itemcell"><div>保险人:'+result[i].application+'</div></div></a>';
}
$('.dom').html(mydata);
}else{
$('.dom').html('');
$('.search_nodata').html('暂无信息');
$('.search_nodata').show();
}
}else{
toast('与服务器断开连接');
}
}
})
})
})
</script>
</html>