import http from '@whale.io/mini/es/http';
import { toast } from '../publicMethods';
import { urlConfig } from '../mock';
http.config.baseUrl = `${urlConfig}/client/b2b/`;
http.config.toast = toast; // 设置统一参数 appId

const {
  appId
} = my.getAppIdSync();

if (appId) {
  http.config.data = http.config.data || {};
  http.config.data.appId = appId;
}

export default http;