...
|
...
|
@@ -91,9 +91,13 @@ class ActivityController extends HomeBaseController |
|
|
$wx = new \WeChatCommon();
|
|
|
if(empty(session('user.city'))) {
|
|
|
$pos = Db:: name('user')->field('lat,lng')->where(['id' => session('user.id')])->find();
|
|
|
$return = json_decode(anti_analysis($pos['lat'], $pos['lng']), true);
|
|
|
$city = $return['result']['address_component']['city'];
|
|
|
session('user.city', $city);
|
|
|
if(empty($pos['lat']) || empty($pos['lng'])) {
|
|
|
|
|
|
}else {
|
|
|
$return = json_decode(anti_analysis($pos['lat'], $pos['lng']), true);
|
|
|
$city = $return['result']['address_component']['city'];
|
|
|
session('user.city', $city);
|
|
|
}
|
|
|
}
|
|
|
return $this->fetch(':_list', [
|
|
|
'result' => $result,
|
...
|
...
|
|