|
@@ -42,6 +42,22 @@ class Auth
|
|
|
$this->wechat = new Wechat();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 小程序登录login
|
|
|
+ *
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function applet_login_api()
|
|
|
+ {
|
|
|
+ $param['js_code'] = Dever::input('code');
|
|
|
+ $param['appid'] = Dever::input('appid');
|
|
|
+ $param['component_access_token'] = $this->wechat->token();
|
|
|
+ $param['component_appid'] = $this->wechat->project['id'];
|
|
|
+ $data = $this->wechat->curl('applet_login', $param);
|
|
|
+
|
|
|
+ echo $data;die;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取component token 一般为系统token
|
|
|
*
|