dever 6 jaren geleden
bovenliggende
commit
6e46c3944e
2 gewijzigde bestanden met toevoegingen van 18 en 2 verwijderingen
  1. 8 2
      lib/Base.php
  2. 10 0
      src/App.php

+ 8 - 2
lib/Base.php

@@ -196,7 +196,7 @@ class Base
     public function combine($uid, $unionid, $col = 'unionid')
     {
     	$cur = $uid;
-        if ($col == 'mobile') {
+        if ($col == 'mobile' || $col == 'id') {
             $user_wechat = Dever::load('passport/user-all', array($col => $unionid));
         } else {
             $user_wechat = Dever::load('passport/wechat-state', array($col => $unionid));
@@ -224,7 +224,13 @@ class Base
                         $drop[$v['uid']] = $v['uid'];
                     }
                 }
-                
+            }
+
+            $test = Dever::input('test');
+
+            if ($test == 1) {
+                print_r($cur);
+                print_r($drop);die;
             }
             if ($drop) {
                 foreach ($drop as $k => $v) {

+ 10 - 0
src/App.php

@@ -14,6 +14,16 @@ class App extends Base
 
         return $uid;
     }
+
+    public function comcomuid()
+    {
+        $uid = Dever::input('uid');
+        $olduid = Dever::input('olduid');
+        $uid = $this->combine($uid, $olduid, 'id');
+
+        return $uid;
+    }
+
     /**
      * 更新用户信息
      *