myservice.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. };
  50. }]);
  51. })(angular.module('app.services'));