
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
hm-wkapi-taro
Advanced tools
$ yarn add wkapi-taro
import wkApi from 'wkapi-taro';
import React from 'react';
class App extends React.Component {
componentDidMount() {
const ext = getExtConfig();
wxApi.config({
appId: ext.appId,
appKey: ext.maAppId,
});
}
}
注意: 不需要调用 initLaunch、setContext。App、页面生命周期会自动监听
@connect(mapStateToProps, mapDispatchToProps, undefined, { forwardRef: true })
@hoc
class GoodsDetail extends WaitComponent {
// ...
constructor(props) {
super(props);
// 埋点:页面标识
// 取代旧的 ftBuryPageKey
wkApi.setBuryPageKey(buryConfig.ITEM_DETAIL.key);
// 埋点: 页面业务参数,供埋点sdk调用 **不能删除**
// 取代旧的 ftBuryLoadArgument
wkApi.setBuryPageLoadArgument(() => {
const { itemNo, activityType, activityId, distributorId, source } = this.state;
if (itemNo || activityId) {
return {
itemNo,
activityType,
activityId,
distributorId,
source,
};
}
return null;
});
}
// ...
}
Hooks 版本
function Foo() {
useSetBuryPageKey(buryConfig.ITEM_DETAIL.key);
useSetBuryPageLoadArgument(() => {
/*...*/
});
}
其余内容和旧版本保持一致
FAQs
惟客宝埋点 Taro 3.0 版本
The npm package hm-wkapi-taro receives a total of 0 weekly downloads. As such, hm-wkapi-taro popularity was classified as not popular.
We found that hm-wkapi-taro 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
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.