@dfeidao/fd-an000083

生成数字计算的验证码

Usage no npm install needed!

<script type="module">
  import dfeidaoFdAn000083 from 'https://cdn.skypack.dev/@dfeidao/fd-an000083';
</script>

README

生成数字计算的验证码

Installation

yarn add --dev @dfeidao/fd-an000083

Requires

使用本原子操作需要在feidao.json中routers下加入

{
        "URL": "/`@pathname`",
        "METHOD": "get",
        "SERVICE": "dataservice.nodejs",
        "DATA": {
            "modelid": "`@path`"
        }
}

@pathname为url访问地址,@path为服务路径

Example

<div id="box"></div>
// 服务中
import an83 from '@dfeidao/fd-an000083';
interface Message {
        cookie: {
            uk: string
        }
}
const options = {
    width: 100,
    height: 40,
    fontSize: 30,
    color: true,
    inverse: false,
    noise: 1,
    background: '#fff'
};
return an83(msg.cookie, options);
// 客户端中
import aw2 from '@dfeidao/fd-aw000002';

const raw2 = await aw2(`@pathname`, {});
const box = fd.data.node.querySelector<HTMLDivElement>('#box');
box.innerHTML = raw2;