chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <title>{yun:}$title{/yun}</title>
    <meta name="keywords" content="{yun:}$keywords{/yun},wap"/>
    <meta name="description" content="{yun:}$description{/yun}"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width" initial-scale="1"/>
    <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=no, width=device-width"/>
    <script src="{yun:}$wap_style{/yun}/js/flexible.js?v={yun:}$config.cachecode{/yun}"></script>
    <link rel="stylesheet" href="{yun:}$config.sy_weburl{/yun}/app/template/wap/css/css.css?v={yun:}$config.cachecode{/yun}" type="text/css"/>
    <link rel="stylesheet" href="{yun:}$config.sy_weburl{/yun}/app/template/wap/css/job.css?v={yun:}$config.cachecode{/yun}" type="text/css"/>
    <link rel="stylesheet" href="{yun:}$config.sy_weburl{/yun}/app/template/wap/css/map.css?v={yun:}$config.cachecode{/yun}" type="text/css"/>
    <link rel="stylesheet"href="{yun:}$config.sy_weburl{/yun}/app/template/wap/css/base.css?v={yun:}$config.cachecode{/yun}" type="text/css" />
    <link href="{yun:}$config_wapdomain{/yun}/js/vant/lib/index.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" />
</head>
 
<body>
<header>
    <div class="header" style="background: #3b7cff">
        <div class="header_bg {yun:}if $tplmoblie.color{/yun}bg{yun:}$tplmoblie.color{/yun}{yun:}/if{/yun}">    
            <div class="header_cont">
                <a class="header_back hd-lbtn" href="javascript:goBack();"> </a>
                <div class="header_map">{yun:}$headertitle{/yun}</div>
            </div>
        </div>
    </div>
</header>
 
 
 
<div class="yun_map_tit">
    <ul>
        <li class="yun_map_cur">
            <a href="{yun:}url m=wap c=map x=$smarty.get.x y=$smarty.get.y{/yun}">列表</a>
        </li>
        <li>
            <a href="{yun:}url m=wap c=map a=maplist x=$smarty.get.x y=$smarty.get.y{/yun}" class="tcq_mune_msgnews_box">地图</a>
        </li>
    </ul>
</div>
 
<!--公司-->
<div class="" id="com">
</div>
<div id="pageVue" class="none">
    <van-pagination v-model="currentPage" :total-items="total" :items-per-page="perpage" force-ellipses @change="pageChange" />
</div>
 
<input type="hidden" name="x" id="mapx" value="{yun:}$mapx{/yun}"/>
<input type="hidden" name="y" id="mapy" value="{yun:}$mapy{/yun}"/>
 
<div class="wap_member_no" id="nocom" style="display: none;">
    您的附近没有相关职位!
</div>
<script src="{yun:}$config.sy_weburl{/yun}/app/template/wap/js/prefixfree.min.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script type="text/javascript" src="{yun:}$config.mapurl{/yun}"></script>
{yun:}include file="$wapstyle/publichtm/public_js.htm"{/yun}
 
<script type="text/javascript">
 
    var wapurl = '{yun:}url m=wap{/yun}';
 
    var currentPage = parseInt('{yun:}$smarty.get.page{/yun}') ? parseInt('{yun:}$smarty.get.page{/yun}') : 1;
    var total = 0;
 
    var x = $("#mapx").val();
    var y = $("#mapy").val();
 
    var res;
 
    if (x > 0 && y > 0) {
        get_com_list(x, y);
    } else {
        get_current_loaction();
    }
 
    function get_current_loaction() {
        var geolocation = new BMap.Geolocation();
        geolocation.getCurrentPosition(function (r) {
            if (this.getStatus() == BMAP_STATUS_SUCCESS) {
                $.post(wapurl + 'index.php?c=job&a=distance', {
                    x: r.point.lng,
                    y: r.point.lat
                }, function (data) {
                })
                x = r.point.lng;
                y = r.point.lat;
                $('#x').val(x);
                $('#y').val(y);
                get_com_list(x, y);
            } else {
                alert('failed' + this.getStatus());
            }
        }, {
            enableHighAccuracy: true
        });
    }
 
    function get_com_list(x, y) {
        $.post('index.php?c=map&a=joblist', {
            x: x,
            y: y,
            page: currentPage
        }, function (data) {
 
            if (data) {
                res = eval('(' + data + ')');
                if (res.list.length > 0) {
 
                    var joblist_html = '';
                    for (var i = 0; i < res.list.length; i++) {
                        joblist_html += '<div class="map_job_list mt10"> ';
                        joblist_html += '<div class="map_job_list_box">';
                        joblist_html += '<div class="map_job_top">';
                        joblist_html += '<div class="map_job_topname">';
                        joblist_html += '<a href="' + res.list[i].joburl + '" >' + res.list[i].name + '</a>';
                        joblist_html += '</div>';
                        joblist_html += '<span class="map_job_xz">' + res.list[i].salary_n + '</span>';
                        joblist_html += '<div class="map_job_info"></div>';
                        joblist_html += '<div class="map_job_com"><a href="' + res.list[i].comurl + '">' + res.list[i].com_name + '</a></div>';
                        if (res.list[i].lastupdate) {
                            joblist_html += '<div class="map_job_com">更新时间:<span class="">' + res.list[i].lastupdate + '</span></div>';
                        }
                        if (res.list[i].welfare) {
                            joblist_html += '<div class="map_job_fl">';
                            for (var k = 0; k < res.list[i].welfare.length; k++) {
                                joblist_html += '<span class="map_job_fl_s">' + res.list[i].welfare[k] + '</span>';
                            }
                            joblist_html += '</div>';
                        }
                        joblist_html += '</div>';
                        joblist_html += '</div>';
                        joblist_html += '<div class="com_map"><a href="' + res.list[i].addressurl + '"><span class="com_map_name">地址</span>' + res.list[i].address + '<em>' + res.list[i].dis + '</em><i class="com_map_name_icon"></i></a></div>';
                        joblist_html += '</div>';
                    }
                    $('#com').html(joblist_html);
                } else {
                    $('#nocom').show();
                }
 
                if (res.total > 10) {
 
                    pageVue.$data.currentPage = currentPage;
                    pageVue.$data.total = res.total;
                    $('#pageVue').css('display', 'block');
                }
            }
        });
    }
 
    var pageVue =  new Vue({
        el: '#pageVue',
        data: {
            currentPage:currentPage,
            total:total,
            perpage:10,
        },
        methods:{
            pageChange:function(e){
                currentPage = e;
                get_com_list(x, y);
            }
        }
 
    })
</script>
</body>
</html>