-
+
-
{{news.title}}
-
- 发布者: |
- {{news.author.realname}} |
-
-
- 来 源: |
- {{news.course_name}} | 班级通知 |
-
+
+
+ {{news.author.realname}}
+

+

+
+
+
{{news.title}}
+
{{news.course_name}}-课程通知{{news.created_on}}
-
{{news.created_on}}
+
+
赞
+
{{news.praise_count}}
+
{{news.praise_count}}
+
+
-
-
回复 ({{news.comments_count}})
-
已赞 ({{news.praise_count}})
-
赞 ({{news.praise_count}})
-
-
-
-
-
-
{{comments.author.realname}}
-
-
{{comments.created_on}}
-
回复
+
+
+
+
+
+ {{comments.author.realname}}
+

+

+
+
{{comments.created_on}}
+
+
+
-
-
-
-
\ No newline at end of file
+
diff --git a/public/assets/wechat/myresource.html b/public/assets/wechat/myresource.html
index dc4d6ea78..1317ac11a 100644
--- a/public/assets/wechat/myresource.html
+++ b/public/assets/wechat/myresource.html
@@ -1,4 +1,5 @@
+
-
暂无课件,
+
暂无课件,
请登录Trustie网站,在PC浏览器中上传课件。
{{r.homework_name}}
-
暂无作业,
+
暂无作业,
请登录Trustie网站,在PC浏览器中创建作业。
{{r.exercise_name}}
-
暂无测验,
+
暂无测验,
请登录Trustie网站,在PC浏览器中创建测验。
+
diff --git a/public/javascripts/wechat/controllers/class.js b/public/javascripts/wechat/controllers/class.js
index 1cd69bb43..d5de23859 100644
--- a/public/javascripts/wechat/controllers/class.js
+++ b/public/javascripts/wechat/controllers/class.js
@@ -31,6 +31,7 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
{token: auth.token(), name: ''}
).then(function(response){
vm.resources = response.data.data;
+ vm.resources_tag = true;
});
}
}
@@ -40,6 +41,7 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
$http.get(config.apiUrl + "courses/homeworks/"+courseid+"?token="+auth.token()).then(function(response){
vm.homeworks = response.data.data;
console.log(response.data);
+ vm.homeworks_tag = true;
});
}
}
@@ -49,6 +51,7 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
$http.get(config.apiUrl + "courses/"+courseid+"/exercises?token="+auth.token()).then(function(response){
vm.exercises = response.data.data;
console.log(response.data);
+ vm.exercises_tag = true;
});
}
}
@@ -64,6 +67,9 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location
vm.showResources = false;
vm.showHomework = false;
vm.showTestcase = false;
+ vm.resources_tag = false;
+ vm.homeworks_tag = false;
+ vm.exercises_tag = false;
if(vm.isTeacher){
if(index == 1){ //课件
diff --git a/public/javascripts/wechat/controllers/myresource.js b/public/javascripts/wechat/controllers/myresource.js
index 084205fbe..462a35842 100644
--- a/public/javascripts/wechat/controllers/myresource.js
+++ b/public/javascripts/wechat/controllers/myresource.js
@@ -2,23 +2,23 @@ app.controller('MyResourceController', ['$scope', '$http', 'auth', 'config', '$l
var vm = $scope;
vm.menus = ['课件', '作业', '测验'];
- vm.resources = [];
- vm.homeworks = [];
- vm.exercise = [];
+ vm.resources = null;
+ vm.homeworks = null;
+ vm.exercise = null;
vm.tab = function(index){
vm.currentTab = index;
- if(index==1){
+ if(index==1 && (!vm.resources || vm.resources.length <= 0 )){
$http.get(config.apiUrl + "resources?token="+auth.token()).then(function(response){
console.log(response.data);
vm.resources = response.data.data;
});
- } else if(index==2){
+ } else if(index==2 && (!vm.homeworks || vm.homeworks.length <= 0) ){
$http.get(config.apiUrl + "resources/homeworks?token="+auth.token()).then(function(response){
console.log(response.data);
vm.homeworks = response.data.data;
});
- } else if(index==3){
+ } else if(index==3 && (!vm.exercise || vm.exercise.length <= 0) ){
$http.get(config.apiUrl + "resources/exercies?token="+auth.token()).then(function(response){
console.log(response.data);
vm.exercise = response.data.data;
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css
index 3b5507170..795decd06 100644
--- a/public/stylesheets/weui/weixin.css
+++ b/public/stylesheets/weui/weixin.css
@@ -109,9 +109,10 @@ a.underline {text-decoration:underline;}
.post-interactive-reply,
.post-interactive-praise {width:50%; text-align:center; float:left; font-size:13px;}
.more-wrap {width:100%;}
-.more-events {width:98%; font-size:13px; text-align:center; margin:0 auto; padding: 5px 0; border:1px solid #e6e6e6; border-radius:3px; background-color:#f8f9fb; }
+.more-events {width:100%; font-size:13px; text-align:center; margin:0 auto; padding: 5px 0; border-top:1px solid #e6e6e6; border-bottom:1px solid #e6e6e6; border-radius:3px; background-color:#f8f9fb; }
.border-bottom {border-bottom:1px solid #e6e6e6;}
.post-reply-wrap {width:100%;}
+.post-reply-wrap:first-child {border-top:1px solid #ccc;}
.post-input-wrap {width:100%; position:fixed; bottom:0;}
.post-input-wrap2 {width:100%;}
.post-reply-row {padding:10px 15px; color:#9a9a9a; background-color:#fff;}