api.js 351 B

1234567891011121314151617181920212223
  1. const {
  2. api
  3. } = require("./apiConfig")
  4. function getApi(url, data) {
  5. return api(url, {
  6. ...data,
  7. loginAccountId: wx.getStorageSync('loginAccountId')
  8. }, "get")
  9. }
  10. function postApi(url, data) {
  11. return api(url, {
  12. ...data,
  13. loginAccountId: wx.getStorageSync('loginAccountId')
  14. }, "post")
  15. }
  16. module.exports = {
  17. getApi,
  18. postApi
  19. }