login.js 507 B

1234567891011121314
  1. import request from './request.js';
  2. const login = async (data) => {
  3. const res = await request.post({ url: `/user/login`, data });
  4. return res.data;
  5. }
  6. const getPhone = async (data) => {
  7. const res = await request.post({ url: `/wxa/business/getuserphonenumber?appid=${data.appid}`, data: { code: data.code } });
  8. return res.data;
  9. }
  10. const getJson = async () => {
  11. const res = await request.get({ url: `http://192.168.0.63/static/wxa/config.json` });
  12. return res;
  13. }
  14. export default { login, getPhone, getJson };