微信私有动态内容加上提示

This commit is contained in:
yuanke 2016-08-11 10:33:22 +08:00
parent 61ffa58896
commit 0d69fa0cc0
8 changed files with 8 additions and 7 deletions

View File

@ -284,7 +284,7 @@ class WechatsController < ActionController::Base
end
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!',
content: "课程名称:#{course.syllabus.name}\n班级名称:#{course.name}\n任课老师:#{course.teacher.show_name}\n进入班级,和小伙伴愉快的学习吧!"} }
content: "课程名称:#{course.syllabus.title}\n班级名称:#{course.name}\n任课老师:#{course.teacher.show_name}\n进入班级,和小伙伴愉快的学习吧!"} }
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#/class?id='+course.id.to_s}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect"
pic_url = "#{ROOT_URL}/images/wechat/class.jpg"

View File

@ -5,7 +5,7 @@
<div class="post-container">
<div loading-spinner></div>
<div class="post-wrapper" style="margin-top:0;">
<div class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div ng-show="discussion.is_public == 0" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div class="post-main">
<div class="post-avatar fl mr10"><img ng-src="{{discussion.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
<div class="post-dynamic-author hidden fl">

View File

@ -4,7 +4,7 @@
<div ng-if="news.act_type == 'News'">
<div class="post-container">
<div class="post-wrapper" style="margin-top:0;">
<div class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div ng-show="news.is_public == 0 || news.is_public == false" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div class="post-main">
<div class="post-avatar fl mr10"><img ng-src="{{news.author.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
<div class="post-dynamic-author hidden fl">

View File

@ -4,7 +4,7 @@
<div ng-if="homework.act_type == 'HomeworkCommon'">
<div class="post-container">
<div class="post-wrapper" style="margin-top:0;">
<div class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div ng-show="homework.is_public == 0" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div class="post-main">
<div class="post-avatar fl mr10"><img ng-src="{{homework.author.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
<div class="post-dynamic-author hidden fl">

View File

@ -4,7 +4,7 @@
<div ng-if="issue.act_type == 'Issue'">
<div class="post-container">
<div class="post-wrapper" style="margin-top:0;">
<div class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div ng-show="issue.is_public == false" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div class="post-main">
<div class="post-avatar fl mr10"><img ng-src="{{issue.author.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>

View File

@ -3,6 +3,7 @@
<div ng-if="message.act_type == 'JournalsForMessage'">
<div class="post-container">
<div class="post-wrapper" style="margin-top:0;">
<div ng-show="message.is_public == 0 && message.is_public == false" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div class="post-main">
<div class="post-avatar fl mr10"><img ng-src="{{message.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>

View File

@ -4,7 +4,7 @@
<div ng-if="discussion.act_type == 'Message'">
<div class="post-container">
<div class="post-wrapper" style="margin-top:0;">
<div class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div ng-show="discussion.is_public == false" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
<div class="post-main">
<div class="post-avatar fl mr10"><img ng-src="{{discussion.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
<div class="post-dynamic-author hidden fl">

View File

@ -396,7 +396,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
}
if(imgUrl == null || imgUrl == ""){
imgUrl = 'http://www.trustie.net/images/wechat/wx_logo.jpg';
imgUrl = window.g_localhost+'/images/wechat/wx_logo.jpg';
}
wx.ready(function(){