Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
492b2f895c
|
@ -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])
|
||||
|
|
|
@ -4,7 +4,7 @@ class WechatsController < ActionController::Base
|
|||
|
||||
include ApplicationHelper
|
||||
# ROOT_URL = "#{Setting.protocol}://#{Setting.host_name}/"
|
||||
ROOT_URL = "http://wechat.trustie.net"
|
||||
ROOT_URL = "http://www.trustie.net"
|
||||
# default text responder when no other match
|
||||
on :text do |request, content|
|
||||
#邀请码
|
||||
|
@ -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}"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%if @save_flag%>
|
||||
//$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
|
||||
//$('#reorder_time').click();
|
||||
window.location.href= "http://"+"<%= Setting.host_name%>"+"/forums/" + "<%= @forum.id%>"
|
||||
window.location.href= "<%= host_with_protocol %>"+"/forums/" + "<%= @forum.id%>"
|
||||
<%else%>
|
||||
$("#error").html("<%= @forum.errors.full_messages[0]%>").show();
|
||||
<%end %>
|
||||
|
|
|
@ -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: "历史推文"
|
||||
|
|
|
@ -5,14 +5,14 @@ default: &default
|
|||
# Or if using public account, only need above two line
|
||||
|
||||
# guange test
|
||||
appid: "wxf694495398c7d470"
|
||||
secret: "743e038392f1d89540e95f8f7645849a"
|
||||
#appid: "wxf694495398c7d470"
|
||||
#secret: "743e038392f1d89540e95f8f7645849a"
|
||||
|
||||
# appid: "wx8e1ab05163a28e37"
|
||||
# secret: "beb4d3bc4b32b3557811680835357841"
|
||||
appid: "wx8e1ab05163a28e37"
|
||||
secret: "beb4d3bc4b32b3557811680835357841"
|
||||
|
||||
token: "123456"
|
||||
access_token: "1234567"
|
||||
access_token: ".access_token"
|
||||
encrypt_mode: false # if true must fill encoding_aes_key
|
||||
encoding_aes_key: "QGfP13YP4BbQGkkrlYuxpn4ZIDXpBJww4fxl8CObvNw"
|
||||
jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket"
|
||||
|
@ -30,4 +30,4 @@ development:
|
|||
<<: *default
|
||||
|
||||
test:
|
||||
<<: *default
|
||||
<<: *default
|
||||
|
|
Loading…
Reference in New Issue