Socket
Socket
Sign inDemoInstall

lcdp-app-engine

Package Overview
Dependencies
12
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lcdp-app-engine

灵犀低代码平台-app引擎包


Version published
Weekly downloads
1
Maintainers
2
Created
Weekly downloads
 

Readme

Source

使用方法

1、 lcdpApi 发送请求 拦截器 全局配置方法配置方法如下:

  import { lcdpApi } from 'lcdp-app-engine';

  const request = lcdpApi.fetch;

  const uploadRequest = lcdpApi.fetch;

  request.interceptors.request.use((url, options) => {
    return {
      url: `${url}&interceptors=yes`,
      options: { ...options, interceptors: true },
    };
  });

  request.interceptors.response.use((response, options) => {
    response.headers.append('interceptors', 'yes yo');
    return response;
  });

lcdpApi.fetch导出的是umi-request。具体使用方法可参考:umi-request

2、 更新用户信息

lcdpApi.setData('user', userInfo);

FAQs

Last updated on 12 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc