zoukankan      html  css  js  c++  java
  • 分享一个好用的微信npmjs包

    https://www.npmjs.com/package/jquery_wechat_sdk

    安装

    $ npm install jquery_wechat_sdk

    使用

    Browser

    Script tag

    <script src="jquery_wechat_sdk/index.js"></script>

    Browserify/Webpack

     
    var _w = require('jquery_wechat_sdk');
     

    AMD (Asynchronous Module Definition)

    define(["jquery_wechat_sdk"], function(_w) {
     
    });

    Babel

    Babel是下一代JavaScript编译器。其中一个特性是现在可以使用ES6/ES2015模块,尽管浏览器还没有本地支持这个特性。

    import _w from "jquery_wechat_sdk";

    Node

    jquery_wechat_sdk运行在node端,需要提供一个带有documentwindow,因为没有这样的documentnode中存在,所以可以使用jsdom,这样可以达到测试的目的

    npm install jquery_wechat_sdk
    require("jsdom").env("", function(err, window) {
        if (err) {
            console.error(err);
            return;
        }
     
        var _w = require("jquery_wechat_sdk")(window);
    });

    API

    jquery_wechat_sdk API

    https://www.npmjs.com/package/wechat-sdk-gen

    ## 安装

    $ sudo npm install -g wechat-sdk-gen
     
    $ npm install -g wechat-sdk-gen
     
    ## 使用
     
      Usage: wsg [options]
     
     
      Options:
     
        -V, --version                                                       output the version number
        -w, --wechatInfo [appid] [appsecrect] [timestamp] [nonceStr] [url]  get access_token and signature support
        -v, --version                                                       output the version number
        -h, --help                
     
    博客园怎么还不支持md
  • 相关阅读:
    网页调用手机端的方法
    文章分类和标签的数据库设计
    linux 查看进程所在目录
    php-fpm 解析
    php-fpm.conf 解析
    php-fpm 操作命令
    php 获取 post 请求体参数
    获取请求 header 中指定字段的值
    redis 限制接口访问频率
    redis 常用操作
  • 原文地址:https://www.cnblogs.com/goesby/p/8033435.html
Copyright © 2011-2022 走看看