linwu 2 years ago
parent
commit
80dbc4d483

+ 32 - 6
app/admin/view/agent/agentform.html

@@ -1,3 +1,15 @@
+<style type="text/css">
+	.amap-sug-result{
+		z-index:999999999;
+	}
+	#pickerInput{
+		z-index: 999999;
+		position: absolute;
+		right: 30px;
+		top: 20px;
+		width: 200px;
+	}
+</style>
 <div class="layui-fluid">
 	<div class="layui-row layui-col-space15">
 		<div class="layui-col-md12">
@@ -132,7 +144,9 @@
 								<input type="text" name="latitude" value="{$agent.latitude}" lay-verify="required" placeholder="纬度"
 								 autocomplete="off" class="layui-input">
 							</div>
-							<div id="maplocation" style="width:500px;height:500px;display: none;"></div>
+							<div id="maplocation" style="width:500px;height:500px;display: none;">
+								<input id="pickerInput" class="layui-input" placeholder="输入关键字选取地点"/>
+							</div>
 							<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-map-lnglat">选择地理位置</button>
 						</div>
 						<div class="layui-form-item" id="formdetails">
@@ -225,12 +239,15 @@
 		layarea.render({
 			elem: '#LAY-agent-agentform-edit-areapicker',
 			data: {
-                province: '福建省',
-                city: '泉州市',
-                district: '晋江市',
+				province: '福建省',
+				city: '泉州市',
+				district: '晋江市',
 			}
 		});
-
+		var map = new AMap.Map('maplocation', {
+			center:[118.551494,24.781674],//地图中心位置
+			zoom: 12,
+		});
 		$('#layuiadmin-map-lnglat').on('click', function() {
 			var index = layer.open({
 				type: 1,
@@ -238,7 +255,7 @@
 				area: ['500px', '550px'],
 				content: $('#maplocation'),
 				success: function() {
-					var map = new AMap.Map("maplocation", { resizeEnable: true });
+					//var map = new AMap.Map("maplocation", { resizeEnable: true });
 					map.on('click', function(e) {
 						$('input[name="longitude"]').val(e.lnglat.getLng());
 						$('input[name="latitude"]').val(e.lnglat.getLat());
@@ -248,6 +265,15 @@
 			});
 		});
 
+		var auto = new AMap.Autocomplete({ input: "pickerInput" });
+		var placeSearch = new AMap.PlaceSearch({ map: map });
+		window.select = function (e) {
+			console.log(e);
+			placeSearch.setCity(e.poi.adcode);
+			placeSearch.search(e.poi.name);
+		};
+		AMap.event.addListener(auto, "select", select);
+
 		form.on('submit(LAY-agent-agentform-edit-submit)', function(obj) {
 			var index = parent.layer.getFrameIndex(window.name);
 			admin.req({

+ 44 - 17
app/admin/view/comjobs/comjobsform.html

@@ -1,3 +1,15 @@
+<style type="text/css">
+	.amap-sug-result{
+		z-index:999999999;
+	}
+	#pickerInput{
+		z-index: 999999;
+		position: absolute;
+		right: 30px;
+		top: 20px;
+		width: 200px;
+	}
+</style>
 <div class="layui-fluid">
 	<div class="layui-row layui-col-space15">
 		<div class="layui-col-md12">
@@ -99,7 +111,9 @@
 								<input type="text" name="latitude" value="{$comjobs.latitude}" lay-verify="required" placeholder="纬度"
 									   autocomplete="off" class="layui-input">
 							</div>
-							<div id="maplocation" style="width:500px;height:500px;display: none;"></div>
+							<div id="maplocation" style="width:500px;height:500px;display: none;">
+								<input id="pickerInput" class="layui-input" placeholder="输入关键字选取地点"/>
+							</div>
 							<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-map-lnglat">选择地理位置</button>
 						</div>
 						<div class="layui-form-item">
@@ -386,22 +400,35 @@
 
 			}
 		});
-        $('#layuiadmin-map-lnglat').on('click', function() {
-            var index = layer.open({
-                type: 1,
-                title: '点击获取地址坐标',
-                area: ['500px', '550px'],
-                content: $('#maplocation'),
-                success: function() {
-                    var map = new AMap.Map("maplocation", { resizeEnable: true });
-                    map.on('click', function(e) {
-                        $('input[name="longitude"]').val(e.lnglat.getLng());
-                        $('input[name="latitude"]').val(e.lnglat.getLat());
-                        layer.close(index);
-                    });
-                }
-            });
-        });
+		var map = new AMap.Map('maplocation', {
+			center:[118.551494,24.781674],//地图中心位置
+			zoom: 12,
+		});
+		$('#layuiadmin-map-lnglat').on('click', function() {
+			var index = layer.open({
+				type: 1,
+				title: '点击获取地址坐标',
+				area: ['500px', '550px'],
+				content: $('#maplocation'),
+				success: function() {
+					//var map = new AMap.Map("maplocation", { resizeEnable: true });
+					map.on('click', function(e) {
+						$('input[name="longitude"]').val(e.lnglat.getLng());
+						$('input[name="latitude"]').val(e.lnglat.getLat());
+						layer.close(index);
+					});
+				}
+			});
+		});
+
+		var auto = new AMap.Autocomplete({ input: "pickerInput" });
+		var placeSearch = new AMap.PlaceSearch({ map: map });
+		window.select = function (e) {
+			console.log(e);
+			placeSearch.setCity(e.poi.adcode);
+			placeSearch.search(e.poi.name);
+		};
+		AMap.event.addListener(auto, "select", select);
 		form.on('submit(LAY-comjobs-comjobsform-edit-submit)', function(obj) {
 
 			if(video_time)

+ 2 - 2
app/admin/view/public/header.html

@@ -12,8 +12,8 @@
 		<link rel="stylesheet" href="/static/jscss/echoui.css" media="all">
 		<script src="/static/echoui/layui/layui.js"></script>
 		 
-		<script src="/static/jscss/echoui.js"></script> 
-		<script src="https://webapi.amap.com/maps?v=1.4.15&key={$Think.AMAP_KEY}&plugin=AMap.Autocomplete"></script>
+		<script src="/static/jscss/echoui.js"></script>
+		<script src="https://webapi.amap.com/maps?v=1.4.15&key={$Think.AMAP_KEY}&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script>
 	</head>
 	<body>
 	

+ 31 - 5
app/admin/view/worker/workerform.html

@@ -1,5 +1,16 @@
-
--<div class="layui-fluid">
+<style type="text/css">
+	.amap-sug-result{
+		z-index:999999999;
+	}
+	#pickerInput{
+		z-index: 999999;
+		position: absolute;
+		right: 30px;
+		top: 20px;
+		width: 200px;
+	}
+</style>
+<div class="layui-fluid">
 	<div class="layui-row layui-col-space15">
 		<div class="layui-col-md12">
 			<div class="layui-card">
@@ -112,7 +123,9 @@
 								<input type="text" name="latitude" value="{$worker.latitude}" lay-verify="required" placeholder="纬度"
 								 autocomplete="off" class="layui-input">
 							</div>
-							<div id="maplocation" style="width:500px;height:500px;display: none;"></div>
+							<div id="maplocation" style="width:500px;height:500px;display: none;">
+								<input id="pickerInput" class="layui-input" placeholder="输入关键字选取地点"/>
+							</div>
 							<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-map-lnglat">选择地理位置</button>
 						</div>
 						<div class="layui-form-item">
@@ -232,7 +245,11 @@
                 district: '晋江市',
 			}
 		});
-		
+
+		var map = new AMap.Map('maplocation', {
+			center:[118.551494,24.781674],//地图中心位置
+			zoom: 12,
+		});
 		$('#layuiadmin-map-lnglat').on('click', function() {
 			var index = layer.open({
 				type: 1,
@@ -240,7 +257,7 @@
 				area: ['500px', '550px'],
 				content: $('#maplocation'),
 				success: function() {
-					var map = new AMap.Map("maplocation", { resizeEnable: true });
+					//var map = new AMap.Map("maplocation", { resizeEnable: true });
 					map.on('click', function(e) {
 						$('input[name="longitude"]').val(e.lnglat.getLng());
 						$('input[name="latitude"]').val(e.lnglat.getLat());
@@ -250,6 +267,15 @@
 			});
 		});
 
+		var auto = new AMap.Autocomplete({ input: "pickerInput" });
+		var placeSearch = new AMap.PlaceSearch({ map: map });
+		window.select = function (e) {
+			console.log(e);
+			placeSearch.setCity(e.poi.adcode);
+			placeSearch.search(e.poi.name);
+		};
+		AMap.event.addListener(auto, "select", select);
+
 		form.on('submit(LAY-worker-workerform-edit-submit)', function(obj) {
 			var index = parent.layer.getFrameIndex(window.name);
 			admin.req({

+ 29 - 2
app/agent/view/agent/agentform.html

@@ -1,3 +1,15 @@
+<style type="text/css">
+	.amap-sug-result{
+		z-index:999999999;
+	}
+	#pickerInput{
+		z-index: 999999;
+		position: absolute;
+		right: 30px;
+		top: 20px;
+		width: 200px;
+	}
+</style>
 <div class="layui-fluid">
 	<div class="layui-row layui-col-space15">
 		<div class="layui-col-md12">
@@ -121,7 +133,9 @@
 								<input type="text" name="latitude" value="{$agent.latitude}" lay-verify="required" placeholder="纬度"
 								 autocomplete="off" class="layui-input">
 							</div>
-							<div id="maplocation" style="width:500px;height:500px;display: none;"></div>
+							<div id="maplocation" style="width:500px;height:500px;display: none;">
+								<input id="pickerInput" class="layui-input" placeholder="输入关键字选取地点"/>
+							</div>
 							<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-map-lnglat">选择地理位置</button>
 						</div>
 						<div class="layui-form-item" id="formdetails">
@@ -182,6 +196,10 @@
 			}
 		});
 
+		var map = new AMap.Map('maplocation', {
+			center:[118.551494,24.781674],//地图中心位置
+			zoom: 12,
+		});
 		$('#layuiadmin-map-lnglat').on('click', function() {
 			var index = layer.open({
 				type: 1,
@@ -189,7 +207,7 @@
 				area: ['500px', '550px'],
 				content: $('#maplocation'),
 				success: function() {
-					var map = new AMap.Map("maplocation", { resizeEnable: true });
+					//var map = new AMap.Map("maplocation", { resizeEnable: true });
 					map.on('click', function(e) {
 						$('input[name="longitude"]').val(e.lnglat.getLng());
 						$('input[name="latitude"]').val(e.lnglat.getLat());
@@ -199,6 +217,15 @@
 			});
 		});
 
+		var auto = new AMap.Autocomplete({ input: "pickerInput" });
+		var placeSearch = new AMap.PlaceSearch({ map: map });
+		window.select = function (e) {
+			console.log(e);
+			placeSearch.setCity(e.poi.adcode);
+			placeSearch.search(e.poi.name);
+		};
+		AMap.event.addListener(auto, "select", select);
+
 		form.on('submit(LAY-agent-agentform-edit-submit)', function(obj) {
 			var index = parent.layer.getFrameIndex(window.name);
 			admin.req({

+ 2 - 2
app/agent/view/public/header.html

@@ -12,8 +12,8 @@
 		<link rel="stylesheet" href="/static/jscss/echoui.css" media="all">
 		<script src="/static/echoui/layui/layui.js"></script>
 		 
-		<script src="/static/jscss/echoui.js"></script> 
-		<script src="https://webapi.amap.com/maps?v=1.4.15&key={$Think.AMAP_KEY}&plugin=AMap.Autocomplete"></script>
+		<script src="/static/jscss/echoui.js"></script>
+		<script src="https://webapi.amap.com/maps?v=1.4.15&key={$Think.AMAP_KEY}&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script>
 	</head>
 	<body>
 	

+ 17 - 11
app/mainapp/controller/Resume.php

@@ -35,7 +35,8 @@ class Resume extends BaseController
             }
         }
 
-        $plist = $model->page($ppage)->limit($psize)->append(['jobintention_text'])->select();
+        $plist = $model->page($ppage)->limit($psize)->append(['jobintention_text', 'education_text', 'worker_text'])->select();
+        $year  = date('Y');
         foreach ($plist as $v) {
             if ($v['com_cate_type'] == 2) {
                 if (empty($v['com_cate_other'])) {
@@ -44,6 +45,11 @@ class Resume extends BaseController
                     $v['com_cate'] = [$v['com_cate_other']];
                 }
             }
+            if (!empty($v['birthday'])) {
+                $v['age'] = $year - date('Y', strtotime($v['birthday']));
+            } else {
+                $v['age'] = 0;
+            }
         }
 
         page_result(0, "", [
@@ -121,12 +127,12 @@ class Resume extends BaseController
             'createtime' => time(),
         ]);
 
-        $user = UserModel::where('id',$userid)->find();
+        $user = UserModel::where('id', $userid)->find();
         if ($user['mobile']) {
-            $msg = '尊敬的求职者你好!您已在“晋江人力”小程序上收到雇主邀请,请您及时查看处理!';
+            $msg    = '尊敬的求职者你好!您已在“晋江人力”小程序上收到雇主邀请,请您及时查看处理!';
             $mobile = $user['mobile'];
-            $sms = new Chuanglan();
-            $sms->send($mobile,['message'=>$msg]);
+            $sms    = new Chuanglan();
+            $sms->send($mobile, ['message' => $msg]);
         }
 
         page_result(0, "邀请成功", $info);
@@ -140,8 +146,8 @@ class Resume extends BaseController
         $ppage = input('ppage/d', 1);
         $psize = input('psize/d', 20);
 
-        $userid   = input('userid/d', 0);
-        $list = ResumeInviteModel::with(['worker'])->where('userid',$userid)->page($ppage)->limit($psize)->append(['status_text'])->select();
+        $userid = input('userid/d', 0);
+        $list   = ResumeInviteModel::with(['worker'])->where('userid', $userid)->page($ppage)->limit($psize)->append(['status_text'])->select();
 
         page_result(0, "", [
             'list'   => $list,
@@ -154,13 +160,13 @@ class Resume extends BaseController
      */
     public function dealInvite()
     {
-        $id = input('id/d', 0);
+        $id     = input('id/d', 0);
         $status = input('status/d', 0);
         if (empty($id) || empty($status)) {
             page_result(1, "参数错误");
         }
 
-        $info = ResumeInviteModel::where('id',$id)->find();
+        $info = ResumeInviteModel::where('id', $id)->find();
         if ($info['status'] != 1) {
             page_result(1, "请勿重复操作");
         }
@@ -179,8 +185,8 @@ class Resume extends BaseController
         $ppage = input('ppage/d', 1);
         $psize = input('psize/d', 20);
 
-        $workerid   = input('workerid/d', 0);
-        $list = ResumeInviteModel::with(['user'])->where('workerid',$workerid)->page($ppage)->limit($psize)->append(['status_text'])->select();
+        $workerid = input('workerid/d', 0);
+        $list     = ResumeInviteModel::with(['user'])->where('workerid', $workerid)->page($ppage)->limit($psize)->append(['status_text'])->select();
 
         page_result(0, "", [
             'list'   => $list,

+ 29 - 2
app/worker/view/agent/agentform.html

@@ -1,3 +1,15 @@
+<style type="text/css">
+	.amap-sug-result{
+		z-index:999999999;
+	}
+	#pickerInput{
+		z-index: 999999;
+		position: absolute;
+		right: 30px;
+		top: 20px;
+		width: 200px;
+	}
+</style>
 <div class="layui-fluid">
 	<div class="layui-row layui-col-space15">
 		<div class="layui-col-md12">
@@ -127,7 +139,9 @@
 								<input type="text" name="latitude" value="{$agent.latitude}" lay-verify="required" placeholder="纬度"
 								 autocomplete="off" class="layui-input">
 							</div>
-							<div id="maplocation" style="width:500px;height:500px;display: none;"></div>
+							<div id="maplocation" style="width:500px;height:500px;display: none;">
+								<input id="pickerInput" class="layui-input" placeholder="输入关键字选取地点"/>
+							</div>
 							<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-map-lnglat">选择地理位置</button>
 						</div>
 						<div class="layui-form-item" id="formdetails">
@@ -226,6 +240,10 @@
 			}
 		});
 
+		var map = new AMap.Map('maplocation', {
+			center:[118.551494,24.781674],//地图中心位置
+			zoom: 12,
+		});
 		$('#layuiadmin-map-lnglat').on('click', function() {
 			var index = layer.open({
 				type: 1,
@@ -233,7 +251,7 @@
 				area: ['500px', '550px'],
 				content: $('#maplocation'),
 				success: function() {
-					var map = new AMap.Map("maplocation", { resizeEnable: true });
+					//var map = new AMap.Map("maplocation", { resizeEnable: true });
 					map.on('click', function(e) {
 						$('input[name="longitude"]').val(e.lnglat.getLng());
 						$('input[name="latitude"]').val(e.lnglat.getLat());
@@ -243,6 +261,15 @@
 			});
 		});
 
+		var auto = new AMap.Autocomplete({ input: "pickerInput" });
+		var placeSearch = new AMap.PlaceSearch({ map: map });
+		window.select = function (e) {
+			console.log(e);
+			placeSearch.setCity(e.poi.adcode);
+			placeSearch.search(e.poi.name);
+		};
+		AMap.event.addListener(auto, "select", select);
+
 		form.on('submit(LAY-agent-agentform-edit-submit)', function(obj) {
 			var index = parent.layer.getFrameIndex(window.name);
 			admin.req({

+ 50 - 6
app/worker/view/comjobs/comjobsform.html

@@ -1,3 +1,15 @@
+<style type="text/css">
+	.amap-sug-result{
+		z-index:999999999;
+	}
+	#pickerInput{
+		z-index: 999999;
+		position: absolute;
+		right: 30px;
+		top: 20px;
+		width: 200px;
+	}
+</style>
 <div class="layui-fluid">
 	<div class="layui-row layui-col-space15">
 		<div class="layui-col-md12">
@@ -95,7 +107,9 @@
 								<input type="text" name="latitude" value="{$comjobs.latitude}" lay-verify="required" placeholder="纬度"
 									   autocomplete="off" class="layui-input">
 							</div>
-							<div id="maplocation" style="width:500px;height:500px;display: none;"></div>
+							<div id="maplocation" style="width:500px;height:500px;display: none;">
+								<input id="pickerInput" class="layui-input" placeholder="输入关键字选取地点"/>
+							</div>
 							<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-map-lnglat">选择地理位置</button>
 						</div>
 						<div class="layui-form-item">
@@ -270,13 +284,43 @@
 
 		layarea.render({
 			elem: '#LAY-comjobs-comjobsform-edit-areapicker',
-			// data: {
-			// 	province: '河南省',
-			// 	city: '郑州市',
-			// 	district: '金水区',
-			// }
+			data: {
+				province: '福建省',
+				city: '泉州市',
+				district: '晋江市',
+			}
 		});
 
+		var map = new AMap.Map('maplocation', {
+			center:[118.551494,24.781674],//地图中心位置
+			zoom: 12,
+		});
+		$('#layuiadmin-map-lnglat').on('click', function() {
+			var index = layer.open({
+				type: 1,
+				title: '点击获取地址坐标',
+				area: ['500px', '550px'],
+				content: $('#maplocation'),
+				success: function() {
+					//var map = new AMap.Map("maplocation", { resizeEnable: true });
+					map.on('click', function(e) {
+						$('input[name="longitude"]').val(e.lnglat.getLng());
+						$('input[name="latitude"]').val(e.lnglat.getLat());
+						layer.close(index);
+					});
+				}
+			});
+		});
+
+		var auto = new AMap.Autocomplete({ input: "pickerInput" });
+		var placeSearch = new AMap.PlaceSearch({ map: map });
+		window.select = function (e) {
+			console.log(e);
+			placeSearch.setCity(e.poi.adcode);
+			placeSearch.search(e.poi.name);
+		};
+		AMap.event.addListener(auto, "select", select);
+
 		laydate.render({
 			elem: '#enddate',
 			type: 'date',

+ 2 - 2
app/worker/view/public/header.html

@@ -12,8 +12,8 @@
 		<link rel="stylesheet" href="/static/jscss/echoui.css" media="all">
 		<script src="/static/echoui/layui/layui.js"></script>
 		 
-		<script src="/static/jscss/echoui.js"></script> 
-		<script src="https://webapi.amap.com/maps?v=1.4.15&key={$Think.AMAP_KEY}&plugin=AMap.Autocomplete"></script>
+		<script src="/static/jscss/echoui.js"></script>
+		<script src="https://webapi.amap.com/maps?v=1.4.15&key={$Think.AMAP_KEY}&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script>
 	</head>
 	<body>
 	

+ 30 - 3
app/worker/view/worker/workerform.html

@@ -1,3 +1,15 @@
+<style type="text/css">
+	.amap-sug-result{
+		z-index:999999999;
+	}
+	#pickerInput{
+		z-index: 999999;
+		position: absolute;
+		right: 30px;
+		top: 20px;
+		width: 200px;
+	}
+</style>
 <div class="layui-fluid">
 	<div class="layui-row layui-col-space15">
 		<div class="layui-col-md12">
@@ -107,7 +119,9 @@
 								<input type="text" name="latitude" value="{$worker.latitude}" lay-verify="required" placeholder="纬度"
 								 autocomplete="off" class="layui-input">
 							</div>
-							<div id="maplocation" style="width:500px;height:500px;display: none;"></div>
+							<div id="maplocation" style="width:500px;height:500px;display: none;">
+								<input id="pickerInput" class="layui-input" placeholder="输入关键字选取地点"/>
+							</div>
 							<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-map-lnglat">选择地理位置</button>
 						</div>
 						<div class="layui-form-item" id="formdetails">
@@ -171,7 +185,11 @@
 				district: '晋江市',
 			}
 		});
-		
+
+		var map = new AMap.Map('maplocation', {
+			center:[118.551494,24.781674],//地图中心位置
+			zoom: 12,
+		});
 		$('#layuiadmin-map-lnglat').on('click', function() {
 			var index = layer.open({
 				type: 1,
@@ -179,7 +197,7 @@
 				area: ['500px', '550px'],
 				content: $('#maplocation'),
 				success: function() {
-					var map = new AMap.Map("maplocation", { resizeEnable: true });
+					//var map = new AMap.Map("maplocation", { resizeEnable: true });
 					map.on('click', function(e) {
 						$('input[name="longitude"]').val(e.lnglat.getLng());
 						$('input[name="latitude"]').val(e.lnglat.getLat());
@@ -189,6 +207,15 @@
 			});
 		});
 
+		var auto = new AMap.Autocomplete({ input: "pickerInput" });
+		var placeSearch = new AMap.PlaceSearch({ map: map });
+		window.select = function (e) {
+			console.log(e);
+			placeSearch.setCity(e.poi.adcode);
+			placeSearch.search(e.poi.name);
+		};
+		AMap.event.addListener(auto, "select", select);
+
 		form.on('submit(LAY-worker-workerform-edit-submit)', function(obj) {
 			var index = parent.layer.getFrameIndex(window.name);
 			admin.req({