user.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. "use strict";
  2. var common_request = require("../common/request.js");
  3. let request = new common_request.Request().http;
  4. function wxLogin(data) {
  5. return request("/app/wx/login", data, "POST", "application/json;charset=UTF-8");
  6. }
  7. function getUserInfo() {
  8. return request("/app/user/getUserInfo", null, "GET");
  9. }
  10. function checkLogin() {
  11. return request("/app/user/checkLogin", null, "GET");
  12. }
  13. function editUser(data) {
  14. return request("/app/user/editUser", data, "POST", "application/json;charset=UTF-8");
  15. }
  16. function registerDoctor(data) {
  17. return request("/app/user/registerDoctor", data, "POST", "application/json;charset=UTF-8");
  18. }
  19. function getMyCouponList(data) {
  20. return request("/app/user/getMyCouponList", data, "GET");
  21. }
  22. function getMyEnableCouponList(data) {
  23. return request("/app/user/getMyEnableCouponList", data, "GET");
  24. }
  25. function getAppContactWay(userId) {
  26. return request("/app/user/getAppContactWay/" + userId, null, "GET");
  27. }
  28. exports.checkLogin = checkLogin;
  29. exports.editUser = editUser;
  30. exports.getAppContactWay = getAppContactWay;
  31. exports.getMyCouponList = getMyCouponList;
  32. exports.getMyEnableCouponList = getMyEnableCouponList;
  33. exports.getUserInfo = getUserInfo;
  34. exports.registerDoctor = registerDoctor;
  35. exports.wxLogin = wxLogin;