castle-request
TypeScript icon, indicating that this package has built-in type declarations

1.0.13 • Public • Published

castle 请求库

安装

npm i -S castle-request

配置

import {set_server} from 'castle-request'
set_server('http://www.baidu.com/')

创建实例

import Request from './castle-request'
class Goods extends Request {
    _pk = "GoodsID"//设置主键
}
const r = new Goods();
export default r;

使用

import Goods from '../api/Goods'
console.log(await Goods.search())

/castle-request/

    Package Sidebar

    Install

    npm i castle-request

    Weekly Downloads

    1

    Version

    1.0.13

    License

    ISC

    Unpacked Size

    10.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • yanpengquan