my-model.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import {Base} from '../../static/util/base.js';
  2. class My extends Base {
  3. constructor() {
  4. super();
  5. }
  6. //修改密码
  7. editPassword(data, callBack) {
  8. const params = {
  9. url: '/editPassword',
  10. type: 'POST',
  11. data: data,
  12. sCallBack: function (res) {
  13. callBack && callBack(res)
  14. }
  15. }
  16. this.request(params);
  17. }
  18. //修改个人信息
  19. editUserInfo(data, callBack) {
  20. const params = {
  21. url: '/editUserInfo',
  22. type: 'POST',
  23. data: data,
  24. sCallBack: function (res) {
  25. callBack && callBack(res)
  26. }
  27. }
  28. this.request(params);
  29. }
  30. //绑定openid
  31. bandWxOpenid(code, callBack) {
  32. const params = {
  33. url: '/auth/bandWxOpenid?code=' + code,
  34. type: 'GET',
  35. sCallBack: function (res) {
  36. callBack && callBack(res.data)
  37. }
  38. }
  39. this.request(params);
  40. }
  41. }
  42. const _my = new My();
  43. export {_my}