
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ant-mini-flip-draw
Advanced tools
属性名 | 类型 | 默认值 | 描述 |
---|---|---|---|
prizeList | Array | [] | 奖项列表【必填】,须包含 name 和 icon 字段 |
prizeName | String | '' | 抽奖结果的奖品 name 【必填】,其值必须位于 prizeList 中 |
cardNum | Number | 9 | 展示多少张卡片,推荐3/6/9 |
cardHeight | Number | 210 | 宽度固定210,高度需要等比换算设置 |
cardBgImg | String | - | 卡背图片 |
unawardImg | String | - | 未中奖展示图片 |
isDrawing | Boolean | - | 是否正在抽奖,用于限制点击 |
flipAllCards | String | - | 是否翻转剩余卡片 |
onFlipStart | Function | () => {} | 转动开始的回调【选填】 |
视图:
<view>
<flipdraw
prizeList="{{prizeList}}"
prizeName="{{prizeName}}"
isDrawing="{{isDrawing}}"
flipAllCards="{{flipAllCards}}"
onFlipStart="onFlipStart"
/>
</view>
逻辑:
Page({
data: {
prizeList: [{
'name': '谢谢参与1',
'icon': 'https://zos.alipayobjects.com/rmsportal/dexmbhnbsLRGIZGBqTcA.png'
}, ... ],
prizeName: '',
flipAllCards: false,
isDrawing: false,
},
onFlipStart() {
console.log('开始了,这个时候最好页面控制下 loading 状态,组件内不做控制');
this.setData({
isDrawing: true, // 修改抽奖状态,防止重复点击多次请求
});
// 开始抽奖
drawRequest().then(res => {
console.log('拿到结果,设置奖品信息');
if (res.success) {
this.setData({
prizeName: '666元红包',
isDrawing: false,
});
} else {
this.setData({
isDrawing: false, // 抽奖结束一定要还原 isDrawing 状态
});
}
this.showResultDialog()
});
},
showResultDialog() {
// do something
this.setData({
flipAllCards: true, // 将剩下未翻过的牌自动翻,展示奖品结果。
})
}
});
FAQs
The npm package ant-mini-flip-draw receives a total of 2 weekly downloads. As such, ant-mini-flip-draw popularity was classified as not popular.
We found that ant-mini-flip-draw 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.