myservice.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. (function (app) {
  2. app.factory('myService', ['$http', 'config', "util", function ($http, config, util) {
  3. return {
  4. logout:function(){
  5. return $http({
  6. url:config.server + "api/auth/logout",
  7. method:"get"
  8. })
  9. },
  10. setPassword: function (password) {
  11. return $http({
  12. url: config.server + '/api/auth/password',
  13. method: "post",
  14. data: { password: password }
  15. })
  16. },
  17. charge:function(number,type){
  18. return $http({
  19. url:config.server + "api/pay/charge",
  20. method:"post",
  21. data: { number:number,goods:1,type:type}
  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",
  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. myMes:function(){
  62. return $http({
  63. url:config.server + "api/my/persona",
  64. method:"get"
  65. })
  66. },
  67. myInfo:function(){
  68. return $http({
  69. url:config.server + "api/my/show",
  70. method:"get"
  71. })
  72. },
  73. toprofile:function(){
  74. return $http({
  75. url:config.server + "api/my/persona",
  76. method:"get"
  77. })
  78. },
  79. myMaterial:function(){
  80. return $http({
  81. url:config.server + "api/my/update",
  82. method:"get"
  83. })
  84. },
  85. saveMaterial:function(data){
  86. return $http({
  87. url:config.server + "api/my/update",
  88. method:"post",
  89. data:data
  90. })
  91. },
  92. attention:function(){
  93. return $http({
  94. url:config.server + "api/my/care",
  95. method:"get"
  96. })
  97. },
  98. toMyUserDetail:function(id){
  99. return $http({
  100. url:config.server + "api/user/show?user_id=" + id ,
  101. method:"get"
  102. })
  103. },
  104. addAccount:function(data){
  105. return $http({
  106. url:config.server + "api/my/bank/create",
  107. method:"post",
  108. data:data
  109. })
  110. },
  111. showAccount:function(){
  112. return $http({
  113. url:config.server + "api/my/bank/list",
  114. method:"get"
  115. })
  116. },
  117. destroyAccount:function(id){
  118. return $http({
  119. url:config.server + "api/my/bank/delete?id=" + id ,
  120. method:"get"
  121. })
  122. },
  123. withdraw:function(data){
  124. return $http({
  125. url:config.server + "api/my/cash",
  126. method:"post",
  127. data:data
  128. })
  129. },
  130. contact:function(data){
  131. return $http({
  132. url:config.server + "api/my/suggest",
  133. method:"post",
  134. data:data
  135. })
  136. },
  137. payExplain:function(){
  138. return $http({
  139. url:config.server + "api/my/pay/article",
  140. method:"get"
  141. })
  142. },
  143. addQrcode:function(data){
  144. return $http({
  145. url:config.server + "api/my/bank/qrcode",
  146. method:"post",
  147. data:data
  148. })
  149. },
  150. aboutMiao:function(){
  151. return $http({
  152. url:config.server + "api/my/miao",
  153. method:"get"
  154. })
  155. },
  156. messageInfo:function(){
  157. return $http({
  158. url:config.server + "api/my/info",
  159. method:"get"
  160. })
  161. },
  162. notRead:function(){
  163. return $http({
  164. url:config.server + "api/my/read",
  165. method:"get"
  166. })
  167. },
  168. letter:function(){
  169. return $http({
  170. url:config.server + "api/my/letter",
  171. method:"get"
  172. })
  173. }
  174. };
  175. }]);
  176. })(angular.module('app.services'));