myservice.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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",
  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. attention:function(){
  86. return $http({
  87. url:config.server + "api/my/care",
  88. method:"get"
  89. })
  90. },
  91. toMyUserDetail:function(id){
  92. return $http({
  93. url:config.server + "api/user/show?user_id=" + id ,
  94. method:"get"
  95. })
  96. },
  97. addAccount:function(data){
  98. return $http({
  99. url:config.server + "api/my/bank/create",
  100. method:"post",
  101. data:data
  102. })
  103. },
  104. showAccount:function(){
  105. return $http({
  106. url:config.server + "api/my/bank/list",
  107. method:"get"
  108. })
  109. },
  110. destroyAccount:function(id){
  111. return $http({
  112. url:config.server + "api/my/bank/delete?id=" + id ,
  113. method:"get"
  114. })
  115. },
  116. withdraw:function(data){
  117. return $http({
  118. url:config.server + "api/my/cash",
  119. method:"post",
  120. data:data
  121. })
  122. },
  123. contact:function(data){
  124. return $http({
  125. url:config.server + "api/my/suggest",
  126. method:"post",
  127. data:data
  128. })
  129. },
  130. payExplain:function(){
  131. return $http({
  132. url:config.server + "api/my/pay/article",
  133. method:"get"
  134. })
  135. },
  136. addQrcode:function(data){
  137. return $http({
  138. url:config.server + "api/my/bank/img",
  139. method:"post",
  140. data:data
  141. })
  142. },
  143. aboutMiao:function(){
  144. return $http({
  145. url:config.server + "api/my/miao",
  146. method:"get"
  147. })
  148. },
  149. messageInfo:function(){
  150. return $http({
  151. url:config.server + "api/my/info",
  152. method:"get"
  153. })
  154. },
  155. notRead:function(){
  156. return $http({
  157. url:config.server + "api/my/read",
  158. method:"get"
  159. })
  160. },
  161. letter:function(){
  162. return $http({
  163. url:config.server + "api/my/letter",
  164. method:"get"
  165. })
  166. }
  167. };
  168. }]);
  169. })(angular.module('app.services'));