From 8bbdf3688cb91ebe8aad41f942d66a305915bac0 Mon Sep 17 00:00:00 2001 From: txz Date: Mon, 13 Jun 2016 15:25:26 +0800 Subject: [PATCH 01/72] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7css=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/weui/weixin.css | 48 ++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index 6cccb3615..4c7439308 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -3,7 +3,7 @@ /*基本样式*/ body,table,input,textarea,select,button { font-family: "微软雅黑","宋体";} -h1,h2,h3,h4,h5,p,pre {padding:0px; margin:0px;} +body, h1,h2,h3,h4,h5,p,pre {padding:0px; margin:0px;} img {max-width:100%;} blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin-right: 0.4em; border-radius: 4px; font-family: "Microsoft YaHei"; background-size: 100% 100%; margin-top:5px;} .text-control {word-break:normal; word-wrap:break-word;} @@ -12,10 +12,12 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin .f15 {font-size:15px;} .fb {font-weight:bold;} .mt2 {margin-top:2px;} +.mt4 {margin-top:4px;} .mt5 {margin-top:5px;} .mt10 {margin-top:10px;} .mb5 {margin-bottom:5px;} .mb10 {margin-bottom:10px;} +.mb20 {margin-bottom:20px;} .ml10 {margin-left:10px;} .mr5 {margin-right:5px;} .mr10 {margin-right:10px;} @@ -29,12 +31,15 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin .c-grey {color:#9a9a9a;} .c-grey2 {color:#707070;} .c-grey3 {color:#555555;} +.c-grey4 {color:#888888;} +.c-blue {color:#3b94d6;} a {color:#707070;} a.c-grey {color:#707070;} a.c-grey2 {color:#9a9a9a;} a:link,a:visited{text-decoration:none;} a:hover,a:active{cursor:pointer;} a.link-blue {color:#269ac9;} +a.link-blue2 {color:#3b94d6;} a.underline {text-decoration:underline;} .border-radius {border-radius:5px;} .w36 {width:36px;} @@ -42,9 +47,14 @@ a.underline {text-decoration:underline;} .max-width-130 {max-width:130px;} .hidden {overflow:hidden; white-space:nowrap; text-overflow:ellipsis;} .inline-block {display:inline-block;} +.dis {display:block;} .undis {display:none;} .text-nowrap {white-space:nowrap;} .v-top {vertical-align:top;} +.tac {text-align:center;} + +/*背景色*/ +.bg-grey {background-color:#c1c1c1;} /*动态样式*/ .post-container {width:100%;} @@ -88,4 +98,38 @@ a.underline {text-decoration:underline;} /*帖子锁定样式*/ .locked_btn_cir {background: url("/images/locked.png") 0 0 no-repeat; cursor: default;} -.bg-grey {background-color:#c1c1c1;} +/*20150612加入班级样式*/ +.add-class-box {width:80%; max-width:300px; min-width:240px; height:150px; font-size:15px; color:#444; background-color:#fff; margin:0 auto; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); border-radius:5px; margin-top:100px;} +.add-class-tip {padding-top:20px; padding-bottom:20px;} +.class-number-input {width:80%; max-width:240px; height:28px; border:1px solid #ccc; padding-left:5px; margin:0 auto; display:block;} +.cancel-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;} +.submit-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;} +.slice {width:2%; text-align:center; border-top:1px solid #ccc;} +.slice-line {width:1px; height:37px; margin:auto; background:#ccc;} + +/*20160613邀请码样式*/ +.qr-code-wrap {width:100%; padding:40px 0; background-color:#3b94d6;} +.qr-code-box {width:225px; height:332px; background-color:#fff; border-radius:3px; margin:0 auto;} +.share-class-name {font-size:18px; color:#3b3b3b; text-align:center; padding:12px; border-bottom:1px solid #cccccc; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;} +.qr-img-wrap {width:100%; border-bottom:1px dashed #ccc;} +.qr-code-img {margin:36px auto; display:block;} +.invitation-code-wrap {text-align:center; font-size:18px; color:#3b3b3b; padding:16px;} +.share-code-wrap {width:100%; background-color:#efeff4;} +.share-code-btn {width:145px; height:40px; color:#fff; font-size:15px; line-height:40px; 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;} + +/*20160613班级详情*/ +.class-detail-name {width:100%; height:45px; line-height:45px; vertical-align:middle; background-color:#3b94d6; color:#fff; font-size:18px; text-align:center;} +.slice2 {width:2%; text-align:center; background-color:#fff; border-bottom:1px solid #ccc;} +.slice3 {width:1%; height:38px; text-align:center; background-color:#fff; border-bottom:1px solid #ccc;} +.slice-line2 {width:1px; height:38px; margin:auto; background:#ccc;} +.class-detail-tab {width:23%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;} +.class-tab-active {border-bottom:1px solid #3b94d6;} +.class-search-wrap {padding:8px 12px; position:relative;} +.class-search-inner {padding:0 30px; background-color:#fff;} +.class-search-icon {position:absolute; top:16px; left:16px;} +.class-detail-search {width:100%; height:33px; color:#999; background-color:#fff; border:none; outline:none;} +.border-top {border-top:1px solid #ccc;} +.class-detail-row {width:100%; height:38px; line-height:38px; vertical-align:middle; border-bottom:1px solid #ccc; background-color:#fff;} +.class-test-tip {text-align:center; font-size:13px; color:#444; padding-top:40px;} +.img-circle {border-radius:50%;} \ No newline at end of file From 962470c5826e91e47e59dd055df5449f819f8042 Mon Sep 17 00:00:00 2001 From: txz Date: Mon, 13 Jun 2016 17:23:35 +0800 Subject: [PATCH 02/72] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=96=87=E5=AD=97?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 4 ++-- public/stylesheets/weui/weixin.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 69ea8f1fa..2ab2e2d61 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -20,7 +20,7 @@
-
+
迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
@@ -127,7 +127,7 @@
-
+
状态:{{act.issue_detail.issue_status}} 优先级:{{act.issue_detail.issue_priority}}
指派给:{{act.issue_detail.issue_assigned_to}} 完成度:{{act.issue_detail.done_ratio}}%
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index 4c7439308..cc4db7e17 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -66,7 +66,7 @@ a.underline {text-decoration:underline;} .fl {float:left;} .fr {float:right;} .cl {clear:both; overflow:hidden;} -.post-content {width:100%; font-size:13px; line-height:18px; height:95px; overflow:hidden; word-break:break-all; word-wrap:break-word;} +.post-content {width:100%; font-size:13px; line-height:18px; height:90px; overflow:hidden; word-break:break-all; word-wrap:break-word;} .post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;} .post-interactive-column, .post-interactive-reply, From a2450defc67252920bf39984187c23e3cc2e7f40 Mon Sep 17 00:00:00 2001 From: txz Date: Mon, 13 Jun 2016 17:32:51 +0800 Subject: [PATCH 03/72] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=B1=BB=E5=88=AB=E6=96=87=E5=AD=97=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/homework_detail.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 0fc39c735..4de1c7b37 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -18,9 +18,9 @@ 类   别: - 普通作业 - 编程作业 - 分组作业 + 普通作业 + 编程作业 + 分组作业 From 270399c5dade14b39ef3893f93e2402fd4ad9726 Mon Sep 17 00:00:00 2001 From: txz Date: Tue, 14 Jun 2016 14:04:39 +0800 Subject: [PATCH 04/72] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E6=97=B6=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=A7=BB=E5=8A=A8=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 54 ++++++++++++++-------------- public/stylesheets/weui/weixin.css | 1 + 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 2ab2e2d61..476ae3690 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -33,9 +33,9 @@ {{act.latest_update}} 回复 {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
+
+
{{act.praise_count}}
+
{{act.praise_count}}
@@ -59,12 +59,12 @@
{{act.activity_type_name}} - {{act.latest_update}} + {{act.latest_update}} 回复 {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
+
+
{{act.praise_count}}
+
{{act.praise_count}}
@@ -88,12 +88,12 @@
{{act.activity_type_name}} - {{act.latest_update}} + {{act.latest_update}} 回复 {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
+
+
{{act.praise_count}}
+
{{act.praise_count}}
@@ -135,12 +135,12 @@
{{act.activity_type_name}} - {{act.latest_update}} + {{act.latest_update}} 回复 {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
+
+
{{act.praise_count}}
+
{{act.praise_count}}
@@ -165,12 +165,12 @@
{{act.activity_type_name}} - {{act.latest_update}} + {{act.latest_update}} 回复 {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
+
+
{{act.praise_count}}
+
{{act.praise_count}}
@@ -208,12 +208,12 @@
- {{act.latest_update}} + {{act.latest_update}} 回复 {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
+
+
{{act.praise_count}}
+
{{act.praise_count}}
@@ -237,12 +237,12 @@
- {{act.latest_update}} + {{act.latest_update}} 回复 {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
+
+
{{act.praise_count}}
+
{{act.praise_count}}
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index cc4db7e17..514cb92aa 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -88,6 +88,7 @@ a.underline {text-decoration:underline;} .reply-icon {background:url(/images/wechat/icon_list.gif) -150px -155px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;} .praise-icon {background:url(/images/wechat/icon_list.gif) -36px -88px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;} .praised-icon {background:url(/images/wechat/icon_list.gif) -152px -86px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;} +.num-block {width:12px; text-align:center; display:inline-block; vertical-align:top;} /* loading 弹框*/ .loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;} From b1791f4531db9be1648c5e5fb9748d2f1116b256 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 14 Jun 2016 14:24:39 +0800 Subject: [PATCH 05/72] =?UTF-8?q?wechat=E7=BB=93=E6=9E=84=E5=88=86?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/add_class.html | 13 + public/assets/wechat/app.html | 14 + public/javascripts/wechat/CommentBox.jsx | 108 ---- public/javascripts/wechat/app.js | 544 +----------------- public/javascripts/wechat/auth.js | 36 -- public/javascripts/wechat/blog_detail.js | 95 --- .../wechat/controllers/activity.js | 66 +++ .../wechat/controllers/add_class.js | 4 + public/javascripts/wechat/controllers/blog.js | 38 ++ .../wechat/controllers/course_notice.js | 35 ++ .../wechat/controllers/discussion.js | 36 ++ .../wechat/controllers/homework.js | 36 ++ .../javascripts/wechat/controllers/issue.js | 36 ++ .../wechat/controllers/journals.js | 37 ++ .../javascripts/wechat/course_discussion.js | 102 ---- public/javascripts/wechat/course_notice.js | 101 ---- .../wechat/directives/input_auto.js | 19 + .../wechat/directives/loading_spinner.js | 7 + public/javascripts/wechat/gulpfile.js | 7 + public/javascripts/wechat/homework_detail.js | 104 ---- public/javascripts/wechat/issue_detail.js | 108 ---- public/javascripts/wechat/message_detail.js | 95 --- public/javascripts/wechat/others/factory.js | 120 ++++ public/javascripts/wechat/others/filter.js | 5 + public/javascripts/wechat/others/routes.js | 70 +++ .../javascripts/wechat/project_discussion.js | 105 ---- 26 files changed, 546 insertions(+), 1395 deletions(-) create mode 100644 public/assets/wechat/add_class.html delete mode 100644 public/javascripts/wechat/CommentBox.jsx delete mode 100644 public/javascripts/wechat/auth.js delete mode 100644 public/javascripts/wechat/blog_detail.js create mode 100644 public/javascripts/wechat/controllers/activity.js create mode 100644 public/javascripts/wechat/controllers/add_class.js create mode 100644 public/javascripts/wechat/controllers/blog.js create mode 100644 public/javascripts/wechat/controllers/course_notice.js create mode 100644 public/javascripts/wechat/controllers/discussion.js create mode 100644 public/javascripts/wechat/controllers/homework.js create mode 100644 public/javascripts/wechat/controllers/issue.js create mode 100644 public/javascripts/wechat/controllers/journals.js delete mode 100644 public/javascripts/wechat/course_discussion.js delete mode 100644 public/javascripts/wechat/course_notice.js create mode 100644 public/javascripts/wechat/directives/input_auto.js create mode 100644 public/javascripts/wechat/directives/loading_spinner.js delete mode 100644 public/javascripts/wechat/homework_detail.js delete mode 100644 public/javascripts/wechat/issue_detail.js delete mode 100644 public/javascripts/wechat/message_detail.js create mode 100644 public/javascripts/wechat/others/factory.js create mode 100644 public/javascripts/wechat/others/filter.js create mode 100644 public/javascripts/wechat/others/routes.js delete mode 100644 public/javascripts/wechat/project_discussion.js diff --git a/public/assets/wechat/add_class.html b/public/assets/wechat/add_class.html new file mode 100644 index 000000000..2543d5cc4 --- /dev/null +++ b/public/assets/wechat/add_class.html @@ -0,0 +1,13 @@ +
+
+

输入班级邀请码,即刻加入班级!

+
+ +
+ 取消 +
+
+
+ 确定 +
+
diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index 5059c41ab..d88efe50f 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -18,7 +18,21 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/javascripts/wechat/CommentBox.jsx b/public/javascripts/wechat/CommentBox.jsx deleted file mode 100644 index 7f30b38b1..000000000 --- a/public/javascripts/wechat/CommentBox.jsx +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Created by guange on 16/3/19. - */ - - - - -var CommentBox = React.createClass({ - - loadFromServer: function(){ - $.ajax({ - url: this.props.url, - dataType: 'json', - success: function(data){ - this.setState({data: data}); - }.bind(this), - error: function(xhr,status,err){ - console.error(this.props.url, status, err.toString()); - }.bind(this) - }); - }, - onCommentSubmit: function(comment){ - console.log(comment); - }, - getInitialState: function(){ - return {data: []}; - }, - componentDidMount: function(){ - this.loadFromServer(); - setInterval(this.loadFromServer, 2000); - }, - render: function(){ - return( -
- - -
- ); - } -}); - -var CommentList = React.createClass({ - render: function(){ - - var commentNodes = this.props.data.map(function(comment){ - return ( - - {comment.text} - - ) - }); - - return ( -
- {commentNodes} -
- ); - } -}); - -var CommentForm = React.createClass({ - handleSubmit: function(e){ - e.preventDefault(); - - var author = this.refs.author.value.trim(); - var text = this.refs.text.value.trim(); - if(!text || !author){ - return; - } - - this.props.onCommentSubmit({author: author, text: text}); - - this.refs.author.value = ''; - this.refs.text.value = ''; - return; - }, - render: function(){ - return ( -
- - - -
- ); - } -}); - - -var Comment = React.createClass({ - - rawMarkup: function() { - var rawMarkup = marked(this.props.children.toString(), {sanitize: true}); - return { __html: rawMarkup }; - }, - - render: function(){ - return ( -
-

- {this.props.author} -

- -
- ) - } -}) - -React.render(, document.getElementById("example")); \ No newline at end of file diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index ca9682db2..adf445b51 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,546 +1,8 @@ var app = angular.module('wechat', ['ngRoute']); var apiUrl = '/api/v1/'; -var debug = false; //调试标志,如果在本地请置为true +var debug = true; //调试标志,如果在本地请置为true if(debug===true){ - //apiUrl = 'http://localhost:3000/api/v1/'; - apiUrl = 'http://www.trustie.net/api/v1/'; + apiUrl = 'http://localhost:3000/api/v1/'; + //apiUrl = 'http://www.trustie.net/api/v1/'; } - - -app.factory('auth', function($http,$routeParams, $q){ - var _openid = ''; - - if(typeof g_openid !== 'undefined'){ - _openid = g_openid; - } - - if(debug===true){ - _openid = "orgVLv8TlS6e7FDiI6xdTGHRaaRo"; //guange的帐号 - } - - var getOpenId = function() { - var deferred = $q.defer(); - if (typeof _openid !== 'undefined' && _openid.length > 0){ - deferred.resolve(_openid); - } else { - var code = $routeParams.code; - $http({ - url: '/wechat/get_open_id', - data: {code: code}, - method: 'POST' - }).then(function successCallback(response) { - _openid = response.data.openid; - deferred.resolve(_openid); - }, function errorCallback(response) { - deferred.reject(response); - }); - } - return deferred.promise; - }; - var openid = function(){ - return _openid; - }; - return {getOpenId: getOpenId, openid: openid}; -}); - - -app.factory('rms', function(){ - var _saveStorage = {}; - var save = function(key, value){ - _saveStorage[key] = value; - }; - - var get = function(key){ - return _saveStorage[key]; - }; - - return {save: save, get: get}; -}); - -app.controller('ActivityController',function($anchorScroll, $location,$scope, $http, $timeout, auth, rms, common){ - $scope.replaceUrl = function(url){ - return url; - }; - - console.log("ActivityController load"); - - $scope.page = rms.get('page') || 0; - $scope.activities = rms.get("activities") || []; - $scope.has_more = rms.get("has_more"); - - $scope.loadActData = function(page){ - - $scope.page = page; - $http({ - method: 'POST', - url: apiUrl+ "activities", - data: {openid: auth.openid(), page: page} - }).then(function successCallback(response) { - if(response.data.page >0) { - $scope.activities = $scope.activities.concat(response.data.data); - } else { - $scope.activities = response.data.data; - } - - rms.save("activities", $scope.activities); - $scope.has_more = (response.data.count + response.data.page * 10) < response.data.all_count; - rms.save('has_more', $scope.has_more); - rms.save('page', response.data.page); - - console.log(response.data); - - }, function errorCallback(response) { - }); - }; - - if($scope.activities.length<=0){ - auth.getOpenId().then( - function successCallback(response){ - $scope.loadActData(0); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - } else { - $timeout(function(){ - window.scrollTo(0, rms.get("yoffset")); - }); - - } - - //跳到详情页 - $scope.goDetail = function(type, act_id,id){ - rms.save("yoffset", window.document.body.scrollTop); - $location.path('/'+type+'/'+act_id); - } - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.factory('common', function($http, auth, $routeParams){ - var addCommonReply = function(id, type, data, cb){ - - if(!data.comment || data.comment.length<=0){ - return; - } - - var temp = data.comment.replace(/\n/g,'
'); - - var userInfo = { - type: type, - content: temp, - openid: auth.openid() - }; - //回复按钮禁用 - data.disabled = true; - - $http({ - method: 'POST', - url: apiUrl+ "new_comment/"+id, - data: userInfo - }).then(function successCallback(response) { - //alert("提交成功"); - //数据提交完成,回复按钮启用 - data.disabled = false; - if(typeof cb === 'function'){ - cb(); - } - }, function errorCallback(response) { - }); - }; - - var loadCommonData = function(id, type){ - return $http({ - method: 'GET', - url: apiUrl+ type + "/" + id+"?openid="+auth.openid() - }) - }; - - var addCommonPraise = function(act){ - act.praise_count += 1; - act.has_praise = true; - - $http({ - method: 'POST', - url: apiUrl + "praise/" + act.act_id, - data:{openid:auth.openid(),type:act.act_type} - }).then(function successCallback(response) { - console.log(response.data); - }, function errorCallback(response) { - }); - - }; - - var decreaseCommonPraise = function(act){ - act.praise_count -= 1; - act.has_praise = false; - - $http({ - method: 'POST', - url: apiUrl + "praise/" + act.act_id, - data:{openid:auth.openid(),type:act.act_type} - }).then(function successCallback(response) { - console.log(response.data); - }, function errorCallback(response) { - }); - }; - - return {addCommonReply: addCommonReply, loadCommonData: loadCommonData, addCommonPraise: addCommonPraise, decreaseCommonPraise: decreaseCommonPraise}; -}); - -app.controller('IssueController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'issues').then(function successCallback(response) { - console.log(response.data); - $scope.issue = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addIssueReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'Issue', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.controller('HomeworkController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'whomeworks').then(function successCallback(response) { - console.log(response.data); - $scope.homework = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addHomeworkReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'HomeworkCommon', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.controller('CourseNoticeController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'newss').then(function successCallback(response) { - console.log(response.data); - $scope.news = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addNoticeReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'News', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.controller('DiscussionController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'messages').then(function successCallback(response) { - console.log(response.data); - $scope.discussion = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addDiscussionReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'Message', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.controller('JournalsController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'journal_for_messages').then(function successCallback(response) { - console.log(response.data); - $scope.message = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addJournalReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'JournalsForMessage', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - console.log(act); - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - console.log(act); - common.decreaseCommonPraise(act); - }; -}); - -app.controller('BlogController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'blog_comments').then(function successCallback(response) { - console.log(response.data); - $scope.blog = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addBlogReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'BlogComment', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - console.log(act); - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - console.log(act); - common.decreaseCommonPraise(act); - }; -}); - -app.filter('safeHtml', function ($sce) { - return function (input) { - return $sce.trustAsHtml(input); - } -}); - -//app.directive('textAutoHeight', function($timeout){ -// return { -// restrict: 'A', -// scope: {}, -// link: function(scope, element, attr){ -// scope.text = '点击展开'; -// $timeout(function(){ -// var e = element.parent().children().eq(5); -// var height = e[0].scrollHeight; -// if(height>90){ -// element.css('display', 'block'); -// element.on('click', function(){ -// if(element.text() == "点击展开"){ -// e.css("height", height+'px'); -// element.text("点击隐藏"); -// } else { -// e.css("height", '90px'); -// element.text("点击展开"); -// } -// -// }); -// } -// }, false); -// -// } -// } -//}); - -app.directive('inputAuto',function(){ - return{ - restrict: 'A', - scope: {}, - link: function(scope, element){ - var copyContainer = element.parent().children().eq(0); - var sendButton = element.parent().next(); - element.on('input',function(){ - console.log(sendButton); - copyContainer.html(element[0].value); - var textHeight = copyContainer[0].scrollHeight; - element.css('height', textHeight + 'px'); - }); - sendButton.on('click',function(){ - element.css('height','28px'); - }); - } - } -}); - -app.directive('loadingSpinner', ['$http', function ($http) { - return { - restrict: 'A', - replace: true, - template: '
加载中...
', - }; -}]); - -app.config(['$routeProvider',"$httpProvider", "$locationProvider",function ($routeProvider, $httpProvider, $locationProvider) { - var rootPath = '/assets/wechat/' - //$locationProvider.html5Mode(true); - $routeProvider - .when('/activites', { - templateUrl: rootPath + 'activities.html', - controller: 'ActivityController' - }) - .when('/issues/:id', { - templateUrl: rootPath + 'issue_detail.html', - controller: 'IssueController' - }) - .when('/project_discussion/:id', { - templateUrl: rootPath + 'project_discussion.html', - controller: 'DiscussionController' - }) - .when('/homework/:id', { - templateUrl: rootPath + 'homework_detail.html', - controller: 'HomeworkController' - }) - .when('/course_notice/:id', { - templateUrl: rootPath + 'course_notice.html', - controller: 'CourseNoticeController' - }) - .when('/course_discussion/:id', { - templateUrl: rootPath + 'course_discussion.html', - controller: 'DiscussionController' - }) - .when('/journal_for_message/:id', { - templateUrl: rootPath + 'jour_message_detail.html', - controller: 'JournalsController' - }) - .when('/blog_comment/:id', { - templateUrl: rootPath + 'blog_detail.html', - controller: 'BlogController' - }) - .otherwise({ - redirectTo: '/activites' - }); - - //监听异步请求,实现加载中显隐标记 - $httpProvider.interceptors.push(function ($q, $rootScope) { - if ($rootScope.activeCalls == undefined) { - $rootScope.activeCalls = 0; - } - - return { - request: function (config) { - $rootScope.activeCalls += 1; - return config; - }, - requestError: function (rejection) { - $rootScope.activeCalls -= 1; - return rejection; - }, - response: function (response) { - $rootScope.activeCalls -= 1; - return response; - }, - responseError: function (rejection) { - $rootScope.activeCalls -= 1; - return rejection; - } - }; - }); -}]); diff --git a/public/javascripts/wechat/auth.js b/public/javascripts/wechat/auth.js deleted file mode 100644 index f9c2917fc..000000000 --- a/public/javascripts/wechat/auth.js +++ /dev/null @@ -1,36 +0,0 @@ -$(function(){ - //获取url中的参数 - function getUrlParam(name) { - var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 - var r = window.location.search.substr(1).match(reg); //匹配目标参数 - if (r != null) return unescape(r[2]); return null; //返回参数值 - } - - - var debug = false; - - var g_openid = ""; - if(debug){ - g_openid = "填写要调试的openid即可"; - } - - window.getOpenId = function(cb){ - if (g_openid.length>0){ - cb(g_openid); - } - var code = getUrlParam("code"); - $.ajax({ - url: '/wechat/get_open_id', - data: {code: code}, - type: 'post', - dataType: 'json', - success: function(data){ - g_openid = data.openid; - cb(g_openid); - }, - error: function(xhr,err){ - alert("认证失败: "+err); - } - }); - } -}); \ No newline at end of file diff --git a/public/javascripts/wechat/blog_detail.js b/public/javascripts/wechat/blog_detail.js deleted file mode 100644 index 44121f83c..000000000 --- a/public/javascripts/wechat/blog_detail.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Created by root on 4/1/16. - */ -$(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - - var apiUrl = '/api/v1/'; - - var setTemplate = function(data){ - console.log(data); - var html=bt('t:blog-detail',{blog: data}); - $('#blog-container').prepend(html); - $('.post-reply-submit').click(function(){ - replyInsert(); - }); - $('post-interactive-praise').click(function(){ - praiseClick(); - }); - }; - - var loadDataFromServer = function(id){ - //getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'blog_comments/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - //}) - - - }; - - var homeworkUrl = window.location.search; - var homeworkID = homeworkUrl.split("=")[1]; - - loadDataFromServer(homeworkID); - - //点击回复按钮,插入回复内容 - var replyInsert = function(){ - var replyContent = $("#postInput").val(); - if (!replyContent){ - alert("请输入回复"); - }else{ - - //将用户输入内容插入最后一条回复 - $(".post-reply-wrap:last").after('
回复
'); - $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date()); - var postInput = $("#postInput").val(); - $("#postInput").val(""); - //回复数目+1 - var replyNum = $(".post-interactive-reply").text().match(/\d+/g); - replyNum++; - $(".reply-num").text("(" + replyNum + ")"); - - //获取并传送回复用户数据 - var userInfo = { - "replyType" : "homework_assignment", - "replyContent" : postInput - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: "前台地址/后台方法", //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } - }); - } - - } - - //点赞效果 - var praiseClick = function(){ - var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); - praiseNum++; - $(".praise-num").text("(" + praiseNum + ")"); - } - - -}); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/activity.js b/public/javascripts/wechat/controllers/activity.js new file mode 100644 index 000000000..732772e13 --- /dev/null +++ b/public/javascripts/wechat/controllers/activity.js @@ -0,0 +1,66 @@ + +app.controller('ActivityController',function($anchorScroll, $location,$scope, $http, $timeout, auth, rms, common){ + $scope.replaceUrl = function(url){ + return url; + }; + + console.log("ActivityController load"); + + $scope.page = rms.get('page') || 0; + $scope.activities = rms.get("activities") || []; + $scope.has_more = rms.get("has_more"); + + $scope.loadActData = function(page){ + + $scope.page = page; + $http({ + method: 'POST', + url: apiUrl+ "activities", + data: {openid: auth.openid(), page: page} + }).then(function successCallback(response) { + if(response.data.page >0) { + $scope.activities = $scope.activities.concat(response.data.data); + } else { + $scope.activities = response.data.data; + } + + rms.save("activities", $scope.activities); + $scope.has_more = (response.data.count + response.data.page * 10) < response.data.all_count; + rms.save('has_more', $scope.has_more); + rms.save('page', response.data.page); + + console.log(response.data); + + }, function errorCallback(response) { + }); + }; + + if($scope.activities.length<=0){ + auth.getOpenId().then( + function successCallback(response){ + $scope.loadActData(0); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); + } else { + $timeout(function(){ + window.scrollTo(0, rms.get("yoffset")); + }); + + } + + //跳到详情页 + $scope.goDetail = function(type, act_id,id){ + rms.save("yoffset", window.document.body.scrollTop); + $location.path('/'+type+'/'+act_id); + } + + $scope.addPraise = function(act){ + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + common.decreaseCommonPraise(act); + }; +}); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/add_class.js b/public/javascripts/wechat/controllers/add_class.js new file mode 100644 index 000000000..099bb8e8e --- /dev/null +++ b/public/javascripts/wechat/controllers/add_class.js @@ -0,0 +1,4 @@ + +app.controller('AddClassController', ['$scope',function($scope){ + +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/blog.js b/public/javascripts/wechat/controllers/blog.js new file mode 100644 index 000000000..56589122a --- /dev/null +++ b/public/javascripts/wechat/controllers/blog.js @@ -0,0 +1,38 @@ + +app.controller('BlogController', function($scope, $http, $routeParams, auth, common){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + common.loadCommonData(id, 'blog_comments').then(function successCallback(response) { + console.log(response.data); + $scope.blog = response.data.data; + }, function errorCallback(response) { + }); + }; + + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); + + $scope.addBlogReply = function(data){ + console.log(data.comment); + common.addCommonReply($routeParams.id, 'BlogComment', data, function(){ + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }); + }; + + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act); + }; +}); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/course_notice.js b/public/javascripts/wechat/controllers/course_notice.js new file mode 100644 index 000000000..9a60d2222 --- /dev/null +++ b/public/javascripts/wechat/controllers/course_notice.js @@ -0,0 +1,35 @@ +app.controller('CourseNoticeController', function($scope, $http, $routeParams, auth, common){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + common.loadCommonData(id, 'newss').then(function successCallback(response) { + console.log(response.data); + $scope.news = response.data.data; + }, function errorCallback(response) { + }); + }; + + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); + + $scope.addNoticeReply = function(data){ + console.log(data.comment); + common.addCommonReply($routeParams.id, 'News', data, function(){ + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }); + }; + + $scope.addPraise = function(act){ + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + common.decreaseCommonPraise(act); + }; +}); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/discussion.js b/public/javascripts/wechat/controllers/discussion.js new file mode 100644 index 000000000..479f473bf --- /dev/null +++ b/public/javascripts/wechat/controllers/discussion.js @@ -0,0 +1,36 @@ + +app.controller('DiscussionController', function($scope, $http, $routeParams, auth, common){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + common.loadCommonData(id, 'messages').then(function successCallback(response) { + console.log(response.data); + $scope.discussion = response.data.data; + }, function errorCallback(response) { + }); + }; + + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); + + $scope.addDiscussionReply = function(data){ + console.log(data.comment); + common.addCommonReply($routeParams.id, 'Message', data, function(){ + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }); + }; + + $scope.addPraise = function(act){ + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + common.decreaseCommonPraise(act); + }; +}); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/homework.js b/public/javascripts/wechat/controllers/homework.js new file mode 100644 index 000000000..5fb890741 --- /dev/null +++ b/public/javascripts/wechat/controllers/homework.js @@ -0,0 +1,36 @@ + +app.controller('HomeworkController', function($scope, $http, $routeParams, auth, common){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + common.loadCommonData(id, 'whomeworks').then(function successCallback(response) { + console.log(response.data); + $scope.homework = response.data.data; + }, function errorCallback(response) { + }); + }; + + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); + + $scope.addHomeworkReply = function(data){ + console.log(data.comment); + common.addCommonReply($routeParams.id, 'HomeworkCommon', data, function(){ + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }); + }; + + $scope.addPraise = function(act){ + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + common.decreaseCommonPraise(act); + }; +}); diff --git a/public/javascripts/wechat/controllers/issue.js b/public/javascripts/wechat/controllers/issue.js new file mode 100644 index 000000000..53bdbf265 --- /dev/null +++ b/public/javascripts/wechat/controllers/issue.js @@ -0,0 +1,36 @@ +app.controller('IssueController', function($scope, $http, $routeParams, auth, common){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + common.loadCommonData(id, 'issues').then(function successCallback(response) { + console.log(response.data); + $scope.issue = response.data.data; + }, function errorCallback(response) { + }); + }; + + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); + + $scope.addIssueReply = function(data){ + console.log(data.comment); + common.addCommonReply($routeParams.id, 'Issue', data, function(){ + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }); + + }; + + $scope.addPraise = function(act){ + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + common.decreaseCommonPraise(act); + }; +}); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/journals.js b/public/javascripts/wechat/controllers/journals.js new file mode 100644 index 000000000..c292b1932 --- /dev/null +++ b/public/javascripts/wechat/controllers/journals.js @@ -0,0 +1,37 @@ +app.controller('JournalsController', function($scope, $http, $routeParams, auth, common){ + $scope.formData = {comment: ''}; + + var loadData = function(id){ + common.loadCommonData(id, 'journal_for_messages').then(function successCallback(response) { + console.log(response.data); + $scope.message = response.data.data; + }, function errorCallback(response) { + }); + }; + + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); + + $scope.addJournalReply = function(data){ + console.log(data.comment); + common.addCommonReply($routeParams.id, 'JournalsForMessage', data, function(){ + $scope.formData = {comment: ''}; + loadData($routeParams.id); + }); + }; + + $scope.addPraise = function(act){ + console.log(act); + common.addCommonPraise(act); + }; + + $scope.decreasePraise = function(act){ + console.log(act); + common.decreaseCommonPraise(act); + }; +}); \ No newline at end of file diff --git a/public/javascripts/wechat/course_discussion.js b/public/javascripts/wechat/course_discussion.js deleted file mode 100644 index e01b6b451..000000000 --- a/public/javascripts/wechat/course_discussion.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Created by root on 4/1/16. - */ -$(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - - var apiUrl = '/api/v1/'; - - var setReplyTemplate = function(data){ - console.log(data); - var html=bt('t:c-message-detail-reply',{reply: data}); - $('#all_course_message_reply').prepend(html); - }; - - var setTemplate = function(data){ - console.log(data); - var html=bt('t:course-discussion',{discussion: data}); - $('#c-discussion-container').prepend(html); - $('.post-reply-submit').click(function(){ - replyInsert(); - }); - /*$('post-interactive-praise').click(function(){ - praiseClick(); - });*/ - }; - - var loadDataFromServer = function(id){ - //getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'messages/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - //}) - - - }; - - var homeworkUrl = window.location.search; - var homeworkID = homeworkUrl.split("=")[1]; - - loadDataFromServer(homeworkID); - - //点击回复按钮,插入回复内容 - var replyInsert = function(){ - var replyContent = $("#postInput").val(); - if (!replyContent){ - alert("请输入回复"); - }else{ - - //将用户输入内容插入最后一条回复 - /*$(".post-reply-wrap:last").after('
回复
'); - $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date());*/ - var postInput = $("#postInput").val(); - $("#postInput").val(""); - //回复数目+1 - var replyNum = $(".post-interactive-reply").text().match(/\d+/g); - replyNum++; - $(".reply-num").text("(" + replyNum + ")"); - - //获取并传送回复用户数据 - var userInfo = { - "Type" : "Message", - "Content" : postInput - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - setReplyTemplate(data.data); - alert("6"); - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } - }); - } - - } - - /*//点赞效果 - var praiseClick = function(){ - var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); - praiseNum++; - $(".praise-num").text("(" + praiseNum + ")"); - }*/ - - -}); \ No newline at end of file diff --git a/public/javascripts/wechat/course_notice.js b/public/javascripts/wechat/course_notice.js deleted file mode 100644 index 546aac385..000000000 --- a/public/javascripts/wechat/course_notice.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Created by root on 4/1/16. - */ -$(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - - var apiUrl = '/api/v1/'; - - var setReplyTemplate = function(data){ - console.log(data); - var html=bt('t:news-detail-reply',{reply: data}); - $('#all_news_reply').prepend(html); - }; - - var setTemplate = function(data){ - console.log(data); - var html=bt('t:course-notice',{course: data}); - $('#c-notice-container').prepend(html); - $('.post-reply-submit').click(function(){ - replyInsert(); - }); - /*$('post-interactive-praise').click(function(){ - praiseClick(); - });*/ - }; - - var loadDataFromServer = function(id){ - //getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'newss/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - //}) - - - }; - - var homeworkUrl = window.location.search; - var homeworkID = homeworkUrl.split("=")[1]; - - loadDataFromServer(homeworkID); - - //点击回复按钮,插入回复内容 - var replyInsert = function(){ - var replyContent = $("#postInput").val(); - if (!replyContent){ - alert("请输入回复"); - }else{ - - //将用户输入内容插入最后一条回复 - /*$(".post-reply-wrap:last").after('
回复
'); - $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date());*/ - var postInput = $("#postInput").val(); - $("#postInput").val(""); - //回复数目+1 - var replyNum = $(".post-interactive-reply").text().match(/\d+/g); - replyNum++; - $(".reply-num").text("(" + replyNum + ")"); - - //获取并传送回复用户数据 - var userInfo = { - "type" : "News", - "content" : postInput - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - setReplyTemplate(data.data); - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } - }); - } - - } - - //点赞效果 - var praiseClick = function(){ - var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); - praiseNum++; - $(".praise-num").text("(" + praiseNum + ")"); - } - - -}); \ No newline at end of file diff --git a/public/javascripts/wechat/directives/input_auto.js b/public/javascripts/wechat/directives/input_auto.js new file mode 100644 index 000000000..bcb44141e --- /dev/null +++ b/public/javascripts/wechat/directives/input_auto.js @@ -0,0 +1,19 @@ +app.directive('inputAuto',function(){ + return{ + restrict: 'A', + scope: {}, + link: function(scope, element){ + var copyContainer = element.parent().children().eq(0); + var sendButton = element.parent().next(); + element.on('input',function(){ + console.log(sendButton); + copyContainer.html(element[0].value); + var textHeight = copyContainer[0].scrollHeight; + element.css('height', textHeight + 'px'); + }); + sendButton.on('click',function(){ + element.css('height','28px'); + }); + } + } +}); \ No newline at end of file diff --git a/public/javascripts/wechat/directives/loading_spinner.js b/public/javascripts/wechat/directives/loading_spinner.js new file mode 100644 index 000000000..780056828 --- /dev/null +++ b/public/javascripts/wechat/directives/loading_spinner.js @@ -0,0 +1,7 @@ +app.directive('loadingSpinner', ['$http', function ($http) { + return { + restrict: 'A', + replace: true, + template: '
加载中...
', + }; +}]); diff --git a/public/javascripts/wechat/gulpfile.js b/public/javascripts/wechat/gulpfile.js index 439b6ae5d..ea0649376 100644 --- a/public/javascripts/wechat/gulpfile.js +++ b/public/javascripts/wechat/gulpfile.js @@ -8,3 +8,10 @@ gulp.task('minify', function () { .pipe(concat('angular.all.min.js')) .pipe(gulp.dest('build')) }); + +gulp.task("default", function(){ + gulp.src(['app.js','others/factory.js','others/filter.js', 'controllers/*.js', 'directives/*.js', 'others/routes.js']) + .pipe(uglify()) + .pipe(concat('app.min.js')) + .pipe(gulp.dest('build')) +}); diff --git a/public/javascripts/wechat/homework_detail.js b/public/javascripts/wechat/homework_detail.js deleted file mode 100644 index 166ed20bf..000000000 --- a/public/javascripts/wechat/homework_detail.js +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Created by root on 3/31/16. - */ -$(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - - var apiUrl = '/api/v1/'; - - var setReplyTemplate = function(data){ - console.log(data); - var html=bt('t:homework-detail-reply',{reply: data}); - $('#all_homework_reply').prepend(html); - }; - - var setTemplate = function(data){ - console.log(data); - var html=bt('t:homework-detail',{homework: data}); - $('#homework-container').prepend(html); - $('.post-reply-submit').click(function(){ - replyInsert(); - }); - /*$('post-interactive-praise').click(function(){ - praiseClick(); - });*/ - }; - - var loadDataFromServer = function(id){ - //getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'whomeworks/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - //}) - - - }; - - var homeworkUrl = window.location.search; - var homeworkID = homeworkUrl.split("=")[1]; - - loadDataFromServer(homeworkID); - - //点击回复按钮,插入回复内容 - var replyInsert = function(){ - var replyContent = $("#postInput").val(); - if (!replyContent){ - alert("请输入回复"); - }else{ - - /*//将用户输入内容插入最后一条回复 - $(".post-reply-wrap:last").after('
回复
'); - $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date());*/ - var postInput = $("#postInput").val(); - $("#postInput").val(""); - //回复数目+1 - var replyNum = $(".post-interactive-reply").text().match(/\d+/g); - replyNum++; - $(".reply-num").text("(" + replyNum + ")"); - - getOpenId(function(openid) { - //获取并传送回复用户数据 - var userInfo = { - "type": "HomeworkCommon", - "content": postInput, - openid: openid - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - setReplyTemplate(data.data); - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } - }) - }); - } - - }; - - //点赞效果 - /*var praiseClick = function(){ - var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); - praiseNum++; - $(".praise-num").text("(" + praiseNum + ")"); - };*/ - - -}); \ No newline at end of file diff --git a/public/javascripts/wechat/issue_detail.js b/public/javascripts/wechat/issue_detail.js deleted file mode 100644 index 2b2766d29..000000000 --- a/public/javascripts/wechat/issue_detail.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Created by root on 4/1/16. - */ -/** - * Created by root on 3/31/16. - */ -$(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - - var apiUrl = '/api/v1/'; - - var setReplyTemplate = function(data){ - console.log(data); - var html=bt('t:issue-detail-reply',{issue_reply: data}); - $('#all_issue_reply').prepend(html); - }; - - - var setTemplate = function(data){ - console.log(data); - var html=bt('t:issue-detail',{issues: data}); - $('#issue-container').prepend(html); - $('.post-reply-submit').click(function(){ - IssueReplyInsert(); - }); - /*$('post-interactive-praise').click(function(){ - praiseClick(); - });*/ - }; - - var loadDataFromServer = function(id){ - //getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'issues/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - //}) - - - }; - - var IssueUrl = window.location.search; - var IssueID = IssueUrl.split("=")[1]; - - loadDataFromServer(IssueID); - - //点击回复按钮,插入回复内容 - var IssueReplyInsert = function(){ - var replyContent = $("#postInput").val(); - if (!replyContent){ - alert("请输入回复"); - }else{ - - //将用户输入内容插入最后一条回复 - /*$(".post-reply-wrap:last").after('
回复
'); - $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date());*/ - var postInput = $("#postInput").val(); - $("#postInput").val(""); - //回复数目+1 - var replyNum = $(".post-interactive-reply").text().match(/\d+/g); - replyNum++; - $(".reply-num").text("(" + replyNum + ")"); - - getOpenId(function(openid) { - //获取并传送回复用户数据 - var userInfo = { - "type": "Issue", - "content": postInput, - openid: openid, - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: apiUrl + 'new_comment/' + IssueID, //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - setReplyTemplate(data.data); - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } - }) - }); - } - - }; - - //点赞效果 - /*var praiseClick = function(){ - var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); - praiseNum++; - $(".praise-num").text("(" + praiseNum + ")"); - };*/ - - -}); \ No newline at end of file diff --git a/public/javascripts/wechat/message_detail.js b/public/javascripts/wechat/message_detail.js deleted file mode 100644 index 279da05d9..000000000 --- a/public/javascripts/wechat/message_detail.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Created by root on 4/1/16. - */ -$(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - - var apiUrl = '/api/v1/'; - - var setTemplate = function(data){ - console.log(data); - var html=bt('t:message-detail',{message: data}); - $('#message-container').prepend(html); - $('.post-reply-submit').click(function(){ - replyInsert(); - }); - $('post-interactive-praise').click(function(){ - praiseClick(); - }); - }; - - var loadDataFromServer = function(id){ - //getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'journal_for_messages/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - //}) - - - }; - - var homeworkUrl = window.location.search; - var homeworkID = homeworkUrl.split("=")[1]; - - loadDataFromServer(homeworkID); - - //点击回复按钮,插入回复内容 - var replyInsert = function(){ - var replyContent = $("#postInput").val(); - if (!replyContent){ - alert("请输入回复"); - }else{ - - //将用户输入内容插入最后一条回复 - $(".post-reply-wrap:last").after('
回复
'); - $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date()); - var postInput = $("#postInput").val(); - $("#postInput").val(""); - //回复数目+1 - var replyNum = $(".post-interactive-reply").text().match(/\d+/g); - replyNum++; - $(".reply-num").text("(" + replyNum + ")"); - - //获取并传送回复用户数据 - var userInfo = { - "replyType" : "homework_assignment", - "replyContent" : postInput - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: "前台地址/后台方法", //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - alert(data.d); //用data.d来获取后台传过来的json语句,或者是单纯的语句 - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } - }); - } - - } - - //点赞效果 - var praiseClick = function(){ - var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); - praiseNum++; - $(".praise-num").text("(" + praiseNum + ")"); - } - - -}); \ No newline at end of file diff --git a/public/javascripts/wechat/others/factory.js b/public/javascripts/wechat/others/factory.js new file mode 100644 index 000000000..955ca2faf --- /dev/null +++ b/public/javascripts/wechat/others/factory.js @@ -0,0 +1,120 @@ +app.factory('auth', function($http,$routeParams, $q){ + var _openid = ''; + + if(typeof g_openid !== 'undefined'){ + _openid = g_openid; + } + + if(debug===true){ + _openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; //guange的帐号 + } + + var getOpenId = function() { + var deferred = $q.defer(); + if (typeof _openid !== 'undefined' && _openid.length > 0){ + deferred.resolve(_openid); + } else { + var code = $routeParams.code; + $http({ + url: '/wechat/get_open_id', + data: {code: code}, + method: 'POST' + }).then(function successCallback(response) { + _openid = response.data.openid; + deferred.resolve(_openid); + }, function errorCallback(response) { + deferred.reject(response); + }); + } + return deferred.promise; + }; + var openid = function(){ + return _openid; + }; + return {getOpenId: getOpenId, openid: openid}; +}); + + +app.factory('rms', function(){ + var _saveStorage = {}; + var save = function(key, value){ + _saveStorage[key] = value; + }; + + var get = function(key){ + return _saveStorage[key]; + }; + + return {save: save, get: get}; +}); + +app.factory('common', function($http, auth, $routeParams){ + var addCommonReply = function(id, type, data, cb){ + + if(!data.comment || data.comment.length<=0){ + return; + } + + var temp = data.comment.replace(/\n/g,'
'); + + var userInfo = { + type: type, + content: temp, + openid: auth.openid() + }; + //回复按钮禁用 + data.disabled = true; + + $http({ + method: 'POST', + url: apiUrl+ "new_comment/"+id, + data: userInfo + }).then(function successCallback(response) { + //alert("提交成功"); + //数据提交完成,回复按钮启用 + data.disabled = false; + if(typeof cb === 'function'){ + cb(); + } + }, function errorCallback(response) { + }); + }; + + var loadCommonData = function(id, type){ + return $http({ + method: 'GET', + url: apiUrl+ type + "/" + id+"?openid="+auth.openid() + }) + }; + + var addCommonPraise = function(act){ + act.praise_count += 1; + act.has_praise = true; + + $http({ + method: 'POST', + url: apiUrl + "praise/" + act.act_id, + data:{openid:auth.openid(),type:act.act_type} + }).then(function successCallback(response) { + console.log(response.data); + }, function errorCallback(response) { + }); + + }; + + var decreaseCommonPraise = function(act){ + act.praise_count -= 1; + act.has_praise = false; + + $http({ + method: 'POST', + url: apiUrl + "praise/" + act.act_id, + data:{openid:auth.openid(),type:act.act_type} + }).then(function successCallback(response) { + console.log(response.data); + }, function errorCallback(response) { + }); + }; + + return {addCommonReply: addCommonReply, loadCommonData: loadCommonData, addCommonPraise: addCommonPraise, decreaseCommonPraise: decreaseCommonPraise}; +}); \ No newline at end of file diff --git a/public/javascripts/wechat/others/filter.js b/public/javascripts/wechat/others/filter.js new file mode 100644 index 000000000..2f57c2417 --- /dev/null +++ b/public/javascripts/wechat/others/filter.js @@ -0,0 +1,5 @@ +app.filter('safeHtml', function ($sce) { + return function (input) { + return $sce.trustAsHtml(input); + } +}); \ No newline at end of file diff --git a/public/javascripts/wechat/others/routes.js b/public/javascripts/wechat/others/routes.js new file mode 100644 index 000000000..270c16edd --- /dev/null +++ b/public/javascripts/wechat/others/routes.js @@ -0,0 +1,70 @@ +app.config(['$routeProvider',"$httpProvider", "$locationProvider",function ($routeProvider, $httpProvider, $locationProvider) { + var rootPath = '/assets/wechat/' + //$locationProvider.html5Mode(true); + $routeProvider + .when('/activites', { + templateUrl: rootPath + 'activities.html', + controller: 'ActivityController' + }) + .when('/issues/:id', { + templateUrl: rootPath + 'issue_detail.html', + controller: 'IssueController' + }) + .when('/project_discussion/:id', { + templateUrl: rootPath + 'project_discussion.html', + controller: 'DiscussionController' + }) + .when('/homework/:id', { + templateUrl: rootPath + 'homework_detail.html', + controller: 'HomeworkController' + }) + .when('/course_notice/:id', { + templateUrl: rootPath + 'course_notice.html', + controller: 'CourseNoticeController' + }) + .when('/course_discussion/:id', { + templateUrl: rootPath + 'course_discussion.html', + controller: 'DiscussionController' + }) + .when('/journal_for_message/:id', { + templateUrl: rootPath + 'jour_message_detail.html', + controller: 'JournalsController' + }) + .when('/blog_comment/:id', { + templateUrl: rootPath + 'blog_detail.html', + controller: 'BlogController' + }) + .when('/add_class', { + templateUrl: rootPath + 'add_class.html', + controller: 'AddClassController' + }) + .otherwise({ + redirectTo: '/activites' + }); + + //监听异步请求,实现加载中显隐标记 + $httpProvider.interceptors.push(function ($q, $rootScope) { + if ($rootScope.activeCalls == undefined) { + $rootScope.activeCalls = 0; + } + + return { + request: function (config) { + $rootScope.activeCalls += 1; + return config; + }, + requestError: function (rejection) { + $rootScope.activeCalls -= 1; + return rejection; + }, + response: function (response) { + $rootScope.activeCalls -= 1; + return response; + }, + responseError: function (rejection) { + $rootScope.activeCalls -= 1; + return rejection; + } + }; + }); +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/project_discussion.js b/public/javascripts/wechat/project_discussion.js deleted file mode 100644 index 94cdcea10..000000000 --- a/public/javascripts/wechat/project_discussion.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Created by root on 4/1/16. - */ -/** - * Created by root on 4/1/16. - */ -$(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - - var apiUrl = '/api/v1/'; - - var setReplyTemplate = function(data){ - console.log(data); - var html=bt('t:homework-detail-reply',{reply: data}); - $('#all_homework_reply').prepend(html); - }; - - - var setTemplate = function(data){ - console.log(data); - var html=bt('t:project-discussion',{discussion: data}); - $('#p-discussion-container').prepend(html); - $('.post-reply-submit').click(function(){ - replyInsert(); - }); - /*$('post-interactive-praise').click(function(){ - praiseClick(); - });*/ - }; - - var loadDataFromServer = function(id){ - //getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'messages/' + id, - dataType: 'json', - success: function(data){ - setTemplate(data.data); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - //}) - - - }; - - var homeworkUrl = window.location.search; - var homeworkID = homeworkUrl.split("=")[1]; - - loadDataFromServer(homeworkID); - - //点击回复按钮,插入回复内容 - var replyInsert = function(){ - var replyContent = $("#postInput").val(); - if (!replyContent){ - alert("请输入回复"); - }else{ - - /*//将用户输入内容插入最后一条回复 - $(".post-reply-wrap:last").after('
回复
'); - $(".post-reply-content:last").append(replyContent); - $(".post-reply-date:last").append(Date());*/ - var postInput = $("#postInput").val(); - $("#postInput").val(""); - //回复数目+1 - var replyNum = $(".post-interactive-reply").text().match(/\d+/g); - replyNum++; - $(".reply-num").text("(" + replyNum + ")"); - - //获取并传送回复用户数据 - var userInfo = { - "type" : "Message", - "content" : postInput - }; - - $.ajax({ - type: "POST", //提交方式 - dataType: "json", //类型 - url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 - data: userInfo, //参数,如果没有,可以为null - success: function (data) { //如果执行成功,那么执行此方法 - setReplyTemplate(data.data); //用data.d来获取后台传过来的json语句,或者是单纯的语句 - }, - error: function (err) { //如果执行不成功,那么执行此方法 - alert("err:" + err); - } - }); - } - - } - - //点赞效果 - /*var praiseClick = function(){ - var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); - praiseNum++; - $(".praise-num").text("(" + praiseNum + ")"); - }*/ - - -}); \ No newline at end of file From ada15b42123536486f0e62f76cb5f3072ccebd06 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 14 Jun 2016 16:03:10 +0800 Subject: [PATCH 06/72] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4,=20=E7=8E=B0=E5=9C=A8=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=88=86=E5=BC=80=E5=86=99,=E4=BD=86=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=97=B6=E6=89=93=E6=88=90=E4=B8=80=E4=B8=AAjs=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/user_activities.html.erb | 4 +- public/assets/wechat/app.html | 13 ++++- public/javascripts/wechat/app.js | 7 --- public/javascripts/wechat/build/app.min.js | 14 +++++ .../wechat/controllers/activity.js | 6 +- public/javascripts/wechat/controllers/blog.js | 6 +- .../wechat/controllers/course_notice.js | 5 +- .../wechat/controllers/discussion.js | 4 +- .../wechat/controllers/homework.js | 4 +- .../javascripts/wechat/controllers/issue.js | 4 +- .../wechat/controllers/journals.js | 4 +- public/javascripts/wechat/others/factory.js | 12 ++-- public/javascripts/wechat/others/filter.js | 4 +- public/javascripts/wechat/others/routes.js | 4 +- public/javascripts/wechat/wechat_dev.js | 57 ------------------- script/assets | 3 + 16 files changed, 59 insertions(+), 92 deletions(-) create mode 100644 public/javascripts/wechat/build/app.min.js delete mode 100644 public/javascripts/wechat/wechat_dev.js create mode 100644 script/assets diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index 3d61d8fcf..073d45495 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -13,6 +13,8 @@ @@ -21,7 +23,7 @@ - + \ No newline at end of file diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index d88efe50f..cabd224c4 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -2,7 +2,7 @@ - 我的动态 + 仅供本地调试使用 @@ -17,7 +17,15 @@
+ + + + @@ -33,6 +41,9 @@ + + + \ No newline at end of file diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index adf445b51..4d947e440 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,8 +1 @@ var app = angular.module('wechat', ['ngRoute']); -var apiUrl = '/api/v1/'; -var debug = true; //调试标志,如果在本地请置为true - -if(debug===true){ - apiUrl = 'http://localhost:3000/api/v1/'; - //apiUrl = 'http://www.trustie.net/api/v1/'; -} diff --git a/public/javascripts/wechat/build/app.min.js b/public/javascripts/wechat/build/app.min.js new file mode 100644 index 000000000..d8eacbf1b --- /dev/null +++ b/public/javascripts/wechat/build/app.min.js @@ -0,0 +1,14 @@ +var app=angular.module("wechat",["ngRoute"]); +app.factory("auth",["$http","$routeParams","$q",function(e,n,t){var o="";"undefined"!=typeof g_openid&&(o=g_openid);var a=function(){var a=t.defer();if("undefined"!=typeof o&&o.length>0)a.resolve(o);else{var i=n.code;e({url:"/wechat/get_open_id",data:{code:i},method:"POST"}).then(function(e){o=e.data.openid,a.resolve(o)},function(e){a.reject(e)})}return a.promise},i=function(){return o};return{getOpenId:a,openid:i}}]),app.factory("rms",function(){var e={},n=function(n,t){e[n]=t},t=function(n){return e[n]};return{save:n,get:t}}),app.factory("common",["$http","auth","$routeParams",function(e,n,t){var o=function(t,o,a,i){if(a.comment&&!(a.comment.length<=0)){var r=a.comment.replace(/\n/g,"
"),d={type:o,content:r,openid:n.openid()};a.disabled=!0,e({method:"POST",url:apiUrl+"new_comment/"+t,data:d}).then(function(e){a.disabled=!1,"function"==typeof i&&i()},function(e){})}},a=function(t,o){return e({method:"GET",url:apiUrl+o+"/"+t+"?openid="+n.openid()})},i=function(t){t.praise_count+=1,t.has_praise=!0,e({method:"POST",url:apiUrl+"praise/"+t.act_id,data:{openid:n.openid(),type:t.act_type}}).then(function(e){console.log(e.data)},function(e){})},r=function(t){t.praise_count-=1,t.has_praise=!1,e({method:"POST",url:apiUrl+"praise/"+t.act_id,data:{openid:n.openid(),type:t.act_type}}).then(function(e){console.log(e.data)},function(e){})};return{addCommonReply:o,loadCommonData:a,addCommonPraise:i,decreaseCommonPraise:r}}]); +app.filter("safeHtml",["$sce",function(t){return function(n){return t.trustAsHtml(n)}}]); +app.controller("ActivityController",["$anchorScroll","$location","$scope","$http","$timeout","auth","rms","common",function(t,a,e,o,i,n,c,s){e.replaceUrl=function(t){return t},console.log("ActivityController load"),e.page=c.get("page")||0,e.activities=c.get("activities")||[],e.has_more=c.get("has_more"),e.loadActData=function(t){e.page=t,o({method:"POST",url:apiUrl+"activities",data:{openid:n.openid(),page:t}}).then(function(t){t.data.page>0?e.activities=e.activities.concat(t.data.data):e.activities=t.data.data,c.save("activities",e.activities),e.has_more=t.data.count+10*t.data.page
加载中...
'}}]); +app.config(["$routeProvider","$httpProvider","$locationProvider",function(e,r,t){var o="/assets/wechat/";e.when("/activites",{templateUrl:o+"activities.html",controller:"ActivityController"}).when("/issues/:id",{templateUrl:o+"issue_detail.html",controller:"IssueController"}).when("/project_discussion/:id",{templateUrl:o+"project_discussion.html",controller:"DiscussionController"}).when("/homework/:id",{templateUrl:o+"homework_detail.html",controller:"HomeworkController"}).when("/course_notice/:id",{templateUrl:o+"course_notice.html",controller:"CourseNoticeController"}).when("/course_discussion/:id",{templateUrl:o+"course_discussion.html",controller:"DiscussionController"}).when("/journal_for_message/:id",{templateUrl:o+"jour_message_detail.html",controller:"JournalsController"}).when("/blog_comment/:id",{templateUrl:o+"blog_detail.html",controller:"BlogController"}).when("/add_class",{templateUrl:o+"add_class.html",controller:"AddClassController"}).otherwise({redirectTo:"/activites"}),r.interceptors.push(["$q","$rootScope",function(e,r){return void 0==r.activeCalls&&(r.activeCalls=0),{request:function(e){return r.activeCalls+=1,e},requestError:function(e){return r.activeCalls-=1,e},response:function(e){return r.activeCalls-=1,e},responseError:function(e){return r.activeCalls-=1,e}}}])}]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/activity.js b/public/javascripts/wechat/controllers/activity.js index 732772e13..e17b7c5b3 100644 --- a/public/javascripts/wechat/controllers/activity.js +++ b/public/javascripts/wechat/controllers/activity.js @@ -1,5 +1,7 @@ -app.controller('ActivityController',function($anchorScroll, $location,$scope, $http, $timeout, auth, rms, common){ +app.controller('ActivityController', + ['$anchorScroll', '$location','$scope', '$http', '$timeout', 'auth', 'rms', 'common', + function($anchorScroll, $location,$scope, $http, $timeout, auth, rms, common){ $scope.replaceUrl = function(url){ return url; }; @@ -63,4 +65,4 @@ app.controller('ActivityController',function($anchorScroll, $location,$scope, $h $scope.decreasePraise = function(act){ common.decreaseCommonPraise(act); }; -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/blog.js b/public/javascripts/wechat/controllers/blog.js index 56589122a..8eb45b604 100644 --- a/public/javascripts/wechat/controllers/blog.js +++ b/public/javascripts/wechat/controllers/blog.js @@ -1,5 +1,7 @@ -app.controller('BlogController', function($scope, $http, $routeParams, auth, common){ +app.controller('BlogController', + ['$scope', '$http', '$routeParams', 'auth', 'common', + function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ @@ -35,4 +37,4 @@ app.controller('BlogController', function($scope, $http, $routeParams, auth, com console.log(act); common.decreaseCommonPraise(act); }; -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/course_notice.js b/public/javascripts/wechat/controllers/course_notice.js index 9a60d2222..24b0fdbe1 100644 --- a/public/javascripts/wechat/controllers/course_notice.js +++ b/public/javascripts/wechat/controllers/course_notice.js @@ -1,4 +1,5 @@ -app.controller('CourseNoticeController', function($scope, $http, $routeParams, auth, common){ +app.controller('CourseNoticeController', ['$scope', '$http', '$routeParams', 'auth', 'common', + function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ @@ -32,4 +33,4 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a $scope.decreasePraise = function(act){ common.decreaseCommonPraise(act); }; -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/discussion.js b/public/javascripts/wechat/controllers/discussion.js index 479f473bf..4828cb39a 100644 --- a/public/javascripts/wechat/controllers/discussion.js +++ b/public/javascripts/wechat/controllers/discussion.js @@ -1,5 +1,5 @@ -app.controller('DiscussionController', function($scope, $http, $routeParams, auth, common){ +app.controller('DiscussionController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ @@ -33,4 +33,4 @@ app.controller('DiscussionController', function($scope, $http, $routeParams, aut $scope.decreasePraise = function(act){ common.decreaseCommonPraise(act); }; -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/homework.js b/public/javascripts/wechat/controllers/homework.js index 5fb890741..795bf30e9 100644 --- a/public/javascripts/wechat/controllers/homework.js +++ b/public/javascripts/wechat/controllers/homework.js @@ -1,5 +1,5 @@ -app.controller('HomeworkController', function($scope, $http, $routeParams, auth, common){ +app.controller('HomeworkController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ @@ -33,4 +33,4 @@ app.controller('HomeworkController', function($scope, $http, $routeParams, auth, $scope.decreasePraise = function(act){ common.decreaseCommonPraise(act); }; -}); +}]); diff --git a/public/javascripts/wechat/controllers/issue.js b/public/javascripts/wechat/controllers/issue.js index 53bdbf265..09602f9e1 100644 --- a/public/javascripts/wechat/controllers/issue.js +++ b/public/javascripts/wechat/controllers/issue.js @@ -1,4 +1,4 @@ -app.controller('IssueController', function($scope, $http, $routeParams, auth, common){ +app.controller('IssueController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ @@ -33,4 +33,4 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth, co $scope.decreasePraise = function(act){ common.decreaseCommonPraise(act); }; -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/journals.js b/public/javascripts/wechat/controllers/journals.js index c292b1932..f379525d7 100644 --- a/public/javascripts/wechat/controllers/journals.js +++ b/public/javascripts/wechat/controllers/journals.js @@ -1,4 +1,4 @@ -app.controller('JournalsController', function($scope, $http, $routeParams, auth, common){ +app.controller('JournalsController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ $scope.formData = {comment: ''}; var loadData = function(id){ @@ -34,4 +34,4 @@ app.controller('JournalsController', function($scope, $http, $routeParams, auth, console.log(act); common.decreaseCommonPraise(act); }; -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/others/factory.js b/public/javascripts/wechat/others/factory.js index 955ca2faf..cefef3ab9 100644 --- a/public/javascripts/wechat/others/factory.js +++ b/public/javascripts/wechat/others/factory.js @@ -1,14 +1,10 @@ -app.factory('auth', function($http,$routeParams, $q){ +app.factory('auth', ['$http','$routeParams', '$q', function($http,$routeParams, $q){ var _openid = ''; if(typeof g_openid !== 'undefined'){ _openid = g_openid; } - if(debug===true){ - _openid = "oCnvgvz8R7QheXE-R9Kkr39j8Ndg"; //guange的帐号 - } - var getOpenId = function() { var deferred = $q.defer(); if (typeof _openid !== 'undefined' && _openid.length > 0){ @@ -32,7 +28,7 @@ app.factory('auth', function($http,$routeParams, $q){ return _openid; }; return {getOpenId: getOpenId, openid: openid}; -}); +}]); app.factory('rms', function(){ @@ -48,7 +44,7 @@ app.factory('rms', function(){ return {save: save, get: get}; }); -app.factory('common', function($http, auth, $routeParams){ +app.factory('common', ['$http', 'auth', '$routeParams', function($http, auth, $routeParams){ var addCommonReply = function(id, type, data, cb){ if(!data.comment || data.comment.length<=0){ @@ -117,4 +113,4 @@ app.factory('common', function($http, auth, $routeParams){ }; return {addCommonReply: addCommonReply, loadCommonData: loadCommonData, addCommonPraise: addCommonPraise, decreaseCommonPraise: decreaseCommonPraise}; -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/others/filter.js b/public/javascripts/wechat/others/filter.js index 2f57c2417..dcb8e9e6a 100644 --- a/public/javascripts/wechat/others/filter.js +++ b/public/javascripts/wechat/others/filter.js @@ -1,5 +1,5 @@ -app.filter('safeHtml', function ($sce) { +app.filter('safeHtml', ['$sce',function ($sce) { return function (input) { return $sce.trustAsHtml(input); } -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/public/javascripts/wechat/others/routes.js b/public/javascripts/wechat/others/routes.js index 270c16edd..7ea270c6e 100644 --- a/public/javascripts/wechat/others/routes.js +++ b/public/javascripts/wechat/others/routes.js @@ -43,7 +43,7 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",function ($rou }); //监听异步请求,实现加载中显隐标记 - $httpProvider.interceptors.push(function ($q, $rootScope) { + $httpProvider.interceptors.push(['$q', '$rootScope', function ($q, $rootScope) { if ($rootScope.activeCalls == undefined) { $rootScope.activeCalls = 0; } @@ -66,5 +66,5 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",function ($rou return rejection; } }; - }); + }]); }]); \ No newline at end of file diff --git a/public/javascripts/wechat/wechat_dev.js b/public/javascripts/wechat/wechat_dev.js deleted file mode 100644 index 36529e0b8..000000000 --- a/public/javascripts/wechat/wechat_dev.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Created by root on 3/25/16. - */ -$(document).ready(function(){ - - var bt=baidu.template; - bt.LEFT_DELIMITER=''; - - var apiUrl = '/api/v1/'; - var loadDataFromServer = function(id, page){ - getOpenId(function(openid){ - $.ajax({ - url: apiUrl + 'activities', - data: {openid: openid, page: page}, - type: 'POST', - dataType: 'json', - success: function(data){ - setTemplate(data.data, data.all_count, data.count, data.page); - }, - error: function(xhr,status,err){ - console.log(err); - } - }); - }) - - }; - var setTemplate = function(data, all_count, count, page){ - console.log(data); - var html=bt('t:result-list',{activities: data, all_count: all_count, count: count, page: page}); - if (page == 0) { - $('#container').prepend(html); - } else { - $("#more_activities").remove(); - $('#container').append(html); - } - descToggle(); - }; - //内容全部显示与部分隐藏 - var descToggle = function(){ - $(".post-all-content").each(function(){ - var postHeight = $(this).height(); - if (postHeight > 90){ - $(this).parent().next().css("display","block"); - $(this).parent().next().toggle(function(){ - $(this).text("点击隐藏"); - $(this).prev().css("height",postHeight); - },function(){ - $(this).text("点击展开"); - $(this).prev().css("height",90); - }); - } - }); - } - - loadDataFromServer(8686, 0); -}); diff --git a/script/assets b/script/assets new file mode 100644 index 000000000..bf4501127 --- /dev/null +++ b/script/assets @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +cd public/javascripts/wechat && gulp && gulp minify From 8fd4d518b26b159b6fe5040497c49b0944cc24af Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 15 Jun 2016 13:44:28 +0800 Subject: [PATCH 07/72] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/api.rb | 3 +- app/api/mobile/apis/courses.rb | 25 ++++++-------- app/helpers/api_helper.rb | 22 ++++++++++++ app/models/course.rb | 19 +++++++++++ app/services/courses_service.rb | 34 ++++++++++++------- ...0160614072229_add_invite_code_to_course.rb | 5 +++ db/schema.rb | 3 +- 7 files changed, 81 insertions(+), 30 deletions(-) create mode 100644 db/migrate/20160614072229_add_invite_code_to_course.rb diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index c86a36d05..058687776 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -67,8 +67,7 @@ module Mobile mount Apis::NewComment mount Apis::Praise - #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) - #add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development? + add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development? end end diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index 3a36a9e37..b585e7dae 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -97,25 +97,22 @@ module Mobile desc "加入课程" params do - requires :course_password, type: String + optional :openid, type: String, desc: '微信ID' + requires :invite_code, type: String, desc: '邀请码' end - post ":id" do + post "join" do authenticate! + cs = CoursesService.new - status = cs.join_course({:object_id => params[:id],:course_password => params[:course_password]},current_user) - out = {status: status[:state]} - message = case status[:state] - when 0; "加入成功" - when 1; "密码错误" - when 2; "课程已过期 请联系课程管理员重启课程。(在配置课程处)" - when 3; "您已经加入了课程" - when 4; "您加入的课程不存在" - when 5; "您还未登录" - else; "未知错误,请稍后再试" - end - out.merge(message: message) + status = cs.join_course({openid: params[:openid], invite_code: params[:invite_code]}, current_user) + + { + status: status[:state], + messsge:CoursesService::JoinCourseError.message(status[:state]) + } end + desc "退出课程" params do requires :token, type: String diff --git a/app/helpers/api_helper.rb b/app/helpers/api_helper.rb index fb1231287..e993b120f 100644 --- a/app/helpers/api_helper.rb +++ b/app/helpers/api_helper.rb @@ -489,4 +489,26 @@ module ApiHelper self.update_attribute(:praise_num, self.praise_num.to_i - num) end + + class Errors + def self.define_error(arr) + @errors = {} + arr.each_with_index { |item, index| + if index %2 == 1 + @errors[arr[index-1]] = item + end + } + if arr.count % 2== 1 + @default_error = arr.last + else + @default_error = "未知错误" + end + + end + + def self.message(msg_id) + @errors[msg_id] || @default_error + end + end + end \ No newline at end of file diff --git a/app/models/course.rb b/app/models/course.rb index 69dbec5d0..d379b24d3 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -1,3 +1,5 @@ +#coding=utf-8 + require 'elasticsearch/model' class Course < ActiveRecord::Base include Redmine::SafeAttributes @@ -404,6 +406,7 @@ class Course < ActiveRecord::Base self.course_messages << CourseMessage.new(:user_id => self.tea_id, :course_id => self.id, :viewed => false) end + #项目与课程分离后,很多课程的名称等信息为空,这些数据信息存储在项目表中!!就是数据兼容的问题 #def name # read_attribute('name') || Project.find_by_identifier(self.extra).try(:name) @@ -450,6 +453,22 @@ class Course < ActiveRecord::Base end end + # 生成邀请码 + CODES = %W(2 3 4 5 6 7 8 9 A B C D E F G H J K L N M O P Q R S T U V W X Y Z) + def generate_invite_code + code = invite_code + if !invite_code || invite_code.size <6 + self.invite_code = CODES.sample(6).join + save! && reload + code = invite_code + end + code + end + + def + + end + end diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 2c8387349..93529f57c 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -300,23 +300,31 @@ class CoursesService @state end + class JoinCourseError < Errors + define_error [ + 0, '加入成功', + 1, '密码错误', + 2, '课程已过期 请联系课程管理员重启课程。', + 3, '您已经加入了课程', + 4, '您加入的课程不存在', + 5, '您还未登录', + 6, '申请成功,请等待审核完毕', + 7, '您已经发送过申请了,请耐心等待', + 8, '您已经是该课程的教师了', + 9, '您已经是该课程的教辅了', + 10, '您已经是该课程的管理员了', + '未知错误,请稍后再试' + ] + end #加入课程 #object_id:课程id #course_password :加入课程的密码 - #@state == 0 加入成功 - #@state == 1 密码错误 - #@state == 2 课程已过期 请联系课程管理员重启课程。(在配置课程处) - #@state == 3 您已经加入了课程 - #@state == 4 您加入的课程不存在 - #@state == 5 您还未登录 - #@state == 6 申请成功,请等待审核完毕 - #@state == 7 您已经发送过申请了,请耐心等待 - #@state == 8 您已经是该课程的教师了 - #@state == 9 您已经是该课程的教辅了 - #@state == 10 您已经是该课程的管理员了 - #@state 其他 未知错误,请稍后再试 def join_course params,current_user - course = Course.find_by_id params[:object_id] + course = if params[:invite_code] + Course.find_by_invite_code(params[:invite_code]) + else + Course.find_by_id params[:object_id] + end @state = 10 if course diff --git a/db/migrate/20160614072229_add_invite_code_to_course.rb b/db/migrate/20160614072229_add_invite_code_to_course.rb new file mode 100644 index 000000000..8f7bb8da1 --- /dev/null +++ b/db/migrate/20160614072229_add_invite_code_to_course.rb @@ -0,0 +1,5 @@ +class AddInviteCodeToCourse < ActiveRecord::Migration + def change + add_column :courses, :invite_code, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 95ffceef1..820c6a035 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160612043259) do +ActiveRecord::Schema.define(:version => 20160614072229) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -550,6 +550,7 @@ ActiveRecord::Schema.define(:version => 20160612043259) do t.integer "excellent_option", :default => 0 t.integer "is_copy", :default => 0 t.integer "visits", :default => 0 + t.string "invite_code" end create_table "custom_fields", :force => true do |t| From 24458ecb48a4578854bc65f9a3bea82707348876 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 16 Jun 2016 11:31:39 +0800 Subject: [PATCH 08/72] =?UTF-8?q?table=E5=8F=AF=E6=8B=96=E6=8B=BD=EF=BC=8C?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E6=B5=8B=E9=AA=8C=E8=A1=A8=E6=A0=BC=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/_student_table.html.erb | 25 ++++++++++--------- .../student_work/_evaluation_title.html.erb | 6 +---- .../_evaluation_un_title.html.erb | 6 +---- app/views/student_work/index.js.erb | 3 +-- public/javascripts/resizeable_table.js | 5 ++-- public/stylesheets/courses.css | 2 +- 6 files changed, 19 insertions(+), 28 deletions(-) diff --git a/app/views/exercise/_student_table.html.erb b/app/views/exercise/_student_table.html.erb index cbb56025e..f3a72b20e 100644 --- a/app/views/exercise/_student_table.html.erb +++ b/app/views/exercise/_student_table.html.erb @@ -1,23 +1,24 @@ +<%= javascript_include_tag 'resizeable_table'%> + - - + + + + + + + <% @exercise_users_list.each_with_index do |exercise, index|%> - + @@ -30,7 +31,7 @@ - +
- 序号 -    - 姓名 - 学号 - 班级 -
序号  姓名学号班级   - <%= link_to "时间",'',:class => "c_dark f14 fb fl ml50" ,:remote => true%> + <%= link_to "时间",'',:class => "c_dark f14 fb" ,:remote => true%> - <%= link_to "成绩",'',:class => "c_dark f14 fb fl ml10",:remote => true%> + <%= link_to "成绩",'',:class => "c_dark f14 fb",:remote => true%>
<%=index + 1 %><%=index + 1 %> <%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %> --    <% if exercise.created_at%> <%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>  diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 6a89b51b1..950c1660a 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -1,8 +1,4 @@ - - - +
diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index c4a6a3e9b..5ed2e82d6 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -1,8 +1,4 @@ - - -
序号  
+
diff --git a/app/views/student_work/index.js.erb b/app/views/student_work/index.js.erb index da2428316..f65782805 100644 --- a/app/views/student_work/index.js.erb +++ b/app/views/student_work/index.js.erb @@ -1,4 +1,3 @@ $("#homework_student_work_list").html("<%= escape_javascript(render :partial => 'student_work/student_work_list') %>"); $("#export_student_work").replaceWith("<%= escape_javascript( link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :group => @group, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => 'export_student_work') %>"); -/* -$("th").each(function(){$(this).css("width",$(this).width()-1);});*/ +$("th").each(function(){$(this).css("width",$(this).width()-1);}); diff --git a/public/javascripts/resizeable_table.js b/public/javascripts/resizeable_table.js index a43078dee..1f84d4471 100644 --- a/public/javascripts/resizeable_table.js +++ b/public/javascripts/resizeable_table.js @@ -1,7 +1,7 @@ /** * Created by ttang on 2016/5/24. */ - /*$(document).ready(function(){ + $(document).ready(function(){ $("th").each(function(){ $(this).css("width",$(this).width()-1); }); @@ -80,5 +80,4 @@ element.addEventListener?element.addEventListener(type,listener,useCapture):element.attachEvent("on" + type,listener); } } - }); -*/ \ No newline at end of file + }); \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 46fbc5950..382283f75 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -109,7 +109,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re /*20160520作品列表table*/ .hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle; table-layout:fixed;} -.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border-bottom:1px solid #e1e1e1;} +.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border:1px solid #e1e1e1; text-align:center;} /*作业信息*/ .mt-2 {margin-top:-2px;} From 994ce342d71abe8efed5ef605c380ab2775603a8 Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 17 Jun 2016 15:35:58 +0800 Subject: [PATCH 09/72] =?UTF-8?q?=E5=BE=AE=E4=BF=A1ul=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/weui/weixin.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index 514cb92aa..9954ac755 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -3,7 +3,8 @@ /*基本样式*/ body,table,input,textarea,select,button { font-family: "微软雅黑","宋体";} -body, h1,h2,h3,h4,h5,p,pre {padding:0px; margin:0px;} +body, h1,h2,h3,h4,h5,p,pre,ul {padding:0px; margin:0px;} +ul li {margin-left:40px;} img {max-width:100%;} blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin-right: 0.4em; border-radius: 4px; font-family: "Microsoft YaHei"; background-size: 100% 100%; margin-top:5px;} .text-control {word-break:normal; word-wrap:break-word;} @@ -88,7 +89,7 @@ a.underline {text-decoration:underline;} .reply-icon {background:url(/images/wechat/icon_list.gif) -150px -155px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;} .praise-icon {background:url(/images/wechat/icon_list.gif) -36px -88px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;} .praised-icon {background:url(/images/wechat/icon_list.gif) -152px -86px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;} -.num-block {width:12px; text-align:center; display:inline-block; vertical-align:top;} +.num-block {display:inline-block; vertical-align:top;} /* loading 弹框*/ .loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;} From acf17d625218eb8482a99b6cd93c02b0d95534c4 Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 17 Jun 2016 15:45:29 +0800 Subject: [PATCH 10/72] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=93=BE=E6=8E=A5=E6=B7=BB=E5=8A=A0=E9=A2=9C?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/blog_detail.html | 2 +- public/assets/wechat/course_discussion.html | 2 +- public/assets/wechat/course_notice.html | 2 +- public/assets/wechat/homework_detail.html | 2 +- public/assets/wechat/issue_detail.html | 2 +- public/assets/wechat/jour_message_detail.html | 2 +- public/assets/wechat/project_discussion.html | 2 +- public/stylesheets/weui/weixin.css | 1 + 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 509e0171a..ee651eadf 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -8,7 +8,7 @@
{{blog.title}}
{{blog.user.realname}}发表博客
-
+
{{blog.created_at}}
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 2e7ed3151..aa1b05fd9 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -15,7 +15,7 @@
序号  来   源: {{discussion.course_project_name}}  |  课程问答区
-
+
{{discussion.created_on}}
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index cca135681..bbf08e03d 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -14,7 +14,7 @@
来   源: {{news.course_name}}  |  课程通知
-
+
{{news.created_on}}
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 4de1c7b37..c22e89021 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -24,7 +24,7 @@ -
+
迟交扣分:{{homework.late_penalty}}分
缺评扣分:{{homework.absence_penalty}}分/作品
匿评开启时间:{{homework.evaluation_start}}
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 1d7f9a536..70b9286dd 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -14,7 +14,7 @@ 来   源: {{issue.project_name}}  |  项目问题 -
+
状   态:{{issue.issue_status}}
优先级:{{issue.issue_priority}}
指派给:{{issue.issue_assigned_to}}
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index dc6b1409f..a1b79379f 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -7,7 +7,7 @@
{{message.user.realname}}给您留言了
{{message.created_on}}
-
+
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 4831e1521..7bc4b0005 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -14,7 +14,7 @@ 来   源: {{discussion.course_project_name}}  |  项目讨论区 -
+
{{discussion.created_on}}
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index 9954ac755..d664be450 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -68,6 +68,7 @@ a.underline {text-decoration:underline;} .fr {float:right;} .cl {clear:both; overflow:hidden;} .post-content {width:100%; font-size:13px; line-height:18px; height:90px; overflow:hidden; word-break:break-all; word-wrap:break-word;} +.post-all-content a {color:#136ec2;} .post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;} .post-interactive-column, .post-interactive-reply, From 18df93ba9fcfed58d91109fa8e68f6d2fe6b381a Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 17 Jun 2016 16:16:24 +0800 Subject: [PATCH 11/72] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=95=8C=E9=9D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/activities.html | 126 +++++++++++++++------------ public/stylesheets/weui/weixin.css | 2 + 2 files changed, 72 insertions(+), 56 deletions(-) diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 476ae3690..54a00c1f7 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -27,16 +27,18 @@
- 普通作业 - 编程作业 - 分组作业 - {{act.latest_update}} - 回复 - {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
-
+
+ 普通作业 + 编程作业 + 分组作业 + {{act.latest_update}} + 回复 + {{act.reply_count}} +
+
{{act.praise_count}}
+
{{act.praise_count}}
+
+
@@ -58,14 +60,16 @@
- {{act.activity_type_name}} - {{act.latest_update}} - 回复 - {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
-
+
+ {{act.activity_type_name}} + {{act.latest_update}} + 回复 + {{act.reply_count}} +
+
{{act.praise_count}}
+
{{act.praise_count}}
+
+
@@ -87,14 +91,16 @@
- {{act.activity_type_name}} - {{act.latest_update}} - 回复 - {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
-
+
+ {{act.activity_type_name}} + {{act.latest_update}} + 回复 + {{act.reply_count}} +
+
{{act.praise_count}}
+
{{act.praise_count}}
+
+
@@ -134,14 +140,16 @@
- {{act.activity_type_name}} - {{act.latest_update}} - 回复 - {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
-
+
+ {{act.activity_type_name}} + {{act.latest_update}} + 回复 + {{act.reply_count}} +
+
{{act.praise_count}}
+
{{act.praise_count}}
+
+
@@ -164,14 +172,16 @@
- {{act.activity_type_name}} - {{act.latest_update}} - 回复 - {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
-
+
+ {{act.activity_type_name}} + {{act.latest_update}} + 回复 + {{act.reply_count}} +
+
{{act.praise_count}}
+
{{act.praise_count}}
+
+
@@ -208,13 +218,15 @@
- {{act.latest_update}} - 回复 - {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
-
+
+ {{act.latest_update}} + 回复 + {{act.reply_count}} +
+
{{act.praise_count}}
+
{{act.praise_count}}
+
+
@@ -237,13 +249,15 @@
- {{act.latest_update}} - 回复 - {{act.reply_count}} -
-
{{act.praise_count}}
-
{{act.praise_count}}
-
+
+ {{act.latest_update}} + 回复 + {{act.reply_count}} +
+
{{act.praise_count}}
+
{{act.praise_count}}
+
+
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index d664be450..3fd9acd37 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -13,6 +13,7 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin .f15 {font-size:15px;} .fb {font-weight:bold;} .mt2 {margin-top:2px;} +.mt3 {margin-top:3px;} .mt4 {margin-top:4px;} .mt5 {margin-top:5px;} .mt10 {margin-top:10px;} @@ -91,6 +92,7 @@ a.underline {text-decoration:underline;} .praise-icon {background:url(/images/wechat/icon_list.gif) -36px -88px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;} .praised-icon {background:url(/images/wechat/icon_list.gif) -152px -86px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;} .num-block {display:inline-block; vertical-align:top;} +.post-op-banner {height:20px; line-height:20px; vertical-align:middle;} /* loading 弹框*/ .loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;} From 98c6548e3933cc92302182f7f079d9a9b1497ebb Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:18:03 +0800 Subject: [PATCH 12/72] =?UTF-8?q?=E9=87=8D=E5=86=99=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=92=8C=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/users.rb | 11 +++ app/controllers/wechats_controller.rb | 4 +- app/models/course.rb | 5 - public/assets/wechat/app.html | 8 +- public/assets/wechat/login.html | 25 +++++ public/assets/wechat/reg.html | 43 +++++++++ public/assets/wechat/templates/alert.html | 12 +++ public/images/wechat/QR-code.jpg | Bin 0 -> 29738 bytes public/images/wechat/arrow.png | Bin 0 -> 21159 bytes public/images/wechat/checked.png | Bin 0 -> 1092 bytes public/images/wechat/dot.png | Bin 0 -> 27646 bytes public/images/wechat/female.jpg | Bin 0 -> 3783 bytes public/images/wechat/female.png | Bin 0 -> 22752 bytes public/images/wechat/male.jpg | Bin 0 -> 4136 bytes public/images/wechat/male.png | Bin 0 -> 23849 bytes public/images/wechat/minus.png | Bin 0 -> 23318 bytes public/images/wechat/plus.png | Bin 0 -> 23367 bytes public/images/wechat/post-avatar.jpg | Bin 0 -> 2756 bytes public/images/wechat/search.png | Bin 0 -> 1550 bytes public/images/wechat/setting.png | Bin 0 -> 23839 bytes public/images/wechat/tr-like.png | Bin 0 -> 2027 bytes public/images/wechat/tr-reply.png | Bin 0 -> 1908 bytes public/javascripts/wechat/app.js | 7 ++ .../javascripts/wechat/controllers/login.js | 54 +++++++++++ public/javascripts/wechat/controllers/reg.js | 42 +++++++++ public/javascripts/wechat/directives/alert.js | 16 ++++ .../wechat/directives/form_validate.js | 10 ++ public/javascripts/wechat/others/factory.js | 57 ++++++++++- public/javascripts/wechat/others/routes.js | 12 ++- public/stylesheets/weui/weixin.css | 89 +++++++++++++++++- 30 files changed, 378 insertions(+), 17 deletions(-) create mode 100644 public/assets/wechat/login.html create mode 100644 public/assets/wechat/reg.html create mode 100644 public/assets/wechat/templates/alert.html create mode 100644 public/images/wechat/QR-code.jpg create mode 100644 public/images/wechat/arrow.png create mode 100644 public/images/wechat/checked.png create mode 100644 public/images/wechat/dot.png create mode 100644 public/images/wechat/female.jpg create mode 100644 public/images/wechat/female.png create mode 100644 public/images/wechat/male.jpg create mode 100644 public/images/wechat/male.png create mode 100644 public/images/wechat/minus.png create mode 100644 public/images/wechat/plus.png create mode 100644 public/images/wechat/post-avatar.jpg create mode 100644 public/images/wechat/search.png create mode 100644 public/images/wechat/setting.png create mode 100644 public/images/wechat/tr-like.png create mode 100644 public/images/wechat/tr-reply.png create mode 100644 public/javascripts/wechat/controllers/login.js create mode 100644 public/javascripts/wechat/controllers/reg.js create mode 100644 public/javascripts/wechat/directives/alert.js create mode 100644 public/javascripts/wechat/directives/form_validate.js diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 6ce3cacbb..7800382ad 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -4,6 +4,17 @@ module Mobile class Users < Grape::API resource :users do + + desc "绑定微信用户" + params do + requires :login, type: String, desc: 'username' + requires :mail, type: String, desc: 'mail' + requires :password, type: String, desc: 'password' + end + post '/bindwx' do + + end + desc "注册用户" params do requires :login, type: String, desc: 'username' diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 169a33fce..887587a5f 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -145,7 +145,7 @@ class WechatsController < ActionController::Base 您还未绑定确实的用户,请先绑定,谢谢!" } } 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=#{login_wechat_url}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{root_url+'/assets/wechat/app.html#login'}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/weixin_pic.jpg" article.item title: "#{n[:title]}", description: n[:content], @@ -175,7 +175,7 @@ class WechatsController < ActionController::Base code = params[:code] || session[:wechat_code] openid = get_openid_from_code(code) - raise "无法获取到openid" unless openid + raise "无法获取到openid,请在微信中打开本页面" unless openid raise "此微信号已绑定用户, 不能重复绑定" if user_binded?(openid) user, last_login_on = User.try_to_login(params[:username], params[:password]) diff --git a/app/models/course.rb b/app/models/course.rb index d379b24d3..c9ef010e6 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -465,11 +465,6 @@ class Course < ActiveRecord::Base code end - def - - end - - end diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index cabd224c4..6965d24f3 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -10,6 +10,7 @@ + @@ -17,8 +18,9 @@
+ @@ -30,8 +32,12 @@ + + + + diff --git a/public/assets/wechat/login.html b/public/assets/wechat/login.html new file mode 100644 index 000000000..d34d0054c --- /dev/null +++ b/public/assets/wechat/login.html @@ -0,0 +1,25 @@ +
+
+ +
+
绑定注册
+ + + + + +
+
+ + \ No newline at end of file diff --git a/public/assets/wechat/reg.html b/public/assets/wechat/reg.html new file mode 100644 index 000000000..9184fd0ed --- /dev/null +++ b/public/assets/wechat/reg.html @@ -0,0 +1,43 @@ +
+
+
注册登录
+ + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/public/assets/wechat/templates/alert.html b/public/assets/wechat/templates/alert.html new file mode 100644 index 000000000..b59a1b87f --- /dev/null +++ b/public/assets/wechat/templates/alert.html @@ -0,0 +1,12 @@ + +
+
+
+
{{title}}
+
{{message}}
+
+ 确定 +
+
+
+ \ No newline at end of file diff --git a/public/images/wechat/QR-code.jpg b/public/images/wechat/QR-code.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ba2a9e6a3ed11d223342f0093c71b845735700d3 GIT binary patch literal 29738 zcmd?QbyS_&-~f(zOd*Fl;yCW(t z22fOafO2y2f(LRq!`%@+N?ga?y<8j!S0ye>X+v>Clseo4p%dm0Hw!Z|cM0=yk$2@% zQRYy5pzr{RLc#-`I36IqeF797C~^G*xxx+nXSWy^$3KPydMRg(?=c1K=b{!bhd5+XMvL;^y60-YX+_ylnO3xftcz{MYd z3Pkw&aQunU$=Nq3P>Jh?)Bh0xi83_&H{!q5783cVT>lsy5NHbji;ce>9bg`cf{U5L z1AK%0UEnvvx&Jl!MtA>bLVpgt;YQ)UKjLOloV+!BU4oEspFmv=C9az%qOJ&61v$4n zuFkTO;v%xnvTzXzXDMkBCl@&>5jkloxVW5@grt<4{J-%0-F$g*$vYDAGU}3dZh$+Q zGHPn7;;Qm@WHdE3#U&-=ZoWkpc$!}N zmeb?3mOyBFlbU}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8cT|FIe<6SJK4p*G(MrlrM{LA2m4cYY+uXYk zs*1x%6Lcg*N+~TjG$|Fy74~Z{ z0tC%GiUwL|@7nr$*J%Vp8>Q^U#6xwlHd z1x#zjb#E|yx{SiDWVBd5LEw;0a?uANBES~Jn+E>DW{s%%$8yq-GzyMyvGS<{D&Y@^ zk(7%xkOiknRbaSH2uEam{tDmykT#>e0JujzX~nrraU`POL+ zLGeGhZGn<^*YFfV$q=7u$Kzsx!sa2tML@y~t!#~&yLTb8&byOFSjR+m_m~`;ycnvrN=;~x9#&KtKg{1V_mib$Mh(z} z2TJ3I7iZYl*ylZiH^>5L1{Ab~6%@3rGzhzkG)kZ=Z8$|BWQ`S9%GvCOZCa^IG5Y zfr>`Svd4=3a}3VZn?n*@IEuLN8J@c=rNSWP|8ObN|IKw@f1myLWj1%18S6D;HLX*! zCsy{RBvpL|^&V@}t)l&&uohe?kI7sDeC3r-VsitI0B51GtM{MXEC6@O?{~|*yKKgt zV0;=9fP3spSSb3I=$de8<&KKoZ_2Yf?P!*dc&7 T6OyWr!$CfJ)GO$>f9C!db}~`> literal 0 HcmV?d00001 diff --git a/public/images/wechat/arrow.png b/public/images/wechat/arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..f9f9b18c5bf500b5b1d95f33e0c4404217148aad GIT binary patch literal 21159 zcmeI42UHW=y2l3)1QZJ@C|Dw3HzYIZ5h5g14=5s1tb}9&fi#m)RRjxqY+yyCh!s%u zSWu87MNv^fnjP$d90ddmBGxw{Afw`m_uTv5TX(G_i{zWVzwf{I{_Qe*4{POjx9N@s z`X>4S02nws*|{U%S&Bbh9puycst$yF=}DY?WB|}-km64R*qJmG0Q6n?ES8&FfLJb; z1&AdWXBG=1k&1bI0So|P)ycC$y|=U(F&?zR{XLntTaLvGq5(7WOx;TZeD)0346s)Y zFtoX_YK^|<;2{H(oMxY2ena0WdClY0@j3psYuC(KH+vrS#i+Y!CznPvH#L2@_2Eo? zQvJuW@bdmq0}aP+db%eNpt-NIqTe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images/wechat/dot.png new file mode 100644 index 0000000000000000000000000000000000000000..bf1c0104e6d8c36a867507e927431299c758b9f8 GIT binary patch literal 27646 zcmeI52T)W=*RU@+NESqrASfylCNa#Ab5L?dNy9KBdB|CU0R$x|86+b?Q3Mf?EU18F z6(uR61d*IX5b(d~x;wk??#ugq-yiC)Vyb3t(|ykAzE7vq=T==JbhXv!X*p>D0HD`U zSJnrwE$c5 z#;k12H`R@vTv+{Ug~%&st{R!6=6Ht-9-jA~pPl{o=3DLL&B@I!zi!45 zW){Kg6FCk5TK}@NWIu0=j{1|fx)4$}_4nj_OcU)*=O~^6zyg_{Z;ZqoxZ zD;lyCKz~u(Fgwtn!(BuTM3Dd~$JLII%GUtaMxpw`q>W8LROwF z9R=VWZ5qocZw-W`C<=D~d?->t>Cpa8GCobREXa$7_eEB&m#frCfX4QO&ZN^X;H*^% zJ)AyE3-3Q1{?O!9s)%7f!Gxz7WX1qO`)yODJZ_z+Fj8QLEI z^{alUP5DC^*}ARLJlwSV_RSu($*zNZyej)0K1z6hHRuaix;^B-0Jx>fr`&DKy}0Fu zaq+&VA3fPlt_XEmn-th?xg5L|eWLdRqSRcNEppK`qDq%vtHtk;{&nTUZ3!P(rh;LM zyop;haX$1wahOh{b_LbLcBjUmITF&V45lx<0r{Y1k!zg$t^-Wx5HPGw zaMNZVOjO`7Y?SOLe|VpaGmANOl&SnN6h%Mzp2a+L+LfKs`d~)W!P+nya)nmv{g}g& zSD0<0`}w=5*;As)`7!E<8zFgoQ&(8^_@B1A=aCjEI$XC<7g!Q;XGKSu%WuREwerCt zHzRA+pz)z)dStIiz2qMi@^VH#%kt>;L@-)}B<48wa+V*G38}~_=so?(%M&;s8I29; zg)-o;4PeZ#g{xRcm~slX9Kep7iW|p>V|h#^yxF)KGcfbiM@X-R?4O~wyu{SxbRjlY z%~aD=sqpBGKsie_wF%9|OVFlc{BeakPHybZj5Qu9zGfi)7Yoss6M1Fl4p=7`+~{-rl#O@taIDDG3v6AV!ov7m9dPmI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9}w#7lgsr-RVY!*AM()0pR}Z1%A^L zV~W5yUPlU?Dh52vnmRZ*g!S5KUX6;<>a#BTV&`T{n1dkeMz|80gz`Rui>K> ztsI&KBaC$n;mx*{Ljl4EPOItY=me;#wcOg+*w_cUCG0#5E%Ntom?hV)D;9fxQDnB^ zM7zig!}?+5*T^YPdmcgaQXQLLW(dD{r?9ZfSWnOG!dH$Z)kK!MNM>26`a;{fWp0LS zV|8HHzWM=F{M%$w9@96JB-C&qi|n!J$hj-QR2NbXTOXo!Sm#n&A?ag3Gs1N_nRM&! z`)5FG85tnVewjcC-==uAK+-o$Chf<|YD2qH8J6}*msZyLhV?gZIMJ95&&qZXe-}Sw7&4a0CEdVH~;_u literal 0 HcmV?d00001 diff --git a/public/images/wechat/female.jpg b/public/images/wechat/female.jpg new file mode 100644 index 0000000000000000000000000000000000000000..219865572d134fd727a6192ff01f539322e3a780 GIT binary patch literal 3783 zcmbVNc{r3^|DQ3KDcO>pY$1Ek*!L`1ABwD*v@l`DHZvtzQmV--`!aT7>`aA`v4=9q zPO>jULLr3-;hpjJT)(d0fA9Ob&wZWyzRo${^EsdIat=oiX8{}*CgvspAP@*JqdkDb z34jrR0SKhG-vBXz=wN1K1Tle`!C?9eImU7f0yz!=gO9TwKhAQ32JkU9cGeSY^l!Qm z`f~azS~~#&L+CU9I~=|Na6$k?01*V_1Tb&{L7c$Dw*Vmk5CCMNvHd?VGthWJ80n)r z8~`AQ_R9zcGk}j~009gjMkZ#?lVGvG3~V4b9>#N>5{II4Dh9 zY|vH<(#(QrO8jB`XfY5>8$8EJ+Ze>a1Y~An`n@*;5Ok7}lZi|GFQ|=}grV(?huq2r z@wqBSH&GRbrArf^>+B#U&(rf9{oTD4QQ!FSpF9Na zn9CBss&iZw5c(;G_nP&H11%^^yp=6O%O_HJWVSqHwADUnHv8NOSMG*_^;ZmcdT+ht zj&0)}(^jd!SapwaQzb17iti2i4(r!_Y=vT8l(wNi`#ELf(_FG6-oFqAqS>klD# zyPNw}d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qme`{`zLZ1Wx?xgB&PZphnjRc7;t@5VZg@E-nS zqGP$n z3T`Qz57RcuhrL|#Vvr^IMCV%CbihcmN~NI96j^ak!By{+`glz^FO1R=J0939WaL(J zS)r_s0bkuxko)%4DRK|$%3-&_uYfME)=?wtgP%=&gA%(vMLQ^7`nw-0I-lYG%-x*o z3YiAaqom_K4Dtsn6n!s_*E}YB>Cna5$jff@IHB)6W9Wn~s3s-4RdY5J%4M92IUOPb z%j23JuBAN*O|a4&_X;H(6sn4Rb=;k<6})%9w@y|- cVFL@)P*R3*jZMdHJ#$h^{gm2$73&NC2S&o0?*IS* literal 0 HcmV?d00001 diff --git a/public/images/wechat/minus.png b/public/images/wechat/minus.png new file mode 100644 index 0000000000000000000000000000000000000000..32d82ea8484c3c4d07a6474e8e2f41976ef0db7b GIT binary patch literal 23318 zcmeI42{e@L`^O(dC=y9g(V!G#_BBh!?j=jsqKq-a*k)p^MHCU)%9f=*^{neHk>m7Zm`4+Hy7q+8>x$tkpe1U0_RkG+LVO6#+mLi-qq<%#$N3g~H}6)3^Gh4`%u$dSsJ-qccnbhV1%iXZSZB09@ttM> z`~b66T}iUK_si}Ii&b`jLNd?;ksO@Imt+OpQMbOc2)MHZIJ5Dbt0<5H0A9g6ND!b% z3>Y3W))E9B6&~o20UqToD-;Ie`GA8ehD!YFF9Xgt5msva?CZdh;`I>qIqVX?aEFUX zL;mn8K_DQ(K54;vXCV9_Nv#f0!1DvTE2QcL6ifwhnZqMl32U04pi3Rqq+?&(?=820m{kW~vP#xlc{lZm z{lIy@l?RotF$qxS^536991F z>SW@2RX(6T{peEws2p12cp^o{^tLbn=pBhzdq!vO{A-Jf+2YyPmRGW6_{l*p)6 zH6%zvec{VQbC;y)EVX76AI-UNMnLw+!pvTY^Vbk~vB4fm$A}k986oE-hpsQF+#@na z=Z>%xc_lGsp-aLeNQ1D ze-;oLn?MO~Mu^k)JtjNui`IAEYcIR1dNHNn9%Gw`p)9w@1xU-W50OWNmH6YrrG|yK zL`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XgF{(H9b^3i`cli$_m?+eFAGRjSqFz9)O|jDOeI8%`bWep_pn4* z20b8OdTcm0!rqvF8h=^!Q1f)8>SLd$J*S}_MCls}PepWO{cZ=vr;9I&j+kp8weWD) zNk`FP*&_8jaaB6cUfK*aw;aq^+I!uk@~p7VlU{2%CXA^8n~wuhfdisOq#j&gyW^vw!t}N8=W@ppo4y_%Y+nKu$zo3Ak|B6{xp EKcXtm5C8xG literal 0 HcmV?d00001 diff --git a/public/images/wechat/post-avatar.jpg b/public/images/wechat/post-avatar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bd2597dd2a623d59dea9b37ed4452281a69496d3 GIT binary patch literal 2756 zcmbVN3s6&68a~Ml1Tpeh&_zMLhV_96$qh*$DUSdF1qa0-!dm2Ea)lU@8 zcd&ykQe8DFTk0xLi^8nnD$vSSs}{TX1aUxlDCHqOW>vuK&CP>$%XD`3Ofvb;|9{{A zI{!H_-8c0BuNbX#3jlF(%YhS^TBaf3F3cCp3IGXEaCImErXC2((P)%>21B6^%#vW6 z(LgaKXK1sO3?z`r0HG0DWtLcmYT(Uiwp0;DAHCQ_hozD*dI~3jnV^hDbEKC!F(f*{o*JVFIF&h0!C;QQ_2tL^v8# zp)e;fC_v0a5SYsiMA#fI7g+(bmQZGy7n%0&qltxmk zFgl*8r3AS$A;Io=+HT3^=DG;9S|dWI(wG*lUSFU@86s4T<*URf4)?W@@!tJ*ATtop zhQC%N#SbMbSBQ!8<)}gvCk&(GmOzPA!Vf`0f}%M>HY+M9Him=XjASE17J|fZBH2OFksJ<>&1NCY5LU2_8>difvJ_&}7FUYLwQ_mC z$>m3@&@2t6T90A5wh2hg!8DjU2UEh)NnChYic}%NwyXWj$788hh^nO9P)V!`lfy)R z`O<0P<0BKzVsUw#ST>$Hf`o9R*-=r^ypUifD=I2DmTu)r{-2&P@MIX~;rQ9G*i`rg znnnBQ;~V?sK^6FoQQ=p^Gy+_Rfd`Ui{0fpxonQ}eq);dh6h{XK#~F_Jcczo0qti^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(aq8UE;g6 JwKT%?;6G!sTH^o! literal 0 HcmV?d00001 diff --git a/public/images/wechat/search.png b/public/images/wechat/search.png new file mode 100644 index 0000000000000000000000000000000000000000..a04c1496c728f78f3a778117bb00807994bbc659 GIT binary patch literal 1550 zcmeAS@N?(olHy`uVBq!ia0vp^azHH0!3HGvF1f=4q$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1Ffc1+hD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Kep0RGSfuW&-nVFuU ziK&^Hp^k!)fuWJU0T7w#8k$&{npqi{D?ot~(6*wKG^-#NH>h1eo~=?wNlAf~zJ7Um zxn8-kUVc%!zM-Y1CCCgTBVC{h-Qvo;lEez#ykcdT2`;I{$wiq3C7Jno3Lp~`lk!VT zY?Xj6g?J&i0B&qvF*KNf0j6J(SfFpHX8`gNOrftYexnUy@&(kzb(T9Bihb5uTZsl3!k| z30CjxYvq|&T#}fVoa*Ufs{}MbFEca6%G}Aq$;{Q&(%8_@#L&>y%+bZo)Wy`*&D_$$ z%*4{w5vJEAKe;qFHLnDwHwB^B5vN{IQpha;+U$~Alv$RV;#QQOs{r=0RVHq?nBz1L zsy79j8?FJ)n3uMNV2*r?PgQ|!tCwO->-VP?p4jwpp%t3 z%x~ICH}HrZ7O83D$UB&_G2+i$@64b7Il3=o-VpiFcin*LdgOum0S}vu=P@q+pb-$V zhIgHlW!Iw0NF}k0*%!n=@83S_me!dTKh^ht-iziaep;WYWGAXz#cy_)>jo!#B7cda zbqw3=dsht{pZG33^vSnh;(xq_&g%Bx^YW`1svhkAxc>T1$3u(#ZlyeujBU8?@mf~y z_JMbA5*Ow93cYLVJ*F<$x7<>y!~R*}p&eowW_u3p?aNo0e)ibcp6hGOJ$D@Mu|L$T zv&zMGE$h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rpuM+ zr=il 0){ + console.log(_openid); + if (typeof _openid !== 'undefined' && _openid && _openid.length > 0){ deferred.resolve(_openid); } else { - var code = $routeParams.code; + var code = $routeParams.code || session.get("code"); $http({ url: '/wechat/get_open_id', data: {code: code}, method: 'POST' }).then(function successCallback(response) { - _openid = response.data.openid; - deferred.resolve(_openid); + if(response.data.status != 0){ + deferred.reject(response.data.msg); + } else{ + _openid = response.data.openid; + session.save("openid", _openid); + deferred.resolve(_openid); + } }, function errorCallback(response) { deferred.reject(response); }); @@ -30,6 +67,16 @@ app.factory('auth', ['$http','$routeParams', '$q', function($http,$routeParams, return {getOpenId: getOpenId, openid: openid}; }]); +app.factory("session", function(){ + return { + save: function(key,value){ + sessionStorage.setItem(key,value); + }, + get: function(key){ + return sessionStorage.getItem(key); + } + } +}); app.factory('rms', function(){ var _saveStorage = {}; diff --git a/public/javascripts/wechat/others/routes.js b/public/javascripts/wechat/others/routes.js index 7ea270c6e..ded374930 100644 --- a/public/javascripts/wechat/others/routes.js +++ b/public/javascripts/wechat/others/routes.js @@ -1,7 +1,15 @@ -app.config(['$routeProvider',"$httpProvider", "$locationProvider",function ($routeProvider, $httpProvider, $locationProvider) { - var rootPath = '/assets/wechat/' +app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', function ($routeProvider, $httpProvider, $locationProvider, config) { + var rootPath = config.rootPath; //$locationProvider.html5Mode(true); $routeProvider + .when('/login', { + templateUrl: rootPath + 'login.html', + controller: 'LoginController' + }) + .when('/reg', { + templateUrl: rootPath + 'reg.html', + controller: 'RegController' + }) .when('/activites', { templateUrl: rootPath + 'activities.html', controller: 'ActivityController' diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index 6cccb3615..fd5a56bd6 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -3,7 +3,8 @@ /*基本样式*/ body,table,input,textarea,select,button { font-family: "微软雅黑","宋体";} -h1,h2,h3,h4,h5,p,pre {padding:0px; margin:0px;} +body, ul, h1,h2,h3,h4,h5,p,pre {padding:0px; margin:0px;} +ul li {list-style:none;} img {max-width:100%;} blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin-right: 0.4em; border-radius: 4px; font-family: "Microsoft YaHei"; background-size: 100% 100%; margin-top:5px;} .text-control {word-break:normal; word-wrap:break-word;} @@ -12,29 +13,42 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin .f15 {font-size:15px;} .fb {font-weight:bold;} .mt2 {margin-top:2px;} +.mt4 {margin-top:4px;} .mt5 {margin-top:5px;} .mt10 {margin-top:10px;} +.mt11 {margin-top:11px;} +.mt15 {margin-top:15px;} +.mt30 {margin-top:30px;} +.mt70 {margin-top:70px;} .mb5 {margin-bottom:5px;} .mb10 {margin-bottom:10px;} +.mb20 {margin-bottom:20px;} .ml10 {margin-left:10px;} .mr5 {margin-right:5px;} .mr10 {margin-right:10px;} .ml15 {margin-left:15px;} .mr15 {margin-right:15px;} .mr20 {margin-right:20px;} +.ml25 {margin-left:25px;} .mr25 {margin-right:25px;} .ml55 {margin-left:55px;} .mr55 {margin-right:55px;} +.c-red {color:#e81a1a;} .c-blue {color:#269ac9;} .c-grey {color:#9a9a9a;} .c-grey2 {color:#707070;} .c-grey3 {color:#555555;} +.c-grey4 {color:#888888;} +.c-grey5 {color:#aaaaaa;} +.c-grey6 {color:#777777;} +.c-blue {color:#3b94d6;} a {color:#707070;} a.c-grey {color:#707070;} a.c-grey2 {color:#9a9a9a;} a:link,a:visited{text-decoration:none;} a:hover,a:active{cursor:pointer;} a.link-blue {color:#269ac9;} +a.link-blue2 {color:#3b94d6;} a.underline {text-decoration:underline;} .border-radius {border-radius:5px;} .w36 {width:36px;} @@ -42,9 +56,21 @@ a.underline {text-decoration:underline;} .max-width-130 {max-width:130px;} .hidden {overflow:hidden; white-space:nowrap; text-overflow:ellipsis;} .inline-block {display:inline-block;} +.dis {display:block;} .undis {display:none;} .text-nowrap {white-space:nowrap;} .v-top {vertical-align:top;} +.tac {text-align:center;} +.block-center {margin-left:auto; margin-right:auto; display:block;} + +/*背景色*/ +.bg-grey {background-color:#c1c1c1;} +.bg-blue {background-color:#3b94d6;} + +/*按钮样式*/ +.btn1 {width:100%; height:40px; line-height:40px; vertical-align:middle; text-align:center; color:#fff; display:block; border-radius:5px;} +.bg-blue:not(.btn-disabled):active {background-color:#2780c2;} +.btn-disabled {background-color:#ccc;} /*动态样式*/ .post-container {width:100%;} @@ -88,4 +114,63 @@ a.underline {text-decoration:underline;} /*帖子锁定样式*/ .locked_btn_cir {background: url("/images/locked.png") 0 0 no-repeat; cursor: default;} -.bg-grey {background-color:#c1c1c1;} +/*20150612加入班级样式*/ +.add-class-box {width:80%; max-width:300px; min-width:240px; height:150px; font-size:15px; color:#444; background-color:#fff; margin:0 auto; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); border-radius:5px; margin-top:100px;} +.add-class-tip {padding-top:20px; padding-bottom:20px;} +.class-number-input {width:80%; max-width:240px; height:28px; border:1px solid #ccc; padding-left:5px; margin:0 auto; display:block;} +.cancel-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;} +.submit-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;} +.slice {width:2%; text-align:center; border-top:1px solid #ccc;} +.slice-line {width:1px; height:37px; margin:auto; background:#ccc;} + +/*20160613邀请码样式*/ +.qr-code-wrap {width:100%; padding:40px 0; background-color:#3b94d6;} +.qr-code-box {width:225px; height:332px; background-color:#fff; border-radius:3px; margin:0 auto;} +.share-class-name {font-size:18px; color:#3b3b3b; text-align:center; padding:12px; border-bottom:1px solid #cccccc; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;} +.qr-img-wrap {width:100%; border-bottom:1px dashed #ccc;} +.qr-code-img {margin:36px auto; display:block;} +.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;} + +/*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;} +.blue-title-sub {position:absolute; right:10px;} +.slice2 {width:2%; text-align:center; background-color:#fff; border-bottom:1px solid #ccc;} +.slice3 {width:1%; height:38px; text-align:center; background-color:#fff; border-bottom:1px solid #ccc;} +.slice-line2 {width:1px; height:38px; margin:auto; background:#ccc;} +.class-detail-tab {width:23%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;} +.class-detail-tab2 {width:32%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;} +.class-tab-active {border-bottom:1px solid #3b94d6;} +.class-search-wrap {padding:8px 12px; position:relative;} +.class-search-inner {padding:0 30px; background-color:#fff;} +.class-search-icon {position:absolute; top:16px; left:16px;} +.class-detail-search {width:100%; height:33px; color:#999; background-color:#fff; border:none; outline:none;} +.border-top {border-top:1px solid #ccc;} +.class-detail-row {width:100%; height:38px; line-height:38px; vertical-align:middle; border-bottom:1px solid #ccc; background-color:#fff;} +.class-test-tip {text-align:center; font-size:13px; color:#444; padding-top:40px;} +.img-circle {border-radius:50%;} + +/*20160614班级列表*/ +.course-list-row {width:100%; height:38px; line-height:38px; vertical-align:middle; border-top:1px solid #ccc; border-bottom:1px solid #ccc; background-color:#fff;} +.class-list {width:100%; border-bottom:1px solid #ccc;} +.class-list li {height:40px; line-height:40px; vertical-align:middle; margin:0 25px; border-left:1px solid #ccc; border-bottom:1px solid #ccc; position:relative;} +.class-list-name {max-width:75%; display:inline-block;} +.class-list-dot {position:absolute; top:13px; left:-8px;} +.border-bottom-none {border-bottom:none !important;} +.students-amount {height:14px; line-height:14px; vertical-align:middle; padding:2px 5px; background-color:#e6e6e6; border-radius:10px;} +.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:#aaa; height:35px; line-height:35px; vertical-align:middle; border:none; outline:none;} + +/*20160616登录注册*/ +.login-wrap {padding:0 10px;} +.input-box-wrap {padding-right:17px;} +.input-box {width:100%; height:36px; padding-left:5px; line-height:36px; vertical-align:middle; border:1px solid #ccc; border-radius:5px;} +.login-op-wrap {height:30px; line-height:30px; vertical-align:middle;} +.login-box{display:inline-block; width:14px; height:14px; line-height:14px; text-align:center; vertical-align:middle; border:1px solid #ccc; background:#fff; border-radius:3px; color:#fff; cursor:pointer;} +.login-box.checked{background:#63c360;} +.login-box.checked:after{content:url(/images/wechat/checked.png);} +.forget-psw-wrap {width:60px; margin:0 auto;} +.forget-psw {position:fixed; bottom:10px;} \ No newline at end of file From 7aec37bb3a852b3e92f91d932c343f6547dc1060 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:25:55 +0800 Subject: [PATCH 13/72] . --- app/controllers/wechats_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 887587a5f..8c39c773e 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -139,6 +139,8 @@ class WechatsController < ActionController::Base end def sendBind(request) + root_url = "http://wechat.trustie.net" + news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "欢迎使用Trustie创新实践服务平台! 在这里您可以随时了解您的课程和项目动态,随时点赞和回复。 我们将会与微信不断结合,为您提供更有价值的服务。 From a0c0a65d18d4c62b4e4139bb5802ba6d14fe32ad Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:37:26 +0800 Subject: [PATCH 14/72] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E5=88=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/users.rb | 19 +++++++++++++++++++ .../javascripts/wechat/controllers/login.js | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 7800382ad..ab2ba49b4 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -12,7 +12,26 @@ module Mobile requires :password, type: String, desc: 'password' end post '/bindwx' do + code = params[:code] || session[:wechat_code] + openid = get_openid_from_code(code) + raise "无法获取到openid,请在微信中打开本页面" unless openid + raise "此微信号已绑定用户, 不能重复绑定" if user_binded?(openid) + + user, last_login_on = User.try_to_login(params[:username], params[:password]) + raise "用户名或密码错误,请重新输入" unless user + #补全用户信息 + + raise "此用户已经绑定过公众号, 请换一个帐户试试" if user.user_wechat + + UserWechat.create!( + openid: openid, + user: user + ) + ws = WechatService.new + ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.login, format_time(Time.now)) + present status: 0 + present message: '绑定成功' end desc "注册用户" diff --git a/public/javascripts/wechat/controllers/login.js b/public/javascripts/wechat/controllers/login.js index 011f11baa..e8efad177 100644 --- a/public/javascripts/wechat/controllers/login.js +++ b/public/javascripts/wechat/controllers/login.js @@ -22,7 +22,7 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams console.log(apiUrl + "auth"); auth.getOpenId().then( - function(){ + function(openid){ return $http.post( config.rootUrl + "wxbind", {login: user.login, password: user.password, openid: openid} From 3582849ef32801557a95e858c502d663a2cdf3e8 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:40:03 +0800 Subject: [PATCH 15/72] . --- public/javascripts/wechat/controllers/login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/wechat/controllers/login.js b/public/javascripts/wechat/controllers/login.js index e8efad177..5695e63ff 100644 --- a/public/javascripts/wechat/controllers/login.js +++ b/public/javascripts/wechat/controllers/login.js @@ -24,7 +24,7 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams auth.getOpenId().then( function(openid){ return $http.post( - config.rootUrl + "wxbind", + config.apiUrl + "wxbind", {login: user.login, password: user.password, openid: openid} ); } From 46018ad388fd67dffcd03c9c302f24b29e82ce88 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:41:16 +0800 Subject: [PATCH 16/72] . --- public/javascripts/wechat/controllers/login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/wechat/controllers/login.js b/public/javascripts/wechat/controllers/login.js index 5695e63ff..97fe785f5 100644 --- a/public/javascripts/wechat/controllers/login.js +++ b/public/javascripts/wechat/controllers/login.js @@ -24,7 +24,7 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams auth.getOpenId().then( function(openid){ return $http.post( - config.apiUrl + "wxbind", + config.apiUrl + "users/wxbind", {login: user.login, password: user.password, openid: openid} ); } From 64ad182a845abae1791986697bee5716a10a1913 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:42:58 +0800 Subject: [PATCH 17/72] . --- app/api/mobile/apis/users.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index ab2ba49b4..28fbb8839 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -11,7 +11,7 @@ module Mobile requires :mail, type: String, desc: 'mail' requires :password, type: String, desc: 'password' end - post '/bindwx' do + post 'wxbind' do code = params[:code] || session[:wechat_code] openid = get_openid_from_code(code) From b9280caf367fcd45d7f9e84f830114d35ea6c76d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:46:15 +0800 Subject: [PATCH 18/72] . --- app/api/mobile/apis/users.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 28fbb8839..d83283081 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -8,15 +8,13 @@ module Mobile desc "绑定微信用户" params do requires :login, type: String, desc: 'username' - requires :mail, type: String, desc: 'mail' requires :password, type: String, desc: 'password' + requires :openid, type: String, desc: 'wechat openid' end post 'wxbind' do - code = params[:code] || session[:wechat_code] - openid = get_openid_from_code(code) - + openid = params[:openid] raise "无法获取到openid,请在微信中打开本页面" unless openid - raise "此微信号已绑定用户, 不能重复绑定" if user_binded?(openid) + raise "此微信号已绑定用户, 不能重复绑定" if UserWechat.where(openid: openid).first user, last_login_on = User.try_to_login(params[:username], params[:password]) raise "用户名或密码错误,请重新输入" unless user From 9d19caa736bdec95fae4a2cb5a1b7454b5a35020 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:48:27 +0800 Subject: [PATCH 19/72] . --- app/controllers/wechats_controller.rb | 2 +- public/javascripts/wechat/controllers/login.js | 4 ++-- public/javascripts/wechat/others/factory.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 8c39c773e..930318fa5 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -167,7 +167,7 @@ class WechatsController < ActionController::Base raise "无法获取到微信openid" unless openid render :json => {status:0, openid: openid} rescue Exception=>e - render :json => {status: -1, msg: e.message} + render :json => {status: -1, message: e.message} end end diff --git a/public/javascripts/wechat/controllers/login.js b/public/javascripts/wechat/controllers/login.js index 97fe785f5..a760ce8ea 100644 --- a/public/javascripts/wechat/controllers/login.js +++ b/public/javascripts/wechat/controllers/login.js @@ -32,11 +32,11 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams function(response) { vm.loginFailed = (response.data.status != 0); console.log(response.data); - vm.alertService.showMessage('出错了', response.data.msg); + vm.alertService.showMessage('出错了', response.data.message); if (!$scope.loginFailed) { //绑定成功 } else { - vm.alertService.showMessage('出错了', response.data.msg); + vm.alertService.showMessage('出错了', response.data.message); } } ).catch(function(e){ diff --git a/public/javascripts/wechat/others/factory.js b/public/javascripts/wechat/others/factory.js index 27fbeb1c4..3cb601d2b 100644 --- a/public/javascripts/wechat/others/factory.js +++ b/public/javascripts/wechat/others/factory.js @@ -49,7 +49,7 @@ app.factory('auth', ['$http','$routeParams', '$q', 'session', function($http,$ro method: 'POST' }).then(function successCallback(response) { if(response.data.status != 0){ - deferred.reject(response.data.msg); + deferred.reject(response.data.message); } else{ _openid = response.data.openid; session.save("openid", _openid); From 762ca9c3cb8f5881c30590416f028864a9cb0389 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:50:43 +0800 Subject: [PATCH 20/72] . --- app/api/mobile/apis/users.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index d83283081..637f55565 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -16,7 +16,7 @@ module Mobile raise "无法获取到openid,请在微信中打开本页面" unless openid raise "此微信号已绑定用户, 不能重复绑定" if UserWechat.where(openid: openid).first - user, last_login_on = User.try_to_login(params[:username], params[:password]) + user, last_login_on = User.try_to_login(params[:login], params[:password]) raise "用户名或密码错误,请重新输入" unless user #补全用户信息 From f40794282f160f6cdece3e7f33cf05a0dc5551d2 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 17 Jun 2016 18:54:24 +0800 Subject: [PATCH 21/72] . --- app/api/mobile/apis/users.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 637f55565..5aee29fe2 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -14,7 +14,8 @@ module Mobile post 'wxbind' do openid = params[:openid] raise "无法获取到openid,请在微信中打开本页面" unless openid - raise "此微信号已绑定用户, 不能重复绑定" if UserWechat.where(openid: openid).first + uw = UserWechat.where(openid: openid).first + raise "此微信号已绑定用户(#{uw.user.login}), 不能重复绑定" if uw user, last_login_on = User.try_to_login(params[:login], params[:password]) raise "用户名或密码错误,请重新输入" unless user @@ -26,8 +27,8 @@ module Mobile openid: openid, user: user ) - ws = WechatService.new - ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.login, format_time(Time.now)) + # ws = WechatService.new + # ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.login, format_time(Time.now)) present status: 0 present message: '绑定成功' end From b17b92cc3ec7341ef1d1e2179be0de623605a725 Mon Sep 17 00:00:00 2001 From: txz Date: Mon, 20 Jun 2016 11:08:57 +0800 Subject: [PATCH 22/72] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=90=8E=E5=85=88=E5=8A=A0=E8=BD=BD=E5=90=8E=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/blog_detail.html | 2 +- public/assets/wechat/jour_message_detail.html | 2 +- public/javascripts/wechat/app.js | 16 +++++++++++++--- public/stylesheets/weui/weixin.css | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index ee651eadf..509e0171a 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -8,7 +8,7 @@
{{blog.title}}
{{blog.user.realname}}发表博客
-
+
{{blog.created_at}}
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index a1b79379f..dc6b1409f 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -7,7 +7,7 @@
{{message.user.realname}}给您留言了
{{message.created_on}}
-
+
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index ca9682db2..61ec717a2 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -16,7 +16,7 @@ app.factory('auth', function($http,$routeParams, $q){ } if(debug===true){ - _openid = "orgVLv8TlS6e7FDiI6xdTGHRaaRo"; //guange的帐号 + _openid = "1"; //guange的帐号 } var getOpenId = function() { @@ -147,8 +147,6 @@ app.factory('common', function($http, auth, $routeParams){ data: userInfo }).then(function successCallback(response) { //alert("提交成功"); - //数据提交完成,回复按钮启用 - data.disabled = false; if(typeof cb === 'function'){ cb(); } @@ -219,6 +217,8 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth, co common.addCommonReply($routeParams.id, 'Issue', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); + //数据提交完成,回复按钮启用 + data.disabled = false; }); }; @@ -256,6 +256,8 @@ app.controller('HomeworkController', function($scope, $http, $routeParams, auth, common.addCommonReply($routeParams.id, 'HomeworkCommon', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); + //数据提交完成,回复按钮启用 + data.disabled = false; }); }; @@ -292,6 +294,8 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a common.addCommonReply($routeParams.id, 'News', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); + //数据提交完成,回复按钮启用 + data.disabled = false; }); }; @@ -328,6 +332,8 @@ app.controller('DiscussionController', function($scope, $http, $routeParams, aut common.addCommonReply($routeParams.id, 'Message', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); + //数据提交完成,回复按钮启用 + data.disabled = false; }); }; @@ -364,6 +370,8 @@ app.controller('JournalsController', function($scope, $http, $routeParams, auth, common.addCommonReply($routeParams.id, 'JournalsForMessage', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); + //数据提交完成,回复按钮启用 + data.disabled = false; }); }; @@ -402,6 +410,8 @@ app.controller('BlogController', function($scope, $http, $routeParams, auth, com common.addCommonReply($routeParams.id, 'BlogComment', data, function(){ $scope.formData = {comment: ''}; loadData($routeParams.id); + //数据提交完成,回复按钮启用 + data.disabled = false; }); }; diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index 3fd9acd37..f77cf1e2a 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -56,7 +56,7 @@ a.underline {text-decoration:underline;} .tac {text-align:center;} /*背景色*/ -.bg-grey {background-color:#c1c1c1;} +.bg-grey {background-color:#c1c1c1 !important;} /*动态样式*/ .post-container {width:100%;} From 61c117b8cbc86ccb8de23c40f86295f727c6ce1e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 14:39:20 +0800 Subject: [PATCH 23/72] =?UTF-8?q?=E9=87=8D=E6=9E=84=E8=80=81=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E6=9C=AC=E5=9C=B0=E9=80=9A=E8=BF=87?= =?UTF-8?q?session=E6=9D=A5=E5=AD=98=E6=94=BEtoken,=20=E6=89=80=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E8=AE=BF=E9=97=AE=E7=9B=B4=E6=8E=A5=E7=94=A8=E8=80=81?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/activities.rb | 2 +- app/api/mobile/apis/issues.rb | 3 +- app/api/mobile/apis/journal_for_messages.rb | 3 +- app/api/mobile/apis/messages.rb | 3 +- app/api/mobile/apis/new_comment.rb | 4 +- app/api/mobile/apis/newss.rb | 3 +- app/api/mobile/apis/praise.rb | 5 +- app/api/mobile/apis/users.rb | 17 ++++- app/api/mobile/apis/whomeworks.rb | 3 +- public/assets/wechat/activities.html | 1 + public/assets/wechat/app.html | 2 +- public/assets/wechat/blog_detail.html | 2 +- public/assets/wechat/course_discussion.html | 2 +- public/assets/wechat/course_notice.html | 2 +- public/assets/wechat/homework_detail.html | 2 +- public/assets/wechat/issue.html | 50 ------------ public/assets/wechat/issue_detail.html | 2 +- public/assets/wechat/jour_message_detail.html | 2 +- public/assets/wechat/login.html | 2 +- public/assets/wechat/project_discussion.html | 2 +- public/javascripts/wechat/app.js | 21 ++++- .../wechat/controllers/activity.js | 14 ++-- public/javascripts/wechat/controllers/blog.js | 44 +++-------- .../wechat/controllers/course_notice.js | 40 +++------- .../wechat/controllers/discussion.js | 42 +++------- .../wechat/controllers/homework.js | 42 +++------- .../javascripts/wechat/controllers/issue.js | 43 +++-------- .../wechat/controllers/journals.js | 44 +++-------- .../javascripts/wechat/controllers/login.js | 13 ++-- public/javascripts/wechat/directives/alert.js | 10 ++- public/javascripts/wechat/others/factory.js | 76 ++++++++++++++++--- public/javascripts/wechat/others/routes.js | 57 +++++--------- 32 files changed, 232 insertions(+), 326 deletions(-) delete mode 100644 public/assets/wechat/issue.html diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb index 49fdaff8f..661925012 100644 --- a/app/api/mobile/apis/activities.rb +++ b/app/api/mobile/apis/activities.rb @@ -9,7 +9,7 @@ module Mobile params do requires :page, type: Integer - requires :openid, type: String + requires :token, type: String end post do authenticate! diff --git a/app/api/mobile/apis/issues.rb b/app/api/mobile/apis/issues.rb index b767bd768..4a6417cb4 100644 --- a/app/api/mobile/apis/issues.rb +++ b/app/api/mobile/apis/issues.rb @@ -8,7 +8,8 @@ module Mobile desc "get special issuse" get ':id' do - user = UserWechat.find_by_openid(params[:openid]).user + authenticate! + user = current_user issue = Issue.find params[:id] present :data, issue, with: Mobile::Entities::Issue,user: user present :status, 0 diff --git a/app/api/mobile/apis/journal_for_messages.rb b/app/api/mobile/apis/journal_for_messages.rb index 15a571a82..5f2d01185 100644 --- a/app/api/mobile/apis/journal_for_messages.rb +++ b/app/api/mobile/apis/journal_for_messages.rb @@ -7,7 +7,8 @@ module Mobile desc "get special journal" get ':id' do - user = UserWechat.find_by_openid(params[:openid]).user + authenticate! + user = current_user jour = JournalsForMessage.find params[:id] present :data, jour, with: Mobile::Entities::Jours,user: user present :status, 0 diff --git a/app/api/mobile/apis/messages.rb b/app/api/mobile/apis/messages.rb index ae2f9a39c..bab82de8d 100644 --- a/app/api/mobile/apis/messages.rb +++ b/app/api/mobile/apis/messages.rb @@ -7,7 +7,8 @@ module Mobile desc "get special topic" get ':id' do - user = UserWechat.find_by_openid(params[:openid]).user + authenticate! + user = current_user message = Message.find params[:id] present :data, message, with: Mobile::Entities::Message,user: user present :status, 0 diff --git a/app/api/mobile/apis/new_comment.rb b/app/api/mobile/apis/new_comment.rb index 694ec0613..5b7159301 100644 --- a/app/api/mobile/apis/new_comment.rb +++ b/app/api/mobile/apis/new_comment.rb @@ -11,12 +11,12 @@ module Mobile params do requires :type, type: String requires :content, type: String - requires :openid, type: String + requires :token, type: String end post ':id' do + authenticate! type = params[:type] result = 1 - current_user = UserWechat.find_by_openid(params[:openid]).user if params[:content]!="" && current_user case type when "HomeworkCommon" diff --git a/app/api/mobile/apis/newss.rb b/app/api/mobile/apis/newss.rb index 8bdd460cc..d42177783 100644 --- a/app/api/mobile/apis/newss.rb +++ b/app/api/mobile/apis/newss.rb @@ -7,7 +7,8 @@ module Mobile desc "get special news" get ':id' do - user = UserWechat.find_by_openid(params[:openid]).user + authenticate! + user = current_user news = News.find params[:id] present :data, news, with: Mobile::Entities::News,user: user present :status, 0 diff --git a/app/api/mobile/apis/praise.rb b/app/api/mobile/apis/praise.rb index 57dbd0729..834d1195b 100644 --- a/app/api/mobile/apis/praise.rb +++ b/app/api/mobile/apis/praise.rb @@ -9,12 +9,13 @@ module Mobile params do requires :type, type: String - requires :openid, type: String + requires :token, type: String end post ':id' do + authenticate! obj_id = params[:id] obj_type = params[:type] - user = UserWechat.find_by_openid(params[:openid]).user + user = current_user pts = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",obj_id,obj_type.to_s,user.id).first if pts.blank? praise_or_cancel(obj_type,obj_id,user,1) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 5aee29fe2..e3041abcd 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -4,6 +4,20 @@ module Mobile class Users < Grape::API resource :users do + desc "查询是否已绑定" + params do + requires :openid, type: String, desc: 'wechat openid' + end + post 'isbind' do + openid = params[:openid] + uw = UserWechat.where(openid: openid).first + raise "还未绑定trustie帐户" unless uw + + user = uw.user + ::ApiKey.delete_all(user_id: user.id) + key = ::ApiKey.create!(user_id: user.id) + present status: 0, token: key.access_token + end desc "绑定微信用户" params do @@ -29,8 +43,7 @@ module Mobile ) # ws = WechatService.new # ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.login, format_time(Time.now)) - present status: 0 - present message: '绑定成功' + present status: 0, message: '您已成功绑定Trustie平台' end desc "注册用户" diff --git a/app/api/mobile/apis/whomeworks.rb b/app/api/mobile/apis/whomeworks.rb index a88d509a3..c8377aa0d 100644 --- a/app/api/mobile/apis/whomeworks.rb +++ b/app/api/mobile/apis/whomeworks.rb @@ -7,7 +7,8 @@ module Mobile desc "get one homework" get ':id' do - user = UserWechat.find_by_openid(params[:openid]).user + authenticate! + user = current_user homework = HomeworkCommon.find params[:id] present :data, homework, with: Mobile::Entities::Whomework,user: user present :status, 0 diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 69ea8f1fa..fd5b44b2b 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -254,6 +254,7 @@
更多
+
diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index 6965d24f3..a3977ec5c 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -20,7 +20,7 @@ diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 509e0171a..762bd090e 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -39,7 +39,7 @@ - +
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 2e7ed3151..69daf2b05 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -46,7 +46,7 @@ - +
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index cca135681..6d2d49d23 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -45,7 +45,7 @@ - +
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 0fc39c735..974af2246 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -59,7 +59,7 @@ - +
diff --git a/public/assets/wechat/issue.html b/public/assets/wechat/issue.html deleted file mode 100644 index 558496ef0..000000000 --- a/public/assets/wechat/issue.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - react js - - - - - - - - - - - -
- - - - - - - - - - \ No newline at end of file diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 1d7f9a536..4438c453d 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -49,7 +49,7 @@ - +
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index dc6b1409f..9fd09de2c 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -37,7 +37,7 @@ - +
diff --git a/public/assets/wechat/login.html b/public/assets/wechat/login.html index d34d0054c..309db29de 100644 --- a/public/assets/wechat/login.html +++ b/public/assets/wechat/login.html @@ -22,4 +22,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 4831e1521..696ffd7d1 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -45,7 +45,7 @@ - +
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index d4275e9df..472a5a377 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -4,5 +4,24 @@ app.constant('config', { rootPath: '/assets/wechat/', rootUrl: '/', apiUrl: '/api/v1/' +}); -}); \ No newline at end of file + +app.run(['$rootScope', 'auth', '$location', function($rootScope, auth, $location){ + $rootScope.$on('$routeChangeError', function(event, next, current){ + + if(next && next.templateUrl){ + if(!next.templateUrl.endsWith("login.html") && !next.templateUrl.endsWith("reg.html")){ + $location.path("/login"); + } + } + }); + + $rootScope.$on('$routeChangeStart', function(event, next, current){ + if(next && next.templateUrl){ + if(!next.templateUrl.endsWith("login.html") && !next.templateUrl.endsWith("reg.html")){ + } + } + }); +} +]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/activity.js b/public/javascripts/wechat/controllers/activity.js index e17b7c5b3..e44eb3ea2 100644 --- a/public/javascripts/wechat/controllers/activity.js +++ b/public/javascripts/wechat/controllers/activity.js @@ -1,11 +1,12 @@ app.controller('ActivityController', - ['$anchorScroll', '$location','$scope', '$http', '$timeout', 'auth', 'rms', 'common', - function($anchorScroll, $location,$scope, $http, $timeout, auth, rms, common){ + ['$anchorScroll', '$location','$scope', '$http', '$timeout', 'auth', 'rms', 'common','alertService', + function($anchorScroll, $location,$scope, $http, $timeout, auth, rms, common, alertService){ $scope.replaceUrl = function(url){ return url; }; + $scope.alertService = alertService.create(); console.log("ActivityController load"); $scope.page = rms.get('page') || 0; @@ -18,7 +19,7 @@ app.controller('ActivityController', $http({ method: 'POST', url: apiUrl+ "activities", - data: {openid: auth.openid(), page: page} + data: {token: auth.token(), page: page} }).then(function successCallback(response) { if(response.data.page >0) { $scope.activities = $scope.activities.concat(response.data.data); @@ -38,18 +39,17 @@ app.controller('ActivityController', }; if($scope.activities.length<=0){ - auth.getOpenId().then( - function successCallback(response){ + auth.isBind().then( + function(){ $scope.loadActData(0); }, function errorCallback(response) { - alert("获取openid出错:"+response); + $scope.alertService.showMessage("获取token出错",response); } ); } else { $timeout(function(){ window.scrollTo(0, rms.get("yoffset")); }); - } //跳到详情页 diff --git a/public/javascripts/wechat/controllers/blog.js b/public/javascripts/wechat/controllers/blog.js index 8eb45b604..4c2403944 100644 --- a/public/javascripts/wechat/controllers/blog.js +++ b/public/javascripts/wechat/controllers/blog.js @@ -1,40 +1,16 @@ - app.controller('BlogController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - var loadData = function(id){ - common.loadCommonData(id, 'blog_comments').then(function successCallback(response) { - console.log(response.data); - $scope.blog = response.data.data; - }, function errorCallback(response) { + common.init({ + id: $routeParams.id, + scope: $scope, + type: 'blog_comments', + replyType: 'BlogComment', + loadCallback: function(data){ + $scope.blog = data.data; + }, + replyCallback: function(){ + } }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addBlogReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'BlogComment', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - console.log(act); - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - console.log(act); - common.decreaseCommonPraise(act); - }; }]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/course_notice.js b/public/javascripts/wechat/controllers/course_notice.js index 24b0fdbe1..77d2e6ab0 100644 --- a/public/javascripts/wechat/controllers/course_notice.js +++ b/public/javascripts/wechat/controllers/course_notice.js @@ -1,36 +1,16 @@ app.controller('CourseNoticeController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - var loadData = function(id){ - common.loadCommonData(id, 'newss').then(function successCallback(response) { - console.log(response.data); - $scope.news = response.data.data; - }, function errorCallback(response) { + common.init({ + id: $routeParams.id, + scope: $scope, + type: 'newss', + replyType: 'News', + loadCallback: function(data){ + $scope.news = data.data; + }, + replyCallback: function(){ + } }); - }; - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addNoticeReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'News', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; }]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/discussion.js b/public/javascripts/wechat/controllers/discussion.js index 4828cb39a..7e0811a0d 100644 --- a/public/javascripts/wechat/controllers/discussion.js +++ b/public/javascripts/wechat/controllers/discussion.js @@ -1,36 +1,14 @@ app.controller('DiscussionController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'messages').then(function successCallback(response) { - console.log(response.data); - $scope.discussion = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); + common.init({ + id: $routeParams.id, + scope: $scope, + type: 'messages', + replyType: 'Message', + loadCallback: function(data){ + $scope.discussion = data.data; + }, + replyCallback: function(){ } - ); - - $scope.addDiscussionReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'Message', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; + }); }]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/homework.js b/public/javascripts/wechat/controllers/homework.js index 795bf30e9..58f70db5a 100644 --- a/public/javascripts/wechat/controllers/homework.js +++ b/public/javascripts/wechat/controllers/homework.js @@ -1,36 +1,16 @@ app.controller('HomeworkController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'whomeworks').then(function successCallback(response) { - console.log(response.data); - $scope.homework = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); + common.init({ + id: $routeParams.id, + scope: $scope, + type: 'whomeworks', + replyType: 'HomeworkCommon', + loadCallback: function(data){ + console.log(data); + $scope.homework = data.data; + }, + replyCallback: function(){ } - ); + }); - $scope.addHomeworkReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'HomeworkCommon', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; }]); diff --git a/public/javascripts/wechat/controllers/issue.js b/public/javascripts/wechat/controllers/issue.js index 09602f9e1..ae0cc4450 100644 --- a/public/javascripts/wechat/controllers/issue.js +++ b/public/javascripts/wechat/controllers/issue.js @@ -1,36 +1,15 @@ app.controller('IssueController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - var loadData = function(id){ - common.loadCommonData(id, 'issues').then(function successCallback(response) { - console.log(response.data); - $scope.issue = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); + common.init({ + id: $routeParams.id, + scope: $scope, + type: 'issues', + replyType: 'Issue', + loadCallback: function(data){ + console.log(data); + $scope.issue = data.data; + }, + replyCallback: function(){ } - ); - - $scope.addIssueReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'Issue', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; + }); }]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/journals.js b/public/javascripts/wechat/controllers/journals.js index f379525d7..76b4f8cf6 100644 --- a/public/javascripts/wechat/controllers/journals.js +++ b/public/javascripts/wechat/controllers/journals.js @@ -1,37 +1,13 @@ app.controller('JournalsController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'journal_for_messages').then(function successCallback(response) { - console.log(response.data); - $scope.message = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); + common.init({ + id: $routeParams.id, + scope: $scope, + type: 'journal_for_messages', + replyType: 'JournalsForMessage', + loadCallback: function(data){ + $scope.message = data.data; + }, + replyCallback: function(){ } - ); - - $scope.addJournalReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'JournalsForMessage', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - }); - }; - - $scope.addPraise = function(act){ - console.log(act); - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - console.log(act); - common.decreaseCommonPraise(act); - }; + }); }]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/login.js b/public/javascripts/wechat/controllers/login.js index a760ce8ea..35b750e8c 100644 --- a/public/javascripts/wechat/controllers/login.js +++ b/public/javascripts/wechat/controllers/login.js @@ -1,5 +1,8 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session', function ($scope, $http, $location, $routeParams, alertService, config, auth,session) { + if(auth.isBind().then(function(){ + $location.path("/activities"); + })); if($routeParams.code){ session.save('code', $routeParams.code); @@ -21,7 +24,7 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams console.log(apiUrl + "auth"); - auth.getOpenId().then( + auth.openid().then( function(openid){ return $http.post( config.apiUrl + "users/wxbind", @@ -30,11 +33,12 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams } ).then( function(response) { - vm.loginFailed = (response.data.status != 0); console.log(response.data); - vm.alertService.showMessage('出错了', response.data.message); - + vm.loginFailed = (response.data.status != 0); if (!$scope.loginFailed) { //绑定成功 + vm.alertService.showMessage('提示', response.data.message, function(){ + $location.path("/activities"); + }); } else { vm.alertService.showMessage('出错了', response.data.message); } @@ -47,7 +51,6 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams vm.showBox = function () { vm.findPwdDialog.showMessage("提示", "请访问www.trustie.net获取密码,谢谢!"); } - vm.goReg = function () { $location.path('/reg'); } diff --git a/public/javascripts/wechat/directives/alert.js b/public/javascripts/wechat/directives/alert.js index aa346cb8c..332ec65bf 100644 --- a/public/javascripts/wechat/directives/alert.js +++ b/public/javascripts/wechat/directives/alert.js @@ -2,14 +2,16 @@ app.directive('myAlert', ['config', function(config){ return { templateUrl: config.rootPath+ 'templates/alert.html', scope: { - message: "=", title: "=", - visible: "=" + message: "=", + visible: "=", + cb: "=" }, link: function(scope){ - scope.visible = false; scope.dismiss = function(){ - scope.visible = false; + if(typeof scope.cb === 'function'){ + scope.cb(); + } }; } } diff --git a/public/javascripts/wechat/others/factory.js b/public/javascripts/wechat/others/factory.js index 3cb601d2b..c4aca60f4 100644 --- a/public/javascripts/wechat/others/factory.js +++ b/public/javascripts/wechat/others/factory.js @@ -3,18 +3,21 @@ app.factory('alertService', function(){ this.title = null; this.message = null; this.visible = null; + this.cb = null; } - Alert.prototype.showMessage = function(title, msg){ + Alert.prototype.showMessage = function(title, msg, cb){ this.message = msg; this.title = title; this.visible = true; + this.cb = cb; } Alert.prototype.dismiss = function(){ this.message = null; this.title = null; this.visible = false; + if(this.cb) {this.cb();} } return { @@ -25,7 +28,7 @@ app.factory('alertService', function(){ }); -app.factory('auth', ['$http','$routeParams', '$q', 'session', function($http,$routeParams, $q, session){ +app.factory('auth', ['$http','$routeParams', '$q', 'session', 'config',function($http,$routeParams, $q, session,config){ var _openid = ''; if(typeof g_openid !== 'undefined'){ @@ -36,6 +39,34 @@ app.factory('auth', ['$http','$routeParams', '$q', 'session', function($http,$ro _openid = session.get("openid"); } + //是否已经绑定 + var isBind = function(){ + var defer = $q.defer(); + + var token = getToken(); + if(token && token.length>10){ + defer.resolve(token); + } else { + getOpenId().then(function(openid){ + return $http.post( + config.apiUrl+ 'users/isbind', + {openid: openid} + ) + }).then(function(response){ + if(response.data.status!=0){ + defer.reject(response.data.message); + }else { + session.save("token", response.data.token); + defer.resolve(response.data.token); + } + }).catch(function(e){ + defer.reject(e); + }); + } + + return defer.promise; + } + var getOpenId = function() { var deferred = $q.defer(); console.log(_openid); @@ -52,7 +83,7 @@ app.factory('auth', ['$http','$routeParams', '$q', 'session', function($http,$ro deferred.reject(response.data.message); } else{ _openid = response.data.openid; - session.save("openid", _openid); + //session.save("openid", _openid); deferred.resolve(_openid); } }, function errorCallback(response) { @@ -64,7 +95,10 @@ app.factory('auth', ['$http','$routeParams', '$q', 'session', function($http,$ro var openid = function(){ return _openid; }; - return {getOpenId: getOpenId, openid: openid}; + var getToken = function(){ + return session.get("token"); + } + return {isBind: isBind, token: getToken, openid: getOpenId}; }]); app.factory("session", function(){ @@ -103,7 +137,7 @@ app.factory('common', ['$http', 'auth', '$routeParams', function($http, auth, $r var userInfo = { type: type, content: temp, - openid: auth.openid() + token: auth.token() }; //回复按钮禁用 data.disabled = true; @@ -126,7 +160,7 @@ app.factory('common', ['$http', 'auth', '$routeParams', function($http, auth, $r var loadCommonData = function(id, type){ return $http({ method: 'GET', - url: apiUrl+ type + "/" + id+"?openid="+auth.openid() + url: apiUrl+ type + "/" + id+"?token="+auth.token() }) }; @@ -137,7 +171,7 @@ app.factory('common', ['$http', 'auth', '$routeParams', function($http, auth, $r $http({ method: 'POST', url: apiUrl + "praise/" + act.act_id, - data:{openid:auth.openid(),type:act.act_type} + data:{token:auth.token(),type:act.act_type} }).then(function successCallback(response) { console.log(response.data); }, function errorCallback(response) { @@ -152,12 +186,36 @@ app.factory('common', ['$http', 'auth', '$routeParams', function($http, auth, $r $http({ method: 'POST', url: apiUrl + "praise/" + act.act_id, - data:{openid:auth.openid(),type:act.act_type} + data:{token:auth.token(),type:act.act_type} }).then(function successCallback(response) { console.log(response.data); }, function errorCallback(response) { }); }; - return {addCommonReply: addCommonReply, loadCommonData: loadCommonData, addCommonPraise: addCommonPraise, decreaseCommonPraise: decreaseCommonPraise}; + var init = function(args){ + args.scope.formData = {comment: ''}; + var loadData = function(id){ + loadCommonData(id, args.type).then(function successCallback(response) { + args.loadCallback(response.data); + }, function errorCallback(response) { + }); + }; + + loadData(args.id); + args.scope.addReply = function(data){ + console.log(data.comment); + addCommonReply(args.id, args.replyType, data, function(){ + args.scope.formData = {comment: ''}; + loadData(args.id); + if(typeof args.replyCallback === 'function'){ + args.replyCallback(); + } + }); + }; + args.scope.addPraise = addCommonPraise; + args.scope.decreasePraise = decreaseCommonPraise; + } + + return {init: init, addCommonReply: addCommonReply, loadCommonData: loadCommonData, addCommonPraise: addCommonPraise, decreaseCommonPraise: decreaseCommonPraise}; }]); \ No newline at end of file diff --git a/public/javascripts/wechat/others/routes.js b/public/javascripts/wechat/others/routes.js index ded374930..b4a4e4067 100644 --- a/public/javascripts/wechat/others/routes.js +++ b/public/javascripts/wechat/others/routes.js @@ -1,5 +1,17 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', function ($routeProvider, $httpProvider, $locationProvider, config) { var rootPath = config.rootPath; + var resolve = { + delay: ['auth',function(auth){ + return auth.isBind(); + }] + }; + var makeRoute = function(path, ctrl){ + return { + templateUrl: rootPath + path, + controller: ctrl, + resolve: resolve + } + } //$locationProvider.html5Mode(true); $routeProvider .when('/login', { @@ -10,42 +22,15 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', func templateUrl: rootPath + 'reg.html', controller: 'RegController' }) - .when('/activites', { - templateUrl: rootPath + 'activities.html', - controller: 'ActivityController' - }) - .when('/issues/:id', { - templateUrl: rootPath + 'issue_detail.html', - controller: 'IssueController' - }) - .when('/project_discussion/:id', { - templateUrl: rootPath + 'project_discussion.html', - controller: 'DiscussionController' - }) - .when('/homework/:id', { - templateUrl: rootPath + 'homework_detail.html', - controller: 'HomeworkController' - }) - .when('/course_notice/:id', { - templateUrl: rootPath + 'course_notice.html', - controller: 'CourseNoticeController' - }) - .when('/course_discussion/:id', { - templateUrl: rootPath + 'course_discussion.html', - controller: 'DiscussionController' - }) - .when('/journal_for_message/:id', { - templateUrl: rootPath + 'jour_message_detail.html', - controller: 'JournalsController' - }) - .when('/blog_comment/:id', { - templateUrl: rootPath + 'blog_detail.html', - controller: 'BlogController' - }) - .when('/add_class', { - templateUrl: rootPath + 'add_class.html', - controller: 'AddClassController' - }) + .when('/activites', makeRoute('activities.html', 'ActivityController')) + .when('/issues/:id', makeRoute('issue_detail.html', 'IssueController')) + .when('/project_discussion/:id', makeRoute('project_discussion.html', 'DiscussionController')) + .when('/homework/:id', makeRoute('homework_detail.html', 'HomeworkController')) + .when('/course_notice/:id', makeRoute('course_notice.html', 'CourseNoticeController')) + .when('/course_discussion/:id', makeRoute('course_discussion.html', 'DiscussionController')) + .when('/journal_for_message/:id', makeRoute('jour_message_detail.html', 'JournalsController')) + .when('/blog_comment/:id', makeRoute('blog_detail.html', 'BlogController')) + .when('/add_class', makeRoute('add_class.html', 'AddClassController')) .otherwise({ redirectTo: '/activites' }); From 3f98562c0fe304f828c9c8c4d782ba1767ae514e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 14:45:19 +0800 Subject: [PATCH 24/72] =?UTF-8?q?=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 16 +++++++-------- app/views/wechats/user_activities.html.erb | 2 +- public/javascripts/wechat/build/app.min.js | 24 +++++++++++++--------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 930318fa5..cfd83cce1 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -207,14 +207,14 @@ class WechatsController < ActionController::Base end def user_activities - session[:wechat_code] = params[:code] if params[:code] - code = params[:code] || session[:wechat_code] - openid = get_openid_from_code(code) - @wechat_user = user_binded?(openid) - unless @wechat_user - redirect_to login_wechat_path - return - end + # session[:wechat_code] = params[:code] if params[:code] + # code = params[:code] || session[:wechat_code] + # openid = get_openid_from_code(code) + # @wechat_user = user_binded?(openid) + # unless @wechat_user + # redirect_to login_wechat_path + # return + # end render 'wechats/user_activities', layout: nil end diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index 073d45495..ccbf2a2b1 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -12,7 +12,7 @@ diff --git a/public/javascripts/wechat/build/app.min.js b/public/javascripts/wechat/build/app.min.js index d8eacbf1b..26995dea2 100644 --- a/public/javascripts/wechat/build/app.min.js +++ b/public/javascripts/wechat/build/app.min.js @@ -1,14 +1,18 @@ -var app=angular.module("wechat",["ngRoute"]); -app.factory("auth",["$http","$routeParams","$q",function(e,n,t){var o="";"undefined"!=typeof g_openid&&(o=g_openid);var a=function(){var a=t.defer();if("undefined"!=typeof o&&o.length>0)a.resolve(o);else{var i=n.code;e({url:"/wechat/get_open_id",data:{code:i},method:"POST"}).then(function(e){o=e.data.openid,a.resolve(o)},function(e){a.reject(e)})}return a.promise},i=function(){return o};return{getOpenId:a,openid:i}}]),app.factory("rms",function(){var e={},n=function(n,t){e[n]=t},t=function(n){return e[n]};return{save:n,get:t}}),app.factory("common",["$http","auth","$routeParams",function(e,n,t){var o=function(t,o,a,i){if(a.comment&&!(a.comment.length<=0)){var r=a.comment.replace(/\n/g,"
"),d={type:o,content:r,openid:n.openid()};a.disabled=!0,e({method:"POST",url:apiUrl+"new_comment/"+t,data:d}).then(function(e){a.disabled=!1,"function"==typeof i&&i()},function(e){})}},a=function(t,o){return e({method:"GET",url:apiUrl+o+"/"+t+"?openid="+n.openid()})},i=function(t){t.praise_count+=1,t.has_praise=!0,e({method:"POST",url:apiUrl+"praise/"+t.act_id,data:{openid:n.openid(),type:t.act_type}}).then(function(e){console.log(e.data)},function(e){})},r=function(t){t.praise_count-=1,t.has_praise=!1,e({method:"POST",url:apiUrl+"praise/"+t.act_id,data:{openid:n.openid(),type:t.act_type}}).then(function(e){console.log(e.data)},function(e){})};return{addCommonReply:o,loadCommonData:a,addCommonPraise:i,decreaseCommonPraise:r}}]); +var app=angular.module("wechat",["ngRoute"]);app.constant("config",{rootPath:"/assets/wechat/",rootUrl:"/",apiUrl:"/api/v1/"}),app.run(["$rootScope","auth","$location",function(t,e,a){t.$on("$routeChangeError",function(t,e,l){e&&e.templateUrl&&(e.templateUrl.endsWith("login.html")||e.templateUrl.endsWith("reg.html")||a.path("/login"))}),t.$on("$routeChangeStart",function(t,e,a){e&&e.templateUrl&&!e.templateUrl.endsWith("login.html")&&!e.templateUrl.endsWith("reg.html")})}]); +app.factory("alertService",function(){function t(){this.title=null,this.message=null,this.visible=null,this.cb=null}return t.prototype.showMessage=function(t,e,n){this.message=e,this.title=t,this.visible=!0,this.cb=n},t.prototype.dismiss=function(){this.message=null,this.title=null,this.visible=!1,this.cb&&this.cb()},{create:function(){return new t}}}),app.factory("auth",["$http","$routeParams","$q","session","config",function(t,e,n,o,a){var i="";"undefined"!=typeof g_openid&&(i=g_openid),i||(i=o.get("openid"));var r=function(){var e=n.defer(),i=c();return i&&i.length>10?e.resolve(i):s().then(function(e){return t.post(a.apiUrl+"users/isbind",{openid:e})}).then(function(t){0!=t.data.status?e.reject(t.data.message):(o.save("token",t.data.token),e.resolve(t.data.token))})["catch"](function(t){e.reject(t)}),e.promise},s=function(){var a=n.defer();if(console.log(i),"undefined"!=typeof i&&i&&i.length>0)a.resolve(i);else{var r=e.code||o.get("code");t({url:"/wechat/get_open_id",data:{code:r},method:"POST"}).then(function(t){0!=t.data.status?a.reject(t.data.message):(i=t.data.openid,a.resolve(i))},function(t){a.reject(t)})}return a.promise},c=function(){return o.get("token")};return{isBind:r,token:c,openid:s}}]),app.factory("session",function(){return{save:function(t,e){sessionStorage.setItem(t,e)},get:function(t){return sessionStorage.getItem(t)}}}),app.factory("rms",function(){var t={},e=function(e,n){t[e]=n},n=function(e){return t[e]};return{save:e,get:n}}),app.factory("common",["$http","auth","$routeParams",function(t,e,n){var o=function(n,o,a,i){if(a.comment&&!(a.comment.length<=0)){var r=a.comment.replace(/\n/g,"
"),s={type:o,content:r,token:e.token()};a.disabled=!0,t({method:"POST",url:apiUrl+"new_comment/"+n,data:s}).then(function(t){a.disabled=!1,"function"==typeof i&&i()},function(t){})}},a=function(n,o){return t({method:"GET",url:apiUrl+o+"/"+n+"?token="+e.token()})},i=function(n){n.praise_count+=1,n.has_praise=!0,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},r=function(n){n.praise_count-=1,n.has_praise=!1,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},s=function(t){t.scope.formData={comment:""};var e=function(e){a(e,t.type).then(function(e){t.loadCallback(e.data)},function(t){})};e(t.id),t.scope.addReply=function(n){console.log(n.comment),o(t.id,t.replyType,n,function(){t.scope.formData={comment:""},e(t.id),"function"==typeof t.replyCallback&&t.replyCallback()})},t.scope.addPraise=i,t.scope.decreasePraise=r};return{init:s,addCommonReply:o,loadCommonData:a,addCommonPraise:i,decreaseCommonPraise:r}}]); app.filter("safeHtml",["$sce",function(t){return function(n){return t.trustAsHtml(n)}}]); -app.controller("ActivityController",["$anchorScroll","$location","$scope","$http","$timeout","auth","rms","common",function(t,a,e,o,i,n,c,s){e.replaceUrl=function(t){return t},console.log("ActivityController load"),e.page=c.get("page")||0,e.activities=c.get("activities")||[],e.has_more=c.get("has_more"),e.loadActData=function(t){e.page=t,o({method:"POST",url:apiUrl+"activities",data:{openid:n.openid(),page:t}}).then(function(t){t.data.page>0?e.activities=e.activities.concat(t.data.data):e.activities=t.data.data,c.save("activities",e.activities),e.has_more=t.data.count+10*t.data.page0?e.activities=e.activities.concat(t.data.data):e.activities=t.data.data,n.save("activities",e.activities),e.has_more=t.data.count+10*t.data.page
加载中...
'}}]); -app.config(["$routeProvider","$httpProvider","$locationProvider",function(e,r,t){var o="/assets/wechat/";e.when("/activites",{templateUrl:o+"activities.html",controller:"ActivityController"}).when("/issues/:id",{templateUrl:o+"issue_detail.html",controller:"IssueController"}).when("/project_discussion/:id",{templateUrl:o+"project_discussion.html",controller:"DiscussionController"}).when("/homework/:id",{templateUrl:o+"homework_detail.html",controller:"HomeworkController"}).when("/course_notice/:id",{templateUrl:o+"course_notice.html",controller:"CourseNoticeController"}).when("/course_discussion/:id",{templateUrl:o+"course_discussion.html",controller:"DiscussionController"}).when("/journal_for_message/:id",{templateUrl:o+"jour_message_detail.html",controller:"JournalsController"}).when("/blog_comment/:id",{templateUrl:o+"blog_detail.html",controller:"BlogController"}).when("/add_class",{templateUrl:o+"add_class.html",controller:"AddClassController"}).otherwise({redirectTo:"/activites"}),r.interceptors.push(["$q","$rootScope",function(e,r){return void 0==r.activeCalls&&(r.activeCalls=0),{request:function(e){return r.activeCalls+=1,e},requestError:function(e){return r.activeCalls-=1,e},response:function(e){return r.activeCalls-=1,e},responseError:function(e){return r.activeCalls-=1,e}}}])}]); \ No newline at end of file +app.config(["$routeProvider","$httpProvider","$locationProvider","config",function(e,o,r,t){var l=t.rootPath,n={delay:["auth",function(e){return e.isBind()}]},i=function(e,o){return{templateUrl:l+e,controller:o,resolve:n}};e.when("/login",{templateUrl:l+"login.html",controller:"LoginController"}).when("/reg",{templateUrl:l+"reg.html",controller:"RegController"}).when("/activites",i("activities.html","ActivityController")).when("/issues/:id",i("issue_detail.html","IssueController")).when("/project_discussion/:id",i("project_discussion.html","DiscussionController")).when("/homework/:id",i("homework_detail.html","HomeworkController")).when("/course_notice/:id",i("course_notice.html","CourseNoticeController")).when("/course_discussion/:id",i("course_discussion.html","DiscussionController")).when("/journal_for_message/:id",i("jour_message_detail.html","JournalsController")).when("/blog_comment/:id",i("blog_detail.html","BlogController")).when("/add_class",i("add_class.html","AddClassController")).otherwise({redirectTo:"/activites"}),o.interceptors.push(["$q","$rootScope",function(e,o){return void 0==o.activeCalls&&(o.activeCalls=0),{request:function(e){return o.activeCalls+=1,e},requestError:function(e){return o.activeCalls-=1,e},response:function(e){return o.activeCalls-=1,e},responseError:function(e){return o.activeCalls-=1,e}}}])}]); \ No newline at end of file From b7230333dcbf6427774698a57de80bc55bd8f7b4 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 15:21:13 +0800 Subject: [PATCH 25/72] =?UTF-8?q?code=E8=8E=B7=E5=8F=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 3 ++- app/views/wechats/user_activities.html.erb | 2 +- public/javascripts/wechat/app.js | 3 ++- public/javascripts/wechat/build/app.min.js | 4 ++-- public/javascripts/wechat/others/factory.js | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index cfd83cce1..39e093cdd 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -215,7 +215,8 @@ class WechatsController < ActionController::Base # redirect_to login_wechat_path # return # end - + session[:wechat_code] = params[:code] if params[:code] + @code = params[:code] || session[:wechat_code] render 'wechats/user_activities', layout: nil end diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index ccbf2a2b1..a3f5c741b 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -12,7 +12,7 @@ diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 472a5a377..a7c4d13d5 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -7,7 +7,7 @@ app.constant('config', { }); -app.run(['$rootScope', 'auth', '$location', function($rootScope, auth, $location){ +app.run(['$rootScope', 'auth', '$location', '$routeParams', function($rootScope, auth, $location, $routeParams){ $rootScope.$on('$routeChangeError', function(event, next, current){ if(next && next.templateUrl){ @@ -18,6 +18,7 @@ app.run(['$rootScope', 'auth', '$location', function($rootScope, auth, $location }); $rootScope.$on('$routeChangeStart', function(event, next, current){ + console.log($routeParams); if(next && next.templateUrl){ if(!next.templateUrl.endsWith("login.html") && !next.templateUrl.endsWith("reg.html")){ } diff --git a/public/javascripts/wechat/build/app.min.js b/public/javascripts/wechat/build/app.min.js index 26995dea2..57664c550 100644 --- a/public/javascripts/wechat/build/app.min.js +++ b/public/javascripts/wechat/build/app.min.js @@ -1,5 +1,5 @@ -var app=angular.module("wechat",["ngRoute"]);app.constant("config",{rootPath:"/assets/wechat/",rootUrl:"/",apiUrl:"/api/v1/"}),app.run(["$rootScope","auth","$location",function(t,e,a){t.$on("$routeChangeError",function(t,e,l){e&&e.templateUrl&&(e.templateUrl.endsWith("login.html")||e.templateUrl.endsWith("reg.html")||a.path("/login"))}),t.$on("$routeChangeStart",function(t,e,a){e&&e.templateUrl&&!e.templateUrl.endsWith("login.html")&&!e.templateUrl.endsWith("reg.html")})}]); -app.factory("alertService",function(){function t(){this.title=null,this.message=null,this.visible=null,this.cb=null}return t.prototype.showMessage=function(t,e,n){this.message=e,this.title=t,this.visible=!0,this.cb=n},t.prototype.dismiss=function(){this.message=null,this.title=null,this.visible=!1,this.cb&&this.cb()},{create:function(){return new t}}}),app.factory("auth",["$http","$routeParams","$q","session","config",function(t,e,n,o,a){var i="";"undefined"!=typeof g_openid&&(i=g_openid),i||(i=o.get("openid"));var r=function(){var e=n.defer(),i=c();return i&&i.length>10?e.resolve(i):s().then(function(e){return t.post(a.apiUrl+"users/isbind",{openid:e})}).then(function(t){0!=t.data.status?e.reject(t.data.message):(o.save("token",t.data.token),e.resolve(t.data.token))})["catch"](function(t){e.reject(t)}),e.promise},s=function(){var a=n.defer();if(console.log(i),"undefined"!=typeof i&&i&&i.length>0)a.resolve(i);else{var r=e.code||o.get("code");t({url:"/wechat/get_open_id",data:{code:r},method:"POST"}).then(function(t){0!=t.data.status?a.reject(t.data.message):(i=t.data.openid,a.resolve(i))},function(t){a.reject(t)})}return a.promise},c=function(){return o.get("token")};return{isBind:r,token:c,openid:s}}]),app.factory("session",function(){return{save:function(t,e){sessionStorage.setItem(t,e)},get:function(t){return sessionStorage.getItem(t)}}}),app.factory("rms",function(){var t={},e=function(e,n){t[e]=n},n=function(e){return t[e]};return{save:e,get:n}}),app.factory("common",["$http","auth","$routeParams",function(t,e,n){var o=function(n,o,a,i){if(a.comment&&!(a.comment.length<=0)){var r=a.comment.replace(/\n/g,"
"),s={type:o,content:r,token:e.token()};a.disabled=!0,t({method:"POST",url:apiUrl+"new_comment/"+n,data:s}).then(function(t){a.disabled=!1,"function"==typeof i&&i()},function(t){})}},a=function(n,o){return t({method:"GET",url:apiUrl+o+"/"+n+"?token="+e.token()})},i=function(n){n.praise_count+=1,n.has_praise=!0,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},r=function(n){n.praise_count-=1,n.has_praise=!1,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},s=function(t){t.scope.formData={comment:""};var e=function(e){a(e,t.type).then(function(e){t.loadCallback(e.data)},function(t){})};e(t.id),t.scope.addReply=function(n){console.log(n.comment),o(t.id,t.replyType,n,function(){t.scope.formData={comment:""},e(t.id),"function"==typeof t.replyCallback&&t.replyCallback()})},t.scope.addPraise=i,t.scope.decreasePraise=r};return{init:s,addCommonReply:o,loadCommonData:a,addCommonPraise:i,decreaseCommonPraise:r}}]); +var app=angular.module("wechat",["ngRoute"]);app.constant("config",{rootPath:"/assets/wechat/",rootUrl:"/",apiUrl:"/api/v1/"}),app.run(["$rootScope","auth","$location","$routeParams",function(t,e,o,a){t.$on("$routeChangeError",function(t,e,a){e&&e.templateUrl&&(e.templateUrl.endsWith("login.html")||e.templateUrl.endsWith("reg.html")||o.path("/login"))}),t.$on("$routeChangeStart",function(t,e,o){console.log(a),e&&e.templateUrl&&!e.templateUrl.endsWith("login.html")&&!e.templateUrl.endsWith("reg.html")})}]); +app.factory("alertService",function(){function t(){this.title=null,this.message=null,this.visible=null,this.cb=null}return t.prototype.showMessage=function(t,e,n){this.message=e,this.title=t,this.visible=!0,this.cb=n},t.prototype.dismiss=function(){this.message=null,this.title=null,this.visible=!1,this.cb&&this.cb()},{create:function(){return new t}}}),app.factory("auth",["$http","$routeParams","$q","session","config",function(t,e,n,o,a){var i="";"undefined"!=typeof g_openid&&(i=g_openid),i||(i=o.get("openid"));var r=function(){var e=n.defer(),i=s();return i&&i.length>10?e.resolve(i):c().then(function(e){return t.post(a.apiUrl+"users/isbind",{openid:e})}).then(function(t){0!=t.data.status?e.reject(t.data.message):(o.save("token",t.data.token),e.resolve(t.data.token))})["catch"](function(t){e.reject(t)}),e.promise},c=function(){var a=n.defer();if(console.log(i),"undefined"!=typeof i&&i&&i.length>0)a.resolve(i);else{var r=window.g_code||e.code||o.get("code");t({url:"/wechat/get_open_id",data:{code:r},method:"POST"}).then(function(t){0!=t.data.status?a.reject(t.data.message):(i=t.data.openid,a.resolve(i))},function(t){a.reject(t)})}return a.promise},s=function(){return o.get("token")};return{isBind:r,token:s,openid:c}}]),app.factory("session",function(){return{save:function(t,e){sessionStorage.setItem(t,e)},get:function(t){return sessionStorage.getItem(t)}}}),app.factory("rms",function(){var t={},e=function(e,n){t[e]=n},n=function(e){return t[e]};return{save:e,get:n}}),app.factory("common",["$http","auth","$routeParams",function(t,e,n){var o=function(n,o,a,i){if(a.comment&&!(a.comment.length<=0)){var r=a.comment.replace(/\n/g,"
"),c={type:o,content:r,token:e.token()};a.disabled=!0,t({method:"POST",url:apiUrl+"new_comment/"+n,data:c}).then(function(t){a.disabled=!1,"function"==typeof i&&i()},function(t){})}},a=function(n,o){return t({method:"GET",url:apiUrl+o+"/"+n+"?token="+e.token()})},i=function(n){n.praise_count+=1,n.has_praise=!0,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},r=function(n){n.praise_count-=1,n.has_praise=!1,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},c=function(t){t.scope.formData={comment:""};var e=function(e){a(e,t.type).then(function(e){t.loadCallback(e.data)},function(t){})};e(t.id),t.scope.addReply=function(n){console.log(n.comment),o(t.id,t.replyType,n,function(){t.scope.formData={comment:""},e(t.id),"function"==typeof t.replyCallback&&t.replyCallback()})},t.scope.addPraise=i,t.scope.decreasePraise=r};return{init:c,addCommonReply:o,loadCommonData:a,addCommonPraise:i,decreaseCommonPraise:r}}]); app.filter("safeHtml",["$sce",function(t){return function(n){return t.trustAsHtml(n)}}]); app.controller("ActivityController",["$anchorScroll","$location","$scope","$http","$timeout","auth","rms","common","alertService",function(t,a,e,o,i,c,n,s,r){e.replaceUrl=function(t){return t},e.alertService=r.create(),console.log("ActivityController load"),e.page=n.get("page")||0,e.activities=n.get("activities")||[],e.has_more=n.get("has_more"),e.loadActData=function(t){e.page=t,o({method:"POST",url:apiUrl+"activities",data:{token:c.token(),page:t}}).then(function(t){t.data.page>0?e.activities=e.activities.concat(t.data.data):e.activities=t.data.data,n.save("activities",e.activities),e.has_more=t.data.count+10*t.data.page 0){ deferred.resolve(_openid); } else { - var code = $routeParams.code || session.get("code"); + var code = window.g_code || $routeParams.code || session.get("code"); $http({ url: '/wechat/get_open_id', data: {code: code}, From 05ddbe5874266880774c2d78d9f95479f0428689 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 15:28:19 +0800 Subject: [PATCH 26/72] =?UTF-8?q?=E4=BF=AE=E6=94=B9code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/user_activities.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index a3f5c741b..061099571 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -12,7 +12,7 @@ From c6f04db19e1a94eb2616b72a21e7744a6131a7bf Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 15:50:52 +0800 Subject: [PATCH 27/72] wechat --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 39e093cdd..3a6be2016 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -147,7 +147,7 @@ class WechatsController < ActionController::Base 您还未绑定确实的用户,请先绑定,谢谢!" } } 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+'/assets/wechat/app.html#login'}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{root_url+'/wechat/user_activities#login'}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/weixin_pic.jpg" article.item title: "#{n[:title]}", description: n[:content], From 47c443e59d35a238fc759da22440d3b14b9130b8 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 15:56:57 +0800 Subject: [PATCH 28/72] =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E5=8F=98?= =?UTF-8?q?=E5=A4=A7=E4=B8=80=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/weui/weixin.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index fd5a56bd6..9ec0f6823 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -167,7 +167,7 @@ a.underline {text-decoration:underline;} /*20160616登录注册*/ .login-wrap {padding:0 10px;} .input-box-wrap {padding-right:17px;} -.input-box {width:100%; height:36px; padding-left:5px; line-height:36px; vertical-align:middle; border:1px solid #ccc; border-radius:5px;} +.input-box {font-size: 16px;width:100%; height:36px; padding-left:5px; line-height:36px; vertical-align:middle; border:1px solid #ccc; border-radius:5px;} .login-op-wrap {height:30px; line-height:30px; vertical-align:middle;} .login-box{display:inline-block; width:14px; height:14px; line-height:14px; text-align:center; vertical-align:middle; border:1px solid #ccc; background:#fff; border-radius:3px; color:#fff; cursor:pointer;} .login-box.checked{background:#63c360;} From b4a3d4a5a200a8e4e1a4ec7050981b3999d33f2d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 16:04:38 +0800 Subject: [PATCH 29/72] =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/build/app.min.js | 2 +- public/javascripts/wechat/directives/alert.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/javascripts/wechat/build/app.min.js b/public/javascripts/wechat/build/app.min.js index 57664c550..c41e0bb7b 100644 --- a/public/javascripts/wechat/build/app.min.js +++ b/public/javascripts/wechat/build/app.min.js @@ -11,7 +11,7 @@ app.controller("IssueController",["$scope","$http","$routeParams","auth","common app.controller("JournalsController",["$scope","$http","$routeParams","auth","common",function(o,a,e,l,n){n.init({id:e.id,scope:o,type:"journal_for_messages",replyType:"JournalsForMessage",loadCallback:function(a){o.message=a.data},replyCallback:function(){}})}]); app.controller("LoginController",["$scope","$http","$location","$routeParams","alertService","config","auth","session",function(e,o,t,i,a,n,s,r){s.isBind().then(function(){t.path("/activities")}),i.code&&r.save("code",i.code);var l=e;l.loginFailed=!1,l.alertService=a.create(),l.findPwdDialog=a.create(),l.login=function(i,a){return i.$setSubmitted(),console.log(a),i.$valid?(console.log(apiUrl+"auth"),void s.openid().then(function(e){return o.post(n.apiUrl+"users/wxbind",{login:a.login,password:a.password,openid:e})}).then(function(o){console.log(o.data),l.loginFailed=0!=o.data.status,e.loginFailed?l.alertService.showMessage("出错了",o.data.message):l.alertService.showMessage("提示",o.data.message,function(){t.path("/activities")})})["catch"](function(e){l.alertService.showMessage("出错了",e)})):void console.log(i.$error)},l.showBox=function(){l.findPwdDialog.showMessage("提示","请访问www.trustie.net获取密码,谢谢!")},l.goReg=function(){t.path("/reg")}}]); app.controller("RegController",["$scope","$http","$location","alertService",function(e,o,a,r){var s=e;s.errDialog=r.create(),s.goLogin=function(){a.path("/login")},s.isagreed=!0,s.agreed=function(e){s.isagreed=!e},s.reg=function(e,a){return e.$setSubmitted(),console.log(e),e.$valid?(console.log(a),void o.post(apiUrl+"users",{login:a.username,password:a.password,mail:a.email}).then(function(e){0!=e.data.status?s.errDialog.showMessage("出错了",e.data.message):s.errDialog.showMessage("提示","注册且绑定微信成功")},function(e){s.errDialo.showMessage("出错了",e.data)})):void console.log(e.$error)}}]); -app.directive("myAlert",["config",function(t){return{templateUrl:t.rootPath+"templates/alert.html",scope:{title:"=",message:"=",visible:"=",cb:"="},link:function(t){t.dismiss=function(){"function"==typeof t.cb&&t.cb()}}}}]); +app.directive("myAlert",["config",function(t){return{templateUrl:t.rootPath+"templates/alert.html",scope:{title:"=",message:"=",visible:"=",cb:"="},link:function(t){t.dismiss=function(){t.visible=!1,"function"==typeof t.cb&&t.cb()}}}}]); app.directive("pwdconfirm",function(){return{require:"ngModel",link:function(r,n,i,e){e.$validators.pwdconfirm=function(n,i){return r.user&&r.user.password==i}}}}); app.directive("inputAuto",function(){return{restrict:"A",scope:{},link:function(n,t){var e=t.parent().children().eq(0),i=t.parent().next();t.on("input",function(){console.log(i),e.html(t[0].value);var n=e[0].scrollHeight;t.css("height",n+"px")}),i.on("click",function(){t.css("height","28px")})}}}); app.directive("loadingSpinner",["$http",function(i){return{restrict:"A",replace:!0,template:'
加载中...
'}}]); diff --git a/public/javascripts/wechat/directives/alert.js b/public/javascripts/wechat/directives/alert.js index 332ec65bf..f53ecdb5a 100644 --- a/public/javascripts/wechat/directives/alert.js +++ b/public/javascripts/wechat/directives/alert.js @@ -9,6 +9,7 @@ app.directive('myAlert', ['config', function(config){ }, link: function(scope){ scope.dismiss = function(){ + scope.visible = false; if(typeof scope.cb === 'function'){ scope.cb(); } From 29a815aeaf887f118f3fd43f526b957263cb5b65 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 20 Jun 2016 16:09:04 +0800 Subject: [PATCH 30/72] =?UTF-8?q?=E6=B7=BB=E5=8A=A0weui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/user_activities.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index 061099571..2dcd89bbb 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -9,6 +9,7 @@ + + + From 13273d02de69f5a535c57c304772547ed3c17320 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 12:11:34 +0800 Subject: [PATCH 42/72] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E9=97=AE=E9=A2=98=EF=BC=8C=E4=B8=8D=E6=9A=B4=E9=9C=B2?= =?UTF-8?q?openid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/api.rb | 5 ++ app/api/mobile/apis/users.rb | 4 +- app/controllers/wechats_controller.rb | 31 ++++++----- app/views/wechats/open_wechat.html.erb | 18 +++++++ app/views/wechats/user_activities.html.erb | 20 +++++++- config/routes.rb | 2 +- public/javascripts/wechat/app.js | 11 ++-- public/javascripts/wechat/build/app.min.js | 11 ++-- .../wechat/controllers/activity.js | 8 +-- .../javascripts/wechat/controllers/login.js | 12 ++--- public/javascripts/wechat/others/factory.js | 51 +++---------------- public/javascripts/wechat/others/routes.js | 2 +- 12 files changed, 88 insertions(+), 87 deletions(-) create mode 100644 app/views/wechats/open_wechat.html.erb diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index 058687776..9ffac4e10 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -23,6 +23,7 @@ module Mobile version 'v1', using: :path format :json content_type :json, "application/json;charset=UTF-8" + use ActionDispatch::Session::CookieStore use Mobile::Middleware::ErrorHandler helpers do @@ -34,6 +35,10 @@ module Mobile raise('Unauthorized. 用户认证失败.') unless current_user end + def session + env['rack.session'] + end + def current_user openid = params[:openid] if openid diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index e3041abcd..b5ee14d19 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -23,10 +23,10 @@ module Mobile params do requires :login, type: String, desc: 'username' requires :password, type: String, desc: 'password' - requires :openid, type: String, desc: 'wechat openid' end post 'wxbind' do - openid = params[:openid] + openid = session[:wechat_openid] + logger.debug "openid ============== #{openid}" raise "无法获取到openid,请在微信中打开本页面" unless openid uw = UserWechat.where(openid: openid).first raise "此微信号已绑定用户(#{uw.user.login}), 不能重复绑定" if uw diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 6517c756e..dc1e26508 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -191,14 +191,22 @@ class WechatsController < ActionController::Base ### controller method module Controllers - def get_open_id + def get_bind begin - code = params[:code] || session[:wechat_code] openid = get_openid_from_code(code) raise "无法获取到微信openid" unless openid - render :json => {status:0, openid: openid} + + uw = UserWechat.where(openid: openid).first + raise "还未绑定trustie帐户" unless uw + logger.debug "get_bind ============= #{uw}" + + user = uw.user + ::ApiKey.delete_all(user_id: user.id) + key = ::ApiKey.create!(user_id: user.id) + + render :json =>{status: 0, token: key.access_token} rescue Exception=>e render :json => {status: -1, message: e.message} end @@ -240,21 +248,20 @@ class WechatsController < ActionController::Base end def user_activities - # session[:wechat_code] = params[:code] if params[:code] - # code = params[:code] || session[:wechat_code] - # openid = get_openid_from_code(code) - # @wechat_user = user_binded?(openid) - # unless @wechat_user - # redirect_to login_wechat_path - # return - # end session[:wechat_code] = params[:code] if params[:code] - @code = params[:code] || session[:wechat_code] + @path = '/'+(params[:state] || '') + open_id = get_openid_from_code(params[:code]) rescue + unless open_id + render 'wechats/open_wechat', layout: nil and return + end + session[:wechat_openid] = open_id render 'wechats/user_activities', layout: nil end + private def get_openid_from_code(code) + return 'oCnvgvz8R7QheXE-R9Kkr39j8Ndg' if code =='only-for-test' openid = session[:wechat_openid] unless openid diff --git a/app/views/wechats/open_wechat.html.erb b/app/views/wechats/open_wechat.html.erb new file mode 100644 index 000000000..4584e81b5 --- /dev/null +++ b/app/views/wechats/open_wechat.html.erb @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index 6cb32850a..f920aed4b 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -13,9 +13,9 @@ @@ -26,6 +26,24 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index e4b462d93..0998044ff 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1249,7 +1249,7 @@ RedmineApp::Application.routes.draw do get :login get :user_activities post :bind - post :get_open_id + post :get_bind end end diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index a7c4d13d5..ea2bdf318 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -8,6 +8,12 @@ app.constant('config', { app.run(['$rootScope', 'auth', '$location', '$routeParams', function($rootScope, auth, $location, $routeParams){ + + if(g_redirect_path && g_redirect_path.length>0){ + $location.path(g_redirect_path); + g_redirect_path = null; + } + $rootScope.$on('$routeChangeError', function(event, next, current){ if(next && next.templateUrl){ @@ -18,11 +24,6 @@ app.run(['$rootScope', 'auth', '$location', '$routeParams', function($rootScope, }); $rootScope.$on('$routeChangeStart', function(event, next, current){ - console.log($routeParams); - if(next && next.templateUrl){ - if(!next.templateUrl.endsWith("login.html") && !next.templateUrl.endsWith("reg.html")){ - } - } }); } ]); \ No newline at end of file diff --git a/public/javascripts/wechat/build/app.min.js b/public/javascripts/wechat/build/app.min.js index c41e0bb7b..365ed28c0 100644 --- a/public/javascripts/wechat/build/app.min.js +++ b/public/javascripts/wechat/build/app.min.js @@ -1,7 +1,7 @@ -var app=angular.module("wechat",["ngRoute"]);app.constant("config",{rootPath:"/assets/wechat/",rootUrl:"/",apiUrl:"/api/v1/"}),app.run(["$rootScope","auth","$location","$routeParams",function(t,e,o,a){t.$on("$routeChangeError",function(t,e,a){e&&e.templateUrl&&(e.templateUrl.endsWith("login.html")||e.templateUrl.endsWith("reg.html")||o.path("/login"))}),t.$on("$routeChangeStart",function(t,e,o){console.log(a),e&&e.templateUrl&&!e.templateUrl.endsWith("login.html")&&!e.templateUrl.endsWith("reg.html")})}]); -app.factory("alertService",function(){function t(){this.title=null,this.message=null,this.visible=null,this.cb=null}return t.prototype.showMessage=function(t,e,n){this.message=e,this.title=t,this.visible=!0,this.cb=n},t.prototype.dismiss=function(){this.message=null,this.title=null,this.visible=!1,this.cb&&this.cb()},{create:function(){return new t}}}),app.factory("auth",["$http","$routeParams","$q","session","config",function(t,e,n,o,a){var i="";"undefined"!=typeof g_openid&&(i=g_openid),i||(i=o.get("openid"));var r=function(){var e=n.defer(),i=s();return i&&i.length>10?e.resolve(i):c().then(function(e){return t.post(a.apiUrl+"users/isbind",{openid:e})}).then(function(t){0!=t.data.status?e.reject(t.data.message):(o.save("token",t.data.token),e.resolve(t.data.token))})["catch"](function(t){e.reject(t)}),e.promise},c=function(){var a=n.defer();if(console.log(i),"undefined"!=typeof i&&i&&i.length>0)a.resolve(i);else{var r=window.g_code||e.code||o.get("code");t({url:"/wechat/get_open_id",data:{code:r},method:"POST"}).then(function(t){0!=t.data.status?a.reject(t.data.message):(i=t.data.openid,a.resolve(i))},function(t){a.reject(t)})}return a.promise},s=function(){return o.get("token")};return{isBind:r,token:s,openid:c}}]),app.factory("session",function(){return{save:function(t,e){sessionStorage.setItem(t,e)},get:function(t){return sessionStorage.getItem(t)}}}),app.factory("rms",function(){var t={},e=function(e,n){t[e]=n},n=function(e){return t[e]};return{save:e,get:n}}),app.factory("common",["$http","auth","$routeParams",function(t,e,n){var o=function(n,o,a,i){if(a.comment&&!(a.comment.length<=0)){var r=a.comment.replace(/\n/g,"
"),c={type:o,content:r,token:e.token()};a.disabled=!0,t({method:"POST",url:apiUrl+"new_comment/"+n,data:c}).then(function(t){a.disabled=!1,"function"==typeof i&&i()},function(t){})}},a=function(n,o){return t({method:"GET",url:apiUrl+o+"/"+n+"?token="+e.token()})},i=function(n){n.praise_count+=1,n.has_praise=!0,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},r=function(n){n.praise_count-=1,n.has_praise=!1,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},c=function(t){t.scope.formData={comment:""};var e=function(e){a(e,t.type).then(function(e){t.loadCallback(e.data)},function(t){})};e(t.id),t.scope.addReply=function(n){console.log(n.comment),o(t.id,t.replyType,n,function(){t.scope.formData={comment:""},e(t.id),"function"==typeof t.replyCallback&&t.replyCallback()})},t.scope.addPraise=i,t.scope.decreasePraise=r};return{init:c,addCommonReply:o,loadCommonData:a,addCommonPraise:i,decreaseCommonPraise:r}}]); +var app=angular.module("wechat",["ngRoute"]);app.constant("config",{rootPath:"/assets/wechat/",rootUrl:"/",apiUrl:"/api/v1/"}),app.run(["$rootScope","auth","$location","$routeParams",function(t,a,e,r){g_redirect_path&&g_redirect_path.length>0&&(e.path(g_redirect_path),g_redirect_path=null),t.$on("$routeChangeError",function(t,a,r){a&&a.templateUrl&&(a.templateUrl.endsWith("login.html")||a.templateUrl.endsWith("reg.html")||e.path("/login"))}),t.$on("$routeChangeStart",function(t,a,e){})}]); +app.factory("alertService",function(){function t(){this.title=null,this.message=null,this.visible=null,this.cb=null}return t.prototype.showMessage=function(t,e,n){this.message=e,this.title=t,this.visible=!0,this.cb=n},t.prototype.dismiss=function(){this.message=null,this.title=null,this.visible=!1,this.cb&&this.cb()},{create:function(){return new t}}}),app.factory("auth",["$http","$routeParams","$q","session","config",function(t,e,n,o,a){var i=function(){var a=n.defer(),i=c();if(i&&i.length>10)a.resolve(i);else{window.g_code||e.code||o.get("code");t.post("/wechat/get_bind",{}).then(function(t){0!=t.data.status?a.reject(t.data.message):(o.save("token",t.data.token),a.resolve(t.data.token))})["catch"](function(t){a.reject(t)})}return a.promise},c=function(){return o.get("token")};return{get_bind:i,token:c}}]),app.factory("session",function(){return{save:function(t,e){sessionStorage.setItem(t,e)},get:function(t){return sessionStorage.getItem(t)}}}),app.factory("rms",function(){var t={},e=function(e,n){t[e]=n},n=function(e){return t[e]};return{save:e,get:n}}),app.factory("common",["$http","auth","$routeParams",function(t,e,n){var o=function(n,o,a,i){if(a.comment&&!(a.comment.length<=0)){var c=a.comment.replace(/\n/g,"
"),s={type:o,content:c,token:e.token()};a.disabled=!0,t({method:"POST",url:apiUrl+"new_comment/"+n,data:s}).then(function(t){a.disabled=!1,"function"==typeof i&&i()},function(t){})}},a=function(n,o){return t({method:"GET",url:apiUrl+o+"/"+n+"?token="+e.token()})},i=function(n){n.praise_count+=1,n.has_praise=!0,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},c=function(n){n.praise_count-=1,n.has_praise=!1,t({method:"POST",url:apiUrl+"praise/"+n.act_id,data:{token:e.token(),type:n.act_type}}).then(function(t){console.log(t.data)},function(t){})},s=function(t){t.scope.formData={comment:""};var e=function(e){a(e,t.type).then(function(e){t.loadCallback(e.data)},function(t){})};e(t.id),t.scope.addReply=function(n){console.log(n.comment),o(t.id,t.replyType,n,function(){t.scope.formData={comment:""},e(t.id),"function"==typeof t.replyCallback&&t.replyCallback()})},t.scope.addPraise=i,t.scope.decreasePraise=c};return{init:s,addCommonReply:o,loadCommonData:a,addCommonPraise:i,decreaseCommonPraise:c}}]); app.filter("safeHtml",["$sce",function(t){return function(n){return t.trustAsHtml(n)}}]); -app.controller("ActivityController",["$anchorScroll","$location","$scope","$http","$timeout","auth","rms","common","alertService",function(t,a,e,o,i,c,n,s,r){e.replaceUrl=function(t){return t},e.alertService=r.create(),console.log("ActivityController load"),e.page=n.get("page")||0,e.activities=n.get("activities")||[],e.has_more=n.get("has_more"),e.loadActData=function(t){e.page=t,o({method:"POST",url:apiUrl+"activities",data:{token:c.token(),page:t}}).then(function(t){t.data.page>0?e.activities=e.activities.concat(t.data.data):e.activities=t.data.data,n.save("activities",e.activities),e.has_more=t.data.count+10*t.data.page0?e.activities=e.activities.concat(a.data.data):e.activities=a.data.data,n.save("activities",e.activities),e.has_more=a.data.count+10*a.data.page
加载中...
'}}]); -app.config(["$routeProvider","$httpProvider","$locationProvider","config",function(e,o,r,t){var l=t.rootPath,n={delay:["auth",function(e){return e.isBind()}]},i=function(e,o){return{templateUrl:l+e,controller:o,resolve:n}};e.when("/login",{templateUrl:l+"login.html",controller:"LoginController"}).when("/reg",{templateUrl:l+"reg.html",controller:"RegController"}).when("/activites",i("activities.html","ActivityController")).when("/issues/:id",i("issue_detail.html","IssueController")).when("/project_discussion/:id",i("project_discussion.html","DiscussionController")).when("/homework/:id",i("homework_detail.html","HomeworkController")).when("/course_notice/:id",i("course_notice.html","CourseNoticeController")).when("/course_discussion/:id",i("course_discussion.html","DiscussionController")).when("/journal_for_message/:id",i("jour_message_detail.html","JournalsController")).when("/blog_comment/:id",i("blog_detail.html","BlogController")).when("/add_class",i("add_class.html","AddClassController")).otherwise({redirectTo:"/activites"}),o.interceptors.push(["$q","$rootScope",function(e,o){return void 0==o.activeCalls&&(o.activeCalls=0),{request:function(e){return o.activeCalls+=1,e},requestError:function(e){return o.activeCalls-=1,e},response:function(e){return o.activeCalls-=1,e},responseError:function(e){return o.activeCalls-=1,e}}}])}]); \ No newline at end of file +app.config(["$routeProvider","$httpProvider","$locationProvider","config",function(e,o,r,t){var l=t.rootPath,n={delay:["auth",function(e){return e.get_bind()}]},s=function(e,o){return{templateUrl:l+e,controller:o,resolve:n}};e.when("/login",{templateUrl:l+"login.html",controller:"LoginController"}).when("/reg",{templateUrl:l+"reg.html",controller:"RegController"}).when("/activites",s("activities.html","ActivityController")).when("/issues/:id",s("issue_detail.html","IssueController")).when("/project_discussion/:id",s("project_discussion.html","DiscussionController")).when("/homework/:id",s("homework_detail.html","HomeworkController")).when("/course_notice/:id",s("course_notice.html","CourseNoticeController")).when("/course_discussion/:id",s("course_discussion.html","DiscussionController")).when("/journal_for_message/:id",s("jour_message_detail.html","JournalsController")).when("/blog_comment/:id",s("blog_detail.html","BlogController")).when("/add_class",s("add_class.html","AddClassController")).when("/myclass",s("myclass.html","MyClassController")).otherwise({redirectTo:"/activites"}),o.interceptors.push(["$q","$rootScope",function(e,o){return void 0==o.activeCalls&&(o.activeCalls=0),{request:function(e){return o.activeCalls+=1,e},requestError:function(e){return o.activeCalls-=1,e},response:function(e){return o.activeCalls-=1,e},responseError:function(e){return o.activeCalls-=1,e}}}])}]); \ No newline at end of file diff --git a/public/javascripts/wechat/controllers/activity.js b/public/javascripts/wechat/controllers/activity.js index e44eb3ea2..73bd09f26 100644 --- a/public/javascripts/wechat/controllers/activity.js +++ b/public/javascripts/wechat/controllers/activity.js @@ -39,13 +39,7 @@ app.controller('ActivityController', }; if($scope.activities.length<=0){ - auth.isBind().then( - function(){ - $scope.loadActData(0); - }, function errorCallback(response) { - $scope.alertService.showMessage("获取token出错",response); - } - ); + $scope.loadActData(0); } else { $timeout(function(){ window.scrollTo(0, rms.get("yoffset")); diff --git a/public/javascripts/wechat/controllers/login.js b/public/javascripts/wechat/controllers/login.js index 35b750e8c..1dbf804ed 100644 --- a/public/javascripts/wechat/controllers/login.js +++ b/public/javascripts/wechat/controllers/login.js @@ -1,6 +1,6 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session', function ($scope, $http, $location, $routeParams, alertService, config, auth,session) { - if(auth.isBind().then(function(){ + if(auth.get_bind().then(function(){ $location.path("/activities"); })); @@ -24,13 +24,9 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams console.log(apiUrl + "auth"); - auth.openid().then( - function(openid){ - return $http.post( - config.apiUrl + "users/wxbind", - {login: user.login, password: user.password, openid: openid} - ); - } + $http.post( + config.apiUrl + "users/wxbind", + {login: user.login, password: user.password} ).then( function(response) { console.log(response.data); diff --git a/public/javascripts/wechat/others/factory.js b/public/javascripts/wechat/others/factory.js index aefd359a8..6acf25c59 100644 --- a/public/javascripts/wechat/others/factory.js +++ b/public/javascripts/wechat/others/factory.js @@ -29,16 +29,6 @@ app.factory('alertService', function(){ app.factory('auth', ['$http','$routeParams', '$q', 'session', 'config',function($http,$routeParams, $q, session,config){ - var _openid = ''; - - if(typeof g_openid !== 'undefined'){ - _openid = g_openid; - } - - if(!_openid){ - _openid = session.get("openid"); - } - //是否已经绑定 var isBind = function(){ var defer = $q.defer(); @@ -47,12 +37,11 @@ app.factory('auth', ['$http','$routeParams', '$q', 'session', 'config',function( if(token && token.length>10){ defer.resolve(token); } else { - getOpenId().then(function(openid){ - return $http.post( - config.apiUrl+ 'users/isbind', - {openid: openid} - ) - }).then(function(response){ + var code = window.g_code || $routeParams.code || session.get("code"); + $http.post( + '/wechat/get_bind', + {} ///不用传code了,都由服务器来处理 + ).then(function(response){ if(response.data.status!=0){ defer.reject(response.data.message); }else { @@ -67,38 +56,10 @@ app.factory('auth', ['$http','$routeParams', '$q', 'session', 'config',function( return defer.promise; } - var getOpenId = function() { - var deferred = $q.defer(); - console.log(_openid); - if (typeof _openid !== 'undefined' && _openid && _openid.length > 0){ - deferred.resolve(_openid); - } else { - var code = window.g_code || $routeParams.code || session.get("code"); - $http({ - url: '/wechat/get_open_id', - data: {code: code}, - method: 'POST' - }).then(function successCallback(response) { - if(response.data.status != 0){ - deferred.reject(response.data.message); - } else{ - _openid = response.data.openid; - //session.save("openid", _openid); - deferred.resolve(_openid); - } - }, function errorCallback(response) { - deferred.reject(response); - }); - } - return deferred.promise; - }; - var openid = function(){ - return _openid; - }; var getToken = function(){ return session.get("token"); } - return {isBind: isBind, token: getToken, openid: getOpenId}; + return {get_bind: isBind, token: getToken}; }]); app.factory("session", function(){ diff --git a/public/javascripts/wechat/others/routes.js b/public/javascripts/wechat/others/routes.js index fdfd72492..7fa5e6d74 100644 --- a/public/javascripts/wechat/others/routes.js +++ b/public/javascripts/wechat/others/routes.js @@ -2,7 +2,7 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', func var rootPath = config.rootPath; var resolve = { delay: ['auth',function(auth){ - return auth.isBind(); + return auth.get_bind(); }] }; var makeRoute = function(path, ctrl){ From 4663f48496c221e30544ece1ce7bb8f577d57217 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 12:13:50 +0800 Subject: [PATCH 43/72] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index dc1e26508..458c5024a 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -14,7 +14,7 @@ class WechatsController < ActionController::Base news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', content: "课程名称: 数据结构\n班级名称: 数据结构A班\n任课老师: 尹刚\n进入班级,和小伙伴愉快的学习吧!0"} } 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#myclass'}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{root_url+'/wechat/user_activities'}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect" pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/class.jpg" article.item title: "#{n[:title]}", description: n[:content], @@ -176,7 +176,7 @@ class WechatsController < ActionController::Base 您还未绑定确实的用户,请先绑定,谢谢!" } } 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#login'}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{root_url+'/wechat/user_activities'}&response_type=code&scope=snsapi_base&state=login#wechat_redirect" pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/weixin_pic.jpg" article.item title: "#{n[:title]}", description: n[:content], From 833c5a5ede74b391af1d25cc09f2e5ce74cd19af Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 12:27:23 +0800 Subject: [PATCH 44/72] . --- app/controllers/wechats_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 458c5024a..8a596a470 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -20,11 +20,10 @@ class WechatsController < ActionController::Base description: n[:content], pic_url: pic_url, url: url - end + end and return else - request.reply.text "课程邀请码不正确" + request.reply.text "课程邀请码不正确" and return end - return end request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo end From 5b087179ebdeafcde9adc7c89aacf5f9aa4a18db Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 12:31:47 +0800 Subject: [PATCH 45/72] . --- app/controllers/wechats_controller.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 8a596a470..b664c4474 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -6,7 +6,6 @@ class WechatsController < ActionController::Base # default text responder when no other match on :text do |request, content| - if content.size == 6 #邀请码 if join_class(content) root_url = "http://wechat.trustie.net" @@ -20,12 +19,10 @@ class WechatsController < ActionController::Base description: n[:content], pic_url: pic_url, url: url - end and return + end else - request.reply.text "课程邀请码不正确" and return + request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo end - end - request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo end # When receive 'help', will trigger this responder From f791f372059b37284b1497aa58f99f4533beab35 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 12:36:46 +0800 Subject: [PATCH 46/72] . --- app/controllers/wechats_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index b664c4474..20ef9f473 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -11,10 +11,10 @@ class WechatsController < ActionController::Base root_url = "http://wechat.trustie.net" news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', - content: "课程名称: 数据结构\n班级名称: 数据结构A班\n任课老师: 尹刚\n进入班级,和小伙伴愉快的学习吧!0"} } + content: "课程名称: 数据结构\n班级名称: 数据结构A班\n任课老师: 尹刚\n进入班级,和小伙伴愉快的学习吧!"} } 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'}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect" - pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/class.jpg" + pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/wechat/class.jpg" article.item title: "#{n[:title]}", description: n[:content], pic_url: pic_url, From 8129e29d5ba35c8c89eb3906d1f087f60e1e96de Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 12:52:26 +0800 Subject: [PATCH 47/72] . --- app/controllers/wechats_controller.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 20ef9f473..b1bab6c56 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -3,18 +3,18 @@ class WechatsController < ActionController::Base wechat_responder include ApplicationHelper - + # ROOT_URL = "#{Setting.protocol}://#{Setting.host_name}/" + ROOT_URL = "http://wechat.trustie.net" # default text responder when no other match on :text do |request, content| #邀请码 if join_class(content) - root_url = "http://wechat.trustie.net" news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', content: "课程名称: 数据结构\n班级名称: 数据结构A班\n任课老师: 尹刚\n进入班级,和小伙伴愉快的学习吧!"} } 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'}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect" - pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/wechat/class.jpg" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{ROOT_URL+'/wechat/user_activities'}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect" + pic_url = "#{ROOT_URL}/images/wechat/class.jpg" article.item title: "#{n[:title]}", description: n[:content], pic_url: pic_url, @@ -164,16 +164,14 @@ class WechatsController < ActionController::Base end def sendBind(request) - root_url = "http://wechat.trustie.net" - news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "欢迎使用Trustie创新实践服务平台! 在这里您可以随时了解您的课程和项目动态,随时点赞和回复。 我们将会与微信不断结合,为您提供更有价值的服务。 您还未绑定确实的用户,请先绑定,谢谢!" } } 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'}&response_type=code&scope=snsapi_base&state=login#wechat_redirect" - pic_url = "#{Setting.protocol}://#{Setting.host_name}/images/weixin_pic.jpg" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{ROOT_URL+'/wechat/user_activities'}&response_type=code&scope=snsapi_base&state=login#wechat_redirect" + pic_url = "#{ROOT_URL}/images/weixin_pic.jpg" article.item title: "#{n[:title]}", description: n[:content], pic_url: pic_url, From 7700445c178938c23db5f0dbde9b9a8d4d6b780e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 16:42:20 +0800 Subject: [PATCH 48/72] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/courses.rb | 4 +- app/controllers/wechats_controller.rb | 17 +++++--- app/views/wechats/user_activities.html.erb | 39 ++++++++++--------- public/assets/wechat/myclass.html | 32 +++++++++++++++ .../javascripts/wechat/controllers/myclass.js | 8 ++++ public/stylesheets/weui/weixin.css | 2 + 6 files changed, 74 insertions(+), 28 deletions(-) diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index b585e7dae..de2e48c8e 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -97,15 +97,13 @@ module Mobile desc "加入课程" params do - optional :openid, type: String, desc: '微信ID' + requires :token, type: String requires :invite_code, type: String, desc: '邀请码' end post "join" do authenticate! - cs = CoursesService.new status = cs.join_course({openid: params[:openid], invite_code: params[:invite_code]}, current_user) - { status: status[:state], messsge:CoursesService::JoinCourseError.message(status[:state]) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index b1bab6c56..f6e73e088 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -8,12 +8,14 @@ class WechatsController < ActionController::Base # default text responder when no other match on :text do |request, content| #邀请码 - if join_class(content) - + uw = user_binded?(request[:FromUserName]) + if !uw + sendBind() + elsif (course = join_class(content, uw.user)) && course news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', - content: "课程名称: 数据结构\n班级名称: 数据结构A班\n任课老师: 尹刚\n进入班级,和小伙伴愉快的学习吧!"} } + content: "课程名称: #{course.name}\n班级名称: #{course.name}\n任课老师: #{course.teacher.show_name}\n进入班级,和小伙伴愉快的学习吧!"} } 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'}&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?id='+course.id}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect" pic_url = "#{ROOT_URL}/images/wechat/class.jpg" article.item title: "#{n[:title]}", description: n[:content], @@ -179,8 +181,11 @@ class WechatsController < ActionController::Base end end - def join_class(content) - true + def join_class(content, user) + cs = CoursesService.new + status = cs.join_course({invite_code: content.trim}, current_user) + logger.info status + status[:state] == 0 ? status[:course] : nil end ### controller method diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index f920aed4b..b5bd82fc5 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -25,25 +25,26 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/wechat/myclass.html b/public/assets/wechat/myclass.html index e69de29bb..25d29008a 100644 --- a/public/assets/wechat/myclass.html +++ b/public/assets/wechat/myclass.html @@ -0,0 +1,32 @@ +
+
分布式计算环境A班邀请码
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
资源名称001
+
资源名称002
+
资源名称003
+
资源名称004
+
资源名称005
+
资源名称006
+
+
+
授课老师
+
jacknudt
+
我的同学
+
jingquan教辅
+
yuanke
+
sasameimei
+
+
diff --git a/public/javascripts/wechat/controllers/myclass.js b/public/javascripts/wechat/controllers/myclass.js index f6cd77e17..cb5cf9037 100644 --- a/public/javascripts/wechat/controllers/myclass.js +++ b/public/javascripts/wechat/controllers/myclass.js @@ -1,3 +1,11 @@ app.controller('MyClassController', ['$scope', function($scope){ + var vm = $scope; + + vm.currentTab = 1; + vm.tab = function(index){ + vm.currentTab = index; + console.log(vm.currentTab); + } + }]); \ No newline at end of file diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index ab8081173..12e11b5fa 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -142,6 +142,7 @@ a.underline {text-decoration:underline;} .slice-line2 {width:1px; height:38px; margin:auto; background:#ccc;} .class-detail-tab {width:23%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;} .class-detail-tab2 {width:32%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;} +.class-detail-tab3 {width:48%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;} .class-tab-active {border-bottom:1px solid #3b94d6;} .class-search-wrap {padding:8px 12px; position:relative;} .class-search-inner {padding:0 30px; background-color:#fff;} @@ -151,6 +152,7 @@ a.underline {text-decoration:underline;} .class-detail-row {width:100%; height:38px; line-height:38px; vertical-align:middle; border-bottom:1px solid #ccc; background-color:#fff;} .class-test-tip {text-align:center; font-size:13px; color:#444; padding-top:40px;} .img-circle {border-radius:50%;} +.member-banner {height:24px; line-height:24px; text-align:center; vertical-align:middle; background-color:#dfdfdf;} /*20160614班级列表*/ .course-list-row {width:100%; height:38px; line-height:38px; vertical-align:middle; border-top:1px solid #ccc; border-bottom:1px solid #ccc; background-color:#fff;} From 0929d2ac284a8623d47dffe0d74229d7ea9bfe4e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 16:48:34 +0800 Subject: [PATCH 49/72] . --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index f6e73e088..2cb114a56 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -183,7 +183,7 @@ class WechatsController < ActionController::Base def join_class(content, user) cs = CoursesService.new - status = cs.join_course({invite_code: content.trim}, current_user) + status = cs.join_course({invite_code: content.strip}, current_user) logger.info status status[:state] == 0 ? status[:course] : nil end From 40217d5c564aba1bf9ead1bba534f579156fc337 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 16:57:01 +0800 Subject: [PATCH 50/72] . --- app/controllers/wechats_controller.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 2cb114a56..7e87d353c 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -8,6 +8,7 @@ class WechatsController < ActionController::Base # default text responder when no other match on :text do |request, content| #邀请码 + begin uw = user_binded?(request[:FromUserName]) if !uw sendBind() @@ -25,6 +26,9 @@ class WechatsController < ActionController::Base else request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo end + rescue => e + request.reply.text e + end end # When receive 'help', will trigger this responder @@ -183,9 +187,12 @@ class WechatsController < ActionController::Base def join_class(content, user) cs = CoursesService.new - status = cs.join_course({invite_code: content.strip}, current_user) + status = cs.join_course({invite_code: content.upcase.strip}, current_user) logger.info status - status[:state] == 0 ? status[:course] : nil + if status[:state] != 0 + raise CoursesService::JoinCourseError.message(status[:state]) + end + status[:course] end ### controller method From fc5895e74f314622a4564ebbde5994b05b8b9ca2 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 17:02:33 +0800 Subject: [PATCH 51/72] . --- app/services/courses_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 93529f57c..4d9231287 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -334,7 +334,7 @@ class CoursesService if current_user.member_of_course?(course) #如果已经是成员 member = course.members.where("user_id=#{current_user.id} and course_id=#{course.id}")[0] roleName = member.roles[0].name if member - if params[:course_password] == course.password + if params[:course_password] == course.password || params[:invite_code].present? #如果加入角色为学生 并且当前是学生 if params[:role] == "10" && roleName == "Student" @state = 3 @@ -367,7 +367,7 @@ class CoursesService @state = 1 end else - if params[:course_password] == course.password + if params[:course_password] == course.password || params[:invite_code].present? if params[:role] == "10" || params[:role] == nil members = [] members << Member.new(:role_ids => [10], :user_id => current_user.id) From 9b42b4e7f739a79459f58a44bef82787b8f2cf88 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 17:04:01 +0800 Subject: [PATCH 52/72] . --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 7e87d353c..94b02d082 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -16,7 +16,7 @@ class WechatsController < ActionController::Base news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', content: "课程名称: #{course.name}\n班级名称: #{course.name}\n任课老师: #{course.teacher.show_name}\n进入班级,和小伙伴愉快的学习吧!"} } 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}&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?id='+course.id.to_s}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect" pic_url = "#{ROOT_URL}/images/wechat/class.jpg" article.item title: "#{n[:title]}", description: n[:content], From 1470cafe57ad6a02f7bcb58ad3f3607a4b5fd465 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 17:09:49 +0800 Subject: [PATCH 53/72] . --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 94b02d082..30e2be847 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -187,7 +187,7 @@ class WechatsController < ActionController::Base def join_class(content, user) cs = CoursesService.new - status = cs.join_course({invite_code: content.upcase.strip}, current_user) + status = cs.join_course({invite_code: content.upcase.strip}, user) logger.info status if status[:state] != 0 raise CoursesService::JoinCourseError.message(status[:state]) From d466b09f3f3cdbfab9d27b1865cb652f05a69000 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Jun 2016 17:20:34 +0800 Subject: [PATCH 54/72] . --- app/controllers/wechats_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 30e2be847..d6ab11f92 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -11,11 +11,11 @@ class WechatsController < ActionController::Base begin uw = user_binded?(request[:FromUserName]) if !uw - sendBind() + return sendBind() elsif (course = join_class(content, uw.user)) && course news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', content: "课程名称: #{course.name}\n班级名称: #{course.name}\n任课老师: #{course.teacher.show_name}\n进入班级,和小伙伴愉快的学习吧!"} } - 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" pic_url = "#{ROOT_URL}/images/wechat/class.jpg" article.item title: "#{n[:title]}", @@ -24,10 +24,10 @@ class WechatsController < ActionController::Base url: url end else - request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo + return request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo end rescue => e - request.reply.text e + return request.reply.text e end end From 126bf9c195a2342065c112070cf6be7385a192fd Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 23 Jun 2016 14:47:22 +0800 Subject: [PATCH 55/72] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=95=99=E8=A8=80?= =?UTF-8?q?=E3=80=81=E8=AF=BE=E7=A8=8B=E7=95=99=E8=A8=80=E7=9A=84=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 17 +++- app/controllers/words_controller.rb | 74 +++++++++------- app/helpers/application_helper.rb | 20 +++++ app/views/users/_all_replies.html.erb | 2 +- .../users/_comment_reply_detail.html.erb | 17 +--- .../users/_course_journalsformessage.html.erb | 12 ++- app/views/users/_homework_replies.html.erb | 11 +-- .../users/_journal_comment_reply.html.erb | 8 ++ app/views/users/_journal_replies.html.erb | 85 +++++++++++++++++++ .../users/_journal_reply_banner.html.erb | 18 ++++ app/views/users/_reply_to.html.erb | 41 ++++++--- app/views/users/_user_activities.html.erb | 2 +- .../users/_user_journalsformessage.html.erb | 14 +-- app/views/users/_user_jours_list.html.erb | 2 +- app/views/users/all_journals.js.erb | 4 +- app/views/users/show_all_replies.js.erb | 6 +- app/views/words/create_reply.js.erb | 6 +- app/views/words/destroy.js.erb | 10 ++- public/javascripts/application.js | 5 +- 19 files changed, 267 insertions(+), 87 deletions(-) create mode 100644 app/views/users/_journal_comment_reply.html.erb create mode 100644 app/views/users/_journal_replies.html.erb create mode 100644 app/views/users/_journal_reply_banner.html.erb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 29e6a4980..c1f5863b8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -87,7 +87,10 @@ class UsersController < ApplicationController #展开所有回复 def show_all_replies - @comment = JournalsForMessage.find params[:comment].to_i + case params[:type] + when 'JournalsForMessage' + @comment = JournalsForMessage.find params[:comment].to_i + end end #二级回复 @@ -95,6 +98,7 @@ class UsersController < ApplicationController case params[:type] when 'HomeworkCommon' @reply = JournalsForMessage.find params[:reply_id] + @type = 'HomeworkCommon' if params[:user_activity_id] @user_activity_id = params[:user_activity_id] else @@ -102,6 +106,11 @@ class UsersController < ApplicationController end @is_in_course = params[:is_in_course].to_i @course_activity = params[:course_activity].to_i + when 'JournalsForMessage' + @reply = JournalsForMessage.find params[:reply_id] + @user_activity_id = params[:user_activity_id] + @activity_id = params[:activity_id] + @type = 'JournalsForMessage' end respond_to do |format| format.js @@ -3261,7 +3270,11 @@ class UsersController < ApplicationController @journals = obj.comments.reorder("created_on desc") when 'JournalsForMessage' obj = JournalsForMessage.where('id = ?', params[:id].to_i).first - @journals = obj.children.reorder("created_on desc") + journals = [] + @journals = get_all_children(journals, obj) + @type = 'JournalsForMessage' + @user_activity_id = params[:div_id].to_i if params[:div_id] + @allow_delete = params[:allow_delete] when 'Issue' obj = Issue.where('id = ?', params[:id].to_i).first @journals = obj.journals.reorder("created_on desc") diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 22b7f1f52..668269a26 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -54,15 +54,16 @@ class WordsController < ApplicationController :reply_id => reply_user_id, :notes => content, :is_readed => false} - @jfm = add_reply_adapter options + @activity = params[:activity_id].nil? ? JournalsForMessage.find(parent_id) : JournalsForMessage.find(params[:activity_id].to_i) + @jfm = add_reply_adapter(@activity, options) @save_succ = true if @jfm.errors.empty? if @save_succ - update_course_activity('JournalsForMessage',parent_id) - update_user_activity('JournalsForMessage',parent_id) - update_forge_activity('JournalsForMessage',parent_id) - update_org_activity('JournalsForMessage',parent_id) - update_principal_activity('JournalsForMessage',parent_id) - (JournalsForMessage.find parent_id).update_attribute(:updated_on,Time.now) + update_course_activity('JournalsForMessage',@activity.id) + update_user_activity('JournalsForMessage',@activity.id) + update_forge_activity('JournalsForMessage',@activity.id) + update_org_activity('JournalsForMessage',@activity.id) + update_principal_activity('JournalsForMessage',@activity.id) + @activity.update_attribute(:updated_on,Time.now) end respond_to do |format| # format.html { @@ -76,8 +77,6 @@ class WordsController < ApplicationController format.js { #@reply_type = params[:reply_type] @user_activity_id = params[:user_activity_id] - @activity = JournalsForMessage.find(parent_id) - @is_activity = params[:is_activity] if params[:is_activity] } end @@ -92,13 +91,14 @@ class WordsController < ApplicationController elsif @journal_destroyed.jour_type == "Course" @course = Course.find @journal_destroyed.jour_id @jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count + @user_activity_id = params[:user_activity_id] if params[:user_activity_id] + @activity = JournalsForMessage.where("id = #{params[:activity_id].to_i}").first if params[:activity_id] elsif @journal_destroyed.jour_type == "Principal" @user = User.find(@journal_destroyed.jour_id) @jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count @is_user = true @user_activity_id = params[:user_activity_id] if params[:user_activity_id] - @is_activity = params[:is_activity].to_i if params[:is_activity] - @activity = @journal_destroyed.parent if @journal_destroyed.parent + @activity = JournalsForMessage.where("id = #{params[:activity_id].to_i}").first if params[:activity_id] unless @activity redirect_to feedback_path(@user) return @@ -374,28 +374,44 @@ class WordsController < ApplicationController obj end - def add_reply_adapter options + def add_reply_adapter obj, options #modify by nwb #添加对课程留言的支持 #留言回复应该不关系其所属的Class,而关心的是其所属的父留言 - obj = obj_distinguish_url_origin || User.find_by_id(2) - if obj.kind_of? User - obj.add_jour(nil, nil, nil, options) - elsif obj.kind_of? Project - Project.add_new_jour(nil, nil, obj.id, options) - elsif obj.kind_of? Course - Course.add_new_jour(nil, nil, obj.id, options) - elsif obj.kind_of? Bid - obj.add_jour(nil, nil, nil, options) - elsif obj.kind_of? Contest - obj.add_jour(nil, nil, obj.id, options) #new added - elsif obj.kind_of? Softapplication - obj.add_jour(nil, nil, obj.id, options) #new added - elsif obj.kind_of? HomeworkAttach - obj.add_jour(nil, nil, obj.id, options) #new added - else - raise "create reply obj unknow type.#{obj.class}" + case obj.jour_type + when 'Principal' + obj.jour.add_jour(nil, nil, nil, options) + when 'Project' + Project.add_new_jour(nil, nil, obj.jour_id, options) + when 'Course' + Course.add_new_jour(nil, nil, obj.jour_id, options) + when 'Bid' + obj.jour.add_jour(nil, nil, nil, options) + when 'Contest' + obj.jour.add_jour(nil, nil, obj.jour_id, options) + when 'Softapplication' + obj.jour.add_jour(nil, nil, obj.jour_id, options) + when 'HomeworkAttach' + obj.jour.add_jour(nil, nil, obj.jour_id, options) end + # obj = obj_distinguish_url_origin || User.find_by_id(2) + # if obj.kind_of? User + # obj.add_jour(nil, nil, nil, options) + # elsif obj.kind_of? Project + # Project.add_new_jour(nil, nil, obj.id, options) + # elsif obj.kind_of? Course + # Course.add_new_jour(nil, nil, obj.id, options) + # elsif obj.kind_of? Bid + # obj.add_jour(nil, nil, nil, options) + # elsif obj.kind_of? Contest + # obj.add_jour(nil, nil, obj.id, options) #new added + # elsif obj.kind_of? Softapplication + # obj.add_jour(nil, nil, obj.id, options) #new added + # elsif obj.kind_of? HomeworkAttach + # obj.add_jour(nil, nil, obj.id, options) #new added + # else + # raise "create reply obj unknow type.#{obj.class}" + # end end #######end of message end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 46fdb02f3..2552a6e84 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3127,6 +3127,26 @@ def get_reply_parents parents_rely, comment parents_rely end +#获取回复的所有父节点(不包括根节点) +def get_reply_parents_no_root parents_rely, comment + if !comment.parent.nil? && !comment.parent.parent.nil? + parents_rely << comment.parent + get_reply_parents_no_root parents_rely, comment.parent + end + parents_rely +end + +#获取留言的所有子节点 +def get_all_children result, jour + if jour.kind_of? JournalsForMessage + jour.children.each do |jour_child| + result << jour_child + get_all_children result, jour_child + end + end + result.sort! { |a,b| b.created_on <=> a.created_on } +end + #将有置顶属性的提到数组前面 def sort_by_sticky topics tmpTopics = [] diff --git a/app/views/users/_all_replies.html.erb b/app/views/users/_all_replies.html.erb index 20a3289ff..45404ed84 100644 --- a/app/views/users/_all_replies.html.erb +++ b/app/views/users/_all_replies.html.erb @@ -13,7 +13,7 @@
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %> - <%= format_activity_day(comment.created_time) %> <%= format_time(comment.created_time, false) %> + <%= time_from_now(comment.created_on) %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> diff --git a/app/views/users/_comment_reply_detail.html.erb b/app/views/users/_comment_reply_detail.html.erb index caac3ee62..4ced798d0 100644 --- a/app/views/users/_comment_reply_detail.html.erb +++ b/app/views/users/_comment_reply_detail.html.erb @@ -1,20 +1,9 @@ -
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
-<% if comment.try(:user).try(:realname) == ' ' %> - <%= link_to comment.try(:user), user_path(comment.user_id), :class => "content-username" %> -<% else %> - <%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "content-username" %> -<% end %> -<%= time_from_now(comment.created_on) %> -
<%= comment.notes.html_safe %>
+ <%= link_to comment.user.show_name, user_path(comment.user_id), :class => "content-username" %> + <%= time_from_now(comment.created_on) %> +
<%= comment.notes.html_safe %>
\ No newline at end of file diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index 85e0e9335..83519b1b1 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -38,14 +38,18 @@
- <% count = fetch_user_leaveWord_reply(activity).count %> + <% all_comments = []%> + <% count=get_all_children(all_comments, activity).count %> + <% allow_delete = (activity.user == User.current || User.current.admin? || User.current.allowed_to?(:as_teacher,activity.course)) %> + <%# count = fetch_user_leaveWord_reply(activity).count %>
- <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %> + <%= render :partial => 'users/journal_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :allow_delete => allow_delete} %> - <% comments = activity.children.reorder("created_on desc").limit(3) %> + <% all_comments = []%> + <% comments = get_all_children(all_comments, activity)[0..2] %> <% if count > 0 %>
- <%= render :partial => 'users/all_replies', :locals => {:comments => comments}%> + <%= render :partial => 'users/journal_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'JournalsForMessage', :allow_delete => allow_delete, :activity_id =>activity.id}%>
<% end %> diff --git a/app/views/users/_homework_replies.html.erb b/app/views/users/_homework_replies.html.erb index 7f4dc379b..285d464b1 100644 --- a/app/views/users/_homework_replies.html.erb +++ b/app/views/users/_homework_replies.html.erb @@ -12,11 +12,7 @@
- <% if comment.try(:user).try(:realname) == ' ' %> - <%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %> - <% else %> - <%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %> - <% end %> + <%= link_to comment.user.show_name, user_path(comment.user_id), :class => "newsBlue mr10 f14" %> <%= time_from_now(comment.created_on) %>
<% unless comment.m_parent_id.nil? %> @@ -37,7 +33,7 @@
- <%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment),:remote=>true %> + <%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
@@ -45,7 +41,8 @@ <% end %>
- <%= comment.notes.html_safe %>
+ <%= comment.notes.html_safe %> +
diff --git a/app/views/users/_journal_comment_reply.html.erb b/app/views/users/_journal_comment_reply.html.erb new file mode 100644 index 000000000..9906abeb5 --- /dev/null +++ b/app/views/users/_journal_comment_reply.html.erb @@ -0,0 +1,8 @@ +
+ <% if !comment.parent.nil? && !comment.parent.parent.nil? %> +
+ <%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent} %> +
+ <% end %> + <%=render :partial => 'users/comment_reply_detail', :locals => {:comment => comment} %> +
\ No newline at end of file diff --git a/app/views/users/_journal_replies.html.erb b/app/views/users/_journal_replies.html.erb new file mode 100644 index 000000000..7fc708ebb --- /dev/null +++ b/app/views/users/_journal_replies.html.erb @@ -0,0 +1,85 @@ +
    + <% comments.each do |comment| %> + +
  • +
    + <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %> +
    +
    +
    + <%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %> + <%= time_from_now(comment.created_on) %> +
    + <% if !comment.parent.nil? && !comment.parent.parent.nil? %> + <% parents_rely = [] %> + <% parents_rely = get_reply_parents_no_root parents_rely, comment %> + <% length = parents_rely.length %> +
    + <% if length <= 3 %> + <%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent} %> + <% else %> +
    +
    +
    + <%=render :partial => 'users/journal_comment_reply', :locals => {:comment => parents_rely[length - 1]} %> +
    + <%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %> +
    +
    + + + <%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %> +
    + <%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %> +
    + <% end %> +
    + <% end %> + <% if !comment.content_detail.blank? || comment.class == Journal %> +
    + <% if comment.class == Journal %> + <% if comment.details.any? %> + <% details_to_strings(comment.details).each do |string| %> +

    <%= string %>

    + <% end %> + <% end %> +

    <%= comment.notes.html_safe %>

    + <% else %> + <%= comment.content_detail.html_safe %> + <% end %> +
    +
    +
    + + + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> + + + <%= link_to( + l(:button_reply), + {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, + :remote => true, + :method => 'get', + :title => l(:button_reply)) %> + + + <% if allow_delete %> + <%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id}, + :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %> + <% end %> + +
    +
    +
    +

    + <% end %> +
    +
    +
  • + <% end %> +
\ No newline at end of file diff --git a/app/views/users/_journal_reply_banner.html.erb b/app/views/users/_journal_reply_banner.html.erb new file mode 100644 index 000000000..31934328f --- /dev/null +++ b/app/views/users/_journal_reply_banner.html.erb @@ -0,0 +1,18 @@ +
+
+ 回复 + ︿ + <%= count>0 ? "(#{count})" : "" %> + + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> + +
+
<%#= format_date(activity.updated_on) %>
+ <%if count>3 %> + + <% end %> +
\ No newline at end of file diff --git a/app/views/users/_reply_to.html.erb b/app/views/users/_reply_to.html.erb index 23090265c..fd56eb712 100644 --- a/app/views/users/_reply_to.html.erb +++ b/app/views/users/_reply_to.html.erb @@ -1,19 +1,36 @@
-
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
+
+ <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %> +
<% if User.current.logged? %>
- <%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %> - > - > - > - -
- - -
-

- <% end%> + <% if @type == 'HomeworkCommon' %> + <%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %> + > + > + > + +
+ + +
+

+ <% end%> + <% elsif @type == 'JournalsForMessage' %> + <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => reply.id}, :method => "post", :remote => true) do |f|%> + <%= hidden_field_tag 'reference_id', params[:reference_id], :value => reply.id %> + <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => reply.user.id %> + <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => reply.id %> + <%= hidden_field_tag 'show_name',params[:show_name],:value =>true %> + <%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>@user_activity_id %> + <%= hidden_field_tag 'activity_id',params[:activity_id],:value =>@activity_id %> +
+ + +
+ <% end%> + <% end %>
<% else %> <%= render :partial => "users/show_unlogged" %> diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 3b327c080..5d06a7001 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -86,7 +86,7 @@ <% case user_activity.act_type.to_s %> <% when 'JournalsForMessage' %> <% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %> - <%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_activity=>1} %> + <%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> <% end %> <% end %> <% when 'Blog'%> diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index dd36d1328..4fb79ee2d 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -50,7 +50,7 @@
  • <%= link_to(l(:label_bid_respond_delete), - {:controller => 'words', :action => 'destroy', :object_id => activity, :user_id => activity.user,:user_activity_id => user_activity_id,:is_activity=>is_activity}, + {:controller => 'words', :action => 'destroy', :object_id => activity, :user_id => activity.user,:user_activity_id => user_activity_id, :activity_id => activity.id}, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "postOptionLink", :title => l(:button_delete)) %>
  • @@ -62,14 +62,17 @@
- <% count=fetch_user_leaveWord_reply(activity).count %> + <% all_comments = []%> + <% count=get_all_children(all_comments, activity).count %> + <% allow_delete = (activity.user == User.current || User.current.admin?) %>
- <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %> + <%= render :partial => 'users/journal_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :allow_delete => allow_delete} %> - <% comments = activity.children.reorder("created_on desc").limit(3) %> + <% all_comments = []%> + <% comments = get_all_children(all_comments, activity)[0..2] %> <% if count > 0 %>
- <%= render :partial => 'users/all_replies', :locals => {:comments => comments}%> + <%= render :partial => 'users/journal_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'JournalsForMessage', :allow_delete => allow_delete, :activity_id =>activity.id}%>
<% end %> @@ -84,7 +87,6 @@ <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %> <%= hidden_field_tag 'show_name',params[:show_name],:value =>true %> <%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %> - <%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %>
diff --git a/app/views/users/_user_jours_list.html.erb b/app/views/users/_user_jours_list.html.erb index 6211aac7d..517d66038 100644 --- a/app/views/users/_user_jours_list.html.erb +++ b/app/views/users/_user_jours_list.html.erb @@ -11,7 +11,7 @@ sd_create_editor_from_data(<%= jour.id%>, null, "100%", "<%=jour.class.to_s%>"); }); - <%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id,:is_activity=>0} %> + <%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id} %> <%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %> <% end %> <%end%> diff --git a/app/views/users/all_journals.js.erb b/app/views/users/all_journals.js.erb index c18c6aae4..d4c42368d 100644 --- a/app/views/users/all_journals.js.erb +++ b/app/views/users/all_journals.js.erb @@ -1,5 +1,7 @@ <% if params[:type] == 'HomeworkCommon' %> $('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/homework_replies', :locals => {:comments => @journals, :is_in_course =>@is_in_course,:course_activity=>@course_activity, :is_teacher => @is_teacher, :user_activity_id => @user_activity_id}) %>'); +<% elsif params[:type] == 'JournalsForMessage' %> +$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/journal_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :allow_delete => @allow_delete, :activity_id =>params[:id].to_i}) %>'); <% else %> -$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals}) %>'); +$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :allow_delete => @allow_delete, :activity_id =>params[:id].to_i}) %>'); <% end %> diff --git a/app/views/users/show_all_replies.js.erb b/app/views/users/show_all_replies.js.erb index 99ab73b46..5f5ea6c3f 100644 --- a/app/views/users/show_all_replies.js.erb +++ b/app/views/users/show_all_replies.js.erb @@ -1,3 +1,7 @@ <% unless @comment.parent.nil? %> -$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/comment_reply', :locals => {:comment => @comment.parent})%>"); + <% if params[:type] == 'JournalsForMessage' && (@comment.jour_type == 'Principal' || @comment.jour_type == 'Course') %> + $('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/journal_comment_reply', :locals => {:comment => @comment.parent})%>"); + <% else %> + $('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/comment_reply', :locals => {:comment => @comment.parent})%>"); + <% end %> <% end %> \ No newline at end of file diff --git a/app/views/words/create_reply.js.erb b/app/views/words/create_reply.js.erb index ded05887f..9f3b0164e 100644 --- a/app/views/words/create_reply.js.erb +++ b/app/views/words/create_reply.js.erb @@ -1,8 +1,8 @@ <% if @save_succ %> <% if @user_activity_id %> - <% if @is_activity %> - $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>"); - <% else %> + <% if @activity.jour_type == 'Principal' %> + $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>"); + <% elsif @activity.jour_type == 'Course' %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>"); <% end %> //init_activity_KindEditor_data('<%#= @user_activity_id%>', "", "87%", "UserActivity"); diff --git a/app/views/words/destroy.js.erb b/app/views/words/destroy.js.erb index a2d606e76..c527474cd 100644 --- a/app/views/words/destroy.js.erb +++ b/app/views/words/destroy.js.erb @@ -3,8 +3,7 @@ <% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication','HomeworkCommon'].include? @journal_destroyed.jour_type)%> <% if @is_user%> <% if @activity %> - $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>"); - //init_activity_KindEditor_data('<%#= @user_activity_id%>', "", "87%", "UserActivity"); + $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>"); sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity"); <% else %> $("#user_activity_<%= @user_activity_id%>").hide(); @@ -20,7 +19,12 @@ <% if @bid && @jours_count %> $('#jours_count').html("<%= @jours_count %>"); <% elsif @course && @jours_count%> - $('#course_jour_count').html("(<%= @jours_count %>)"); + <% if @user_activity_id %> + $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>"); + sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity"); + <% else %> + $('#course_jour_count').html("(<%= @jours_count %>)"); + <% end %> <% elsif @user && @jours_count%> $('#jour_count').html("<%= @jours_count %>"); <% elsif @homework%> diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 22483c1d5..2b674b60d 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1289,7 +1289,7 @@ function clear_data(k,mdu){ } } -function expand_reply(container, btnid, id, type, div_id) { +function expand_reply(container, btnid, id, type, div_id, allow_delete) { var target = $(container); var btn = $(btnid); if (btn.data('init') == '0') { @@ -1299,7 +1299,8 @@ function expand_reply(container, btnid, id, type, div_id) { { type: type, id: id, - div_id: div_id + div_id: div_id, + allow_delete: allow_delete }, function(data) { From 563fb3b4593e123450a1010fd7b65bf1602bf0db Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 23 Jun 2016 14:58:40 +0800 Subject: [PATCH 56/72] =?UTF-8?q?=E6=8E=A7=E5=88=B6table=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E4=B8=8D=E9=9D=A0=E5=9C=A8=E4=B8=80=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/resizeable_table.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/resizeable_table.js b/public/javascripts/resizeable_table.js index 1f84d4471..0b46f9a35 100644 --- a/public/javascripts/resizeable_table.js +++ b/public/javascripts/resizeable_table.js @@ -38,7 +38,7 @@ if (mousedown == true){ var width = (tdWidth + (evt.screenX - screenXStart)) - p1 + "px";//计算后的新的宽度 var width2 = (tdWidth2 - (evt.screenX - screenXStart)) - p2 + "px"; - if (parseInt(width)<0 || parseInt(width2)<0 || tdWidth > totalWidth || tdWidth2 > totalWidth){ + if (parseInt(width)<5 || parseInt(width2)<5 || tdWidth > totalWidth || tdWidth2 > totalWidth){ tartgetTd = null; resizeable = false; mousedown = false; From 8940c5f4ca8ed88444d7f2ac563c8f5b4fc18758 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 23 Jun 2016 15:05:16 +0800 Subject: [PATCH 57/72] =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E7=9A=84=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8=E4=B8=8D=E5=BA=94?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E2=80=9C=E5=AF=BC=E5=87=BA=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E3=80=81=E5=AF=BC=E5=87=BA=E7=BC=BA=E8=AF=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E2=80=9D=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/index.html.erb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 5d9df57c1..6bdc3753e 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -118,12 +118,14 @@ remote: true, class: "hworkExport resourcesGrey", :id => "download_homework_attachments" %> <% end%> -
  • - <%= link_to("导出缺评情况", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%> -
  • -
  • - <%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%> -
  • + <% if @homework.anonymous_comment == 0 %> +
  • + <%= link_to("导出缺评情况", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%> +
  • +
  • + <%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%> +
  • + <% end %>
  • 评分设置
  • From e45759341673ea2ef21bab10e3e26d5661e10dc2 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 23 Jun 2016 17:34:46 +0800 Subject: [PATCH 58/72] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8--?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E4=BD=9C=E4=B8=9A=E6=88=90=E7=BB=A9=EF=BC=9A?= =?UTF-8?q?excel=E4=B8=AD=E5=A2=9E=E5=8A=A0=E7=BC=BA=E8=AF=84=E6=89=A3?= =?UTF-8?q?=E5=88=86=E3=80=81=E8=BF=9F=E4=BA=A4=E6=89=A3=E5=88=86=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 46 +++++++++++++++++----- config/locales/zh.yml | 2 + 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index d478b4d63..a9a0f6081 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -1210,8 +1210,13 @@ class StudentWorkController < ApplicationController blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 sheet1.row(0).default_format = blue if @homework.homework_type == 1 #匿评作业 - sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), - l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)]) + if @homework.anonymous_comment ==0 + sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + else + sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + end count_row = 1 items.each do |homework| sheet1[count_row,0]=homework.user.id @@ -1223,14 +1228,27 @@ class StudentWorkController < ApplicationController sheet1[count_row,6] = strip_html homework.description sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2) sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2) - sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2) - sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) - sheet1[count_row,11] = format_time(homework.created_at) + if @homework.anonymous_comment ==0 + sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2) + sheet1[count_row,10] = homework.absence_penalty + sheet1[count_row,11] = homework.late_penalty + sheet1[count_row,12] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) + sheet1[count_row,13] = format_time(homework.created_at) + else + sheet1[count_row,9] = homework.late_penalty + sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) + sheet1[count_row,11] = format_time(homework.created_at) + end count_row += 1 end elsif @homework.homework_type == 2 #编程作业 - sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), - l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)]) + if @homework.anonymous_comment ==0 + sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + else + sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + end count_row = 1 items.each do |homework| sheet1[count_row,0]=homework.user.id @@ -1243,9 +1261,17 @@ class StudentWorkController < ApplicationController sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2) sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2) sheet1[count_row,9] = homework.system_score.nil? ? l(:label_without_score) : homework.system_score.round(2) - sheet1[count_row,10] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2) - sheet1[count_row,11] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) - sheet1[count_row,12] = format_time(homework.created_at) + if @homework.anonymous_comment ==0 + sheet1[count_row,10] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2) + sheet1[count_row,11] = homework.absence_penalty + sheet1[count_row,12] = homework.late_penalty + sheet1[count_row,13] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) + sheet1[count_row,14] = format_time(homework.created_at) + else + sheet1[count_row,10] = homework.late_penalty + sheet1[count_row,11] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) + sheet1[count_row,12] = format_time(homework.created_at) + end count_row += 1 end end diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 94be8af6d..8e3e29b16 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1870,6 +1870,8 @@ zh: excel_ta_score: 教辅评分 excel_n_score: 匿名评分 excel_s_score: 系统评分 + excel_a_penalty: 缺评扣分 + excel_l_penalty: 迟交扣分 excel_f_score: 成绩 excel_commit_time: 提交时间 excel_homework_score: 作业积分 From 52d4d36097da17d2ea3decd65921b4861f4238ba Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 24 Jun 2016 09:01:12 +0800 Subject: [PATCH 59/72] =?UTF-8?q?=E9=82=80=E8=AF=B7=E7=A0=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + Gemfile | 2 +- app/api/mobile/apis/courses.rb | 1 + app/api/mobile/entities/course.rb | 1 + app/controllers/wechats_controller.rb | 7 ++++ app/views/wechats/user_activities.html.erb | 4 ++ public/assets/wechat/invite_code.html | 15 +++++++ public/assets/wechat/myclass.html | 17 +++++--- public/javascripts/wechat/app.js | 2 +- .../wechat/controllers/invite_code.js | 18 +++++++++ .../javascripts/wechat/controllers/myclass.js | 40 ++++++++++++++++++- public/javascripts/wechat/others/routes.js | 1 + 12 files changed, 99 insertions(+), 10 deletions(-) create mode 100644 public/assets/wechat/invite_code.html create mode 100644 public/javascripts/wechat/controllers/invite_code.js diff --git a/.gitignore b/.gitignore index ba7890841..dbc349c80 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ vendor/cache /config/initializers/gitlab_config.rb 1234567 public/javascripts/wechat/node_modules/ +.ruby-version diff --git a/Gemfile b/Gemfile index d392c6561..a8131fb3f 100644 --- a/Gemfile +++ b/Gemfile @@ -81,7 +81,7 @@ group :assets do gem 'coffee-rails', '~> 3.2.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes - gem 'therubyracer', :platforms => :ruby + # gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' end diff --git a/app/api/mobile/apis/courses.rb b/app/api/mobile/apis/courses.rb index de2e48c8e..58d4a4f8c 100644 --- a/app/api/mobile/apis/courses.rb +++ b/app/api/mobile/apis/courses.rb @@ -196,6 +196,7 @@ module Mobile end route_param :id do get do + authenticate! cs = CoursesService.new course = cs.show_course(params,(current_user.nil? ? User.find(2):current_user)) #course = Course.find(params[:id]) diff --git a/app/api/mobile/entities/course.rb b/app/api/mobile/entities/course.rb index 50812b349..fc5c95ef5 100644 --- a/app/api/mobile/entities/course.rb +++ b/app/api/mobile/entities/course.rb @@ -45,6 +45,7 @@ module Mobile course_expose :tea_id course_expose :term course_expose :time + course_expose :invite_code course_expose :updated_at course_expose :course_student_num expose :teacher, using: Mobile::Entities::User do |c, opt| diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index d6ab11f92..75a8bac92 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -260,7 +260,14 @@ class WechatsController < ActionController::Base unless open_id render 'wechats/open_wechat', layout: nil and return end + if params[:state] == 'myclass' + @course_id = params[:id]; + end + session[:wechat_openid] = open_id + if params[:code] + redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return + end render 'wechats/user_activities', layout: nil end diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index b5bd82fc5..2b4ebc703 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -16,6 +16,9 @@ window.g_debug = false; //调试标志,如果在本地请置为true window.apiUrl = '/api/v1/'; window.g_redirect_path = '<%= @path %>'; + <% if @course_id %> + window.g_courseid = <%= @course_id %>; + <% end %> @@ -34,6 +37,7 @@ + diff --git a/public/assets/wechat/invite_code.html b/public/assets/wechat/invite_code.html new file mode 100644 index 000000000..116dad8da --- /dev/null +++ b/public/assets/wechat/invite_code.html @@ -0,0 +1,15 @@ +
    +
    +
    + +
    +
    邀请码:{{course.invite_code}}
    +
    +
    + +
    \ No newline at end of file diff --git a/public/assets/wechat/myclass.html b/public/assets/wechat/myclass.html index 25d29008a..f12364130 100644 --- a/public/assets/wechat/myclass.html +++ b/public/assets/wechat/myclass.html @@ -1,5 +1,6 @@
    -
    分布式计算环境A班邀请码
    +
    +
    {{course.name}}邀请码
    @@ -10,7 +11,7 @@
    - +
    @@ -23,10 +24,14 @@
    授课老师
    -
    jacknudt
    + +
    + {{teacher.realname}}教辅 +
    我的同学
    -
    jingquan教辅
    -
    yuanke
    -
    sasameimei
    +
    + {{student.realname}} +
    +
    diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index ea2bdf318..00d6bf3bc 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -9,7 +9,7 @@ app.constant('config', { app.run(['$rootScope', 'auth', '$location', '$routeParams', function($rootScope, auth, $location, $routeParams){ - if(g_redirect_path && g_redirect_path.length>0){ + if(g_redirect_path && g_redirect_path.length>1){ $location.path(g_redirect_path); g_redirect_path = null; } diff --git a/public/javascripts/wechat/controllers/invite_code.js b/public/javascripts/wechat/controllers/invite_code.js new file mode 100644 index 000000000..b21653b1e --- /dev/null +++ b/public/javascripts/wechat/controllers/invite_code.js @@ -0,0 +1,18 @@ +/** + * Created by guange on 16/6/22. + */ + + +app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config','auth', function($scope, $http, $routeParams, config, auth){ + var vm = $scope; + + vm.course = {}; + var courseid = $routeParams.id; + $http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then( + function(response){ + console.log(response.data); + vm.course = response.data.data; + } + ); + +}]); diff --git a/public/javascripts/wechat/controllers/myclass.js b/public/javascripts/wechat/controllers/myclass.js index cb5cf9037..bf864ab88 100644 --- a/public/javascripts/wechat/controllers/myclass.js +++ b/public/javascripts/wechat/controllers/myclass.js @@ -1,11 +1,47 @@ -app.controller('MyClassController', ['$scope', function($scope){ +app.controller('MyClassController', ['$scope', 'config','$http', 'auth','$location','$routeParams', function($scope, config, $http, auth, $location, $routeParams){ var vm = $scope; + var courseid = $routeParams.id; vm.currentTab = 1; vm.tab = function(index){ vm.currentTab = index; - console.log(vm.currentTab); + vm.searchText = ''; + console.log(vm.currentTab); + if(index == 2){ + if(vm.students.length<=0){ + $http.get(config.apiUrl + 'courses/students?token='+auth.token()+'&course_id='+courseid).then( + function(response) { + console.log(response.data); + vm.students = response.data.data; + } + ) + } + } + } + vm.course = {}; + vm.students = []; + vm.teachers = []; + + vm.invite = function(){ + $location.path("/invite_code").search({id: courseid}); + }; + + $http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then( + function(response){ + console.log(response.data); + vm.course = response.data.data; + } + ); + + + if(vm.teachers.length<=0){ + $http.get(config.apiUrl + 'courses/teachers?token='+auth.token()+'&course_id='+courseid).then( + function(response) { + console.log(response.data); + vm.teachers = response.data.data; + } + ) } }]); \ No newline at end of file diff --git a/public/javascripts/wechat/others/routes.js b/public/javascripts/wechat/others/routes.js index 7fa5e6d74..3fa7ca6df 100644 --- a/public/javascripts/wechat/others/routes.js +++ b/public/javascripts/wechat/others/routes.js @@ -32,6 +32,7 @@ app.config(['$routeProvider',"$httpProvider", "$locationProvider",'config', func .when('/blog_comment/:id', makeRoute('blog_detail.html', 'BlogController')) .when('/add_class', makeRoute('add_class.html', 'AddClassController')) .when('/myclass', makeRoute('myclass.html', 'MyClassController')) + .when('/invite_code', makeRoute('invite_code.html', 'InviteCodeController')) .otherwise({ redirectTo: '/activites' }); From bd3277681c291593da53f073f47db337efc039a2 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 24 Jun 2016 10:50:40 +0800 Subject: [PATCH 60/72] =?UTF-8?q?=E5=88=86=E7=BB=84=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=9A=84=E4=BD=9C=E4=B8=9A=E6=88=90=E7=BB=A9=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E3=80=81=E5=AD=A6=E7=94=9F=E5=88=97=E8=A1=A8=E7=9A=84=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 117 ++++++++++++++++++++- app/controllers/student_work_controller.rb | 35 +++++- app/helpers/application_helper.rb | 17 +++ config/locales/zh.yml | 4 + 4 files changed, 169 insertions(+), 4 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index e421b8c69..2e8aebce5 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1224,7 +1224,7 @@ class CoursesController < ApplicationController def member_to_xls homeworks, course, members,groups xls_report = StringIO.new book = Spreadsheet::Workbook.new - sheet1 = book.create_worksheet :name => "student" + sheet1 = book.create_worksheet :name => "总成绩" blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 #sheet1.row(0).default_format = blue #sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_class),l(:excel_f_score),l(:excel_commit_time)]) @@ -1268,6 +1268,121 @@ class CoursesController < ApplicationController count_row += 1 end + homeworks.each_with_index do |home, i| + sheet = book.create_worksheet :name => "第#{i+1}次作业" + sheet[0,0] = "课程编号" + sheet[0,1] = course.id + sheet[1,0] = "课程学期" + sheet[1,1] = course.time.to_s+"年"+course.term + sheet[2,0] = "课程名称" + sheet[2,1] = course.name + sheet[3,0] = "教师团队" + sheet[3,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、') + sheet[4,0] = "主讲教师" + sheet[4,1] = course.teacher.show_name + sheet[4,0] = "作业批次" + sheet[4,1] = "第#{i+1}次作业" + sheet[4,0] = "作业名称" + sheet[4,1] = home.name + if home.homework_type == 1 #普通作业 + if home.anonymous_comment ==0 + sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + else + sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + end + count_row = 6 + items = home.student_works.order("work_score desc") + items.each_with_index do |stu, j| + sheet[count_row,0]= j + 1 + sheet[count_row,1] = stu.user.show_name + sheet[count_row,2] = stu.user.login + sheet[count_row,3] = stu.user.user_extensions.student_id + sheet[count_row,4] = stu.name + sheet[count_row,5] = strip_html stu.description + sheet[count_row,6] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2) + sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2) + if home.anonymous_comment ==0 + sheet[count_row,8] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2) + sheet[count_row,9] = stu.absence_penalty + sheet[count_row,10] = stu.late_penalty + sheet[count_row,11] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,12] = format_time(stu.created_at) + else + sheet[count_row,8] = stu.late_penalty + sheet[count_row,9] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,10] = format_time(stu.created_at) + end + count_row += 1 + end + elsif home.homework_type == 2 #编程作业 + if home.anonymous_comment ==0 + sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + else + sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + end + count_row = 6 + items = home.student_works.order("work_score desc") + items.each_with_index do |stu, j| + sheet[count_row,0]= j + 1 + sheet[count_row,1] = stu.user.show_name + sheet[count_row,2] = stu.user.login + sheet[count_row,3] = stu.user.user_extensions.student_id + sheet[count_row,4] = stu.name + sheet[count_row,5] = stu.description + sheet[count_row,6] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2) + sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2) + sheet[count_row,8] = stu.system_score.nil? ? l(:label_without_score) : stu.system_score.round(2) + if home.anonymous_comment ==0 + sheet[count_row,9] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2) + sheet[count_row,10] = stu.absence_penalty + sheet[count_row,11] = stu.late_penalty + sheet[count_row,12] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,13] = format_time(stu.created_at) + else + sheet[count_row,9] = stu.late_penalty + sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,11] = format_time(stu.created_at) + end + count_row += 1 + end + elsif home.homework_type == 3 #分组作业 + if home.anonymous_comment ==0 + sheet.row(5).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + else + sheet.row(5).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + end + count_row = 6 + items = home.student_works.order("work_score desc") + items.each_with_index do |stu, j| + sheet[count_row,0] = j + 1 + sheet[count_row,1] = get_group_member_names stu + sheet[count_row,2] = stu.name + sheet[count_row,3] = (stu.project_id == 0 || stu.project_id.nil?) ? l(:excel_no_project) : stu.project.name + sheet[count_row,4] = strip_html stu.description + sheet[count_row,5] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2) + sheet[count_row,6] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2) + if home.anonymous_comment ==0 + sheet[count_row,7] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2) + sheet[count_row,8] = stu.absence_penalty + sheet[count_row,9] = stu.late_penalty + sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,11] = format_time(stu.created_at) + else + sheet[count_row,7] = stu.late_penalty + sheet[count_row,8] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,9] = format_time(stu.created_at) + end + count_row += 1 + end + end + end + =begin group0 = CourseGroup.new(); group0.id = 0; diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index a9a0f6081..b92dbb935 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -1209,7 +1209,7 @@ class StudentWorkController < ApplicationController sheet1 = book.create_worksheet :name => "homework" blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 sheet1.row(0).default_format = blue - if @homework.homework_type == 1 #匿评作业 + if @homework.homework_type == 1 #普通作业 if @homework.anonymous_comment ==0 sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des), l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) @@ -1220,7 +1220,7 @@ class StudentWorkController < ApplicationController count_row = 1 items.each do |homework| sheet1[count_row,0]=homework.user.id - sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s + sheet1[count_row,1] = homework.user.show_name sheet1[count_row,2] = homework.user.login sheet1[count_row,3] = homework.user.user_extensions.student_id sheet1[count_row,4] = homework.user.mail @@ -1252,7 +1252,7 @@ class StudentWorkController < ApplicationController count_row = 1 items.each do |homework| sheet1[count_row,0]=homework.user.id - sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s + sheet1[count_row,1] = homework.user.show_name sheet1[count_row,2] = homework.user.login sheet1[count_row,3] = homework.user.user_extensions.student_id sheet1[count_row,4] = homework.user.mail @@ -1274,6 +1274,35 @@ class StudentWorkController < ApplicationController end count_row += 1 end + elsif @homework.homework_type == 3 #分组作业 + if @homework.anonymous_comment ==0 + sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + else + sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des), + l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)]) + end + count_row = 1 + items.each do |homework| + sheet1[count_row,0] = get_group_member_names homework + sheet1[count_row,1] = homework.name + sheet1[count_row,2] = (homework.project_id == 0 || homework.project_id.nil?) ? l(:excel_no_project) : homework.project.name + sheet1[count_row,3] = strip_html homework.description + sheet1[count_row,4] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2) + sheet1[count_row,5] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2) + if @homework.anonymous_comment ==0 + sheet1[count_row,6] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2) + sheet1[count_row,7] = homework.absence_penalty + sheet1[count_row,8] = homework.late_penalty + sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) + sheet1[count_row,10] = format_time(homework.created_at) + else + sheet1[count_row,6] = homework.late_penalty + sheet1[count_row,7] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) + sheet1[count_row,8] = format_time(homework.created_at) + end + count_row += 1 + end end book.write xls_report xls_report.string diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2552a6e84..ee2e2d74a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3303,3 +3303,20 @@ def get_hw_index(hw,is_teacher) index = hw_ids.index(hw.id) return index end + +def get_group_member_names work + result = "" + unless work.nil? + work.student_work_projects.each do |member| + user = User.where(:id => member.user_id).first + unless user.nil? + if result != "" + result += "、#{user.show_name}" + else + result += user.show_name + end + end + end + end + result +end diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 8e3e29b16..5d9b3c2a1 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1864,8 +1864,12 @@ zh: excel_nickname: 登录名 excel_student_id: 学号 excel_mail: 电子邮箱 + excel_rank: 排名 excel_homework_name: 作品名 excel_homework_des: 作品描述 + excel_homework_project: 关联项目 + excel_no_project: 无关联项目 + excel_group_member: 组员 excel_t_score: 教师评分 excel_ta_score: 教辅评分 excel_n_score: 匿名评分 From a41d18dd0ec33d0f0e62957f85e52a7949716e66 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 24 Jun 2016 11:02:29 +0800 Subject: [PATCH 61/72] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=9A=84=E4=BD=9C=E5=93=81=E8=AF=A6=E6=83=85=E5=9C=A8=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E5=A2=9E=E5=8A=A0=E2=80=9C=E6=94=B6=E8=B5=B7=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_programing_work_show.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index 4ca5a8f2d..c4df9e715 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -4,6 +4,7 @@
  • 上交时间: <%=format_time work.created_at %> + 收起
  • <% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %> From 295939143861f35f9d6999171470e528b10e9f35 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 24 Jun 2016 11:20:48 +0800 Subject: [PATCH 62/72] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=9A=E6=B2=A1=E6=9C=89=E4=BD=9C=E4=B8=9A=E6=97=B6=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E8=A2=AB=E7=82=B9=E5=87=BB=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=80=E6=9D=A1=E8=AE=B0=E5=BD=95=EF=BC=9A?= =?UTF-8?q?=E7=9B=AE=E5=89=8D=E5=B0=9A=E6=9C=AA=E5=8F=91=E5=B8=83=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_common/index.html.erb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index 35f4658f9..167ae98f0 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -45,11 +45,15 @@
  • 作业
      - <% @homework_commons.each_with_index do |homework_common,index |%> -
    • - <%= link_to "作业#{@homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%> -
    • - <% end%> + <% if @homework_commons.empty? %> +
    • 目前尚未发布作业
    • + <% else %> + <% @homework_commons.each_with_index do |homework_common,index |%> +
    • + <%= link_to "作业#{@homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%> +
    • + <% end%> + <% end %>
  • From d34898172192365390bef7e0cbafef341d47204e Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 24 Jun 2016 13:29:36 +0800 Subject: [PATCH 63/72] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/user.rb | 7 ++++ app/helpers/courses_helper.rb | 34 ++++++++----------- app/models/course.rb | 5 +-- app/services/courses_service.rb | 7 ++-- ...20160624032138_add_index_to_invite_code.rb | 6 ++++ db/schema.rb | 5 ++- public/assets/wechat/myclass.html | 11 ++---- .../javascripts/wechat/controllers/myclass.js | 7 ++++ public/javascripts/wechat/others/filter.js | 11 +++++- public/stylesheets/weui/weixin.css | 5 +-- 10 files changed, 63 insertions(+), 35 deletions(-) create mode 100644 db/migrate/20160624032138_add_index_to_invite_code.rb diff --git a/app/api/mobile/entities/user.rb b/app/api/mobile/entities/user.rb index 8c6a839b3..2eb20f0db 100644 --- a/app/api/mobile/entities/user.rb +++ b/app/api/mobile/entities/user.rb @@ -26,6 +26,8 @@ module Mobile u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.student_id when :realname u.nil? ? "" : get_user_realname(u) + when :name + u.nil? ? "" : u.show_name end end end @@ -57,6 +59,11 @@ module Mobile user_expose :student_num # 活跃值 user_expose :active_count + + user_expose :role_name + + user_expose :name + end end diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index c10652c6f..47d343e8f 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -270,13 +270,22 @@ module CoursesHelper # ===================================================================================== # return people list + def searchPeopleByName(course, role_name) + course.members.select{|m| + m.roles.any?{|r|r.name == role_name} + } + end + def searchTeacherAndAssistant project - #searchPeopleByRoles(project, TeacherRoles) - members = [] - project.members.includes(:user).each do |m| - members << m if m && m.user && m.user.allowed_to?(:as_teacher,project) - end - members + searchPeopleByName(project, 'Manager').concat( + searchPeopleByName(project, 'Teacher') + ).concat( + searchPeopleByName(project, 'TeachingAsistant') + ) + end + + def searchStudent project + searchPeopleByName(project, 'Student') end def TeacherAndAssistantCount course @@ -293,19 +302,6 @@ module CoursesHelper members end - def searchStudent project - #searchPeopleByRoles(project, StudentRoles) - members = [] - project.members.each do |m| - if m && m.user && m.user.allowed_to?(:as_student,project) - members << m - end - end - members - end - - - def searchStudent_by_name project, name #searchPeopleByRoles(project, StudentRoles) members = [] diff --git a/app/models/course.rb b/app/models/course.rb index c9ef010e6..d0266b381 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -457,8 +457,9 @@ class Course < ActiveRecord::Base CODES = %W(2 3 4 5 6 7 8 9 A B C D E F G H J K L N M O P Q R S T U V W X Y Z) def generate_invite_code code = invite_code - if !invite_code || invite_code.size <6 - self.invite_code = CODES.sample(6).join + if !invite_code || invite_code.size <5 + self.invite_code = CODES.sample(5).join + return generate_invite_code if Course.where(invite_code: invite_code).present? save! && reload code = invite_code end diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 4d9231287..0eb699459 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -68,7 +68,6 @@ class CoursesService if current_user.nil? || !(current_user.admin? || c.is_public == 1 || (c.is_public == 0 && current_user.member_of_course?(c))) raise '403' end - @teachers= searchTeacherAndAssistant(c) #@canShowCode = isCourseTeacher(User.current.id,course) && params[:role] != '1' case params[:role] when '1' @@ -87,7 +86,11 @@ class CoursesService gender = m.user.user_extensions.gender.nil? ? 0 : m.user.user_extensions.gender work_unit = get_user_work_unit m.user location = get_user_location m.user - users << {:id => m.user.id, :img_url => img_url, :nickname => m.user.login, :gender => gender, :work_unit => work_unit, :mail => m.user.mail, :location => location, :brief_introduction => m.user.user_extensions.brief_introduction,:realname=>m.user.realname} + users << {:id => m.user.id, :img_url => img_url, :nickname => m.user.login, :gender => gender, + :work_unit => work_unit, :mail => m.user.mail, :location => location, + role_name: m.roles.first.name, + name: m.user.show_name, + :brief_introduction => m.user.user_extensions.brief_introduction,:realname=>m.user.realname} end users end diff --git a/db/migrate/20160624032138_add_index_to_invite_code.rb b/db/migrate/20160624032138_add_index_to_invite_code.rb new file mode 100644 index 000000000..420951874 --- /dev/null +++ b/db/migrate/20160624032138_add_index_to_invite_code.rb @@ -0,0 +1,6 @@ +class AddIndexToInviteCode < ActiveRecord::Migration + def change + add_column :courses, :qrcode, :string + add_index :courses, :invite_code, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 820c6a035..9db65aca0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160614072229) do +ActiveRecord::Schema.define(:version => 20160624032138) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -551,8 +551,11 @@ ActiveRecord::Schema.define(:version => 20160614072229) do t.integer "is_copy", :default => 0 t.integer "visits", :default => 0 t.string "invite_code" + t.string "qrcode" end + add_index "courses", ["invite_code"], :name => "index_courses_on_invite_code", :unique => true + create_table "custom_fields", :force => true do |t| t.string "type", :limit => 30, :default => "", :null => false t.string "name", :limit => 30, :default => "", :null => false diff --git a/public/assets/wechat/myclass.html b/public/assets/wechat/myclass.html index f12364130..30a8b9083 100644 --- a/public/assets/wechat/myclass.html +++ b/public/assets/wechat/myclass.html @@ -15,22 +15,17 @@
    -
    资源名称001
    -
    资源名称002
    -
    资源名称003
    -
    资源名称004
    -
    资源名称005
    -
    资源名称006
    +
    {{r.filename}}
    授课老师
    - {{teacher.realname}}教辅 + {{teacher.name}}{{teacher.role_name|identify}}
    我的同学
    - {{student.realname}} + {{student.name}}
    diff --git a/public/javascripts/wechat/controllers/myclass.js b/public/javascripts/wechat/controllers/myclass.js index bf864ab88..b689e0f55 100644 --- a/public/javascripts/wechat/controllers/myclass.js +++ b/public/javascripts/wechat/controllers/myclass.js @@ -22,10 +22,17 @@ app.controller('MyClassController', ['$scope', 'config','$http', 'auth','$locati vm.course = {}; vm.students = []; vm.teachers = []; + vm.resources = []; vm.invite = function(){ $location.path("/invite_code").search({id: courseid}); }; + + $http.post(config.apiUrl + "courses/"+courseid+"/attachments", + {token: auth.token(), name: ''} + ).then(function(response){ + vm.resources = response.data.data; + }); $http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then( function(response){ diff --git a/public/javascripts/wechat/others/filter.js b/public/javascripts/wechat/others/filter.js index dcb8e9e6a..96007958d 100644 --- a/public/javascripts/wechat/others/filter.js +++ b/public/javascripts/wechat/others/filter.js @@ -2,4 +2,13 @@ app.filter('safeHtml', ['$sce',function ($sce) { return function (input) { return $sce.trustAsHtml(input); } -}]); \ No newline at end of file +}]); + +app.filter('identify', function () { + return function(input){ + if (input == 'TeachingAsistant'){ + return '教辅' + } + return ''; + } +}) \ No newline at end of file diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index 12e11b5fa..8391b1083 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -4,6 +4,7 @@ /*基本样式*/ body,table,input,textarea,select,button { font-family: "微软雅黑","宋体","Helvetica Neue", Helvetica, Arial, sans-serif;} body, ul, h1,h2,h3,h4,h5,p,pre,input {padding:0px; margin:0px;} +body{background-color: #EFEFF4;} ul li {list-style:none;} img {max-width:100%;} blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin-right: 0.4em; border-radius: 4px; font-family: "Microsoft YaHei"; background-size: 100% 100%; margin-top:5px;} @@ -125,8 +126,8 @@ a.underline {text-decoration:underline;} /*20160613邀请码样式*/ .qr-code-wrap {width:100%; padding:40px 0; background-color:#3b94d6;} -.qr-code-box {width:225px; height:332px; background-color:#fff; border-radius:3px; margin:0 auto;} -.share-class-name {font-size:18px; color:#3b3b3b; text-align:center; padding:12px; border-bottom:1px solid #cccccc; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;} +.qr-code-box {width:225px; background-color:#fff; border-radius:3px; margin:0 auto;} +.share-class-name {font-size:18px; color:#3b3b3b; text-align:center; padding:12px; border-bottom:1px solid #cccccc;} .qr-img-wrap {width:100%; border-bottom:1px dashed #ccc;} .qr-code-img {margin:36px auto; display:block;} .invitation-code-wrap {text-align:center; font-size:18px; color:#3b3b3b; padding:16px;} From e21f4e0b4dda91f1efab82d73b283b2e58272344 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 24 Jun 2016 13:52:11 +0800 Subject: [PATCH 64/72] merge --- public/javascripts/wechat/app.js | 439 +------------------------------ 1 file changed, 1 insertion(+), 438 deletions(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 5c0d7d5bf..00d6bf3bc 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,66 +1,9 @@ var app = angular.module('wechat', ['ngRoute']); -<<<<<<< HEAD app.constant('config', { rootPath: '/assets/wechat/', rootUrl: '/', apiUrl: '/api/v1/' -======= -if(debug===true){ - //apiUrl = 'http://localhost:3000/api/v1/'; - apiUrl = 'http://www.trustie.net/api/v1/'; -} - - -app.factory('auth', function($http,$routeParams, $q){ - var _openid = ''; - - if(typeof g_openid !== 'undefined'){ - _openid = g_openid; - } - - if(debug===true){ - _openid = "1"; //guange的帐号 - } - - var getOpenId = function() { - var deferred = $q.defer(); - if (typeof _openid !== 'undefined' && _openid.length > 0){ - deferred.resolve(_openid); - } else { - var code = $routeParams.code; - $http({ - url: '/wechat/get_open_id', - data: {code: code}, - method: 'POST' - }).then(function successCallback(response) { - _openid = response.data.openid; - deferred.resolve(_openid); - }, function errorCallback(response) { - deferred.reject(response); - }); - } - return deferred.promise; - }; - var openid = function(){ - return _openid; - }; - return {getOpenId: getOpenId, openid: openid}; -}); - - -app.factory('rms', function(){ - var _saveStorage = {}; - var save = function(key, value){ - _saveStorage[key] = value; - }; - - var get = function(key){ - return _saveStorage[key]; - }; - - return {save: save, get: get}; ->>>>>>> b17b92cc3ec7341ef1d1e2179be0de623605a725 }); @@ -73,394 +16,14 @@ app.run(['$rootScope', 'auth', '$location', '$routeParams', function($rootScope, $rootScope.$on('$routeChangeError', function(event, next, current){ -<<<<<<< HEAD if(next && next.templateUrl){ if(!next.templateUrl.endsWith("login.html") && !next.templateUrl.endsWith("reg.html")){ $location.path("/login"); -======= - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.factory('common', function($http, auth, $routeParams){ - var addCommonReply = function(id, type, data, cb){ - - if(!data.comment || data.comment.length<=0){ - return; - } - - var temp = data.comment.replace(/\n/g,'
    '); - - var userInfo = { - type: type, - content: temp, - openid: auth.openid() - }; - //回复按钮禁用 - data.disabled = true; - - $http({ - method: 'POST', - url: apiUrl+ "new_comment/"+id, - data: userInfo - }).then(function successCallback(response) { - //alert("提交成功"); - if(typeof cb === 'function'){ - cb(); ->>>>>>> b17b92cc3ec7341ef1d1e2179be0de623605a725 } } -<<<<<<< HEAD }); $rootScope.$on('$routeChangeStart', function(event, next, current){ }); } -]); -======= - ); - - $scope.addIssueReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'Issue', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - //数据提交完成,回复按钮启用 - data.disabled = false; - }); - - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.controller('HomeworkController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'whomeworks').then(function successCallback(response) { - console.log(response.data); - $scope.homework = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addHomeworkReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'HomeworkCommon', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - //数据提交完成,回复按钮启用 - data.disabled = false; - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.controller('CourseNoticeController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'newss').then(function successCallback(response) { - console.log(response.data); - $scope.news = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addNoticeReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'News', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - //数据提交完成,回复按钮启用 - data.disabled = false; - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.controller('DiscussionController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'messages').then(function successCallback(response) { - console.log(response.data); - $scope.discussion = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addDiscussionReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'Message', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - //数据提交完成,回复按钮启用 - data.disabled = false; - }); - }; - - $scope.addPraise = function(act){ - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - common.decreaseCommonPraise(act); - }; -}); - -app.controller('JournalsController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'journal_for_messages').then(function successCallback(response) { - console.log(response.data); - $scope.message = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addJournalReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'JournalsForMessage', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - //数据提交完成,回复按钮启用 - data.disabled = false; - }); - }; - - $scope.addPraise = function(act){ - console.log(act); - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - console.log(act); - common.decreaseCommonPraise(act); - }; -}); - -app.controller('BlogController', function($scope, $http, $routeParams, auth, common){ - $scope.formData = {comment: ''}; - - var loadData = function(id){ - common.loadCommonData(id, 'blog_comments').then(function successCallback(response) { - console.log(response.data); - $scope.blog = response.data.data; - }, function errorCallback(response) { - }); - }; - - auth.getOpenId().then( - function successCallback(response){ - loadData($routeParams.id); - }, function errorCallback(response) { - alert("获取openid出错:"+response); - } - ); - - $scope.addBlogReply = function(data){ - console.log(data.comment); - common.addCommonReply($routeParams.id, 'BlogComment', data, function(){ - $scope.formData = {comment: ''}; - loadData($routeParams.id); - //数据提交完成,回复按钮启用 - data.disabled = false; - }); - }; - - $scope.addPraise = function(act){ - console.log(act); - common.addCommonPraise(act); - }; - - $scope.decreasePraise = function(act){ - console.log(act); - common.decreaseCommonPraise(act); - }; -}); - -app.filter('safeHtml', function ($sce) { - return function (input) { - return $sce.trustAsHtml(input); - } -}); - -//app.directive('textAutoHeight', function($timeout){ -// return { -// restrict: 'A', -// scope: {}, -// link: function(scope, element, attr){ -// scope.text = '点击展开'; -// $timeout(function(){ -// var e = element.parent().children().eq(5); -// var height = e[0].scrollHeight; -// if(height>90){ -// element.css('display', 'block'); -// element.on('click', function(){ -// if(element.text() == "点击展开"){ -// e.css("height", height+'px'); -// element.text("点击隐藏"); -// } else { -// e.css("height", '90px'); -// element.text("点击展开"); -// } -// -// }); -// } -// }, false); -// -// } -// } -//}); - -app.directive('inputAuto',function(){ - return{ - restrict: 'A', - scope: {}, - link: function(scope, element){ - var copyContainer = element.parent().children().eq(0); - var sendButton = element.parent().next(); - element.on('input',function(){ - console.log(sendButton); - copyContainer.html(element[0].value); - var textHeight = copyContainer[0].scrollHeight; - element.css('height', textHeight + 'px'); - }); - sendButton.on('click',function(){ - element.css('height','28px'); - }); - } - } -}); - -app.directive('loadingSpinner', ['$http', function ($http) { - return { - restrict: 'A', - replace: true, - template: '
    加载中...
    ', - }; -}]); - -app.config(['$routeProvider',"$httpProvider", "$locationProvider",function ($routeProvider, $httpProvider, $locationProvider) { - var rootPath = '/assets/wechat/' - //$locationProvider.html5Mode(true); - $routeProvider - .when('/activites', { - templateUrl: rootPath + 'activities.html', - controller: 'ActivityController' - }) - .when('/issues/:id', { - templateUrl: rootPath + 'issue_detail.html', - controller: 'IssueController' - }) - .when('/project_discussion/:id', { - templateUrl: rootPath + 'project_discussion.html', - controller: 'DiscussionController' - }) - .when('/homework/:id', { - templateUrl: rootPath + 'homework_detail.html', - controller: 'HomeworkController' - }) - .when('/course_notice/:id', { - templateUrl: rootPath + 'course_notice.html', - controller: 'CourseNoticeController' - }) - .when('/course_discussion/:id', { - templateUrl: rootPath + 'course_discussion.html', - controller: 'DiscussionController' - }) - .when('/journal_for_message/:id', { - templateUrl: rootPath + 'jour_message_detail.html', - controller: 'JournalsController' - }) - .when('/blog_comment/:id', { - templateUrl: rootPath + 'blog_detail.html', - controller: 'BlogController' - }) - .otherwise({ - redirectTo: '/activites' - }); - - //监听异步请求,实现加载中显隐标记 - $httpProvider.interceptors.push(function ($q, $rootScope) { - if ($rootScope.activeCalls == undefined) { - $rootScope.activeCalls = 0; - } - - return { - request: function (config) { - $rootScope.activeCalls += 1; - return config; - }, - requestError: function (rejection) { - $rootScope.activeCalls -= 1; - return rejection; - }, - response: function (response) { - $rootScope.activeCalls -= 1; - return response; - }, - responseError: function (rejection) { - $rootScope.activeCalls -= 1; - return rejection; - } - }; - }); -}]); ->>>>>>> b17b92cc3ec7341ef1d1e2179be0de623605a725 +]); \ No newline at end of file From 485d0e3743495ddda1e63d3b6d083bd11fed67a1 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 24 Jun 2016 14:59:50 +0800 Subject: [PATCH 65/72] =?UTF-8?q?ticket=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/course.rb | 1 + app/controllers/wechats_controller.rb | 47 ++++++++++++------- app/models/course.rb | 13 +++++ app/services/courses_service.rb | 3 ++ public/assets/wechat/invite_code.html | 4 +- .../wechat/controllers/invite_code.js | 16 +++++++ 6 files changed, 66 insertions(+), 18 deletions(-) diff --git a/app/api/mobile/entities/course.rb b/app/api/mobile/entities/course.rb index fc5c95ef5..487a75c4d 100644 --- a/app/api/mobile/entities/course.rb +++ b/app/api/mobile/entities/course.rb @@ -46,6 +46,7 @@ module Mobile course_expose :term course_expose :time course_expose :invite_code + course_expose :qrcode course_expose :updated_at course_expose :course_student_num expose :teacher, using: Mobile::Entities::User do |c, opt| diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 75a8bac92..120de197a 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -12,19 +12,8 @@ class WechatsController < ActionController::Base uw = user_binded?(request[:FromUserName]) if !uw return sendBind() - elsif (course = join_class(content, uw.user)) && course - news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', - 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 - 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" - pic_url = "#{ROOT_URL}/images/wechat/class.jpg" - article.item title: "#{n[:title]}", - description: n[:content], - pic_url: pic_url, - url: url - end else - return request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo + return join_class(content, uw.user) end rescue => e return request.reply.text e @@ -57,7 +46,16 @@ class WechatsController < ActionController::Base # When subscribe user scan scene_id in public account on :scan, with: 'scene_id' do |request, ticket| - request.reply.text "Subscribe user #{request[:FromUserName]} Ticket #{ticket}" + begin + uw = user_binded?(request[:FromUserName]) + if !uw + return sendBind() + else + return join_class({ticket: ticket}, uw.user) + end + rescue => e + return request.reply.text e + end end # When no any on :scan responder can match subscribe user scaned scene_id @@ -185,14 +183,31 @@ class WechatsController < ActionController::Base end end - def join_class(content, user) + def join_class(params, user) + course = nil + course = Course.where(qrcode: params[:ticket]) if params[:ticket] + course = Course.where(invite_code: params[:invite_code]) if params[:invite_code] + raise "课程不存在" if course.blank? + cs = CoursesService.new - status = cs.join_course({invite_code: content.upcase.strip}, user) + status = cs.join_course(course.invite_code, user) logger.info status if status[:state] != 0 raise CoursesService::JoinCourseError.message(status[:state]) end - status[:course] + + course = status[:course] + news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', + 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 + 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" + pic_url = "#{ROOT_URL}/images/wechat/class.jpg" + article.item title: "#{n[:title]}", + description: n[:content], + pic_url: pic_url, + url: url + end + end ### controller method diff --git a/app/models/course.rb b/app/models/course.rb index d0266b381..b8ec4181d 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -466,6 +466,19 @@ class Course < ActiveRecord::Base code end + + def generate_qrcode + ticket = self.qrcode + if !ticket || ticket.size < 10 + response = Wechat.api.qrcode_create_scene(invite_code) + logger.debug "response = #{response}" + self.qrcode = response['ticket'] + save! && reload + ticket = qrcode + end + ticket + end + end diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 0eb699459..3c74c328c 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -165,6 +165,9 @@ class CoursesService #显示课程 def show_course(params,current_user) course = Course.find(params[:id]) + course.generate_invite_code + course.generate_qrcode + if course.school work_unit = course.school.name else diff --git a/public/assets/wechat/invite_code.html b/public/assets/wechat/invite_code.html index 116dad8da..6f56f7e86 100644 --- a/public/assets/wechat/invite_code.html +++ b/public/assets/wechat/invite_code.html @@ -2,12 +2,12 @@
    -
    +
    邀请码:{{course.invite_code}}