From d6daa906b6ddae65d38bafd883ac6cf2708b0dbb Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 8 Apr 2016 16:58:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1234567 | 1 + app/api/mobile/entities/blog_comment.rb | 4 +++- app/models/blog_comment.rb | 2 +- app/models/journal.rb | 2 +- app/models/journals_for_message.rb | 2 +- public/assets/wechat/blog_detail.html | 2 +- public/javascripts/wechat/app.js | 4 ++-- 7 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 1234567 diff --git a/1234567 b/1234567 new file mode 100644 index 000000000..4354b8b04 --- /dev/null +++ b/1234567 @@ -0,0 +1 @@ +{"access_token":"t3XVpwqZbAO6-uRz_ltKUiplgHcYVstA0p43ECTHEjt0-FvVLU7VXzD7n6Z76PYFWHf8hvNHZtLNAUT-FlTl98wWLIK_lh9mhzHxS_x1iXCc0mC38RjxFzZ_NSeERW7dJZCfADAOEH","expires_in":7200,"got_token_at":1460105603} \ No newline at end of file diff --git a/app/api/mobile/entities/blog_comment.rb b/app/api/mobile/entities/blog_comment.rb index 655050fdd..b11194b30 100644 --- a/app/api/mobile/entities/blog_comment.rb +++ b/app/api/mobile/entities/blog_comment.rb @@ -24,6 +24,8 @@ module Mobile 'BlogComment' when :act_id u.id + when :comment_count + u.children.count end end end @@ -41,7 +43,7 @@ module Mobile blog_comment_expose :blog_id blog_comment_expose :title blog_comment_expose :content - blog_comment_expose :comments_count + blog_comment_expose :comment_count blog_comment_expose :created_at blog_comment_expose :lasted_comment blog_comment_expose :id diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index 0abb6d3d8..945a3c5c2 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -99,7 +99,7 @@ class BlogComment < ActiveRecord::Base color:"#173177" }, keyword3:{ - value:h(truncate(key3, :length=>50, :omission=> '...')), + value:self.content.html_safe, color:"#173177" }, remark:{ diff --git a/app/models/journal.rb b/app/models/journal.rb index 8c0bb8f46..b62cf8d97 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -260,7 +260,7 @@ class Journal < ActiveRecord::Base color:"#173177" }, keyword3:{ - value:h(truncate(key3, :length=>50, :omission=> '...')), + value:self.description.html_safe, color:"#173177" }, remark:{ diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index 739ef9d8f..82820990f 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -330,7 +330,7 @@ class JournalsForMessage < ActiveRecord::Base color:"#173177" }, keyword3:{ - value:h(truncate(key3, :length=>50, :omission=> '...')), + value:self.notes.html_safe, color:"#173177" }, remark:{ diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 823110e54..92e03ef0c 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -15,7 +15,7 @@
-
回复 ({{blog.comments_count}})
+
回复 ({{blog.comment_count}})
已赞 ({{blog.praise_count}})
赞 ({{blog.praise_count}})
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 2e6ceda5c..2b3eaf161 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,6 +1,6 @@ var app = angular.module('wechat', ['ngRoute','ngCookies']); var apiUrl = 'http://wechat.trustie.net/api/v1/'; -var debug = false; //调试标志,如果在本地请置为true +var debug = true; //调试标志,如果在本地请置为true if(debug===true){ apiUrl = 'http://localhost:3000/api/v1/'; @@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){ var _openid = ''; if(debug===true){ - _openid = "6"; + _openid = "1"; } var getOpenId = function() {