提交其他文件

This commit is contained in:
2026-03-11 18:24:59 +08:00
parent 4b490670f1
commit f0d7f60fd5
1377 changed files with 73456 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<?php
namespace app\api\logic;
use app\common\logic\BaseLogic;
use app\common\model\area\City;
use app\common\model\area\Area;
class AreaLogic extends BaseLogic
{
public static function getArea(){
$result = City::where('status',1)->with(['getArea'])->select()->toArray();
return $result;
}
public static function getDfaultArea($data){
$result = Area::where("lng",$data['longitude'])->where("lat",$data['latitude'])->find();
if($result == null){
return self::getDfault();
}
// $r = City::where('city_id',$result['id'])->find();
// if($r == null){
// return self::getDfault();
// }
return $result;
}
public static function getDfault(){
return Area::where("lng","121.472644")->where("lat","31.231706")->find();
}
}