diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index cbeaf851d..1a4c4d340 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -137,7 +137,7 @@ class WechatsController < ActionController::Base on :fallback, respond: 'fallback message' on :click, with: 'FEEDBACK' do |request, key| - request.reply.text "如有反馈问题,请直接切换至输入框,发微信给我们即可" + request.reply.text "如有问题反馈,请您:\n1、直接切换至输入框,发微信给我们。\n2、加入QQ群:173184401,我们直接互动。\n欢迎大家积极反馈,谢谢啦!" end on :click, with: 'MY_NEWS' do |request, key| diff --git a/app/models/news.rb b/app/models/news.rb index 54f6fce08..489a231c8 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -173,7 +173,7 @@ class News < ActiveRecord::Base count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count if count == 0 ws = WechatService.new - content = strip_html self.author.try(:realname) + " 发布了通知:" + self.title.html_safe, 200 + content = self.title.html_safe, 200 ws.class_notice m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", self.course.name, self.author.show_name, format_time(self.created_on), content, "点击查看通知详情" end end diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index 74af26cfe..d49caedd5 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -37,6 +37,8 @@ + + diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index ee9e968d2..f17a384f4 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -25,13 +25,13 @@
{{blog.praise_count}}
{{blog.praise_count}}
-
+
回复 {{blog.comment_count}}
-
+
diff --git a/public/assets/wechat/class_list.html b/public/assets/wechat/class_list.html index ece31ceeb..9ac70cc0a 100644 --- a/public/assets/wechat/class_list.html +++ b/public/assets/wechat/class_list.html @@ -10,7 +10,7 @@
  • - > + > {{course.member_count}}人
  • @@ -25,7 +25,7 @@
  • - > + > {{course.member_count}}人
  • diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 9ef7bc429..ab71aa887 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -23,14 +23,14 @@
    {{discussion.praise_count}}
    {{discussion.praise_count}}
    -
    -
    +
    diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index b2771100b..59f9afa5f 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -22,14 +22,14 @@
    {{news.praise_count}}
    {{news.praise_count}}
    -
    -
    +
    diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 599774dfc..49fa52b49 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -27,13 +27,13 @@
    {{homework.praise_count}}
    {{homework.praise_count}}
    - -
    +
    diff --git a/public/assets/wechat/invite_code.html b/public/assets/wechat/invite_code.html index a1b225fc9..3aaa00bbe 100644 --- a/public/assets/wechat/invite_code.html +++ b/public/assets/wechat/invite_code.html @@ -11,6 +11,8 @@

    + 3.通过“加入班级”菜单输入邀请码加入班级(长按邀请码可以复制哦~)
    + 4.扫码默认以学生身份加入班级 +
    \ No newline at end of file diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 852103b81..2d33367cf 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -28,14 +28,14 @@
    {{issue.praise_count}}
    {{issue.praise_count}}
    -
    -
    +
    diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 78760da71..643bce4f5 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -22,14 +22,14 @@
    {{message.praise_count}}
    {{message.praise_count}}
    -
    -
    +
    diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index cc3d4b1c8..b2be0b263 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -23,7 +23,7 @@
    {{discussion.praise_count}}
    {{discussion.praise_count}}
    -
    + @@ -31,7 +31,7 @@
    -
    +
    diff --git a/public/assets/wechat/project_invite_code.html b/public/assets/wechat/project_invite_code.html index a17b8fe85..7685d7aef 100644 --- a/public/assets/wechat/project_invite_code.html +++ b/public/assets/wechat/project_invite_code.html @@ -11,6 +11,8 @@

    + 3.通过“加入项目”菜单输入邀请码加入项目(长按邀请码可以复制哦~)
    + 4.扫码默认以报告人员身份加入项目 +
    \ No newline at end of file diff --git a/public/assets/wechat/project_list.html b/public/assets/wechat/project_list.html index 1d385dabf..d9313b6a7 100644 --- a/public/assets/wechat/project_list.html +++ b/public/assets/wechat/project_list.html @@ -7,7 +7,7 @@
    - > + > {{project.member_count}}人
    @@ -20,7 +20,7 @@
    - > + > {{project.member_count}}人
    diff --git a/public/images/wechat/wx_logo.jpg b/public/images/wechat/wx_logo.jpg new file mode 100644 index 000000000..8faeef27a Binary files /dev/null and b/public/images/wechat/wx_logo.jpg differ diff --git a/public/javascripts/wechat/controllers/invite_code.js b/public/javascripts/wechat/controllers/invite_code.js index 867c9bce4..71826d54d 100644 --- a/public/javascripts/wechat/controllers/invite_code.js +++ b/public/javascripts/wechat/controllers/invite_code.js @@ -13,7 +13,7 @@ app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config console.log(response.data); vm.course = response.data.data; - var desc = "班级邀请:"+vm.course.name+" 班级"; + var desc = "您的好友邀请您加入班级:\n"+vm.course.name+"\n和小伙伴一起踏上便捷的学习之旅吧!"; var link = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d" + "&redirect_uri=https://test.forge.trustie.net/wechat/user_activities?id="+vm.course.id+ "&response_type=code&scope=snsapi_base&state=invite_code&connect_redirect=1#wechat_redirect"; diff --git a/public/javascripts/wechat/controllers/project_invite_code.js b/public/javascripts/wechat/controllers/project_invite_code.js index e82bb44a8..0729e882e 100644 --- a/public/javascripts/wechat/controllers/project_invite_code.js +++ b/public/javascripts/wechat/controllers/project_invite_code.js @@ -13,7 +13,7 @@ app.controller('ProjectInviteCodeController', ['$scope','$http', '$routeParams', console.log(response.data); vm.project = response.data.data; - var desc = "项目邀请:"+vm.project.name+" 项目"; + var desc = "您的好友邀请您加入项目:\n"+vm.project.name+"\n和小伙伴一起踏上便捷的研发之旅吧!"; var link = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d" + "&redirect_uri=https://test.forge.trustie.net/wechat/user_activities?id="+vm.project.id+ diff --git a/public/javascripts/wechat/directives/at_delete_link.js b/public/javascripts/wechat/directives/at_delete_link.js new file mode 100644 index 000000000..15190c327 --- /dev/null +++ b/public/javascripts/wechat/directives/at_delete_link.js @@ -0,0 +1,17 @@ +/** + * Created by ttang on 2016/8/10. + */ +app.directive('atDeleteLink',["$timeout",function(timer){ + return{ + restrict: 'A', + scope: {}, + link: function(scope, element){ + timer(function(){ + $(".at a").each(function(){ + var atText = $(this).text(); + $(this).parent().html(atText); + }); + }) + } + } +}]); diff --git a/public/javascripts/wechat/directives/input_focus.js b/public/javascripts/wechat/directives/input_focus.js new file mode 100644 index 000000000..38cc01ec9 --- /dev/null +++ b/public/javascripts/wechat/directives/input_focus.js @@ -0,0 +1,14 @@ +/** + * Created by ttang on 2016/8/10. + */ +app.directive('inputFocus',function(){ + return{ + restrict: 'A', + scope: {}, + link: function(scope, element){ + element.on('click',function(){ + $("#postInput1").focus(); + }); + } + } +}); \ No newline at end of file diff --git a/public/javascripts/wechat/others/factory.js b/public/javascripts/wechat/others/factory.js index ad42eb27c..adce0699f 100644 --- a/public/javascripts/wechat/others/factory.js +++ b/public/javascripts/wechat/others/factory.js @@ -372,7 +372,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc } if(imgUrl == null || imgUrl == ""){ - imgUrl = 'http://www.trustie.net/images/logo2.png'; + imgUrl = 'http://www.trustie.net/images/wechat/wx_logo.jpg'; } wx.ready(function(){ diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index 59bdcd7d9..234dc367b 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -178,7 +178,7 @@ a.underline {text-decoration:underline;} .invitation-code-wrap {text-align:center; font-size:18px; color:#3b3b3b; padding:16px;} .share-code-wrap {width:100%; background-color:#efeff4;} .share-code-btn, .finish-btn {width:145px; height:35px; color:#fff; font-size:15px; line-height:35px; text-align:center; vertical-align:middle; background-color:#ff7239; margin:18px auto 20px auto; border-radius:50px; display:block;} -.share-code-instruction {max-width:228px; font-size:12px; color:#666; line-height:20px; margin:0 auto;} +.share-code-instruction {max-width:228px; font-size:12px; color:#666; line-height:20px; margin:20px auto 30px;} /*20160613班级详情*/ .class-detail-name, .blue-title {width:100%; height:45px; line-height:45px; vertical-align:middle; background-color:#3b94d6; color:#fff; font-size:18px; text-align:center;} @@ -216,6 +216,7 @@ a.underline {text-decoration:underline;} .border-bottom-none {border-bottom:none !important;} .border-top-none {border-top:none !important;} .students-amount {height:14px; line-height:14px; vertical-align:middle; padding:2px 5px; background-color:#e6e6e6; border-radius:10px;} +.amount-arrow {height:14px; line-height:14px; vertical-align:middle; margin-top:12px;} .new-class-btn {font-size:15px; color:#fff; background-color:#3b94d6; padding:10px 40px; border-radius:20px; display:inline-block; margin:0 auto;} .join-class-btn {font-size:15px; color:#444; background-color:#ccc; padding:10px 40px; border-radius:20px; display:inline-block; margin:0 auto;} .new-class-input {width:60%; color:#555; height:16px; line-height:16px; vertical-align:middle; border:none; outline:none; padding:8px 0;}