myservice.js 2.7 KB

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