传request参数
This commit is contained in:
parent
0ab579af98
commit
35f9dc6e77
|
@ -23,7 +23,7 @@ class WechatsController < ActionController::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
on :event, with: 'subscribe' do |request|
|
on :event, with: 'subscribe' do |request|
|
||||||
sendBind
|
sendBind(request)
|
||||||
end
|
end
|
||||||
|
|
||||||
# When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account
|
# When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account
|
||||||
|
@ -147,11 +147,11 @@ class WechatsController < ActionController::Base
|
||||||
url: n[:url]
|
url: n[:url]
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
sendBind
|
sendBind(request)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def sendBind
|
def sendBind(request)
|
||||||
openid = request[:FromUserName]
|
openid = request[:FromUserName]
|
||||||
attrs = wechat.user(openid)
|
attrs = wechat.user(openid)
|
||||||
UserWechat.delete_all(openid: openid)
|
UserWechat.delete_all(openid: openid)
|
||||||
|
|
Loading…
Reference in New Issue