
Security News
Cline CLI npm Package Compromised via Suspected Cache Poisoning Attack
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.
gisquest-component-request
Advanced tools
npm install
私服的依赖(暂时在公网上,方便安装 npm i gisquest-component-request)
npm install gisquest-component-request --registry=http://192.168.11.146:8073/repository/npm-all/
添加环境变量文件 public/env.*.js 添加参数,确保改js被引入到index.html中 (星号代表环境变量名:env.development.js 【本地调试】,env.production.js 【打包后的环境】)
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<script src="./env.<%=process.env.NODE_ENV%>.js?t=<%= new Date().getTime() %>"></script>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
在 env.*.js 添加参数,
/**
* API路网关地址,作为整个程序的baseURL,如果没有网关,则为空
*/
window.apiGateway = '';
/**
* 单点登陆的认证地址
* @type {string}
*/
window.ssoUrl = '/tdcb';
如果不需要认证失败或成功后的处理,那么直接调用组件即可
import {request} from 'gisquest-component-request'
export function SubSystems() {
return request({
url: window.appAllotnum + '/allotnum/platform/subsystem', method: 'post'
})
}
请自己编写一个request.js
import {request} from 'gisquest-component-request'
function myRequest(args) {
return request(args, AuthSuccess, AuthFail);
}
/**
* 认证成功后的处理
* @param res
* @returns {Promise<AxiosResponse<any>>}
* @constructor
*/
function AuthSuccess(res) {
if (res != null && res.data != null && res.data.status == 200) {
}
}
/**
* 认证失败后处理
* @param res
* @constructor
*/
function AuthFail(res) {
}
export default myRequest;
在api中进行调用
import request from "../utils/myRequest"
/**
* 读取子系统
* @param params
* @returns {*}
*/
export function SubSystems() {
return request({
url: '/allotnum/platform/subsystem', method: 'post'
})
}
FAQs
只给前端使用的request封装包
The npm package gisquest-component-request receives a total of 0 weekly downloads. As such, gisquest-component-request popularity was classified as not popular.
We found that gisquest-component-request demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.