dever 6 năm trước cách đây
mục cha
commit
4af31d636b
2 tập tin đã thay đổi với 8 bổ sung10 xóa
  1. 6 8
      service/src/Base.php
  2. 2 2
      vip/src/Buy.php

+ 6 - 8
service/src/Base.php

@@ -26,18 +26,16 @@ class Base
         $this->signature = Dever::input('signature');
         $this->source_type = Dever::input('source_type');
 
-        if ($this->source_type) {
+        $this->user = Dever::load('passport/user')->data();
+        # 用户信息
+        if (!$this->user && $this->signature) {
+            $uid = Dever::load('passport/applet')->check();
+            $this->user = Dever::db('passport/user')->one($uid);
+        } elseif ($this->source_type) {
             $this->user = array();
             $this->user['id'] = -1;
             $this->user['username'] = '未登录用户';
             $this->user['mobile'] = '';
-        } else {
-            $this->user = Dever::load('passport/user')->data();
-            # 用户信息
-            if (!$this->user && $this->signature) {
-                $uid = Dever::load('passport/applet')->check();
-                $this->user = Dever::db('passport/user')->one($uid);
-            }
         }
     }
 

+ 2 - 2
vip/src/Buy.php

@@ -38,9 +38,9 @@ class Buy extends Base
         $info['unpay'] = $this->url('pay', array(), 'vip');
         # 跳转至成功页面
         if ($this->source_type == 'android') {
-
+            $info['ypay'] = 'javascript:JstyleApp.goBack();';
         } elseif ($this->source_type == 'ios') {
-
+            $info['ypay'] = 'jstyle://goback';
         } else {
             $info['ypay'] = $this->url('success', array('buy' => -1, 'order_id' => -1), 'vip');
         }