Ejemplo n.º 1
0
 public function actionIndex()
 {
     echo 'Hello, world!!';
     //U::W(U::getQqAddress(114.253578, 30.585514));
     $arr = U::getMobileLocation('13871407676');
     if (!empty($arr['errcode'])) {
         U::W(['err', $arr]);
     } else {
         U::W($arr);
     }
     return;
     $clientOrganization = ClientOrganization::findOne(50);
     U::W($clientOrganization);
     $directSubordinateOrganizations = $clientOrganization->directSubordinateOrganizations;
     U::W($directSubordinateOrganizations);
 }
Ejemplo n.º 2
0
 public function getCity()
 {
     if (empty($this->city) || strtotime($this->update_time) < strtotime('-1 month')) {
         $resp = \app\models\U::getMobileLocation($this->mobile);
         //if (empty($resp['errcode'])) {
         $this->updateAttributes(['carrier' => $resp['company'], 'province' => $resp['province'], 'city' => $resp['city'], 'zip' => $resp['zip'], 'areacode' => $resp['areacode'], 'cardtype' => $resp['card']]);
         // }
     }
     return $this->city;
 }