myservice.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. <<<<<<< HEAD
  12. add:function (data){
  13. return $http({
  14. url:config.server + 'api/my/add_dream',
  15. =======
  16. reset:function(data){
  17. return $http({
  18. url:config.server + "api/auth/avatar",
  19. >>>>>>> 257ac8c26b1de045fb0ce6844de33ff94a5763f8
  20. method:"post",
  21. data:data
  22. })
  23. },
  24. recharge:function(){
  25. return $http({
  26. url:config.server + "api/my/recharge",
  27. method:"get"
  28. })
  29. },
  30. setting:function(){
  31. return $http({
  32. url:config.server + "api/my/setting",
  33. method:"get"
  34. })
  35. },
  36. systemInfo:function(){
  37. return $http({
  38. url:config.server + "api/my/system_info",
  39. method:"get"
  40. })
  41. },
  42. replyMy:function(){
  43. return $http({
  44. url:config.server + "api/my/reply_my",
  45. method:"get"
  46. })
  47. },
  48. collect:function(){
  49. return $http({
  50. url:config.server + "api/my/collection",
  51. method:"get"
  52. })
  53. },
  54. myDream:function(){
  55. return $http({
  56. url:config.server + "api/my/dream",
  57. method:"get"
  58. })
  59. },
  60. myReplay:function(data){
  61. return $http({
  62. url: config.server + '/api/my/my_reply',
  63. method: "post",
  64. data: data
  65. })
  66. },
  67. myMes:function(){
  68. return $http({
  69. url:config.server + "api/my/persona",
  70. method:"get"
  71. })
  72. },
  73. myIndex:function(){
  74. return $http({
  75. url:config.server + "api/my/index",
  76. method:"get"
  77. })
  78. },
  79. toprofile:function(){
  80. return $http({
  81. url:config.server + "api/my/persona",
  82. method:"get"
  83. })
  84. },
  85. myMaterial:function(){
  86. return $http({
  87. url:config.server + "api/my/edit_user_info",
  88. method:"get"
  89. })
  90. },
  91. saveMaterial:function(data){
  92. return $http({
  93. url:config.server + "api/my/update_user_info",
  94. method:"post",
  95. data:data
  96. })
  97. }
  98. };
  99. }]);
  100. })(angular.module('app.services'));