third_party_wxa 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/third_party_wxa/api/login.rb +1 -1
- data/lib/third_party_wxa/plugin.rb +2 -1
- data/lib/third_party_wxa/version.rb +1 -1
- data/lib/third_party_wxa.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 299ad55c809a181eb2edf05fdb1a42853cc00b1f90f47a5974b47e2446e33e27
|
4
|
+
data.tar.gz: 63351888433ff85ff07a469898ca46414c5a53713c782617ee7a8f5d357530d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3477aa284f073b0840edc5bd378e52cf369e14e234bd75eecf1234765154052a8e8346b0bbdc34db468c7f5f912a918227fb0e7abc0c44da10fee350cfce4093
|
7
|
+
data.tar.gz: 01c7338901b34f371b63bd65250771d575c7bea6ae2aca941009de8adc43da95e11291446d7443d3c61522a712ab35be2f642666677a163ff7f6d3499f7f6481
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ module ThirdPartyWxa
|
|
11
11
|
component_access_token: get_component_access_token,
|
12
12
|
grant_type: 'authorization_code'
|
13
13
|
}.merge!(options.slice(:appid, :js_code))
|
14
|
-
|
14
|
+
ThirdPartyWxa.http_get_without_component_access_token 'sns', 'component/jscode2session', params
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -15,9 +15,10 @@ module ThirdPartyWxa
|
|
15
15
|
attr_accessor :pre_auth_code, :pre_expire_at #10分钟
|
16
16
|
attr_accessor :token_store
|
17
17
|
|
18
|
-
def initialize
|
18
|
+
def initialize ticket = nil
|
19
19
|
@appid = ThirdPartyWxa.appid
|
20
20
|
@appsecret = ThirdPartyWxa.appsecret
|
21
|
+
@component_verify_ticket = ticket
|
21
22
|
@token_store = token_store_init
|
22
23
|
p "third party wxa use #{@token_store.class.to_s}"
|
23
24
|
end
|
data/lib/third_party_wxa.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'rest_client'
|
2
2
|
require 'redis'
|
3
3
|
require 'active_support'
|
4
|
+
require 'active_support/core_ext'
|
4
5
|
require 'third_party_wxa/config'
|
5
6
|
require "third_party_wxa/api"
|
6
7
|
require 'third_party_wxa/plugin'
|
@@ -19,6 +20,7 @@ module ThirdPartyWxa
|
|
19
20
|
def http_get_without_component_access_token scope, url, url_params={}
|
20
21
|
url = "#{BASE}#{scope}/#{url}"
|
21
22
|
p "get ----- #{url}"
|
23
|
+
p url_params
|
22
24
|
JSON.parse RestClient.get URI.encode(url), {params: url_params}
|
23
25
|
end
|
24
26
|
|