index.js 365 B

123456789101112131415
  1. import http from '@whale.io/mini/es/http';
  2. import { toast } from '../publicMethods';
  3. http.config.baseUrl = 'https://universe.alipay-eco.com/client/b2b/';
  4. http.config.toast = toast; // 设置统一参数 appId
  5. const {
  6. appId
  7. } = my.getAppIdSync();
  8. if (appId) {
  9. http.config.data = http.config.data || {};
  10. http.config.data.appId = appId;
  11. }
  12. export default http;