| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- define([ 'ngResource' ], function() {
- angular.module('helpServices', ['ngResource']).factory('Help', ['$resource', 'BaseService', function ($resource, BaseService) {
- //获取ComponentSubmit的分页数据
- return $resource('help-service', {}, {
- deleteById: {
- url: 'help-service/:id',
- method: 'DELETE'
- },
- updateNav: {
- url: 'help-service',
- method: 'PUT'
- },
- exchangeDetno: {
- url: 'help-service/exchange',
- method: 'POST'
- }
- });
- }]).factory('HelpAPI', ['$resource', 'BaseService', function ($resource, BaseService) {
- //获取ComponentSubmit的分页数据
- return $resource('api/help-service/issue', {}, {
- //取得完整的消息
- findAllChildren: {
- url: 'api/help-service/helps',
- method: 'GET',
- isArray: true
- },
- findByLevel: {
- url: 'api/help-service/level/:level',
- method: 'GET',
- isArray: true
- },
- findChildren: {
- url: 'api/help-service/children',
- method: 'GET',
- isArray: true
- },
- findStructingNav: {
- url: 'api/help-service/parents/:id',
- method: 'GET',
- isArray: true,
- params: {
- _status : 'structing'
- }
- },
- get: {
- url: 'api/help-service/:id',
- method: 'GET'
- }
- })
- }]).factory('HelpIssue', ['$resource', 'BaseService', function ($resource, BaseService) {
- //获取ComponentSubmit的分页数据
- return $resource('help-service/issue', {}, {
- //取得完整的消息
- saveAndPublish: {
- url: 'help-service/issue/publish',
- method: 'POST'
- },
- getAll: {
- url: 'help-service/issue/issues',
- method: 'GET',
- params: {
- _state : 'all'
- }
- },
- getPublished: {
- url: 'help-service/issue/issues',
- method: 'GET',
- params: {
- _state : 'publish'
- }
- },
- getInputing: {
- url: 'help-service/issue/issues',
- method: 'GET',
- params: {
- _state : 'inputing'
- }
- },
- get: {
- url: 'help-service/issue/:id',
- method: 'GET'
- },
- deleteById: {
- url: 'help-service/issue/:id',
- method: 'DELETE'
- },
- publish: {
- url: 'help-service/issue/publish',
- method: 'PUT'
- },
- publishAndFlush: {
- url: 'help-service/issue/publishAndFlush/:id',
- method: 'PUT'
- },
- update: {
- url: 'help-service/issue/update',
- method: 'PUT'
- },
- exchangeDetno: {
- url: 'help-service/issue/exchange',
- method: 'POST'
- }
- })
- }]).factory('HelpIssueAPI', ['$resource', 'BaseService', function ($resource, BaseService) {
- //获取ComponentSubmit的分页数据
- return $resource('api/help-service/issues', {}, {
- //取得完整的消息
- getIssues: {
- url: 'api/help-service/issues',
- method: 'GET',
- isArray: true
- },
- getIssue: {
- url: 'api/help-service/issues/:num',
- method: 'GET'
- }
- })
- }]).factory('HelpUpload', ['$resource', 'BaseService', function ($resource) {
- //文章编辑图片处理
- return $resource('file', {}, {
- upload: {
- url: 'file',
- method: 'POST',
- headers : {'Content-Type' : undefined},
- isArray: true
- }
- })
- }]);
- });
|