system.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**
  2. * 获取验证码
  3. */
  4. export function getCaptcha() {
  5. return request.get('captcha', { time: (new Date().getTime()) })
  6. }
  7. /**
  8. * 获取微信公众号授权码
  9. */
  10. export function getWechatAuthCode(data: AnyObject) {
  11. return request.get('wechat/codeurl', data)
  12. }
  13. /**
  14. * 同步微信信息
  15. */
  16. export function wechatSync(data: AnyObject) {
  17. return request.get('wechat/sync', data)
  18. }
  19. /**
  20. * 获取协议信息
  21. */
  22. export function getAgreementInfo(key: string) {
  23. return request.get(`agreement/${key}`)
  24. }
  25. /**
  26. * 重置密码
  27. */
  28. export function resetPassword(data: AnyObject) {
  29. return request.post(`password/reset`, data)
  30. }
  31. /**
  32. * 发送短信验证码
  33. */
  34. export function sendSms(data: AnyObject) {
  35. return request.post(`send/mobile/${data.type}`, data)
  36. }
  37. /**
  38. * 获取微信jssdk config
  39. */
  40. export function getWechatSkdConfig(data: AnyObject) {
  41. return request.get('wechat/jssdkconfig', data)
  42. }
  43. /**
  44. * 拉取图片
  45. */
  46. export function fetchImage(data: AnyObject) {
  47. return request.post('file/image/fetch', data)
  48. }
  49. /**
  50. * 拉取base64图片
  51. */
  52. export function fetchBase64Image(data: AnyObject) {
  53. return request.post('file/image/base64', data)
  54. }
  55. /**
  56. * 获取版权信息
  57. */
  58. export function getCopyRight() {
  59. return request.get('copyright')
  60. }
  61. /**
  62. * 获取站点信息
  63. */
  64. export function getSiteInfo() {
  65. return request.get('site')
  66. }