This commit is contained in:
guange 2016-06-24 17:35:55 +08:00
parent 9e61f2229e
commit b5bfe40693
3 changed files with 8 additions and 13 deletions

View File

@ -103,7 +103,7 @@ module Mobile
post "join" do
authenticate!
cs = CoursesService.new
status = cs.join_course({openid: params[:openid], invite_code: params[:invite_code]}, current_user)
status = cs.join_course({role: "10", openid: params[:openid], invite_code: params[:invite_code]}, current_user)
{
status: status[:state],
messsge:CoursesService::JoinCourseError.message(status[:state])

View File

@ -64,6 +64,9 @@ class WechatsController < ActionController::Base
request.reply.text "User: #{request[:FromUserName]} click #{key}"
end
on :click, with: 'DEV' do |request, key|
request.reply.text "此功能正在开发中,请耐心等待。"
end
# When user view URL in the menu button
on :view, with: 'http://wechat.somewhere.com/view_url' do |request, view|
request.reply.text "#{request[:FromUserName]} view #{view}"

View File

@ -7,13 +7,13 @@ button:
name: "我的课程"
sub_button:
-
type: "view"
type: "click"
name: "课程"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf694495398c7d470&redirect_uri=http://wechat.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
key: "DEV"
-
type: "view"
type: "click"
name: "资源"
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf694495398c7d470&redirect_uri=http://wechat.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
key: "DEV"
-
name: "更多"
@ -22,14 +22,6 @@ button:
type: "view"
name: "加入班级"
url: "https://www.trustie.net/"
-
type: "view"
name: "点名"
url: "https://www.trustie.net/organizations/1/downloads"
-
type: "click"
name: "反馈"
key: "FEEDBACK"
-
type: "view"
name: "历史推文"