vmax-request

0.1.10 • Public • Published

vmax-request

顶象数据可视化数据请求模块

目前支持三种数据源

  • static:静态数据源
  • api: 接口数据源
  • queryer: 标准查询器数据源

使用方式

import request from 'vmax-request'

request({
  type: 'static',
  static: {
    content: [1, 2, 3]
  }
}).then(data => {

})

request({
  type: 'api',
  api: {
    url: 'api地址'
  }
}).then(data => {

})

request({
  type: 'queryer',
  queryer: {
    server: 'http://服务器地址',
    id: 'queryer-app',
    conditions: [
      {
        field: "startTime",
        value: "2019/04/25 14:02:01",
        type: "DATE"
      }
    ],
    orders: [
      {
        type: "ASC",
        field: "accept"
      }
    ],
    page: {
      pageNo: 1,
      pageSize: 10
    }
  }
}).then(data => {

})

接口格式

{
  success: true,
  message: '',
  data: []
}

Readme

Keywords

none

Package Sidebar

Install

npm i vmax-request

Weekly Downloads

8

Version

0.1.10

License

none

Unpacked Size

36.4 kB

Total Files

19

Last publish

Collaborators

  • zenxds