1.0.2 • Published 8 years ago

ucshare v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

mobileShare

触发手机UC、QQ浏览器的原生的微信分享功能

npm npm

说明

安装

npm install --save ucshare

DEMO

var mShare = require('mshare');

/**
 * @param  {Object} config 配置对象  参数见示例
 *     var config = {
 *          title : 'Lorem ipsum dolor sit.'
 *        , url   : 'http://m.ly.com'
 *        , desc  : 'Lorem ipsum dolor sit.'
 *        , img   : 'http://img1.40017.cn/cn/s/c/2015/loading.gif'
 *        , type  : type // 1 ==> 朋友圈  2 ==> 朋友  0 ==> 直接弹出原生
 *     }
 */
var mshare = new mShare({
      title : 'Lorem ipsum dolor sit.'
    , url   : 'http://m.ly.com'
    , desc  : 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat inventore minima voluptates.'
    , img   : 'http://placehold.it/150x150'
});

$('button').click(function () {
    // 1 ==> 朋友圈  2 ==> 朋友  0 ==> 直接弹出原生
    mshare.init(+$(this).data('mshare'));
});