修改班级和项目审核模版消息地址
This commit is contained in:
parent
c26f59e697
commit
c5cedbfcc2
|
@ -435,8 +435,12 @@ class WechatsController < ActionController::Base
|
||||||
|
|
||||||
session[:wechat_openid] = open_id
|
session[:wechat_openid] = open_id
|
||||||
if params[:code]
|
if params[:code]
|
||||||
if params[:userid]
|
if params[:state].match("review_class_member") || params[:state].match("review_project_member")
|
||||||
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}&userid=#{params[:userid]}" and return
|
useridstr = params[:state].split('/')[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
if useridstr
|
||||||
|
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}&#{useridstr}" and return
|
||||||
elsif params[:id]
|
elsif params[:id]
|
||||||
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
|
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
|
||||||
else
|
else
|
||||||
|
|
|
@ -115,8 +115,8 @@ class WechatService
|
||||||
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"
|
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"
|
||||||
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
||||||
if uid && uid != 0
|
if uid && uid != 0
|
||||||
tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"+ "&user_id="+uid.to_s
|
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"+ "&user_id="+uid.to_s
|
||||||
# tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+ "&user_id="+uid.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+"/user_id="+uid.to_s+Wechat.config.auto_openid_url_3
|
||||||
end
|
end
|
||||||
data = {
|
data = {
|
||||||
touser:openid,
|
touser:openid,
|
||||||
|
@ -149,8 +149,8 @@ class WechatService
|
||||||
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"
|
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"
|
||||||
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
||||||
if uid && uid != 0
|
if uid && uid != 0
|
||||||
tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"+ "&user_id="+uid.to_s
|
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"+ "&user_id="+uid.to_s
|
||||||
# tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+ "&user_id="+uid.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+"/user_id="+uid.to_s+Wechat.config.auto_openid_url_3
|
||||||
end
|
end
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
@ -188,8 +188,8 @@ class WechatService
|
||||||
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"
|
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"
|
||||||
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
||||||
if uid && uid != 0
|
if uid && uid != 0
|
||||||
tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"+ "&user_id="+uid.to_s
|
# tmpurl = "#{Setting.protocol}://#{Setting.host_name}/wechat/user_activities#/#{type}?id=#{id}"+ "&user_id="+uid.to_s
|
||||||
# tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+ "&user_id="+uid.to_s+Wechat.config.auto_openid_url_2+type+Wechat.config.auto_openid_url_3
|
tmpurl = Wechat.config.auto_openid_url_1+"?id="+id.to_s+Wechat.config.auto_openid_url_2+type+"/user_id="+uid.to_s+Wechat.config.auto_openid_url_3
|
||||||
end
|
end
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
|
Loading…
Reference in New Issue