浏览代码

no message

wzh 5 年之前
父节点
当前提交
a2666ebf03
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      api/application/controllers/Project.php

+ 3 - 3
api/application/controllers/Project.php

@@ -528,15 +528,15 @@ class Project extends Base_Controller {
                 $location_ch = '暂无位置信息,请在编辑项目页面选择位置信息';
                 $location_en = 'There is no location information, please select location information on the edit project page.';
             }else{
-                $res1 = $this->Global_location_model->getOne($data['cityid'],'level,pid,chinese_name,longitude,latitude,english_name');
+                $res1 = $this->Global_location_model->get_one(['id'=>$data['cityid']],'level,pid,chinese_name,longitude,latitude,english_name');
                 $data['longitude'] = $res1['longitude'];
                 $data['latitude'] = $res1['latitude'];
-                $res2 = $this->Global_location_model->getOne($res1['pid'],'pid,chinese_name,english_name');
+                $res2 = $this->Global_location_model->get_one(['id'=>$res1['pid']],'pid,chinese_name,english_name');
                 if ($res1['level'] == 4) {
                     $data['areaId'] = $data['cityid'];
                     $data['cityId'] = $res1['pid'];
                     $data['provinceId'] = $res2['pid'];
-                    $res3 = $this->Global_location_model->getOne($res2['pid'],'pid,chinese_name,english_name');
+                    $res3 = $this->Global_location_model->get_one(['id'=>$res2['pid']],'pid,chinese_name,english_name');
                     $data['countryId'] = $res3['pid'];
                     $location_ch = $res3['chinese_name'].','.$res2['chinese_name'].','.$res1['chinese_name'];
                     $location_en = $res1['english_name'].','.$res2['english_name'].','.$res3['english_name'];