myservice.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. (function (app) {
  2. app.factory('myService', ['$http', 'config', "util", function ($http, config, util) {
  3. return {
  4. setPassword: function (password) {
  5. return $http({
  6. url: config.server + '/api/auth/password',
  7. method: "post",
  8. data: { password: password }
  9. })
  10. },
  11. add:function (data){
  12. return $http({
  13. url:config.server + 'api/my/add_dream',
  14. method:"post",
  15. data:data
  16. })
  17. },
  18. reset:function(data){
  19. return $http({
  20. url:config.server + "api/auth/avatar",
  21. method:"post",
  22. data:data
  23. })
  24. },
  25. recharge:function(){
  26. return $http({
  27. url:config.server + "api/my/recharge",
  28. method:"get"
  29. })
  30. },
  31. setting:function(){
  32. return $http({
  33. url:config.server + "api/my/setting",
  34. method:"get"
  35. })
  36. },
  37. systemInfo:function(){
  38. return $http({
  39. url:config.server + "api/my/system_info",
  40. method:"get"
  41. })
  42. },
  43. replyMy:function(){
  44. return $http({
  45. url:config.server + "api/my/reply_my",
  46. method:"get"
  47. })
  48. },
  49. collect:function(){
  50. return $http({
  51. url:config.server + "api/my/collection",
  52. method:"get"
  53. })
  54. },
  55. myDream:function(){
  56. return $http({
  57. url:config.server + "api/my/dream",
  58. method:"get"
  59. })
  60. },
  61. myReplay:function(data){
  62. return $http({
  63. url: config.server + '/api/my/my_reply',
  64. method: "post",
  65. data: data
  66. })
  67. },
  68. userMes:function(data){
  69. return $http({
  70. url:config.server + "api/user/index/",
  71. method:"get",
  72. data:data
  73. })
  74. },
  75. myIndex:function(){
  76. return $http({
  77. url:config.server + "api/my/index",
  78. method:"get"
  79. })
  80. },
  81. toprofile:function(){
  82. return $http({
  83. url:config.server + "api/my/persona",
  84. method:"get"
  85. })
  86. }
  87. };
  88. }]);
  89. })(angular.module('app.services'));