diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index 369185ca2..bfd559402 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -287,6 +287,30 @@ module Mobile end end + desc "获取课程动态" + params do + requires :id, type: Integer + requires :token, type: String + end + post 'activities' do + authenticate! + + user = current_user + + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + activities = UserActivity.where("(container_type = 'Course' and container_id = #{params[:id]} and act_type in #{course_types})").order('updated_at desc') + + page = params[:page] ? params[:page] : 0 + all_count = activities.count + activities = activities.limit(10).offset(page * 10) + count = activities.count + present :data, activities, with: Mobile::Entities::Activity,user: user + present :all_count, all_count + present :count, count + present :page, page + present :status, 0 + end + desc "课程作业列表" params do requires :token, type: String @@ -558,6 +582,85 @@ module Mobile end end + desc "发布班级通知" + params do + requires :id, type: Integer + requires :token, type: String + requires :text, type: String + requires :title, type: String + end + post ':id/publishnotice' do + authenticate! + + #老师或教辅才能发通知 + c = Course.find("#{params[:id]}") + + my_member = c.member_principals.where("users.id=#{current_user.id}").first + + roles_ids = [] + my_member.roles.each do |role| + roles_ids << role.id + end + if my_member && (roles_ids.include?(7)|| roles_ids.include?(9) || roles_ids.include?(3)) + + tmpparams = {} + tmpparams['title'] = params[:title] + tmpparams['description'] = params[:text] + tmpparams['sticky'] = 0 + + news = News.new(:course => c, :author => current_user) + #render :layout => 'base_courses' + news.safe_attributes = tmpparams + + news.save! + + present :status, 0 + else + present :status, -1 + present :message,"学生不能发布通知" + end + end + + desc "发布班级问题" + params do + requires :id, type: Integer + requires :token, type: String + requires :text, type: String + end + post ':id/publishissue' do + authenticate! + + c = Course.find("#{params[:id]}") + + boards = c.boards.includes(:last_message => :author).all + if c.boards.empty? + board = c.boards.build + board.name = "班级问答区" + board.description = c.name.to_s + board.project_id = -1 + if board.save + boards = c.boards.includes(:last_message => :author).all + end + end + + board = boards.first + + message = Message.new + message.author = current_user + message.board = board + + tmpparams = {} + tmpparams['subject'] = params[:title] + tmpparams['content'] = params[:text] + + message.safe_attributes = tmpparams + + message.save! + + present :status, 0 + + end + end end end diff --git a/app/api/mobile/apis/issues.rb b/app/api/mobile/apis/issues.rb index dfd5a3335..271e3419d 100644 --- a/app/api/mobile/apis/issues.rb +++ b/app/api/mobile/apis/issues.rb @@ -17,11 +17,21 @@ module Mobile #0一级回复的更多 1 二级回复的更多 type = params[:type] || 0 page = params[:page] || 0 - issue = Issue.find params[:id] - present :data, issue, with: Mobile::Entities::Issue,user: user,type: type,page: page + + is_public = 1 + + if type == 0 + issue = Issue.find params[:id] + issue.project.is_public + present :data, issue, with: Mobile::Entities::Issue,user: user,type: type,page: page + else + jour = Journal.find params[:id] + present :data, jour, with: Mobile::Entities::Issue,user: user,type: type,page: page + end + present :type, type present :page, page - present :is_public, issue.project.is_public + present :is_public,is_public present :status, 0 rescue Exception=>e present :status, -1 diff --git a/app/api/mobile/apis/newss.rb b/app/api/mobile/apis/newss.rb index c2e2fcb5c..810e4ff2a 100644 --- a/app/api/mobile/apis/newss.rb +++ b/app/api/mobile/apis/newss.rb @@ -14,14 +14,19 @@ module Mobile #0一级回复的更多 1 二级回复的更多 type = params[:type] || 0 page = params[:page] || 0 - news = News.find params[:id] is_public = 1 - if news.project - is_public = news.project.is_public - elsif news.course - is_public = news.course.is_public + if type == 0 + news = News.find params[:id] + + if news.project + is_public = news.project.is_public + elsif news.course + is_public = news.course.is_public + end + else + news = Comment.find params[:id] end present :data, news, with: Mobile::Entities::News,user: user,type: type,page: page diff --git a/app/api/mobile/apis/projects.rb b/app/api/mobile/apis/projects.rb index 05d4036f9..2202fbd13 100644 --- a/app/api/mobile/apis/projects.rb +++ b/app/api/mobile/apis/projects.rb @@ -229,6 +229,45 @@ module Mobile present :message, result[:message] end + desc "发布项目帖子" + params do + requires :id, type: Integer + requires :token, type: String + requires :text, type: String + end + post ':id/publishnote' do + authenticate! + + project = Project.find("#{params[:id]}") + + boards = project.boards.includes(:last_message => :author).all + if project.boards.empty? + board = project.boards.build + board.name = "项目讨论区" + board.description = project.name.to_s + board.course_id = -1 + if board.save + boards = project.boards.includes(:last_message => :author).all + end + end + + board = boards.first + + message = Message.new + message.author = current_user + message.board = board + + tmpparams = {} + tmpparams['subject'] = params[:title] + tmpparams['content'] = params[:text] + + message.safe_attributes = tmpparams + + message.save! + + present :status, 0 + + end end end end diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 2856354a1..95940c0c5 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -40,6 +40,8 @@ module Mobile ac.act.subject unless ac.nil? || ac.act.nil? elsif ac.act_type == "JournalsForMessage" ac.act.private == 0 ? "留言" : "私信" unless ac.nil? || ac.act.nil? + elsif ac.act_type == "Poll" + ac.act.polls_name unless ac.nil? || ac.act.nil? end when :description if ac.act_type == "HomeworkCommon" || ac.act_type == "Issue" || ac.act_type == "News" @@ -48,6 +50,8 @@ module Mobile strip_html(ac.act.content) unless ac.nil? || ac.act.nil? elsif ac.act_type == "JournalsForMessage" strip_html(ac.act.notes) unless ac.nil? || ac.act.nil? + elsif ac.act_type == "Poll" + ac.act.polls_description unless ac.nil? || ac.act.nil? end when :latest_update time_from_now ac.updated_at unless ac.nil? diff --git a/app/api/mobile/entities/attachment.rb b/app/api/mobile/entities/attachment.rb index 028ad633d..8200c04b2 100644 --- a/app/api/mobile/entities/attachment.rb +++ b/app/api/mobile/entities/attachment.rb @@ -23,6 +23,8 @@ module Mobile (number_to_human_size(f.filesize)).gsub("ytes", "").to_s when :coursename f.course.nil? ? "" : f.course.name + when :course_id + f.course.nil? ? 0 : f.course.id end end @@ -38,6 +40,7 @@ module Mobile attachment_expose :file_dir attachment_expose :attafile_size attachment_expose :coursename #所属班级名 + attachment_expose :course_id #所属班级名 expose :current_user_is_teacher, if: lambda { |instance, options| options[:user] } do |instance, options| current_user = options[:user] current_user_is_teacher = false diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index 9cbeb3459..e3dbb5023 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -36,15 +36,42 @@ module Mobile issue.id when :title issue.subject + when :subject + issue.subject + when :description + issue.description + when :done_ratio + issue.done_ratio end end + elsif issue.is_a?(::Journal) + case f + when :content + issue[:notes] + when :lasted_comment + time_from_now issue.created_on + when :act_id + issue.id + end end end end - expose :subject - expose :description - expose :author, using: Mobile::Entities::User - expose :done_ratio + issue_expose :subject + issue_expose :description + expose :author, using: Mobile::Entities::User do |f, opt| + if f.is_a?(::Issue) + f.send(:author) + end + end + expose :user,using: Mobile::Entities::User do |f, opt| + if f.is_a?(::Journal) + f.send(:user) + end + end + issue_expose :content + issue_expose :lasted_comment + + issue_expose :done_ratio issue_expose :title issue_expose :act_type issue_expose :act_id @@ -55,11 +82,29 @@ module Mobile issue_expose :comment_count issue_expose :project_name issue_expose :praise_count - expose :issue_journals, using: Mobile::Entities::Journal do |f, opt| + + expose :id + # expose :issue_journals, using: Mobile::Entities::Journal do |f, opt| + # if f.is_a?(::Issue) + # f.journals.where("notes is not null and notes != ''").reverse + # end + # end + + expose :all_children, using: Mobile::Entities::Issue do |f, opt| + #f[:journals_for_messages] if f.is_a?(Hash) && f.key?(:journals_for_messages) if f.is_a?(::Issue) - f.journals.where("notes is not null and notes != ''").reverse + # f.journals_for_messages.reverse + if !opt[:children] && opt[:type] == 0 + opt[:children] = true + tStart = opt[:page]*5 + tEnd = (opt[:page]+1)*5 - 1 + + all_comments = f.journals.where("notes is not null and notes != ''").reorder("created_on desc") + all_comments[tStart..tEnd] + end end end + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| has_praise = false current_user = options[:user] @@ -67,6 +112,69 @@ module Mobile has_praise = obj.empty? ? false : true has_praise end + + expose :parents_count, if: lambda { |instance, options| options[:user] } do |instance, options| + if instance.is_a?(::Journal) + parents_reply = [] + parents_reply = get_reply_parents(parents_reply, instance) + parents_reply.count + end + end + + expose :parents_reply_bottom, using:Mobile::Entities::Issue do |f,opt| + if f.is_a? (::Journal) + #取二级回复的底楼层 + parents_reply = [] + parents_reply = get_reply_parents(parents_reply, f) + if parents_reply.count > 0 && !opt[:bottom] + if opt[:type] == 1 + # opt[:bottom] = true + # parents_reply[opt[:page]..opt[:page]] + else + opt[:bottom] = true + parents_reply[0..0] + end + else + [] + end + end + end + + expose :parents_reply_top, using:Mobile::Entities::Issue do |f,opt| + if f.is_a? (::Journal) + #取二级回复的顶楼层 + parents_reply = [] + parents_reply = get_reply_parents(parents_reply, f) + if parents_reply.count > 2 && !opt[:top] + if opt[:type] == 1 + opt[:top] = true + tStart = (opt[:page]-1)*5+2 + tEnd = (opt[:page])*5+2 - 1 + + if tEnd >= parents_reply.count - 1 + tEnd = parents_reply.count - 2 + end + + if tStart <= parents_reply.count - 2 + parents_reply = parents_reply.reverse[tStart..tEnd] + parents_reply.reverse + else + [] + end + else + opt[:top] = true + parents_reply = parents_reply.reverse[0..1] + parents_reply.reverse + end + elsif parents_reply.count == 2 && !opt[:top] + opt[:top] = true + parents_reply = parents_reply.reverse[0..0] + parents_reply.reverse + else + [] + end + end + end end end end \ No newline at end of file diff --git a/app/api/mobile/entities/news.rb b/app/api/mobile/entities/news.rb index be9fa3ceb..a64081d8a 100644 --- a/app/api/mobile/entities/news.rb +++ b/app/api/mobile/entities/news.rb @@ -28,6 +28,16 @@ module Mobile f.comments.count end end + elsif f.is_a?(::Comment) + case field + when :content + f[:comments] + when :lasted_comment + time_from_now f.created_on + when :act_id + f.id + end + elsif f.is_a?(Hash) && !f.key?(field) n = f[:news] comments = f[:comments] @@ -43,14 +53,16 @@ module Mobile end end end - news_expose :id + expose :id #新闻标题 news_expose :title - expose :author,using: Mobile::Entities::User do |f, opt| + expose :user,using: Mobile::Entities::User do |f, opt| obj = nil if f.is_a?(::News) && f.respond_to?(:author) obj = f.send(:author) + elsif f.is_a?(::Comment) && f.respond_to?(:author) + obj = f.send(:author) elsif f.is_a?(Hash) && f.key?(:author) obj = f[:author] end @@ -73,14 +85,34 @@ module Mobile news_expose :praise_count #课程名字 news_expose :course_name + news_expose :lasted_comment + #评论 - expose :comments, using: Mobile::Entities::Comment do |f, opt| - if f.is_a?(Hash) && f.key?(:comments) - f[:comments] - elsif f.is_a?(::News) && f.respond_to?(:comments) - f.comments.reverse + # expose :comments, using: Mobile::Entities::Comment do |f, opt| + # if f.is_a?(Hash) && f.key?(:comments) + # f[:comments] + # elsif f.is_a?(::News) && f.respond_to?(:comments) + # f.comments.reverse + # end + # end + + news_expose :content + + expose :all_children, using: Mobile::Entities::News do |f, opt| + #f[:journals_for_messages] if f.is_a?(Hash) && f.key?(:journals_for_messages) + if f.is_a?(::News) + # f.journals_for_messages.reverse + if !opt[:children] && opt[:type] == 0 + opt[:children] = true + tStart = opt[:page]*5 + tEnd = (opt[:page]+1)*5 - 1 + + all_comments = f.comments.reorder("created_on desc") + all_comments[tStart..tEnd] + end end end + expose :has_praise , if: lambda { |instance, options| options[:user] } do |instance, options| has_praise = false current_user = options[:user] @@ -88,6 +120,69 @@ module Mobile has_praise = obj.empty? ? false : true has_praise end + + expose :parents_count, if: lambda { |instance, options| options[:user] } do |instance, options| + if instance.is_a?(::Comment) + parents_reply = [] + parents_reply = get_reply_parents(parents_reply, instance) + parents_reply.count + end + end + + expose :parents_reply_bottom, using:Mobile::Entities::News do |f,opt| + if f.is_a? (::Comment) + #取二级回复的底楼层 + parents_reply = [] + parents_reply = get_reply_parents(parents_reply, f) + if parents_reply.count > 0 && !opt[:bottom] + if opt[:type] == 1 + # opt[:bottom] = true + # parents_reply[opt[:page]..opt[:page]] + else + opt[:bottom] = true + parents_reply[0..0] + end + else + [] + end + end + end + + expose :parents_reply_top, using:Mobile::Entities::News do |f,opt| + if f.is_a? (::Comment) + #取二级回复的顶楼层 + parents_reply = [] + parents_reply = get_reply_parents(parents_reply, f) + if parents_reply.count > 2 && !opt[:top] + if opt[:type] == 1 + opt[:top] = true + tStart = (opt[:page]-1)*5+2 + tEnd = (opt[:page])*5+2 - 1 + + if tEnd >= parents_reply.count - 1 + tEnd = parents_reply.count - 2 + end + + if tStart <= parents_reply.count - 2 + parents_reply = parents_reply.reverse[tStart..tEnd] + parents_reply.reverse + else + [] + end + else + opt[:top] = true + parents_reply = parents_reply.reverse[0..1] + parents_reply.reverse + end + elsif parents_reply.count == 2 && !opt[:top] + opt[:top] = true + parents_reply = parents_reply.reverse[0..0] + parents_reply.reverse + else + [] + end + end + end end end end \ No newline at end of file diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 63ef30b35..b0c83e869 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -189,6 +189,15 @@ class IssuesController < ApplicationController # 给该issue在它所在的项目中所有的issues中所在的位置给一个序号 @issue.project_issues_index = @issue.project.issues.last.nil? ? 1 : @issue.project.issues.last.project_issues_index + 1 if @issue.save + + senduser = User.find(params[:issue][:assigned_to_id]) + issue_id = @issue.id + issue_title = params[:issue][:subject] + priority_id = params[:issue][:priority_id] + + ps = ProjectsService.new + ps.send_wechat_project_issue_notice senduser,@issue.project,issue_id,issue_title,priority_id + call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue}) respond_to do |format| format.html { @@ -581,6 +590,18 @@ class IssuesController < ApplicationController end end @issue.safe_attributes = issue_attributes + + senduser = User.find(params[:issue][:assigned_to_id]) + + if senduser.id != User.current.id + issue_id = @issue.id + issue_title = params[:issue][:subject] + priority_id = params[:issue][:priority_id] + + ps = ProjectsService.new + ps.send_wechat_project_issue_notice senduser,@issue.project,issue_id,issue_title,priority_id + end + @priorities = IssuePriority.active @allowed_statuses = @issue.new_statuses_allowed_to(User.current) true diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index cfa5f4414..54486221e 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -435,8 +435,12 @@ class WechatsController < ActionController::Base session[:wechat_openid] = open_id if params[:code] - if params[:userid] - redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}&userid=#{params[:userid]}" and return + # if params[:state].match("review_class_member") || params[:state].match("review_project_member") + @path = params[:state].split('/')[0] + useridstr = params[:state].split('/')[1] + # end + if useridstr + redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}{useridstr}" and return elsif params[:id] redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return else diff --git a/app/services/projects_service.rb b/app/services/projects_service.rb index 56dfaceff..fc7f25d1f 100644 --- a/app/services/projects_service.rb +++ b/app/services/projects_service.rb @@ -331,4 +331,28 @@ class ProjectsService {:status => status,:message => message} end + def send_wechat_project_issue_notice user,project,issue_id,issue_title,priority_id + count = ShieldWechatMessage.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count + if count == 0 + title = "您有新的issue需要解决。" + remark = "点击详情查看issue。" + + case priority_id + when "1" + priority = "低" + when "2" + priority = "正常" + when "3" + priority = "高" + when "4" + priority = "紧急" + when "5" + priority = "立刻" + end + + ws = WechatService.new + ws.project_issue_notice user.id, "issues", issue_id,title, issue_title,priority, remark + end + end + end diff --git a/app/services/wechat_service.rb b/app/services/wechat_service.rb index 3b6cfe930..423676983 100644 --- a/app/services/wechat_service.rb +++ b/app/services/wechat_service.rb @@ -115,8 +115,8 @@ class WechatService # 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 if uid && uid != 0 - 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 = "#{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+Wechat.config.auto_openid_url_2+type+"/user_id="+uid.to_s+Wechat.config.auto_openid_url_3 end data = { touser:openid, @@ -149,8 +149,8 @@ class WechatService # 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 if uid && uid != 0 - 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 = "#{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+Wechat.config.auto_openid_url_2+type+"/user_id="+uid.to_s+Wechat.config.auto_openid_url_3 end data = { @@ -188,8 +188,8 @@ class WechatService # 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 if uid && uid != 0 - 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 = "#{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+Wechat.config.auto_openid_url_2+type+"/user_id="+uid.to_s+Wechat.config.auto_openid_url_3 end data = { @@ -417,8 +417,19 @@ class WechatService end Rails.logger.info "send over. #{req}" end + end - + def project_issue_notice(user_id, type, id, first, key1, key2,remark="",uid=0) + uw = UserWechat.where(user_id: user_id).first + unless uw.nil? + data = two_keys_template uw.openid,Wechat.config.project_issue_notice, type, id, first, key1, key2,remark,0 + begin + req = Wechat.api.template_message_send Wechat::Message.to(uw.openid).template(data) + rescue Exception => e + Rails.logger.error "[project_issue_notice] ===> #{e}" + end + Rails.logger.info "send over. #{req}" + end end end \ No newline at end of file diff --git a/config/menu.yml b/config/menu.yml index 52272e8a0..8cc920707 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -8,7 +8,7 @@ button: sub_button: - type: "view" - name: "我的课程" + name: "我的班级" url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect" - type: "view" diff --git a/config/menu.yml.production b/config/menu.yml.production index c1431172e..55318e811 100644 --- a/config/menu.yml.production +++ b/config/menu.yml.production @@ -8,7 +8,7 @@ button: sub_button: - type: "view" - name: "我的课程" + name: "我的班级" url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect" - type: "view" diff --git a/config/menu.yml.test b/config/menu.yml.test index dc4aacbe5..45e23aaf3 100644 --- a/config/menu.yml.test +++ b/config/menu.yml.test @@ -8,7 +8,7 @@ button: sub_button: - type: "view" - name: "我的课程" + name: "我的班级" url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect" - type: "view" diff --git a/config/wechat.yml.template b/config/wechat.yml.template index e6b942f09..adda8e7e8 100644 --- a/config/wechat.yml.template +++ b/config/wechat.yml.template @@ -24,6 +24,7 @@ default: &default create_project_notice: "jYu0iimbDpgWYZaTLXioZe2lvqoWTdKnUPyphTJ1mxs" project_review_notice: "kdb-8UlMjTc3z51Qcf8g2vY4i_nE4OGKZAucdQma_2E" join_project_notice: "TtXvy0XMIQyCgpnXHhoB8t-x0QIfy-78gAJXsGf9afg" + project_issue_notice: "HP8JejOnkzmvFopTarc0l1Tp4bU9qnxzdH27x3186lI" auto_openid_url_1: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities" auto_openid_url_2: "&response_type=code&scope=snsapi_base&state=" diff --git a/config/wechat.yml.test b/config/wechat.yml.test index c0676cc26..8c0dafc2f 100644 --- a/config/wechat.yml.test +++ b/config/wechat.yml.test @@ -24,6 +24,7 @@ default: &default create_project_notice: "R2ZaQKJfDJgujPcHWPzadKHIRkIyj2CjX2o_qIuRqig" project_review_notice: "ip192wVXTav3qchgUn9_7B6lFfTlCZjwL7A1tncTOuc" join_project_notice: "3KnMQEMUCmQWkB5JvzrpmguEwnN8bvUHUdpOTudxv_M" + project_issue_notice: "HAF2aCta7BtnaOd_cotGvU4tErGWwCd9I9aiClFN7w8" auto_openid_url_1: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities" auto_openid_url_2: "&response_type=code&scope=snsapi_base&state=" diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index a4aa9a4c7..506dcc724 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -127,6 +127,78 @@ +