|
@@ -148,11 +148,43 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
|
|
|
app.controller('IndexCtrl', ['$scope', function($scope){
|
|
app.controller('IndexCtrl', ['$scope', function($scope){
|
|
|
|
|
|
|
|
}]);
|
|
}]);
|
|
|
- app.controller('ContactCtrl', ['$scope', 'toaster', function($scope, toaster){
|
|
|
|
|
|
|
+ app.controller('ContactCtrl', ['$scope', 'toaster', 'AuthenticationService', 'FeedBackService', function($scope, toaster, AuthenticationService, FeedBackService){
|
|
|
$scope.connect = function(type) {
|
|
$scope.connect = function(type) {
|
|
|
toaster.pop('warning', '连接失败', '高峰期建议选择自助服务或问题反馈');
|
|
toaster.pop('warning', '连接失败', '高峰期建议选择自助服务或问题反馈');
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ $scope.question = {
|
|
|
|
|
+ classId: 1,
|
|
|
|
|
+ isPublic: 1,
|
|
|
|
|
+ title:''
|
|
|
|
|
+ }
|
|
|
|
|
+ //提交反馈
|
|
|
|
|
+ $scope.submit = function(){
|
|
|
|
|
+ AuthenticationService.getAuthentication().success(function(data){
|
|
|
|
|
+ $scope.user = data;
|
|
|
|
|
+ if(!$scope.user){
|
|
|
|
|
+ $scope.userUU = null;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $scope.userUU = $scope.user.userUU;
|
|
|
|
|
+ }
|
|
|
|
|
+ FeedBackService.feedBackQuestion({classId: $scope.question.classId, isPublic: $scope.question.isPublic, title: $scope.question.title, userUU: $scope.userUU}, {},
|
|
|
|
|
+ function(data){
|
|
|
|
|
+ toaster.pop('success', '成功', '您的问题反馈成功!');
|
|
|
|
|
+ $scope.reset();
|
|
|
|
|
+ }, function(response){
|
|
|
|
|
+ toaster.pop('error', '错误', response.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ //重置
|
|
|
|
|
+ $scope.reset = function(){
|
|
|
|
|
+ $scope.question.classId = 1;
|
|
|
|
|
+ $scope.question.isPublic = 1;
|
|
|
|
|
+ $scope.question.title = '';
|
|
|
|
|
+ }
|
|
|
}]);
|
|
}]);
|
|
|
|
|
+
|
|
|
app.controller('GuideCtrl', ['$scope', '$stateParams', 'Guide', function($scope, $stateParams, Guide) {
|
|
app.controller('GuideCtrl', ['$scope', '$stateParams', 'Guide', function($scope, $stateParams, Guide) {
|
|
|
Guide.get($stateParams.id).then(function(data){
|
|
Guide.get($stateParams.id).then(function(data){
|
|
|
$scope.slides = data;
|
|
$scope.slides = data;
|