Browse Source

提交问题反馈

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@1302 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
luoq 10 years ago
parent
commit
69c3377a08
1 changed files with 11 additions and 2 deletions
  1. 11 2
      src/main/webapp/resources/js/common/services.js

+ 11 - 2
src/main/webapp/resources/js/common/services.js

@@ -58,7 +58,7 @@ define([ 'angular', 'toaster' ], function(angular) {
 		return {
 		return {
 			getRootPath : function() {
 			getRootPath : function() {
 				var fullPath = window.document.location.href;
 				var fullPath = window.document.location.href;
-				var path = window.document.location.pathname;
+				var path = window.document.location.pathname;	//返回当前部分路径
 				var pos = fullPath.indexOf(path);
 				var pos = fullPath.indexOf(path);
 				return fullPath.substring(0, pos) + path.substring(0, path.substr(1).indexOf('/') + 1);
 				return fullPath.substring(0, pos) + path.substring(0, path.substr(1).indexOf('/') + 1);
 			},
 			},
@@ -145,7 +145,7 @@ define([ 'angular', 'toaster' ], function(angular) {
 				});
 				});
 			},
 			},
 			getNotice : function(count, success) {
 			getNotice : function(count, success) {
-				var request = $http.get(rootPath + '/public/notice?page=1&count='+count);
+				var request = $http.get(rootPath + '/public/notice?page=1&count='+count);	//NoticeController.java
 				request.success(function(data){
 				request.success(function(data){
 					success.call(null, data.content);
 					success.call(null, data.content);
 				});
 				});
@@ -219,5 +219,14 @@ define([ 'angular', 'toaster' ], function(angular) {
 			customer: $resource('vendor/customer/:id', {}),
 			customer: $resource('vendor/customer/:id', {}),
 			vendor: $resource('vendor/:id', {})
 			vendor: $resource('vendor/:id', {})
 		};
 		};
+	}]).factory('FeedBackService',['$resource', 'BaseService', function($resource, BaseService){
+		var rootPath = BaseService.getRootPath();
+		return $resource('serve/question', {}, {
+			//反馈问题
+			feedBackQuestion: {
+				url: rootPath + '/serve/question/feedback',
+				method: 'POST',
+			}
+		});
 	}]);
 	}]);
 });
 });