andypliang 6 роки тому
джерело
коміт
16c9bff16d

+ 5
- 4
manage-server/app/Http/Controllers/CommonController.php Переглянути файл

30
             return response()->json([
30
             return response()->json([
31
                 "status" => 0,
31
                 "status" => 0,
32
                 "data" => [
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
         } else if(array_key_exists("errcode", $auth)){
36
         } else if(array_key_exists("errcode", $auth)){
36
             return response()->json([
37
             return response()->json([
37
-                "status" => $auth->errcode,
38
-                "message" => $auth->errmsg]);
38
+                "status" => $auth["errcode"],
39
+                "message" => $auth["errmsg"]]);
39
         } else {
40
         } else {
40
             return response()->json([
41
             return response()->json([
41
-                "status" => -1, 
42
+                "status" => -1,
42
                 "data" => $auth
43
                 "data" => $auth
43
             ]);
44
             ]);
44
         }
45
         }

Loading…
Відмінити
Зберегти