andypliang 6 년 전
부모
커밋
16c9bff16d
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5
    4
      manage-server/app/Http/Controllers/CommonController.php

+ 5
- 4
manage-server/app/Http/Controllers/CommonController.php 파일 보기

@@ -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…
취소
저장