用户注册发送绑定成功消息通知,加入班级消息通知点击跳入班级
This commit is contained in:
parent
4be95cd9c5
commit
dc2ba96353
|
@ -67,7 +67,8 @@ module Mobile
|
||||||
openid: openid,
|
openid: openid,
|
||||||
user: user
|
user: user
|
||||||
)
|
)
|
||||||
|
ws = WechatService.new
|
||||||
|
ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.login, Time.now.strftime("%Y-%m-%d"))
|
||||||
present :data, user, with: Mobile::Entities::User
|
present :data, user, with: Mobile::Entities::User
|
||||||
present :status, 0
|
present :status, 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -221,7 +221,7 @@ class WechatsController < ActionController::Base
|
||||||
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!',
|
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!',
|
||||||
content: "课程名称: #{course.name}\n班级名称: #{course.name}\n任课老师: #{course.teacher.show_name}\n进入班级,和小伙伴愉快的学习吧!"} }
|
content: "课程名称: #{course.name}\n班级名称: #{course.name}\n任课老师: #{course.teacher.show_name}\n进入班级,和小伙伴愉快的学习吧!"} }
|
||||||
return request.reply.news(news) do |article, n, index| # article is return object
|
return request.reply.news(news) do |article, n, index| # article is return object
|
||||||
url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{ROOT_URL+'/wechat/user_activities?id='+course.id.to_s}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect"
|
url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{ROOT_URL+'/wechat/user_activities#/class?id='+course.id.to_s}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect"
|
||||||
pic_url = "#{ROOT_URL}/images/wechat/class.jpg"
|
pic_url = "#{ROOT_URL}/images/wechat/class.jpg"
|
||||||
article.item title: "#{n[:title]}",
|
article.item title: "#{n[:title]}",
|
||||||
description: n[:content],
|
description: n[:content],
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="course-diff-row"><span class="c-blue f13 ml10">我创建的课程</span></div>
|
<div class="course-diff-row"><span class="c-blue f13 ml10">我创建的课程</span></div>
|
||||||
<div ng-show = "syllabus.can_setting" ng-repeat="syllabus in syllabuses">
|
<div ng-show = "syllabus.can_setting" ng-repeat="syllabus in syllabuses">
|
||||||
<div ng-click="syllabus.show_plus = !syllabus.show_plus" class="course-list-row f13 c-grey3"><img src="/images/wechat/plus.png" ng-show="syllabus.show_plus" width="15" class="fl ml10 mt11 spread-btn" /><img src="/images/wechat/minus.png" ng-show="!syllabus.show_plus" width="15" class="fl ml10 mt11 retract-btn " /><span class="fl ml10">{{syllabus.title}}</span><img src="/images/wechat/setting.png" ng-show = "syllabus.can_setting" width="15" class="fr mr10 mt10" ng-click="onSetting(syllabus)" /></div>
|
<div ng-click="syllabus.show_plus = !syllabus.show_plus" class="course-list-row f13 c-grey3"><img src="/images/wechat/plus.png" ng-show="!syllabus.show_plus" width="15" class="fl ml10 mt11 spread-btn" /><img src="/images/wechat/minus.png" ng-show="syllabus.show_plus" width="15" class="fl ml10 mt11 retract-btn " /><span class="fl ml10">{{syllabus.title}}</span><img src="/images/wechat/setting.png" ng-show = "syllabus.can_setting" width="15" class="fr mr10 mt10" ng-click="onSetting(syllabus)" /></div>
|
||||||
<ul ng-show="!syllabus.show_plus" class="class-list f13 c-grey3">
|
<ul ng-show="syllabus.show_plus" class="class-list f13 c-grey3">
|
||||||
<li ng-show="course.id" ng-click="goClass(course.id)" ng-repeat="course in syllabus.courses" ng-class="{'border-bottom-none': $last}">
|
<li ng-show="course.id" ng-click="goClass(course.id)" ng-repeat="course in syllabus.courses" ng-class="{'border-bottom-none': $last}">
|
||||||
<img src="/images/wechat/dot.png" width="15px" class="class-list-dot" />
|
<img src="/images/wechat/dot.png" width="15px" class="class-list-dot" />
|
||||||
<span class="fl ml10 class-list-name hidden">{{course.name}}</span>
|
<span class="fl ml10 class-list-name hidden">{{course.name}}</span>
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="course-diff-row border-top mt10"><span class="c-blue f13 ml10">我参与的课程</span></div>
|
<div class="course-diff-row border-top mt10"><span class="c-blue f13 ml10">我参与的课程</span></div>
|
||||||
<div ng-show = "!syllabus.can_setting" ng-repeat="syllabus in syllabuses">
|
<div ng-show = "!syllabus.can_setting" ng-repeat="syllabus in syllabuses">
|
||||||
<div ng-click="syllabus.show_plus = !syllabus.show_plus" class="course-list-row f13 c-grey3"><img src="/images/wechat/plus.png" ng-show="syllabus.show_plus" width="15" class="fl ml10 mt11 spread-btn" /><img src="/images/wechat/minus.png" ng-show="!syllabus.show_plus" width="15" class="fl ml10 mt11 retract-btn " /><span class="fl ml10">{{syllabus.title}}</span><img src="/images/wechat/setting.png" ng-show = "syllabus.can_setting" width="15" class="fr mr10 mt10" ng-click="onSetting(syllabus)" /></div>
|
<div ng-click="syllabus.show_plus = !syllabus.show_plus" class="course-list-row f13 c-grey3"><img src="/images/wechat/plus.png" ng-show="!syllabus.show_plus" width="15" class="fl ml10 mt11 spread-btn" /><img src="/images/wechat/minus.png" ng-show="syllabus.show_plus" width="15" class="fl ml10 mt11 retract-btn " /><span class="fl ml10">{{syllabus.title}}</span><img src="/images/wechat/setting.png" ng-show = "syllabus.can_setting" width="15" class="fr mr10 mt10" ng-click="onSetting(syllabus)" /></div>
|
||||||
<ul ng-show="!syllabus.show_plus" class="class-list f13 c-grey3">
|
<ul ng-show="syllabus.show_plus" class="class-list f13 c-grey3">
|
||||||
<li ng-show="course.id" ng-click="goClass(course.id)" ng-repeat="course in syllabus.courses" ng-class="{'border-bottom-none': $last}">
|
<li ng-show="course.id" ng-click="goClass(course.id)" ng-repeat="course in syllabus.courses" ng-class="{'border-bottom-none': $last}">
|
||||||
<img src="/images/wechat/dot.png" width="15px" class="class-list-dot" />
|
<img src="/images/wechat/dot.png" width="15px" class="class-list-dot" />
|
||||||
<span class="fl ml10 class-list-name hidden">{{course.name}}</span>
|
<span class="fl ml10 class-list-name hidden">{{course.name}}</span>
|
||||||
|
|
Loading…
Reference in New Issue