
Security News
/Company News
Socket Is Sponsoring Composer and Packagist
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.
@hbgj/common
Advanced tools
引入Promise支持推荐做法
| method | paramsType | return | description |
|---|---|---|---|
| App.getTicketList | JSON | url | 生成机票列表页链接 |
| App.getTicketDetail | JSON | url | 生成机票详情页链接 |
| App.getCouponsList | null | url | 生成优惠券列表页链接 |
| App.getHome | null | url | 生成首页链接 |
npm i @hbgj/common // 你可能需@babel/polyfill 但不推荐此做法
// import "@babel/polyfill";
import Common from "@hbgj/common";
const { Config, Util, App } = Common;
let params = _.extend({}, {
scty: "PEK", // 出发地三字码
ecty: "SHA", // 目的地三字码
date: "2019-12-01", // 去程
fdate: "2019-12-11", // 返程
cabin: "4" // // 4 经济舱,7 公务舱
});
// type 0 国际 1 国内
const url = App.getTicketList(params, {type: 0 });
import Common from "@hbgj/common";
const { App } = Common;
let params = _.extend({}, {
dep: "出发地三字码",
arr: "目的地三字码",
date: "2019-12-01", // 去程
fdate: "2019-12-11", // 返程
analyseSourceEntry: "统计参数",
no: '航班号,仅在app内使用',
shareid: '仅在h5中使用'
});
// type 0 国际 1 国内
const url = App.getTicketDetail(params, {type: 0 });
npm i -S es6-promise
plugins: [
new webpack.ProvidePlugin({
Promise: ['es6-promise', 'Promise']
}),
...
]
FAQs
hbgj 公共功能
We found that @hbgj/common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.

Research
/Security News
Benign-looking npm packages split malicious functionality across a dependency chain that deploys a cross-platform RAT targeting Alibaba developers.

Research
/Security News
Two Joyfill npm beta releases contain an import-time implant that uses blockchain transactions to retrieve a remote-access trojan.