1.0.3 • Published 6 years ago

tf-weixin v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

微信接口封装

// 引入
import { wxInject, isWeixin, wxInvoke } from "tf-weixin";

// 判断是否微信
alert(isWeixin);

// 一般在刚进入页面的时候,注入微信相关sign信息
wxInject("url", { appId: "xxxx", secret: "yyyy" });

// 一般在点击某个按钮,调用微信相关接口
document.body.addEventListener("click", function() {
    wxInvoke("scanQRCode")
        .then(data => {
            console.log(data);
        })
        .catch(e => {
            console.log(e);
        });
});
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago