12345678910111213141516171819202122232425 |
- <?php
- namespace app\common\model;
- use think\Db;
- class AttendanceAddr extends Base{
- protected $autoWriteTimestamp = 'datetime';
- protected $createTime = 'create_time';
- protected $updateTime = 'update_time';
- public function updates(){
- $data = request()->post();
- if(isset($data['latlng']) && !empty($data['latlng'])){
- $arr = explode('-',$data['latlng']);
- $data['lat'] = $arr[0];
- $data['lng'] = $arr[1];
- }
- $data['org_id'] = cur_org_id();
- unset($data['latLng']);
- return $this->updateInfo($data,'AttendanceAddr','');
- }
- }
|