|
@@ -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',
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}]);
|
|
}]);
|
|
|
});
|
|
});
|