myservice.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. reset:function(data){
  12. return $http({
  13. url:config.server + "api/auth/avatar",
  14. method:"post",
  15. data:data
  16. })
  17. },
  18. recharge:function(){
  19. return $http({
  20. url:config.server + "api/my/recharge",
  21. method:"get"
  22. })
  23. },
  24. setting:function(){
  25. return $http({
  26. url:config.server + "api/my/setting",
  27. method:"get"
  28. })
  29. },
  30. systemInfo:function(){
  31. return $http({
  32. url:config.server + "api/my/system_info",
  33. method:"get"
  34. })
  35. },
  36. replyMy:function(){
  37. return $http({
  38. url:config.server + "api/my/reply_my",
  39. method:"get"
  40. })
  41. },
  42. collect:function(){
  43. return $http({
  44. url:config.server + "api/my/collection",
  45. method:"get"
  46. })
  47. },
  48. myDream:function(){
  49. return $http({
  50. url:config.server + "api/my/dream",
  51. method:"get"
  52. })
  53. },
  54. myReplay:function(data){
  55. return $http({
  56. url: config.server + '/api/my/my_reply',
  57. method: "post",
  58. data: data
  59. })
  60. },
  61. userMes:function(data){
  62. return $http({
  63. url:config.server + "api/user/index/",
  64. method:"get",
  65. data:data
  66. })
  67. },
  68. myIndex:function(){
  69. return $http({
  70. url:config.server + "api/my/index",
  71. method:"get"
  72. })
  73. },
  74. toprofile:function(){
  75. return $http({
  76. url:config.server + "api/my/persona",
  77. method:"get"
  78. })
  79. }
  80. };
  81. }]);
  82. })(angular.module('app.services'));