1.0.11 • Published 5 months ago

@besovideo/apifox-service-gen v1.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

当前包包含多个从apifox文档生成的typescript接口模块 和 必要的工具

// 接口文档 https://bvcsp.apifox.cn/
import bvcsp from "@besovideo/apifox-service-gen/bvcsp";

// 接口文档 https://bvnru.apifox.cn/
import bvnru from "@besovideo/apifox-service-gen/bvnru";

// 接口文档 https://bvalg.apifox.cn/
import bvnru from "@besovideo/apifox-service-gen/bvalg";

// 接口文档 https://bvworkorder.apifox.cn/
import bvworkorder from "@besovideo/apifox-service-gen/bvworkorder";

// 配置/工具库
import {ServiceGlobalConfig, ServiceGlobalUtils} from "@besovideo/apifox-service-gen";

示例

import { ServiceGlobalConfig, ServiceGlobalUtils } from "@besovideo/apifox-service-gen";
import { linkaction, auth } from "@besovideo/apifox-service-gen/bvcsp";
async function test() {
   // 工具库 登录加密
  const loginParams =
    ServiceGlobalUtils.PlatformLoginEncryPasswordWithTimestamp(
      "admin",
      "123456"
    );

  // 登录
  const loginResult = await auth.postBvcspV1AuthLogin({ body: loginParams });

  if (!loginResult.error && loginResult.data?.code == 0) {
    const tokenInfo = loginResult.data.data;
    if (tokenInfo && tokenInfo.token) {
      //设置token
      ServiceGlobalConfig.SetConfig(tokenInfo.token);
    }
  }

  // 修改报警联动
  const a = await linkaction.putBvcspV1LinkactionById({
    path: {
      id: 1,
    },
    body: {} 
  });
}
test();
1.0.12

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago