Commit f211b6806b50471079d27e053df14b73e778b3bd

Authored by lanrion
1 parent 795147d0
Exists in master

fixed covert_to_open_id API

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
lib/qy_wechat_api/api/user.rb
... ... @@ -71,7 +71,8 @@ module QyWechatApi
71 71  
72 72 # userid转换成openid接口
73 73 def covert_to_open_id(user_id, agent_id="")
74   - payload = {userid: user_id, agentid: agent_id}
  74 + payload = {userid: user_id}
  75 + payload.merge!(agentid: agent_id) if agent_id.present?
75 76 http_post("convert_to_openid", payload)
76 77 end
77 78  
... ...