We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f5241c commit bbd2df4Copy full SHA for bbd2df4
1 file changed
README.md
@@ -23,7 +23,7 @@ use hillpy\MiniProgramSDK;
23
$appid = '';
24
$appsecret = '';
25
26
-$MiniProgramSDK = new MiniProgramSDK($appid, $appsecret);
+$MiniProgram = new MiniProgram($appid, $appsecret);
27
28
$params['code'] = '';
29
$params['rawData'] = '';
@@ -32,13 +32,13 @@ $params['encryptedData'] = '';
32
$params['iv'] = '';
33
34
/**
35
- * 调用登录功能(解密用户信息)
+ * 调用解密用户信息功能
36
* 登录成功后,返回的数组包含code、msg、data三个元素
37
* data又包含session3rd(缓存标识名)、sessionKey(通过微信接口获取,用于解密用户信息)、data(用户信息数组,比如昵称、头像等)
38
* 之后建议将用户信息存库,并根据session3rd缓存用户信息。
39
* session3rd可理解为用户登录令牌token,session3rd需返回给小程序端
40
*/
41
-$res = $MiniProgramSDK->login($params);
+$res = $MiniProgram->decryptData($params);
42
43
44
if ($res['code'] == 100) {
0 commit comments