租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
385 B

6 months ago
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const requestInterceptors = (vm) => {
  4. common_vendor.index.$uv.http.interceptors.request.use((config) => {
  5. config.data = config.data || {};
  6. return config;
  7. }, (config) => (
  8. // 可使用async await 做异步操作
  9. Promise.reject(config)
  10. ));
  11. };
  12. exports.requestInterceptors = requestInterceptors;