rabin hace 6 años
padre
commit
d2c8470e27
Se han modificado 2 ficheros con 10 adiciones y 0 borrados
  1. 4 0
      src/Applet.php
  2. 6 0
      src/Reg.php

+ 4 - 0
src/Applet.php

@@ -349,6 +349,10 @@ class Applet extends Base
 
     private function getLoginInfo()
     {
+        $session_key = Dever::input('session_key');
+        if ($session_key) {
+            return array('session_key' => $session_key, 'openid' => $openid);
+        }
         $applet = $this->getApplet();
         $appid = $applet['appid'];
         $secret = $applet['secret'];

+ 6 - 0
src/Reg.php

@@ -181,6 +181,12 @@ class Reg extends Base
             Dever::alert('请填写正确的邮箱');
         }
 
+        $check = Dever::config('base', 'project')->passportCheckEmail;
+
+        if ($check && !strstr($email, $check[0])) {
+            Dever::alert($check[1]);
+        }
+
         return $email;
     }