0
0

AttendanceAddr.php 624 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\common\model;
  3. use think\Db;
  4. class AttendanceAddr extends Base{
  5. protected $autoWriteTimestamp = 'datetime';
  6. protected $createTime = 'create_time';
  7. protected $updateTime = 'update_time';
  8. public function updates(){
  9. $data = request()->post();
  10. if(isset($data['latlng']) && !empty($data['latlng'])){
  11. $arr = explode('-',$data['latlng']);
  12. $data['lat'] = $arr[0];
  13. $data['lng'] = $arr[1];
  14. }
  15. $data['org_id'] = cur_org_id();
  16. unset($data['latLng']);
  17. return $this->updateInfo($data,'AttendanceAddr','');
  18. }
  19. }