tencentblueking/blueking-apigateway/api-standard

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

统一网络请求封装 (Axios):蓝鲸双协议兼容的 Axios 封装,自动处理旧版和新版 HTTP 协议

Install

npx vskill@latest install tencentblueking/blueking-apigateway/api-standard

SKILL.md

统一网络请求封装 (Axios)

蓝鲸体系处于 HTTP 协议升级过渡期,本封装自动兼容 旧版协议 和 新版协议。

⚠️ 核心规则

  1. 统一导出: 所有请求必须通过 src/api/http.ts 的实例发起
  2. 自动剥壳: 响应拦截器自动提取 data 字段
  3. 自动登录: 401 自动跳转登录页
  4. 统一错误: 错误信息统一通过 Message 提示

快速开始

typescript
// src/api/http.ts
import axios from 'axios';
import { Message } from 'bkui-vue';
const http = axios.create({ baseURL: '/api', timeout: 60000 });
http.interceptors.response.use(
(res) => {
const { data } = res;
// 旧版协议(有 code 字段)
if (data.code !== undefined) {
if (data.code !== 0) {
Message({ theme: 'error', message: data.message });
return Promise.reject(new Error(data.message));
}
return data.data;
}
return data.data ?? data;
},
(error) => {
if (error.response?.status === 401) window.location.href = '/login';
Message({ theme: 'error', message: error.message });
return Promise.reject(error);
}
);
export default http;

常见错误

错误解决
401 循环跳转登录页排除拦截器
数据双层嵌套删除多余的 .data

📦 按需加载资源

资源URI
完整实现./references/full-implementation.md

📦 可用资源

  • ./references/full-implementation.md
  • ./assets/http.ts
根据 SKILL.md 中的 IF-THEN 规则判断是否需要加载

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
55
Repository forks
45
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 Aug 2026, 2 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tencentblueking/blueking-apigateway/api-standard/badge)](https://verified-skill.com/skills/tencentblueking/blueking-apigateway/api-standard)

Something wrong with this skill or its page? Tell us.