Module: ThirdPartyWxa::Api::Login

Included in:
Plugin
Defined in:
lib/third_party_wxa/api/login.rb

Instance Method Summary collapse

Instance Method Details

#jscode2session(options) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/third_party_wxa/api/login.rb', line 8

def jscode2session options
	params = {
		component_appid: appid,
		component_access_token: get_component_access_token,
		grant_type: 'authorization_code'
	}.merge!(options.slice(:appid, :js_code))
	ThirdPartyWxa.http_get_without_component_access_token 'sns', 'component/jscode2session', params
end