eric_weixin 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/lib/eric_weixin.rb +2 -1
- data/lib/eric_weixin/app/controllers/weixin/weixin_controller.rb +4 -7
- data/lib/eric_weixin/app/model/access_token.rb +20 -17
- data/lib/eric_weixin/app/model/message_log.rb +3 -3
- data/lib/eric_weixin/app/model/public_account.rb +175 -174
- data/lib/eric_weixin/app/model/reply_message_rule.rb +51 -31
- data/lib/eric_weixin/app/model/template_message_log.rb +12 -4
- data/lib/eric_weixin/app/model/two_dimension_code.rb +146 -0
- data/lib/eric_weixin/app/model/weixin_user.rb +13 -10
- data/lib/eric_weixin/app/moudles/mult_customer.rb +2 -2
- data/lib/eric_weixin/app/moudles/snsapi.rb +4 -4
- data/lib/eric_weixin/version.rb +1 -1
- metadata +3 -4
- data/.idea/workspace.xml +0 -935
- data/lib/eric_weixin/app/moudles/two_dimension_code.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec075d14a655462edbc8bc024cf472a7bf13fbd8
|
4
|
+
data.tar.gz: e50d4adb4a858532fe4705161816b282e3030334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49d3719a1a0d3ea9b133c7831660249fe3b58fe53019f0d7e541b921dfc0126c8e108bbd9e6d22c2df3fc01875e35ef0761b8c1e59e80e8c965290eadd4ce512
|
7
|
+
data.tar.gz: 51328ca0e18e5d7afdf5739e44ff21259302c3e9d782084f3c82df0adfe64405beff44867d233451df7d8fa983a2e5323906f5e2dd45f111c2138b2921ffc153
|
data/.gitignore
CHANGED
data/lib/eric_weixin.rb
CHANGED
@@ -11,12 +11,13 @@ require File.dirname(__FILE__) + '/eric_weixin/app/model/reply_message_rule.rb'
|
|
11
11
|
require File.dirname(__FILE__) + '/eric_weixin/app/model/template_message_log.rb'
|
12
12
|
require File.dirname(__FILE__) + '/eric_weixin/app/model/weixin_user.rb'
|
13
13
|
require File.dirname(__FILE__) + '/eric_weixin/app/model/message_log.rb'
|
14
|
+
require File.dirname(__FILE__) + '/eric_weixin/app/model/two_dimension_code.rb'
|
14
15
|
|
15
16
|
#加载moudle
|
16
17
|
require File.dirname(__FILE__) + '/eric_weixin/app/moudles/reply_message.rb'
|
17
18
|
require File.dirname(__FILE__) + '/eric_weixin/app/moudles/mult_customer.rb'
|
18
19
|
require File.dirname(__FILE__) + '/eric_weixin/app/moudles/snsapi.rb'
|
19
|
-
|
20
|
+
|
20
21
|
|
21
22
|
#加载controller
|
22
23
|
require File.dirname(__FILE__) + '/eric_weixin/app/controllers/weixin/weixin_controller'
|
@@ -8,13 +8,11 @@ module EricWeixin
|
|
8
8
|
|
9
9
|
def reply
|
10
10
|
request_body = request.body.read
|
11
|
-
|
12
|
-
|
11
|
+
public_account = ::EricWeixin::PublicAccount.find_by_weixin_app_id params[:app_id]
|
13
12
|
"message from wechat: ".to_logger
|
14
13
|
request_body.to_logger
|
15
14
|
weixin_message = MultiXml.parse(request_body).deep_symbolize_keys[:xml]
|
16
|
-
|
17
|
-
message = ::EricWeixin::ReplyMessageRule.process_rule(weixin_message, weixin_secret_key)
|
15
|
+
message = ::EricWeixin::ReplyMessageRule.process_rule(weixin_message, public_account)
|
18
16
|
render xml: message
|
19
17
|
end
|
20
18
|
|
@@ -47,17 +45,16 @@ module EricWeixin
|
|
47
45
|
return
|
48
46
|
end
|
49
47
|
|
50
|
-
|
48
|
+
|
51
49
|
response = RestClient.get "https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{weixin_public_account.weixin_app_id}&secret=#{weixin_public_account.weixin_secret_key}&code=#{params[:code]}&grant_type=authorization_code"
|
52
50
|
result_hash = JSON.parse(response.body)
|
53
|
-
|
54
51
|
query_array << ["openid", result_hash['openid']]
|
55
52
|
query_array << ["access_token", result_hash['access_token']]
|
56
53
|
query_array << ["expires_in", result_hash['expires_in']]
|
57
54
|
query_array << ['refresh_token', result_hash['refresh_token']]
|
58
55
|
query_array << ['scope', result_hash['scope']]
|
59
56
|
query_array << ['agree', 'yes']
|
60
|
-
|
57
|
+
|
61
58
|
response = RestClient.get "https://api.weixin.qq.com/sns/userinfo?access_token=#{result_hash['access_token']}&openid=#{result_hash['openid']}&lang=zh_CN"
|
62
59
|
user_info_hash = JSON.parse(response.body)
|
63
60
|
query_array << ["nickname", user_info_hash['nickname']]
|
@@ -1,31 +1,32 @@
|
|
1
1
|
module EricWeixin
|
2
2
|
class AccessToken < ActiveRecord::Base
|
3
3
|
|
4
|
+
belongs_to :public_account, :class_name => '::EricWeixin::PublicAccount', foreign_key: :experience_center_id
|
5
|
+
|
4
6
|
self.table_name = "weixin_access_tokens"
|
5
7
|
|
6
8
|
def self.get_valid_access_token_by_app_id options
|
7
|
-
|
8
|
-
::EricWeixin::AccessToken.get_valid_access_token
|
9
|
+
pa = ::EricWeixin::PublicAccount.find_by_weixin_app_id options[:app_id]
|
10
|
+
::EricWeixin::AccessToken.get_valid_access_token public_account_id: pa.id
|
9
11
|
end
|
10
12
|
|
11
13
|
|
12
|
-
# 获取有效的Token
|
13
|
-
# 参数为:
|
14
|
-
# ::EricWeixin::AccessToken.get_valid_access_token
|
14
|
+
# 获取有效的Token。
|
15
|
+
# 参数为: public_account_id
|
16
|
+
# ::EricWeixin::AccessToken.get_valid_access_token public_account_id: 1
|
15
17
|
def self.get_valid_access_token options
|
16
18
|
::EricWeixin::AccessToken.transaction do
|
17
|
-
access_token = ::EricWeixin::AccessToken.
|
19
|
+
access_token = ::EricWeixin::AccessToken.find_by_public_account_id options[:public_account_id]
|
18
20
|
if access_token.blank?
|
19
|
-
public_account = ::EricWeixin::PublicAccount.
|
20
|
-
access_token = ::EricWeixin::AccessToken.new :
|
21
|
-
|
22
|
-
|
23
|
-
:public_account_id => public_account.id
|
21
|
+
public_account = ::EricWeixin::PublicAccount.find_by_id options[:public_account_id]
|
22
|
+
access_token = ::EricWeixin::AccessToken.new :access_token => get_new_token(options[:public_account_id]),
|
23
|
+
:expired_at => Time.now.to_i + 2*60*60,
|
24
|
+
:public_account_id => public_account.id
|
24
25
|
access_token.save!
|
25
26
|
end
|
26
27
|
|
27
28
|
if Time.now.to_i > (access_token.expired_at.to_i - 30)
|
28
|
-
access_token.access_token = get_new_token(options[:
|
29
|
+
access_token.access_token = get_new_token(options[:public_account_id])
|
29
30
|
access_token.expired_at = Time.now.to_i + 2*60*60
|
30
31
|
access_token.save!
|
31
32
|
end
|
@@ -35,12 +36,14 @@ module EricWeixin
|
|
35
36
|
end
|
36
37
|
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
account = ::EricWeixin::PublicAccount.where(:weixin_secret_key => secret_key).first
|
39
|
+
#::EricWeixin::AccessToken.get_new_token '5e3b98ca0000959946657212739fd535'
|
40
|
+
def self.get_new_token public_account_id
|
41
|
+
account = ::EricWeixin::PublicAccount.find_by_id public_account_id
|
42
42
|
BusinessException.raise 'account 不存在' if account.blank?
|
43
|
-
|
43
|
+
url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=#{account.weixin_app_id}&secret=#{account.weixin_secret_key}"
|
44
|
+
response = RestClient.get url
|
45
|
+
pp '.........'
|
46
|
+
pp response
|
44
47
|
JSON.parse(response)["access_token"]
|
45
48
|
end
|
46
49
|
end
|
@@ -3,20 +3,20 @@ class EricWeixin::MessageLog < ActiveRecord::Base
|
|
3
3
|
class << self
|
4
4
|
|
5
5
|
def create_public_account_receive_message_log options
|
6
|
-
options = options.select{|k,v| [:openid, :
|
6
|
+
options = options.select{|k,v| [:openid,:event_key, :weixin_public_account_id, :message_type, :message_id, :data, :passive_reply_message, :process_status, :event_name, :create_time, :parent_id].include? k }
|
7
7
|
options[:account_receive_flg] = 0
|
8
8
|
self.create_message_log options
|
9
9
|
end
|
10
10
|
|
11
11
|
def create_public_account_send_message_log options
|
12
|
-
options = options.select{|k,v| [:openid, :
|
12
|
+
options = options.select{|k,v| [:openid, :event_key,:weixin_public_account_id, :message_type, :message_id, :data, :passive_reply_message, :process_status, :event_name, :create_time, :parent_id].include? k }
|
13
13
|
options[:account_receive_flg] = 1
|
14
14
|
self.create_message_log options
|
15
15
|
end
|
16
16
|
|
17
17
|
def create_message_log options
|
18
18
|
EricWeixin::MessageLog.transaction do
|
19
|
-
log = EricWeixin::MessageLog.new options.select{|k,v| [:openid, :
|
19
|
+
log = EricWeixin::MessageLog.new options.select{|k,v| [:openid,:event_key, :weixin_public_account_id, :message_type, :message_id, :data, :account_receive_flg, :passive_reply_message, :process_status, :event_name, :create_time, :parent_id].include? k }
|
20
20
|
log.save!
|
21
21
|
log
|
22
22
|
end
|
@@ -1,185 +1,186 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
class EricWeixin::PublicAccount < ActiveRecord::Base
|
2
|
+
require "rest-client"
|
3
|
+
self.table_name = "weixin_public_accounts"
|
4
|
+
has_many :weixin_users, :class_name => '::EricWeixin::WeixinUser', foreign_key: "weixin_public_account_id"
|
5
|
+
has_many :two_dimension_codes, :class_name => '::EricWeixin::TwoDimensionCode', foreign_key: "weixin_public_account_id"
|
6
|
+
has_one :access_token, :class_name => '::EricWeixin::AccessToken', foreign_key: "public_account_id"
|
6
7
|
|
8
|
+
#
|
9
|
+
# def self.get_secret app_id
|
10
|
+
# account = ::EricWeixin::PublicAccount.where(weixin_app_id: app_id).first
|
11
|
+
# account.weixin_secret_key
|
12
|
+
# end
|
7
13
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
14
|
+
#::EricWeixin::PublicAccount.first.get_user_data_from_weixin_api 'osyUtswoeJ9d7p16RdpC5grOeukQ'
|
15
|
+
#返回Hash信息
|
16
|
+
def get_user_data_from_weixin_api openid
|
17
|
+
token = ::EricWeixin::AccessToken.get_valid_access_token public_account_id: self.id
|
18
|
+
response = RestClient.get "https://api.weixin.qq.com/cgi-bin/user/info?access_token=#{token}&openid=#{openid}&lang=zh_CN"
|
19
|
+
response = JSON.parse response.body
|
20
|
+
response["nickname"] = CGI::escape(response["nickname"]) if not response["nickname"].blank?
|
21
|
+
response
|
22
|
+
end
|
12
23
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
response
|
21
|
-
end
|
24
|
+
#::EricWeixin::PublicAccount.first.weixin_menus
|
25
|
+
def weixin_menus
|
26
|
+
token = ::EricWeixin::AccessToken.get_valid_access_token public_account_id: self.id
|
27
|
+
response = RestClient.get "https://api.weixin.qq.com/cgi-bin/menu/get?access_token=#{token}"
|
28
|
+
response = JSON.parse response.body
|
29
|
+
response['menu']
|
30
|
+
end
|
22
31
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
32
|
+
#
|
33
|
+
# ::EricWeixin::PublicAccount.first.create_menu '{
|
34
|
+
# "button":[
|
35
|
+
# {
|
36
|
+
# "name":"俱乐部2",
|
37
|
+
# "sub_button":[
|
38
|
+
#
|
39
|
+
# {
|
40
|
+
# "type":"click",
|
41
|
+
# "name":"节目介绍",
|
42
|
+
# "key":"V1001_PROGRAMME_INTRODUCTION"
|
43
|
+
# }]
|
44
|
+
# },
|
45
|
+
# {
|
46
|
+
# "type":"view",
|
47
|
+
# "name":"创意社区",
|
48
|
+
# "url":"http://m.wsq.qq.com/264164362"
|
49
|
+
# },
|
50
|
+
# {
|
51
|
+
# "name":"辣妈奶爸", 13818518038 余老师
|
52
|
+
# "sub_button":[
|
53
|
+
# {
|
54
|
+
# "type":"click",
|
55
|
+
# "name":"百家言",
|
56
|
+
# "key":"V1001_BAIJIAYAN"
|
57
|
+
# },
|
58
|
+
# {
|
59
|
+
# "type":"view",
|
60
|
+
# "name":"辣妈养成记",
|
61
|
+
# "url":"http://m.wsq.qq.com/264164362/t/32"
|
62
|
+
# },
|
63
|
+
# {
|
64
|
+
# "type":"view",
|
65
|
+
# "name":"奶爸集中营4",
|
66
|
+
# "url":"http://m.wsq.qq.com/264164362/t/35"
|
67
|
+
# }]
|
68
|
+
# }]
|
69
|
+
# }'
|
70
|
+
def create_menu menu_json
|
71
|
+
::EricWeixin::PublicAccount.transaction do
|
72
|
+
self.menu_json = menu_json
|
73
|
+
self.save!
|
74
|
+
token = ::EricWeixin::AccessToken.get_valid_access_token public_account_id: self.id
|
75
|
+
response = RestClient.post "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=#{token}", menu_json
|
27
76
|
response = JSON.parse response.body
|
28
|
-
response[
|
29
|
-
|
30
|
-
|
31
|
-
# ::EricWeixin::PublicAccount.first.create_menu '{
|
32
|
-
# "button":[
|
33
|
-
# {
|
34
|
-
# "name":"俱乐部2",
|
35
|
-
# "sub_button":[
|
36
|
-
#
|
37
|
-
# {
|
38
|
-
# "type":"click",
|
39
|
-
# "name":"节目介绍",
|
40
|
-
# "key":"V1001_PROGRAMME_INTRODUCTION"
|
41
|
-
# }]
|
42
|
-
# },
|
43
|
-
# {
|
44
|
-
# "type":"view",
|
45
|
-
# "name":"创意社区",
|
46
|
-
# "url":"http://m.wsq.qq.com/264164362"
|
47
|
-
# },
|
48
|
-
# {
|
49
|
-
# "name":"辣妈奶爸", 13818518038 余老师
|
50
|
-
# "sub_button":[
|
51
|
-
# {
|
52
|
-
# "type":"click",
|
53
|
-
# "name":"百家言",
|
54
|
-
# "key":"V1001_BAIJIAYAN"
|
55
|
-
# },
|
56
|
-
# {
|
57
|
-
# "type":"view",
|
58
|
-
# "name":"辣妈养成记",
|
59
|
-
# "url":"http://m.wsq.qq.com/264164362/t/32"
|
60
|
-
# },
|
61
|
-
# {
|
62
|
-
# "type":"view",
|
63
|
-
# "name":"奶爸集中营4",
|
64
|
-
# "url":"http://m.wsq.qq.com/264164362/t/35"
|
65
|
-
# }]
|
66
|
-
# }]
|
67
|
-
# }'
|
68
|
-
def create_menu menu_json
|
69
|
-
::EricWeixin::PublicAccount.transaction do
|
70
|
-
self.menu_json = menu_json
|
71
|
-
self.save!
|
72
|
-
token = ::EricWeixin::AccessToken.get_valid_access_token weixin_secret_key: self.weixin_secret_key
|
73
|
-
response = RestClient.post "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=#{token}", menu_json
|
74
|
-
response = JSON.parse response.body
|
75
|
-
BusinessException.raise response["errmsg"] if response["errcode"].to_i!=0
|
76
|
-
pp response
|
77
|
-
return 0
|
78
|
-
end
|
77
|
+
BusinessException.raise response["errmsg"] if response["errcode"].to_i!=0
|
78
|
+
pp response
|
79
|
+
return 0
|
79
80
|
end
|
81
|
+
end
|
80
82
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
end
|
94
|
-
tmp_next_openid = response["next_openid"]
|
95
|
-
self.rebuild_users tmp_next_openid unless tmp_next_openid.blank?
|
83
|
+
# ::EricWeixin::PublicAccount.first.rebuild_users
|
84
|
+
def rebuild_users next_openid = nil
|
85
|
+
token = ::EricWeixin::AccessToken.get_valid_access_token public_account_id: self.id
|
86
|
+
response = if next_openid.blank?
|
87
|
+
RestClient.get "https://api.weixin.qq.com/cgi-bin/user/get?access_token=#{token}"
|
88
|
+
else
|
89
|
+
RestClient.get "https://api.weixin.qq.com/cgi-bin/user/get?access_token=#{token}&next_openid=#{next_openid}"
|
90
|
+
end
|
91
|
+
response = JSON.parse response.body
|
92
|
+
if response["count"].to_i > 0
|
93
|
+
response["data"]["openid"].each do |openid|
|
94
|
+
::EricWeixin::WeixinUser.create_weixin_user self.id, openid
|
96
95
|
end
|
96
|
+
tmp_next_openid = response["next_openid"]
|
97
|
+
self.rebuild_users tmp_next_openid unless tmp_next_openid.blank?
|
97
98
|
end
|
99
|
+
end
|
98
100
|
|
99
101
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
end
|
102
|
+
GLOBAL_CODES = {
|
103
|
+
-1 => "系统繁忙",
|
104
|
+
0 => "请求成功",
|
105
|
+
40001 => "获取access_token时AppSecret错误,或者access_token无效",
|
106
|
+
40002 => "不合法的凭证类型",
|
107
|
+
40003 => "不合法的OpenID",
|
108
|
+
40004 => "不合法的媒体文件类型",
|
109
|
+
40005 => "不合法的文件类型",
|
110
|
+
40006 => "不合法的文件大小",
|
111
|
+
40007 => "不合法的媒体文件id",
|
112
|
+
40008 => "不合法的消息类型",
|
113
|
+
40009 => "不合法的图片文件大小",
|
114
|
+
40010 => "不合法的语音文件大小",
|
115
|
+
40011 => "不合法的视频文件大小",
|
116
|
+
40012 => "不合法的缩略图文件大小",
|
117
|
+
40013 => "不合法的APPID",
|
118
|
+
40014 => "不合法的access_token",
|
119
|
+
40015 => "不合法的菜单类型",
|
120
|
+
40016 => "不合法的按钮个数",
|
121
|
+
40017 => "不合法的按钮个数",
|
122
|
+
40018 => "不合法的按钮名字长度",
|
123
|
+
40019 => "不合法的按钮KEY长度",
|
124
|
+
40020 => "不合法的按钮URL长度",
|
125
|
+
40021 => "不合法的菜单版本号",
|
126
|
+
40022 => "不合法的子菜单级数",
|
127
|
+
40023 => "不合法的子菜单按钮个数",
|
128
|
+
40024 => "不合法的子菜单按钮类型",
|
129
|
+
40025 => "不合法的子菜单按钮名字长度",
|
130
|
+
40026 => "不合法的子菜单按钮KEY长度",
|
131
|
+
40027 => "不合法的子菜单按钮URL长度",
|
132
|
+
40028 => "不合法的自定义菜单使用用户",
|
133
|
+
40029 => "不合法的oauth_code",
|
134
|
+
40030 => "不合法的refresh_token",
|
135
|
+
40031 => "不合法的openid列表",
|
136
|
+
40032 => "不合法的openid列表长度",
|
137
|
+
40033 => "不合法的请求字符,不能包含xxxx格式的字符",
|
138
|
+
40035 => "不合法的参数",
|
139
|
+
40038 => "不合法的请求格式",
|
140
|
+
40039 => "不合法的URL长度",
|
141
|
+
40050 => "不合法的分组id",
|
142
|
+
40051 => "分组名字不合法",
|
143
|
+
41001 => "缺少access_token参数",
|
144
|
+
41002 => "缺少appid参数",
|
145
|
+
41003 => "缺少refresh_token参数",
|
146
|
+
41004 => "缺少secret参数",
|
147
|
+
41005 => "缺少多媒体文件数据",
|
148
|
+
41006 => "缺少media_id参数",
|
149
|
+
41007 => "缺少子菜单数据",
|
150
|
+
41008 => "缺少oauth code",
|
151
|
+
41009 => "缺少openid",
|
152
|
+
42001 => "access_token超时",
|
153
|
+
42002 => "refresh_token超时",
|
154
|
+
42003 => "oauth_code超时",
|
155
|
+
43001 => "需要GET请求",
|
156
|
+
43002 => "需要POST请求",
|
157
|
+
43003 => "需要HTTPS请求",
|
158
|
+
43004 => "需要接收者关注",
|
159
|
+
43005 => "需要好友关系",
|
160
|
+
44001 => "多媒体文件为空",
|
161
|
+
44002 => "POST的数据包为空",
|
162
|
+
44003 => "图文消息内容为空",
|
163
|
+
44004 => "文本消息内容为空",
|
164
|
+
45001 => "多媒体文件大小超过限制",
|
165
|
+
45002 => "消息内容超过限制",
|
166
|
+
45003 => "标题字段超过限制",
|
167
|
+
45004 => "描述字段超过限制",
|
168
|
+
45005 => "链接字段超过限制",
|
169
|
+
45006 => "图片链接字段超过限制",
|
170
|
+
45007 => "语音播放时间超过限制",
|
171
|
+
45008 => "图文消息超过限制",
|
172
|
+
45009 => "接口调用超过限制",
|
173
|
+
45010 => "创建菜单个数超过限制",
|
174
|
+
45015 => "回复时间超过限制",
|
175
|
+
45016 => "系统分组,不允许修改",
|
176
|
+
45017 => "分组名字过长",
|
177
|
+
45018 => "分组数量超过上限",
|
178
|
+
46001 => "不存在媒体数据",
|
179
|
+
46002 => "不存在的菜单版本",
|
180
|
+
46003 => "不存在的菜单数据",
|
181
|
+
46004 => "不存在的用户",
|
182
|
+
47001 => "解析JSON/XML内容错误",
|
183
|
+
48001 => "api功能未授权",
|
184
|
+
50001 => "用户未授权该api"
|
185
|
+
}
|
186
|
+
end
|