envApi.js 345 B

12345678910111213141516
  1. import website from '@/config/index';
  2. //获取请求url
  3. export const getAppApiUrl = () => {
  4. let url = '';
  5. if (process.env.NODE_ENV === 'development') {
  6. //#ifdef APP-PLUS
  7. url = website.testApi;
  8. //#endif
  9. } else {
  10. //#ifdef APP-PLUS
  11. url = website.baseApi;
  12. //#endif
  13. }
  14. return url
  15. }