user.js 607 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * 用户模块
  3. */
  4. import {httpGet,httpPost} from "@/utils/request.js"
  5. import w_md5 from "@/js_sdk/zww-md5/w_md5.js"
  6. /**
  7. * 微信登录
  8. * @param {string} Code 微信唯一编码code
  9. */
  10. export const apiWXLogin=params=>{
  11. return httpGet('/wechat/wxapp/login',params)
  12. }
  13. /**
  14. * 用户账号登录
  15. * @param {string} Username
  16. * @param {string} Password md5加密
  17. */
  18. export const apiLogin=params=>{
  19. return httpPost('/admin/login',{Username:params.Username,Password:w_md5.hex_md5_32(params.Password)})
  20. }
  21. /**
  22. * 退出登录
  23. */
  24. export const apiLoginOut=()=>{
  25. return httpPost('/admin/logout',{})
  26. }