作者 lihan
1 个管道 的构建 通过 耗费 0 秒

支付宝

@@ -91,9 +91,13 @@ class ActivityController extends HomeBaseController @@ -91,9 +91,13 @@ class ActivityController extends HomeBaseController
91 $wx = new \WeChatCommon(); 91 $wx = new \WeChatCommon();
92 if(empty(session('user.city'))) { 92 if(empty(session('user.city'))) {
93 $pos = Db:: name('user')->field('lat,lng')->where(['id' => session('user.id')])->find(); 93 $pos = Db:: name('user')->field('lat,lng')->where(['id' => session('user.id')])->find();
94 - $return = json_decode(anti_analysis($pos['lat'], $pos['lng']), true);  
95 - $city = $return['result']['address_component']['city'];  
96 - session('user.city', $city); 94 + if(empty($pos['lat']) || empty($pos['lng'])) {
  95 +
  96 + }else {
  97 + $return = json_decode(anti_analysis($pos['lat'], $pos['lng']), true);
  98 + $city = $return['result']['address_component']['city'];
  99 + session('user.city', $city);
  100 + }
97 } 101 }
98 return $this->fetch(':_list', [ 102 return $this->fetch(':_list', [
99 'result' => $result, 103 'result' => $result,
@@ -360,8 +360,9 @@ class OrderController extends HomeBaseController @@ -360,8 +360,9 @@ class OrderController extends HomeBaseController
360 //微信支付宝中转页面 360 //微信支付宝中转页面
361 public function temp() { 361 public function temp() {
362 if(cmf_is_wechat()) { 362 if(cmf_is_wechat()) {
363 - echo '点击右上角,使用浏览器打开'; 363 + echo '<div style="">点击右上角,在浏览器打开</div>';
364 }else { 364 }else {
  365 + $
365 $this->alipay(1); 366 $this->alipay(1);
366 } 367 }
367 368