Commit 95b22ec5 by lanrion

clean codes

parent 227b6594
...@@ -6,7 +6,7 @@ module WeixinAuthorize ...@@ -6,7 +6,7 @@ module WeixinAuthorize
# 临时二维码 # 临时二维码
def create_qr_scene(scene_id, expire_seconds=1800) def create_qr_scene(scene_id, expire_seconds=1800)
post_url = "#{qrcode_base_url}/create" post_url = "#{qrcode_base_url}/create"
qrcode_infos = {action_name: "QR_SCENE", expire_seconds: expire_seconds} qrcode_infos = {action_name: "QR_SCENE", expire_seconds: expire_seconds}
qrcode_infos = qrcode_infos.merge(action_info(scene_id)) qrcode_infos = qrcode_infos.merge(action_info(scene_id))
http_post(post_url, qrcode_infos) http_post(post_url, qrcode_infos)
...@@ -14,7 +14,7 @@ module WeixinAuthorize ...@@ -14,7 +14,7 @@ module WeixinAuthorize
# 永久二维码 # 永久二维码
def create_qr_limit_scene(scene_id) def create_qr_limit_scene(scene_id)
post_url = "#{qrcode_base_url}/create" post_url = "#{qrcode_base_url}/create"
qrcode_infos = {action_name: "QR_LIMIT_SCENE"} qrcode_infos = {action_name: "QR_LIMIT_SCENE"}
qrcode_infos = qrcode_infos.merge(action_info(scene_id)) qrcode_infos = qrcode_infos.merge(action_info(scene_id))
http_post(post_url, qrcode_infos) http_post(post_url, qrcode_infos)
...@@ -22,7 +22,7 @@ module WeixinAuthorize ...@@ -22,7 +22,7 @@ module WeixinAuthorize
# 通过ticket换取二维码, 直接访问即可显示! # 通过ticket换取二维码, 直接访问即可显示!
def qr_code_url(ticket) def qr_code_url(ticket)
"https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=#{ticket}" WeixinAuthorize.mp_endpoint("/showqrcode?ticket=#{ticket}")
end end
private private
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment