12345678910111213141516171819202122232425262728293031323334353637383940 |
- angular.module('push')
- .factory('replyService', function (ConfigService, $q, UtilService, UserService) {
- return {
- //加载评论的回复列表
- replyList: function(Id){
- var deferred = $q.defer();
- var params = {
- Id: Id
- };
- UtilService.post(ConfigService.server + "getReplyList.action?", params).success(function (response) {
- deferred.resolve(response);
- }).error(function (response) {
- deferred.reject(response);
- });
- return deferred.promise;
- },
- //内页回复提交
- appreply: function(infoId,infoType,content,parentId,parentUserId,source){
- var deferred = $q.defer();
- var params = {
- infoId: infoId,
- infoType: infoType,
- userId: UserService.id,
- type:1,
- content:content,
- parentId:parentId,
- parentUserId:parentUserId,
- source:source
- };
- UtilService.post(ConfigService.server + "appComment.action?", params).success(function (response) {
- deferred.resolve(response);
- }).error(function (response) {
- deferred.reject(response);
- });
- return deferred.promise;
- }
- }
- });
|