作者 Lijianheng

更新

@@ -336,11 +336,11 @@ Page({ @@ -336,11 +336,11 @@ Page({
336 "XX-Device-Type": 'wxapp' 336 "XX-Device-Type": 'wxapp'
337 } 337 }
338 app.post(url, params, header).then((res) => { 338 app.post(url, params, header).then((res) => {
339 - console.log(res); 339 + console.log(res.data);
340 // 获取值 340 // 获取值
341 that.setData({ 341 that.setData({
342 resume: res.data, 342 resume: res.data,
343 - date: res.data.birthday, 343 + // date: res.data.birthday,
344 array: res.data.education_name, 344 array: res.data.education_name,
345 // personal: res.data 345 // personal: res.data
346 // jobs: res.data, 346 // jobs: res.data,
@@ -362,7 +362,7 @@ @@ -362,7 +362,7 @@
362 <picker mode="date" value="{{date}}" bindchange="bindDateChange"> 362 <picker mode="date" value="{{date}}" bindchange="bindDateChange">
363 <view class="mask2_item_date"> 363 <view class="mask2_item_date">
364 364
365 - <view class='mask2_item_date_text'>{{date}}</view> 365 + <view class='mask2_item_date_text'>{{resume.birthday}}</view>
366 <view class='mask2_item_date_icon'> 366 <view class='mask2_item_date_icon'>
367 <image src='../../img/right.png'></image> 367 <image src='../../img/right.png'></image>
368 </view> 368 </view>
@@ -48,33 +48,36 @@ Page({ @@ -48,33 +48,36 @@ Page({
48 data: { 48 data: {
49 publish: '', 49 publish: '',
50 array: [], 50 array: [],
51 - status:true, 51 + status: true,
52 52
53 jobIndex: 0, 53 jobIndex: 0,
54 54
55 industry: [], 55 industry: [],
56 - 56 +
57 industryIndex: 0, 57 industryIndex: 0,
58 58
59 post: [], 59 post: [],
60 - 60 +
61 postIndex: 0, 61 postIndex: 0,
62 62
63 edu: [], 63 edu: [],
64 64
65 eduIndex: 0, 65 eduIndex: 0,
66 - switch_content:false, 66 + switch_content: false,
  67 + // eduname:'请选择',
67 68
68 images: [], 69 images: [],
69 images2: [], 70 images2: [],
70 bannerImage: [], 71 bannerImage: [],
  72 + region: ['请选择', '请选择', '请选择'],
71 // 获取分类 73 // 获取分类
72 - getClass:'', 74 + getClass: '',
73 // 设置传入参数 75 // 设置传入参数
74 - categories_id:'', 76 + categories_id: '',
75 industry_id: '', 77 industry_id: '',
76 station_id: '', 78 station_id: '',
77 education_id: '', 79 education_id: '',
  80 + eduname:'请选择',
78 unid_id: '', 81 unid_id: '',
79 money_type: 1, 82 money_type: 1,
80 min_money: '', 83 min_money: '',
@@ -92,26 +95,31 @@ Page({ @@ -92,26 +95,31 @@ Page({
92 end_time: '', 95 end_time: '',
93 logo: '', 96 logo: '',
94 banner: '', 97 banner: '',
95 -  
96 - categories_name:'请选择',  
97 - hangye:'请选择',  
98 - gangwei:'请选择',  
99 - logoitem:'',  
100 - banneritem:'', 98 + wxn: '',
  99 + wx_gz: '',
  100 + qq: '',
  101 + qq_lock: '',
  102 + mobile: '',
  103 +
  104 + categories_name: '请选择',
  105 + hangye: '请选择',
  106 + gangwei: '请选择',
  107 + logoitem: '',
  108 + banneritem: '',
101 //薪酬范围 109 //薪酬范围
102 - maxMoney:'',  
103 - minMoney:"",  
104 - gumoney:'', 110 + maxMoney: '',
  111 + minMoney: "",
  112 + gumoney: '',
105 //薪资单位 113 //薪资单位
106 - danweiarray:[],  
107 - danindex:0, 114 + danweiarray: [],
  115 + danindex: 0,
108 // 地图 116 // 地图
109 - latitude:'', 117 + latitude: '',
110 longitude: '', 118 longitude: '',
111 markers: [{ 119 markers: [{
112 id: 1, 120 id: 1,
113 latitude: '', 121 latitude: '',
114 - longitude:'', 122 + longitude: '',
115 name: 'T.I.T 创意园' 123 name: 'T.I.T 创意园'
116 }], 124 }],
117 covers: [{ 125 covers: [{
@@ -123,51 +131,59 @@ Page({ @@ -123,51 +131,59 @@ Page({
123 longitude: '', 131 longitude: '',
124 iconPath: '/image/location.png' 132 iconPath: '/image/location.png'
125 }], 133 }],
126 - map:[],  
127 - addressname:"请选择地区",  
128 - zhaopin:'',  
129 - fuli:'',  
130 -  
131 - connectinfo:{}, 134 + map: [],
  135 + addressname: "请选择地区",
  136 + zhaopin: '',
  137 + fuli: '',
  138 +
  139 + connectinfo: {},
132 //发布时间 140 //发布时间
133 141
134 time: '', 142 time: '',
135 multiArray: [years, months, days, hours, minutes], 143 multiArray: [years, months, days, hours, minutes],
136 multiIndex: [0, 9, 16, 10, 17], 144 multiIndex: [0, 9, 16, 10, 17],
137 choose_year: '', 145 choose_year: '',
138 - 146 +
139 // edu: '', 147 // edu: '',
  148 + // yaoqiu: '',
  149 + city: '',
  150 + provice: '',
  151 + district: '',
  152 + detailaddress:"",
  153 + len:0,
  154 + len_fuli:0,
  155 + len_miaoshu:0,
140 }, 156 },
141 // 岗位分类 157 // 岗位分类
142 - jobClass: function (e) { 158 + jobClass: function(e) {
143 console.log('picker发送选择改变,携带值为', e.detail.value) 159 console.log('picker发送选择改变,携带值为', e.detail.value)
144 - 160 +
145 this.setData({ 161 this.setData({
146 jobIndex: e.detail.value, 162 jobIndex: e.detail.value,
147 categories_id: this.data.array[e.detail.value].id, 163 categories_id: this.data.array[e.detail.value].id,
148 // categories_name: this.data.array[e.detail.value].categories_name, 164 // categories_name: this.data.array[e.detail.value].categories_name,
149 categories_name: this.data.array[e.detail.value].categories_name, 165 categories_name: this.data.array[e.detail.value].categories_name,
150 - hangye:'请选择',  
151 - gangwei:"请选择"  
152 - 166 + hangye: '请选择',
  167 + gangwei: "请选择"
  168 +
153 }) 169 })
154 console.log(that.data.categories_id) 170 console.log(that.data.categories_id)
155 this.publicIndustry() 171 this.publicIndustry()
156 }, 172 },
157 // 选择行业 173 // 选择行业
158 - industryClass: function (e) { 174 + industryClass: function(e) {
159 console.log('picker发送选择改变,携带值为', e.detail.value) 175 console.log('picker发送选择改变,携带值为', e.detail.value)
160 this.setData({ 176 this.setData({
161 industryIndex: e.detail.value, 177 industryIndex: e.detail.value,
162 industry_id: this.data.industry[e.detail.value].id, 178 industry_id: this.data.industry[e.detail.value].id,
163 - hangye: this.data.industry[e.detail.value].industry_name ,  
164 - gangwei:'请选择' 179 + hangye: this.data.industry[e.detail.value].industry_name,
  180 + gangwei: '请选择'
165 }) 181 })
166 console.log(that.data.industry_id) 182 console.log(that.data.industry_id)
167 this.publicPost() 183 this.publicPost()
168 }, 184 },
169 // 选择岗位 185 // 选择岗位
170 - postClass: function (e) { 186 + postClass: function(e) {
171 console.log('picker发送选择改变,携带值为', e.detail.value) 187 console.log('picker发送选择改变,携带值为', e.detail.value)
172 this.setData({ 188 this.setData({
173 postIndex: e.detail.value, 189 postIndex: e.detail.value,
@@ -177,30 +193,30 @@ Page({ @@ -177,30 +193,30 @@ Page({
177 console.log(that.data.station_id) 193 console.log(that.data.station_id)
178 }, 194 },
179 // 选择学历 195 // 选择学历
180 - selectEdu: function (e) { 196 + selectEdu: function(e) {
181 console.log('picker发送选择改变,携带值为', e.detail.value) 197 console.log('picker发送选择改变,携带值为', e.detail.value)
182 this.setData({ 198 this.setData({
183 - education_id:this.data.edu[e.detail.value].id, 199 + education_id: this.data.edu[e.detail.value].id,
184 eduname: that.data.edu[e.detail.value].education_name, 200 eduname: that.data.edu[e.detail.value].education_name,
185 - eduIndex:e.detail.value 201 + eduIndex: e.detail.value
186 }) 202 })
187 }, 203 },
188 204
189 // 切换薪资类型 205 // 切换薪资类型
190 - switch_a(){ 206 + switch_a() {
191 this.setData({ 207 this.setData({
192 -  
193 - status:!this.data.status,  
194 - 208 +
  209 + status: !this.data.status,
  210 +
195 }) 211 })
196 212
197 let status = this.data.status; 213 let status = this.data.status;
198 -  
199 - if(status==true){ 214 +
  215 + if (status == true) {
200 this.setData({ 216 this.setData({
201 - money_type:1 217 + money_type: 1
202 }) 218 })
203 - }else{ 219 + } else {
204 this.setData({ 220 this.setData({
205 money_type: 2 221 money_type: 2
206 }) 222 })
@@ -210,7 +226,7 @@ Page({ @@ -210,7 +226,7 @@ Page({
210 /** 226 /**
211 * 生命周期函数--监听页面加载 227 * 生命周期函数--监听页面加载
212 */ 228 */
213 - onLoad: function (options) { 229 + onLoad: function(options) {
214 that = this; 230 that = this;
215 this.publicClass(); 231 this.publicClass();
216 this.publicIndustry(); 232 this.publicIndustry();
@@ -221,7 +237,7 @@ Page({ @@ -221,7 +237,7 @@ Page({
221 wx.getLocation({ 237 wx.getLocation({
222 238
223 type: 'gcj02', 239 type: 'gcj02',
224 - success: function (res) { 240 + success: function(res) {
225 console.log(8090) 241 console.log(8090)
226 console.log(res) 242 console.log(res)
227 var lat = res.latitude 243 var lat = res.latitude
@@ -230,7 +246,7 @@ Page({ @@ -230,7 +246,7 @@ Page({
230 map.push(lat) 246 map.push(lat)
231 map.push(log) 247 map.push(log)
232 248
233 - 249 + that.loadCity(lat, log)
234 250
235 that.setData({ 251 that.setData({
236 latitude: lat, 252 latitude: lat,
@@ -263,7 +279,7 @@ Page({ @@ -263,7 +279,7 @@ Page({
263 this.setData({ 279 this.setData({
264 choose_year: this.data.multiArray[0][0] 280 choose_year: this.data.multiArray[0][0]
265 }) 281 })
266 - 282 +
267 283
268 }, 284 },
269 285
@@ -316,7 +332,7 @@ Page({ @@ -316,7 +332,7 @@ Page({
316 }, 332 },
317 333
318 // 获取岗位 334 // 获取岗位
319 - publicPost(){ 335 + publicPost() {
320 let that = this; 336 let that = this;
321 let url = 'index/category/station'; 337 let url = 'index/category/station';
322 let params = { 338 let params = {
@@ -340,7 +356,7 @@ Page({ @@ -340,7 +356,7 @@ Page({
340 }, 356 },
341 357
342 // 选择学历 358 // 选择学历
343 - publicEdu(){ 359 + publicEdu() {
344 let that = this; 360 let that = this;
345 let url = 'index/category/education'; 361 let url = 'index/category/education';
346 let params = { 362 let params = {
@@ -361,67 +377,20 @@ Page({ @@ -361,67 +377,20 @@ Page({
361 }).catch((err) => { 377 }).catch((err) => {
362 378
363 }) 379 })
364 - },  
365 -  
366 - // 调用Ajax  
367 - publish() {  
368 - let that = this;  
369 - let url = 'index/job/publish_job';  
370 - let params = {  
371 - categories_id: that.data.categories_id,  
372 - industry_id: that.data.industry_id,  
373 - station_id: that.data.station_id,  
374 - education_id: that.data.education_id,  
375 - unit_id: that.data.unid_id,  
376 - money_type: that.data.money_type,  
377 - // min_money: that.data.min_money,  
378 - // max_money: that.data.max_money,  
379 - // work_provice: that.data.work_province,  
380 - // work_city: that.data.work_city,  
381 - // work_county: that.data.work_county,  
382 - // work_address: that.data.work_address,  
383 - // work_longitude: that.data.work_longitude,  
384 - // work_latitude: that.data.work_latitude,  
385 - // demand: that.data.demand,  
386 - // welfare: that.data.welfare,  
387 - // describe: that.data.describe,  
388 - // start_time: that.data.start_time,  
389 - // end_time: that.data.end_time,  
390 - // logo: that.data.logo,  
391 - // banner:  
392 - // wxn:  
393 - // wx_gz:  
394 - // qq_lock:  
395 - // mobile:  
396 - }  
397 - // console.log(e)  
398 - let header = {  
399 - "XX-Token": wx.getStorageSync('token'),  
400 - "XX-Device-Type": 'wxapp'  
401 - }  
402 - app.post(url, params, header).then((res) => {  
403 - console.log(res);  
404 - // 获取值  
405 - // that.setData({  
406 -  
407 - // })  
408 -  
409 - }).catch((err) => {  
410 -  
411 - })  
412 }, 380 },
413 381
  382 +
414 383
415 384
416 // 选择图片 385 // 选择图片
417 - chooseImage: function () { 386 + chooseImage: function() {
418 // 选择图片 387 // 选择图片
419 wx.chooseImage({ 388 wx.chooseImage({
420 count: 3, // 默认9 389 count: 3, // 默认9
421 sizeType: ['compressed'], 390 sizeType: ['compressed'],
422 sourceType: ['album', 'camera'], 391 sourceType: ['album', 'camera'],
423 // 可以指定来源是相册还是相机,默认二者都有 392 // 可以指定来源是相册还是相机,默认二者都有
424 - success: function (res) { 393 + success: function(res) {
425 console.log(res) 394 console.log(res)
426 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 395 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
427 var tempFilePaths = res.tempFilePaths; 396 var tempFilePaths = res.tempFilePaths;
@@ -433,7 +402,7 @@ Page({ @@ -433,7 +402,7 @@ Page({
433 }, 402 },
434 403
435 // 图片预览 404 // 图片预览
436 - previewImage: function (e) { 405 + previewImage: function(e) {
437 var current = e.target.dataset.src 406 var current = e.target.dataset.src
438 wx.previewImage({ 407 wx.previewImage({
439 current: current, 408 current: current,
@@ -442,7 +411,7 @@ Page({ @@ -442,7 +411,7 @@ Page({
442 }, 411 },
443 412
444 // 图片删除功能 413 // 图片删除功能
445 - delete: function (e) { 414 + delete: function(e) {
446 var index = e.currentTarget.dataset.index; 415 var index = e.currentTarget.dataset.index;
447 var images = that.data.images; 416 var images = that.data.images;
448 images.splice(index, 1); 417 images.splice(index, 1);
@@ -451,14 +420,14 @@ Page({ @@ -451,14 +420,14 @@ Page({
451 }); 420 });
452 }, 421 },
453 422
454 - chooseImage2: function () { 423 + chooseImage2: function() {
455 // 选择图片 424 // 选择图片
456 wx.chooseImage({ 425 wx.chooseImage({
457 count: 3, // 默认9 426 count: 3, // 默认9
458 sizeType: ['compressed'], 427 sizeType: ['compressed'],
459 sourceType: ['album', 'camera'], 428 sourceType: ['album', 'camera'],
460 // 可以指定来源是相册还是相机,默认二者都有 429 // 可以指定来源是相册还是相机,默认二者都有
461 - success: function (res) { 430 + success: function(res) {
462 console.log(res) 431 console.log(res)
463 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 432 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
464 var tempFilePaths = res.tempFilePaths; 433 var tempFilePaths = res.tempFilePaths;
@@ -472,7 +441,7 @@ Page({ @@ -472,7 +441,7 @@ Page({
472 }, 441 },
473 442
474 // 图片预览 443 // 图片预览
475 - previewImage2: function (e) { 444 + previewImage2: function(e) {
476 //console.log(this.data.images); 445 //console.log(this.data.images);
477 var current = e.target.dataset.src 446 var current = e.target.dataset.src
478 wx.previewImage({ 447 wx.previewImage({
@@ -482,7 +451,7 @@ Page({ @@ -482,7 +451,7 @@ Page({
482 }, 451 },
483 452
484 // 图片删除功能 453 // 图片删除功能
485 - delete2: function (e) { 454 + delete2: function(e) {
486 var index = e.currentTarget.dataset.index; 455 var index = e.currentTarget.dataset.index;
487 var images = that.data.images2; 456 var images = that.data.images2;
488 images2.splice(index, 1); 457 images2.splice(index, 1);
@@ -490,47 +459,54 @@ Page({ @@ -490,47 +459,54 @@ Page({
490 images2: images2 459 images2: images2
491 }); 460 });
492 }, 461 },
493 -//获取薪资单位  
494 -getdanwei(){  
495 - let that = this;  
496 - var url = 'index/category/unit';  
497 - var params = {  
498 - token: wx.getStorageSync('token'), 462 + //获取薪资单位
  463 + getdanwei() {
  464 + let that = this;
  465 + var url = 'index/category/unit';
  466 + var params = {
  467 + token: wx.getStorageSync('token'),
499 468
500 - }  
501 - app.post(url, params).then((res) => {  
502 - console.log(res);  
503 - this.setData({  
504 - danweiarray:res.data  
505 - }) 469 + }
  470 + app.post(url, params).then((res) => {
  471 + console.log(res);
  472 + this.setData({
  473 + danweiarray: res.data,
  474 +
  475 + })
  476 +
  477 + that.setData({
  478 + unid_id:that.data.danweiarray[0].id
  479 + })
506 480
  481 +
507 482
508 483
509 - }).catch((err) => {  
510 484
511 - }) 485 + }).catch((err) => {
512 486
513 -}, 487 + })
514 488
515 -// 薪酬范围  
516 - minMoney(e){ 489 + },
  490 +
  491 + // 薪酬范围
  492 + minMoney(e) {
517 this.setData({ 493 this.setData({
518 - minMoney:e.detail.value 494 + minMoney: e.detail.value
519 }) 495 })
520 }, 496 },
521 - maxMoney(e){ 497 + maxMoney(e) {
522 this.setData({ 498 this.setData({
523 - maxMoney:e.detail.value 499 + maxMoney: e.detail.value
524 }) 500 })
525 }, 501 },
526 502
527 - guminMoney(e){ 503 + guminMoney(e) {
528 this.setData({ 504 this.setData({
529 - gumoney:e.detail.value 505 + gumoney: e.detail.value
530 }) 506 })
531 }, 507 },
532 // 获取薪资单位id 508 // 获取薪资单位id
533 - binddanweirChange(e){ 509 + binddanweirChange(e) {
534 this.setData({ 510 this.setData({
535 danindex: e.detail.value, 511 danindex: e.detail.value,
536 unid_id: this.data.danweiarray[e.detail.value].id 512 unid_id: this.data.danweiarray[e.detail.value].id
@@ -538,57 +514,37 @@ getdanwei(){ @@ -538,57 +514,37 @@ getdanwei(){
538 // console.log(that.danindex) 514 // console.log(that.danindex)
539 }, 515 },
540 516
541 - // 地图功能  
542 - getCenterLocation: function () {  
543 - this.mapCtx.getCenterLocation({  
544 - success: function (res) {  
545 - console.log(res.longitude)  
546 - console.log(res.latitude)  
547 - }  
548 - })  
549 - },  
550 - moveToLocation: function () {  
551 - this.mapCtx.moveToLocation()  
552 - },  
553 - translateMarker: function () {  
554 - this.mapCtx.translateMarker({  
555 - markerId: 1,  
556 - autoRotate: true,  
557 - duration: 1000,  
558 - destination: {  
559 - latitude: 23.10229,  
560 - longitude: 113.3345211,  
561 - },  
562 - animationEnd() {  
563 - console.log('animation end')  
564 - }  
565 - })  
566 - },  
567 - includePoints: function () {  
568 - this.mapCtx.includePoints({  
569 - padding: [10],  
570 - points: [{  
571 - latitude: 23.10229,  
572 - longitude: 113.3345211,  
573 - }, {  
574 - latitude: 23.00229,  
575 - longitude: 113.3345211,  
576 - }] 517 +
  518 + // 选择地区
  519 + bindRegionChange: function(e) {
  520 + console.log(e)
  521 + console.log('picker发送选择改变,携带值为', e.detail.value)
  522 + this.setData({
  523 + region: e.detail.value,
  524 + // 获取省市区
  525 + work_province: e.detail.value[0],
  526 + work_city: e.detail.value[1],
  527 + work_county: e.detail.value[2],
577 }) 528 })
  529 + console.log(e.detail.value[2])
578 }, 530 },
579 -  
580 531
581 //选择地址 532 //选择地址
582 enter() { 533 enter() {
583 let that = this; 534 let that = this;
584 wx.chooseLocation({ 535 wx.chooseLocation({
585 - success: function (res) { 536 + success: function(res) {
586 console.log(res); 537 console.log(res);
587 let map = []; 538 let map = [];
588 map.push(res.latitude); 539 map.push(res.latitude);
589 map.push(res.longitude) 540 map.push(res.longitude)
  541 + let latitude= res.latitude;
  542 + let longitude=res.longitude;
  543 + console.log(longitude);
  544 + console.log(latitude)
  545 + that.loadCity(longitude,latitude)
590 that.setData({ 546 that.setData({
591 - addressname: res.name, 547 + addressname: res.address,
592 548
593 latitude: res.latitude, 549 latitude: res.latitude,
594 longitude: res.longitude, 550 longitude: res.longitude,
@@ -609,19 +565,54 @@ getdanwei(){ @@ -609,19 +565,54 @@ getdanwei(){
609 iconPath: 'http://bronet.wangshuwen.com/choosed_03@3x.png' 565 iconPath: 'http://bronet.wangshuwen.com/choosed_03@3x.png'
610 }], 566 }],
611 567
612 - map: map 568 + map: map,
  569 + detailaddress: res.address
  570 + })
  571 + },
  572 + })
  573 + },
  574 +
  575 + loadCity: function (longitude, latitude) {
  576 + let that = this
  577 + wx.request({
  578 + url: 'https://api.map.baidu.com/geocoder/v2/?ak=aETXP6og8vWD7aOsutiwLL0rrqaEdbxy&location=' + latitude + ',' + longitude + '&output=json',
  579 + data: {},
  580 + header: {
  581 + 'Content-Type': 'application/json'
  582 + },
  583 + success: function (res) {
  584 + // success
  585 + console.log(res);
  586 + var city = res.data.result.addressComponent.city;
  587 + var provice = res.data.result.addressComponent.province;
  588 + console.log(provice)
  589 + // var distance = res.data.result.addressComponent.distance;
  590 + var district = res.data.result.addressComponent.district;
  591 + that.setData({
  592 + city: city,
  593 + provice : provice,
  594 + district: district
  595 + // distance : distance,
  596 + // detailaddress:res.data.result.addressComponent.distance
  597 +
  598 + });
613 599
614 600
615 - }) 601 + console.log(that.data.district)
  602 +
616 }, 603 },
  604 + fail: function () {
  605 + page.setData({ currentCity: "获取定位失败" });
  606 + },
  607 +
617 }) 608 })
618 }, 609 },
619 610
620 //发布时间 611 //发布时间
621 //获取时间日期 612 //获取时间日期
622 - bindMultiPickerChange: function (e) { 613 + bindMultiPickerChange: function(e) {
623 console.log(e) 614 console.log(e)
624 - let id=e.currentTarget.dataset.id 615 + let id = e.currentTarget.dataset.id
625 // console.log('picker发送选择改变,携带值为', e.detail.value) 616 // console.log('picker发送选择改变,携带值为', e.detail.value)
626 this.setData({ 617 this.setData({
627 multiIndex: e.detail.value 618 multiIndex: e.detail.value
@@ -633,13 +624,13 @@ getdanwei(){ @@ -633,13 +624,13 @@ getdanwei(){
633 const hour = this.data.multiArray[3][index[3]]; 624 const hour = this.data.multiArray[3][index[3]];
634 const minute = this.data.multiArray[4][index[4]]; 625 const minute = this.data.multiArray[4][index[4]];
635 // console.log(`${year}-${month}-${day}-${hour}-${minute}`); 626 // console.log(`${year}-${month}-${day}-${hour}-${minute}`);
636 -  
637 627
638 - if(id==1){ 628 +
  629 + if (id == 1) {
639 this.setData({ 630 this.setData({
640 time: year + '-' + month + '-' + day + ' ' + hour + ':' + minute 631 time: year + '-' + month + '-' + day + ' ' + hour + ':' + minute
641 }) 632 })
642 - }else{ 633 + } else {
643 this.setData({ 634 this.setData({
644 endtime: year + '-' + month + '-' + day + ' ' + hour + ':' + minute 635 endtime: year + '-' + month + '-' + day + ' ' + hour + ':' + minute
645 }) 636 })
@@ -649,7 +640,7 @@ getdanwei(){ @@ -649,7 +640,7 @@ getdanwei(){
649 // console.log(this.data.time); 640 // console.log(this.data.time);
650 }, 641 },
651 //监听picker的滚动事件 642 //监听picker的滚动事件
652 - bindMultiPickerColumnChange: function (e) { 643 + bindMultiPickerColumnChange: function(e) {
653 //获取年份 644 //获取年份
654 if (e.detail.column == 0) { 645 if (e.detail.column == 0) {
655 let choose_year = this.data.multiArray[e.detail.column][e.detail.value]; 646 let choose_year = this.data.multiArray[e.detail.column][e.detail.value];
@@ -717,89 +708,144 @@ getdanwei(){ @@ -717,89 +708,144 @@ getdanwei(){
717 this.setData(data); 708 this.setData(data);
718 }, 709 },
719 710
720 - 711 +
721 //联系方式 712 //联系方式
722 - connect(e){  
723 - let that=this;  
724 - let type=e.currentTarget.dataset.type;  
725 - let newconnectinfo=that.data.connectinfo  
726 - newconnectinfo[type]=e.detail.value; 713 + connect(e) {
  714 + let that = this;
  715 + let type = e.currentTarget.dataset.type;
  716 + let newconnectinfo = that.data.connectinfo;
  717 + newconnectinfo[type] = e.detail.value;
727 that.setData({ 718 that.setData({
728 - connectinfo:newconnectinfo 719 + connectinfo: newconnectinfo
729 }) 720 })
730 721
731 console.log(that.data.connectinfo) 722 console.log(that.data.connectinfo)
732 }, 723 },
733 724
734 // 招聘要求 725 // 招聘要求
735 - zhaopinyaoqiu(e){ 726 + zhaopinyaoqiu(e) {
  727 + let len=e.detail.value.length;
  728 +
736 this.setData({ 729 this.setData({
737 - yaoqiu:e.detail.value 730 + zhaopin: e.detail.value,
  731 + len:len
738 }) 732 })
739 }, 733 },
740 -// 福利要求  
741 - fuliyaoqiu(e){ 734 + // 福利要求
  735 + fuliyaoqiu(e) {
  736 + let len = e.detail.value.length;
742 this.setData({ 737 this.setData({
743 - fuli:e.detail.value 738 + fuli: e.detail.value,
  739 + len_fuli: len
744 }) 740 })
745 }, 741 },
746 -//岗位要求  
747 - gangweiyaoqiu(e){ 742 + //岗位要求
  743 + gangweiyaoqiu(e) {
  744 + let len = e.detail.value.length
748 this.setData({ 745 this.setData({
749 - gangwei:e.detail.value 746 + gangweiyq: e.detail.value,
  747 + len_miaoshu:len
750 }) 748 })
751 }, 749 },
752 750
753 - //确定发布  
754 - sure(){ 751 +
  752 + // 调用Ajax
  753 + publish() {
  754 + let that = this;
  755 + let url = 'index/job/publish_job';
  756 + let params = {
  757 + categories_id: that.data.categories_id,
  758 + industry_id: that.data.industry_id,
  759 + station_id: that.data.station_id,
  760 + education_id: that.data.education_id,
  761 + unit_id: that.data.unid_id,
  762 + money_type: that.data.money_type,
  763 + min_money: that.data.minMoney,
  764 + max_money: that.data.maxMoney,
  765 + money: that.data.gumoney,
  766 + work_provice: that.data.provice,
  767 + work_city: that.data.city,
  768 + work_county: that.data.district,
  769 + work_address: that.data.detailaddress,
  770 + // work_longitude: that.data.work_longitude,
  771 + // work_latitude: that.data.work_latitude,
  772 + demand: that.data.zhaopin,
  773 + welfare: that.data.fuli,
  774 + describe: that.data.gangweiyq,
  775 + start_time: that.data.time,
  776 + end_time: that.data.endtime,
  777 + logo: that.data.logoitem,
  778 + banner: that.data.banneritem,
  779 + wxn: that.data.connectinfo.weixn,
  780 + wx_gz: that.data.connectinfo.weixingroup,
  781 + qq: that.data.connectinfo.qqnum,
  782 + qq_lock: that.data.connectinfo.qqgroup,
  783 + mobile: that.data.connectinfo.mobile,
  784 +
  785 + }
  786 + // console.log(e)
  787 + let header = {
  788 + "XX-Token": wx.getStorageSync('token'),
  789 + "XX-Device-Type": 'wxapp'
  790 + }
  791 + app.post(url, params, header).then((res) => {
  792 + console.log(res);
  793 + // 获取值
  794 + // that.setData({
  795 +
  796 + // })
755 797
  798 + }).catch((err) => {
  799 +
  800 + })
756 }, 801 },
  802 +
757 /** 803 /**
758 * 生命周期函数--监听页面初次渲染完成 804 * 生命周期函数--监听页面初次渲染完成
759 */ 805 */
760 - onReady: function () { 806 + onReady: function() {
761 this.mapCtx = wx.createMapContext('myMap') 807 this.mapCtx = wx.createMapContext('myMap')
762 }, 808 },
763 809
764 /** 810 /**
765 * 生命周期函数--监听页面显示 811 * 生命周期函数--监听页面显示
766 */ 812 */
767 - onShow: function () { 813 + onShow: function() {
768 814
769 }, 815 },
770 816
771 /** 817 /**
772 * 生命周期函数--监听页面隐藏 818 * 生命周期函数--监听页面隐藏
773 */ 819 */
774 - onHide: function () { 820 + onHide: function() {
775 821
776 }, 822 },
777 823
778 /** 824 /**
779 * 生命周期函数--监听页面卸载 825 * 生命周期函数--监听页面卸载
780 */ 826 */
781 - onUnload: function () { 827 + onUnload: function() {
782 828
783 }, 829 },
784 830
785 /** 831 /**
786 * 页面相关事件处理函数--监听用户下拉动作 832 * 页面相关事件处理函数--监听用户下拉动作
787 */ 833 */
788 - onPullDownRefresh: function () { 834 + onPullDownRefresh: function() {
789 835
790 }, 836 },
791 837
792 /** 838 /**
793 * 页面上拉触底事件的处理函数 839 * 页面上拉触底事件的处理函数
794 */ 840 */
795 - onReachBottom: function () { 841 + onReachBottom: function() {
796 842
797 }, 843 },
798 844
799 /** 845 /**
800 * 用户点击右上角分享 846 * 用户点击右上角分享
801 */ 847 */
802 - onShareAppMessage: function () { 848 + onShareAppMessage: function() {
803 849
804 } 850 }
805 }) 851 })
@@ -139,7 +139,7 @@ @@ -139,7 +139,7 @@
139 </view> 139 </view>
140 </view> --> 140 </view> -->
141 141
142 - <picker bindchange="binddanweirChange" value="{{index}}" range="{{danweiarray}}" range-key="unit_name" > 142 + <picker bindchange="binddanweirChange" value="{{index}}" range="{{danweiarray}}" range-key="unit_name">
143 <view class='item_right_bottom_money'> 143 <view class='item_right_bottom_money'>
144 元{{danweiarray[danindex].unit_name}} 144 元{{danweiarray[danindex].unit_name}}
145 <view class='bottom_money_icon'> 145 <view class='bottom_money_icon'>
@@ -159,11 +159,13 @@ @@ -159,11 +159,13 @@
159 <!-- 选择学历 --> 159 <!-- 选择学历 -->
160 <view class='item'> 160 <view class='item'>
161 <view class='item_left'>选择学历</view> 161 <view class='item_left'>选择学历</view>
162 - <picker bindchange="selectEdu" value="{{eduIndex}}" range="{{edu}}" range-key='education_name' > 162 + <picker bindchange="selectEdu" value="{{eduIndex}}" range="{{edu}}" range-key='education_name'>
163 <view class='item_right'> 163 <view class='item_right'>
164 <view class="item_right_text"> 164 <view class="item_right_text">
165 <!-- {{post[postIndex]}} --> 165 <!-- {{post[postIndex]}} -->
166 - {{edu[eduIndex].education_name}} 166 + <!-- {{edu[eduIndex].education_name}} -->
  167 + {{eduname}}
  168 + <!-- 请选择 -->
167 </view> 169 </view>
168 <view class='item_right_icon'> 170 <view class='item_right_icon'>
169 <image src='../../img/right.png'></image> 171 <image src='../../img/right.png'></image>
@@ -220,9 +222,10 @@ @@ -220,9 +222,10 @@
220 222
221 </view> 223 </view>
222 <!-- 选工作地点 --> 224 <!-- 选工作地点 -->
223 - <view class='item map' bindtap="enter">  
224 - <view class='map_item'>  
225 - <view class='item_left'>选择地区</view> 225 + <view class='item map' >
  226 + <!-- 选择地区 -->
  227 + <view class='map_item address' bindtap="enter">
  228 + <view class='item_left'>详细地址</view>
226 <view class='item_right'> 229 <view class='item_right'>
227 <view class='item_right_text'>{{addressname}}</view> 230 <view class='item_right_text'>{{addressname}}</view>
228 <view class='item_right_icon'> 231 <view class='item_right_icon'>
@@ -230,9 +233,7 @@ @@ -230,9 +233,7 @@
230 </view> 233 </view>
231 </view> 234 </view>
232 </view> 235 </view>
233 - <!-- <map class='map_pic'> -->  
234 - <!-- <image src='../../img/aicon_31@2x.png'></image> -->  
235 - <!-- </map> --> 236 +
236 237
237 <view class="page-section page-section-gap"> 238 <view class="page-section page-section-gap">
238 <map id="myMap" style="width: 100%; height: 300px;" latitude="{{latitude}}" longitude="{{longitude}}" markers="{{markers}}" covers="{{covers}}" show-location></map> 239 <map id="myMap" style="width: 100%; height: 300px;" latitude="{{latitude}}" longitude="{{longitude}}" markers="{{markers}}" covers="{{covers}}" show-location></map>
@@ -273,24 +274,24 @@ @@ -273,24 +274,24 @@
273 <view class='require'> 274 <view class='require'>
274 <view class='require_top'>招聘要求</view> 275 <view class='require_top'>招聘要求</view>
275 <view class='require_textarea'> 276 <view class='require_textarea'>
276 - <textarea placeholder='性别不限/学历不限/年龄不限/经验不限'></textarea>  
277 - <view class='require_textarea_text' bindinput="zhaopinyaoqiu">0/200</view> 277 + <textarea placeholder='性别不限/学历不限/年龄不限/经验不限' bindinput="zhaopinyaoqiu" maxlength='200'></textarea>
  278 + <view class='require_textarea_text' >{{len}}/200</view>
278 </view> 279 </view>
279 </view> 280 </view>
280 <!-- 福利要求 --> 281 <!-- 福利要求 -->
281 <view class='require'> 282 <view class='require'>
282 <view class='require_top'>福利要求</view> 283 <view class='require_top'>福利要求</view>
283 <view class='require_textarea'> 284 <view class='require_textarea'>
284 - <textarea placeholder='性别不限/学历不限/年龄不限/经验不限' bindinput="fuliyaoqiu"></textarea>  
285 - <view class='require_textarea_text'>0/200</view> 285 + <textarea placeholder='性别不限/学历不限/年龄不限/经验不限' bindinput="fuliyaoqiu" maxlength='200'></textarea>
  286 + <view class='require_textarea_text'>{{len_fuli}}/200</view>
286 </view> 287 </view>
287 </view> 288 </view>
288 <!-- 岗位描述 --> 289 <!-- 岗位描述 -->
289 <view class='require'> 290 <view class='require'>
290 <view class='require_top'>岗位描述</view> 291 <view class='require_top'>岗位描述</view>
291 <view class='require_textarea'> 292 <view class='require_textarea'>
292 - <textarea placeholder='性别不限/学历不限/年龄不限/经验不限'></textarea>  
293 - <view class='require_textarea_text' bindinput="gangweiyaoqiu">0/200</view> 293 + <textarea placeholder='性别不限/学历不限/年龄不限/经验不限' bindinput="gangweiyaoqiu" maxlength='200'></textarea>
  294 + <view class='require_textarea_text'>{{len_miaoshu}}/200</view>
294 </view> 295 </view>
295 </view> 296 </view>
296 </view> 297 </view>
@@ -37,7 +37,7 @@ page { @@ -37,7 +37,7 @@ page {
37 } 37 }
38 38
39 .item_right_text { 39 .item_right_text {
40 - font-size: 32rpx; 40 + font-size: 28rpx;
41 font-family: PingFang-SC-Medium; 41 font-family: PingFang-SC-Medium;
42 font-weight: 500; 42 font-weight: 500;
43 color: rgba(26, 26, 26, 1); 43 color: rgba(26, 26, 26, 1);
@@ -292,6 +292,12 @@ page { @@ -292,6 +292,12 @@ page {
292 display: flex; 292 display: flex;
293 justify-content: space-between; 293 justify-content: space-between;
294 } 294 }
  295 +.address{
  296 + margin-top: 20rpx;
  297 +}
  298 +.area_select{
  299 + display: flex;
  300 +}
295 301
296 .employ { 302 .employ {
297 display: flex; 303 display: flex;