|
@@ -18,7 +18,13 @@ class LoginController extends Controller
|
|
$encryptedData = $request->input('encryptedData');
|
|
$encryptedData = $request->input('encryptedData');
|
|
$app = app('wechat.mini_program');
|
|
$app = app('wechat.mini_program');
|
|
$res = $app->auth->session($code);
|
|
$res = $app->auth->session($code);
|
|
- Log::info($res);
|
|
|
|
|
|
+
|
|
|
|
+ if(!isset($res['session_key'])) {
|
|
|
|
+ return response()->json(['status' => 'error', 'info' => '接口错误']);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $info = $app->encryptor->decryptData($res['session_key'], $iv, $encryptedData);
|
|
|
|
+ Log::info($info);
|
|
return response()->json(['status' => 'success', 'info' => '操作成功']);
|
|
return response()->json(['status' => 'success', 'info' => '操作成功']);
|
|
}
|
|
}
|
|
}
|
|
}
|