parent
b783ec5b44
commit
04a2effcee
@ -0,0 +1,32 @@
|
||||
<div class="post-container">
|
||||
<div loading-spinner></div>
|
||||
<div class="post-container" style="padding-bottom:50px;">
|
||||
<div class="blue-title">欢迎加入班级</div>
|
||||
<div class="class-detail-row f13 c-grey3"><img src="images/logo.png" ng-src="current_course.img_url" class="fl ml10 img-circle mt4" width="30"><span class="fl mt10 ml10 ng-binding">{{current_course.name}}</span><div class="cl"></div> </div>
|
||||
<div class="course-list-row f13 c-grey3 mt10"><span class="fl ml15">选择分班</span></div>
|
||||
<ul class="class-list f13 c-grey3">
|
||||
<li><span class="fl ml10 class-list-name hidden">暂无</span><span class="login-box fr mr10 mt12 img-circle" ng-class="['login-box', 'fr', 'mr10', 'mt12', {'bg-grey':assistant,'checked': teacher}]"></span></li>
|
||||
|
||||
<div ng-repeat="group in groups">
|
||||
<li><span class="fl ml10 class-list-name hidden">分班1</span><span class="login-box fr mr10 mt12 img-circle" ng-class="['login-box', 'fr', 'mr10', 'mt12', {'bg-grey':teacher, 'checked': assistant}]"></span></li>
|
||||
<!--<li class="border-bottom-none"><span class="fl ml10 class-list-name hidden">分班2</span><span class="login-box fr mr10 mt12 img-circle" ng-class="['login-box', 'fr', 'mr10', 'mt12', {'checked': student}]"></span></li>-->
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<div class="f12 c-grey6 mt10 ml15">
|
||||
<span class="f13 c-grey3">提示</span>
|
||||
<ul class="mb15 mt5 ml10 new-tip">
|
||||
<li><span class="project-intro-dot">•</span>该班级存在分班信息,请选择属于您的小班</li>
|
||||
<li><span class="project-intro-dot">•</span>老师可以在班级的成员管理页,对所有成员进行修改</li>
|
||||
<li><span class="project-intro-dot">•</span>学生可以在班级的我的同学页,对自己进行修改</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bottom-tab-wrap mt10">
|
||||
<a href="javascript:void(0);" ng-click="cancel()" class="weixin-tab c-grey border-top">取消</a>
|
||||
<a href="javascript:void(0);" ng-click="joinClass()" class="weixin-tab link-blue2 border-top">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
|
||||
</div>
|
@ -0,0 +1,39 @@
|
||||
|
||||
|
||||
app.controller('JoinClassGroupController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','wx','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,wx,common){
|
||||
var vm = $scope;
|
||||
|
||||
var course_id = $routeParams.id;
|
||||
vm.alertService = alertService.create();
|
||||
|
||||
$http.get(config.apiUrl+ 'courses/'+course_id+"?token="+auth.token()).then(
|
||||
function(response) {
|
||||
console.log(response.data);
|
||||
if (response.data.status == 0){
|
||||
vm.current_course = response.data.data;
|
||||
console.log("courses");
|
||||
console.log(response.data.data);
|
||||
}
|
||||
else{
|
||||
vm.alertService.showMessage('提示', response.data.message);
|
||||
}
|
||||
if(!vm.current_course){
|
||||
vm.tip_1 = "该班级不存在或已被删除";
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
if(vm.current_course){
|
||||
$http.get(config.apiUrl + 'courses/course_groups?token='+auth.token()+'&course_id='+course_id).then(
|
||||
function(response) {
|
||||
if(response.data.status == 0) {
|
||||
vm.groups = response.data.groups;
|
||||
}
|
||||
else{
|
||||
vm.groups = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}] );
|
Loading…
Reference in new issue