andypliang 6 lat temu
rodzic
commit
16c9bff16d

+ 5
- 4
manage-server/app/Http/Controllers/CommonController.php Wyświetl plik

@@ -30,15 +30,16 @@ class CommonController extends Controller
30 30
             return response()->json([
31 31
                 "status" => 0,
32 32
                 "data" => [
33
-                    "token" => sha1($auth->openid . $auth->access_token)
33
+                    "openid" => $auth["openid"],
34
+                    "token" => sha1($auth["openid"] . $auth["session_key"])
34 35
                 ]]);
35 36
         } else if(array_key_exists("errcode", $auth)){
36 37
             return response()->json([
37
-                "status" => $auth->errcode,
38
-                "message" => $auth->errmsg]);
38
+                "status" => $auth["errcode"],
39
+                "message" => $auth["errmsg"]]);
39 40
         } else {
40 41
             return response()->json([
41
-                "status" => -1, 
42
+                "status" => -1,
42 43
                 "data" => $auth
43 44
             ]);
44 45
         }

Loading…
Anuluj
Zapisz